#RegularExpressions

2025-06-09

While searching for J.A.Brzozowski 1964 paper to correctly cite it in the documentation of some scanner implementation based on derivatives of I found the S.Owens, J.Reppy, and A.Turon which happily describes exactly what I remember from a compiler construction course back in the day. This seems to be a nice and good write-up for anyone interested in that kind of stuff.

dl.acm.org/doi/10.1017/s095679

Princess Serena Star ✨Starcross@mk.absturztau.be
2025-05-30

How do I use regular expressions to mute specific terms without muting them if they're just part of a word?
So like, in a stupid example:
I want to block "lol" but not "testloltest"
#regularexpressions #regularexpression #sharkey #misskey #wordmute

suzunenakal
2025-05-13

Wieso machen wir nicht mit ?

Kolleg(inn)?en
Mitarbeiter(innen)?

Ist doch viel einfacher und logisch nachvollziehbar. 👍

rk: it’s hyphen-minus actuallyrk@well.com
2025-05-09

I have written regular expression engines, in multiple languages and with various performance guarantees. I have written multiple peer-reviewed academic papers on regular expressions, and presented at multiple conferences on them. I was invited to lecture on regex transformations for multiple three-letter agencies.

Anyway yeah any time I write a regex I fuck it up.

#programming #regularExpressions

Chris Mackay 🇨🇦tantramar
2025-04-12

You know how you can understand something like Regular Expressions (Grep) well enough to write really complex statements that precisely match the nuanced text patterns you’re hoping to revise, but then 6 months later you look at this RegEx you wrote and can’t parse it at all? Like, literally no idea how it works? As in it-would-be-faster-to-recreate-it-from-scratch-than-to-understand-it-enough-to-change-it-even-slightly?

I feel like that all the time.

2025-03-24

I am very proud to show off my newest video! I’ve had a lot of thoughts about how something like #RegularExpressions could be implemented in a limited #esolang like #Funciton but I never took the time to actually implement it... until I ran into Day 3 of #AdventOfCode 2024, which provided a challenge best solved with a #regex. Enjoy! youtube.com/watch?v=ImzcTmB0m0

Stuart McHattie 👨🏼‍💻sdjmchattie@hachyderm.io
2025-03-23

Hi all, this week’s blog post is about regular expressions. If you’ve been wondering how data scientists manipulate text quickly or you find yourself needing to find information in text and the thing you’re looking for follows a pattern, maybe you can benefit from learning more about regular expressions.

sdjmchattie.github.io/posts/20

#blog #regex #regularexpressions #productivity #textmanipulation

Rainer "friendica" Sokollrainer@friendica.sokoll.com
2025-03-07

Nach Zeichenketten greppen, die exakt einen Punkt enthalten.
grep -E '^[^.]*\.[^.]*$' - sieht erstmal komisch aus, aber wenn man es aufdröselt, dann doch nicht. Gehirnschmerzen verursacht allerdings [^.]* - denn [^.] kann natürlich auch eine leere Menge sein, also bedeutet [^.]*auch: "nichts keinmal". Ja, schon klar, das ist formal absolut korrekt. Aber mein Hirn quietscht.

#grep #regularexpressions

Patrick Johanneson 🚀 🇨🇦pjohanneson@mstdn.ca
2025-02-25

This worked on the first try.

:%s/^\(.*@[^"]\+"\),.*/\1/g

#RegEx #RegularExpressions #vim

I fully expect two kinds of responses to this:

  1. What is this, amateur hour?
  2. What the fuck is that?
SkaladSkalad
2025-02-18

and are fun. Trying to map one set of unique identifiers against another, on a dataset that has discernable patterns but too much variability to do a simple Excel formula. Sometimes there are spaces, sometimes it's one to many. Also, the boss keeps tweaking his ask. Since it's working it a) makes it look like I know what I'm doing and b) is essentially getting to do puzzles on the clock. My opinion will, of course, change if it stops working.

Dr. Juande Santander-Velajuandesant@astrodon.social
2025-02-03

Just had to rename a bunch of files underscore-separated timestamps, and did a Python gist to facilitate this task to myself in the future.

gist.github.com/juandesant/16c

#Python #FileOperations #FileRenaming #RenamingFiles #OsRename #OsListdir #ReSub #RegularExpressions #RegEx #RegExp #RegExSubstitution

Pragmatic Bookshelf 📚pragprog@techhub.social
2025-01-23

New at PragProg

Staffan Nöteberg helps you really understand how the machinery works under the hood. Learn advanced tools like reluctant, lookbehind and nondeterministic finite automata to write efficient and elegant regexes with ease.

In this illustrated guide, you gain precisely that understanding., even with no prior knowledge of Regular Expressions.

pragprog.com/titles/d-snrem

@staffannoteberg

#regularexpressions #patternmatching #regex #regexp #textprocessing

2025-01-23

There is the possibility to change the case-sensitivity for a part of a regular expression. If this is something new for you, read a use-case article: kudashevs.com/posts/2025/01/pc

Doughnut Lollipop 【記録係】:blobfoxgooglymlem:tk@bbs.kawa-kun.com
2025-01-17

At a past position, the team I was on had a #regex that was several kilobytes in length in several products. It was the stuff of nightmares! :blobfoxscared: We only managed by splitting their definition strings into multiple pieces that were assembled kind of like a puzzle. :blobfoxgooglymlem:

That said, it was also an amazing learning experience and taught me about things to be extremely careful about, like don’t go too deep with the nesting of groups, and definitely don’t sprinkle deeply nested groups with the Kleene star or anything else that is unbound in length or repetition. :blobfoxscared: :blobfoxdeadinside:

(I still love #RegularExpressions for their power, though. :blobfoxgooglytrash: )

#RegularExpression #regexes #work

Steven Sandersonspsanderson@rstats.me
2025-01-10

🛠️ Struggling with text manipulation in Linux? My new article at spsanderson.com/steveondata/po breaks down Regular Expressions into easy-to-understand concepts! Perfect for beginners looking to enhance their skills. 📚💡

#Blog #RegEx #regularexpressions #Programming #Linux #code

Share your thoughts in the comments!

A terminal window with a dark theme displaying a command to match phone numbers in the format (XXX) XXX-XXXX using the grep command. The command shown is:
grep -E '^$[0-9]{3}$ [0-9]{3}-[0-9]{4}$' phonelist.txt.
Above the command, a comment reads: # Match phone numbers in format (XXX) XXX-XXXX. The background is a gradient of light gray to blue, creating a clean and modern look.
2024-12-13

Weekend reading for code obsessives, based on my current work adding semi-full regular expressions to Quamina. Two blog entries, coding recommendation, and a quiz/challenge.
1. QRS: Quamina Regexp Series - tbray.org/ongoing/When/202x/20
2. QRS: Parsing Regular Experssions - tbray.org/ongoing/When/202x/20

[If you don’t know what a “regular expression is”, please ignore this, and don’t feel bad, because nobody should have to know that.]

#software #regularexpressions

Quiz · Just for fun, here’s an intellectual challenge. Suppose you’re building a byte-at-a-time state machine to process UTF-8 text. How many states, roughly, would it take to match ., i.e. any single Unicode code point? By “match” I mean reject any byte sequence that doesn’t, and when it does match, consume just enough bytes to leave you positioned after the . and ready to start matching whatever’s next. ¶
I think I’ve found the correct answer. It surprised me, so I’m still sanity-checking, but I think I’m right. I am convinced the problem isn’t as simple as it looks.
Anachron :void:Anachron@fosstodon.org
2024-12-12

If my wife knew how long and often I fight with #regularexpressions she would probably be jealous.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst