#regularExpressions

2026-01-24

Pyparsing-based regex inverter (a static page written using PyScript) is live at ptmcg.github.io/regex_inverter/ #python #pyparsing #regularexpressions #regex

2025-12-04

@bytebro

Are you sure that it was #Wikipedia? Because this is the sort of thing that has endless modern GitHub and #StackExchange posts, and a claim that there was an official government regular expression at one point in the past.

stackoverflow.com/a/51885364/3

github.com/stemount/gov-uk-off

Whereas Wikipedia has had the British Standard mentioned for almost 20 years at this point, not 15.

Before then it had a haphazard half-arsed list of #RegularExpressions, where every so often someone had come along and appended text saying that "well, actually, the aforegiven does not work; *this* is the *more complete* regular expression".

en.wikipedia.org/wiki/Special:

It had grown 4 times in that way with a succession of invented regular expressions, each one described as "more complete" than the last, by the time someone came along with the #BS7666 one in 2006 and switched from Perl syntax to standard POSIX syntax.

en.wikipedia.org/wiki/Special:

The "Well, actually"s were gradually approaching it.

#postcodes

2025-11-17

The episode came out on time (Saturday) but this announcement is a bit late because of travel. It’s another episode of our #Technology #Podcast, @RuntimeArguments.

Jim (@jammcq) did the research and does the presentation in this episode; Wolf (@YesJustWolf) asks the questions! This episode, Jim tells us all about #POSIX! What does the word mean, where does the idea come from, how did we get here, how it touches you today, and if it should influence what tools you use, how you use them, and anything you build on top of them!

Get it in all the usual places. Send us feedback to feedback@RuntimeArguments.fm.

Also, #RegularExpressions are a programming "cheat code". They should be in your toolbox!

Michel Marianimikaeru
2025-11-06

[Follow-Up]

Reference links:

- UTS #18: Unicode Regular Expressions
🔗 unicode.org/reports/tr18/

- UTS #18: Unicode Regular Expressions [Proposed Update]
🔗 unicode.org/reports/tr18/propo

- Issues - tonton-pixel/unicopedia-plus - Codeberg.org
🔗 codeberg.org/tonton-pixel/unic

David Schultzdavidschultz
2025-10-10

Raku: The match of a regex is automatically stored in $/, and this variable then also provides access to the text before ($/.prematch), to the text after ($/.postmatch), and to the match's position ($/.from and $/.to). Nice.

docs.raku.org/language/regexes

2025-08-22

Today I learned that regular expressions have a size limit and you get a “regular expression too large” error if you go over it.

Still trying to find some definitive documentation on what that size limit is in v8/latest Node.js.

#web #dev #JavaScript #regularExpressions

2025-08-06

@cks

Warning: rabbit hole

polymaths.social/@rl_dane/stat

You'll recognize this one as well, no doubt. There's probably an old Usenet FAQ somewhere with it, although I haven't checked.

But it got me to thinking of when the idea of a-z collating *entirely after* A-Z became a norm; only to falter again when ASCII systems met other countries. When the era was.

I checked with a couple of my old printed dictionaries from the 20th century, and they had case-insensitive collation in English. One even put 'a' ahead of 'A'.

It's definitely thus an #ASCII notion, but did it pre-date #Unix? Did it pre-date regular expression syntax? Or shell globbing?

My initial educated guess would be that the golden period of A-Za-z was the middle 1960s with ASCII and some Unix predecessor to the early 1990s when all of the books/posts/whatnot on the new Standard C were spreading the knowledge of locales.

#UnixHistory #retrocomputing #locales #collation #RegularExpressions #fnmatch

2025-07-17

Alternative to regex. String matching and parsing, find and parse files. hackernoon.com/regex-is-a-70-y #regularexpressions

2025-07-13

I got less traffic for my Python article than I expected, so I added "Python" to the title, and inserted some section headers to break things up a bit, and make the flow of my thinking a bit clearer.

I was pretty happy with how this project turned out. This decorator makes the re.sub function simpler to work with. The decorator simplifies the re.sub API, wrapping your own function that takes in strings and returns a string. medium.com/@ptmcg/re-sub-as-a- #python #decorators #regularexpressions

Two Python snippets, showing before and after using the @re_sub decorator to simplify using the re.sub function. The first snippet shows the standard usage, creating a function that takes an re.Match object, and returns a string with the content that should replace the content matched by the regular expression. The first snippet also contains a function that calls re.sub with its 3 required arguments: a str containing the regular expression, the function to call for each match, and the string to be processed with the regular expression and the transforming function. The second snippet shows how the re_sub decorator encapsulates all this logic, so that only the regular expression and a simplified converter (using only Python strings instead of re.Match objects) need to be defined.
Jeff Fortin T. (風の庭園のNekohayo)nekohayo
2025-07-08

I wanted to append a prefix to the beginning of the contents of a bunch of cells in Calc, and the "simplest" way I found to do that today (from what I saw as recommendations in forums like StackOverflow and Reddit)… was to use regexes 🤮

So, to prefix the contents, I searched for:
^(.)

…and replaced by:
The string you want to add as a prefix $1

I feel dirty.

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.

Client Info

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