diff --git a/content/notes/regex-feature-creep-considered-non-harmful.md b/content/notes/regex-feature-creep-considered-non-harmful.md new file mode 100644 index 0000000..2687d32 --- /dev/null +++ b/content/notes/regex-feature-creep-considered-non-harmful.md @@ -0,0 +1,16 @@ +--- +title: "Regex feature creep considered non-harmful" +date: 2023-08-26T15:00:22-07:00 +replyURI: "https://akko.wtf/objects/14ffd986-060f-4bf9-9339-f26b1a3ecf5c" +replyTitle: "“regular” expressions" +replyType: "SocialMediaPosting" +replyAuthor: "Chjara" +replyAuthorURI: "https://tuxcrafting.online/" +#syndicatedCopies: +# - title: 'The Fediverse' +# url: '' +--- +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](https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines). +