1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-27 14:12:09 +00:00
seirdy.one/content/notes/regex-feature-creep-considered-non-harmful.md
2023-08-26 15:06:35 -07:00

1.4 KiB

title date replyURI replyTitle replyType replyAuthor replyAuthorURI syndicatedCopies
Regex feature creep considered non-harmful 2023-08-26T15:00:22-07:00 https://akko.wtf/objects/14ffd986-060f-4bf9-9339-f26b1a3ecf5c “regular” expressions SocialMediaPosting Chjara https://tuxcrafting.online/
title url
The Fediverse https://pleroma.envs.net/notice/AZ8TzJQpYkHFYzw0CO

De-facto standard extensions for recursion and variable-length look-arounds have existed for ages; the word "regular" in most regular-expression engines is there for historical reasons. I first read about this in {{}}{{}} by {{}}{{}} (he loves his biblical terminology).

I would like to just use Raku rules for a concise way to describe more advanced grammars; I'd then just keep my regexes to the PCRE subset that's common between Google's RE2 and the Rust regex crate. I doubt they're both "regular" but both guarantee linear time matching. Part of the reason I don't do this is portability. Not everything runs Raku, but almost every platform has a regex engine with the features I need.