#regexps — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #regexps, aggregated by home.social.
-
Best answer on regexps ever? 🧐 😎
- What is the plural form of regex?
- If you've used more than one of them, you'll know that the plural of "regex" is "regrets." – cjs (Mar 14, 2022 at 23:46)
#regex #regexps #programmer #programming #devops #regularexpression
-
@neustradamus #PCRE continues to be a misnomer; it’s a modified subset of #Perl #RegularExpressions with dozens of differences: https://pcre.org/current/doc/html/pcre2compat.html
It's not "(C)ompatible." Accept no substitutes: https://perldoc.perl.org/perlre
#PCRE2 #PerlIncompatibleRegularExpressions #RegularExpression #RegExes #RegExps #regex #regexp
-
Spent half a day polishing complex #regexps in #vim . And they work too, but perl has a little different standard, so I'm basically stuck in grep -p punching a file until it works. As they say in #taoup , sometimes you just have to brute force prototype. #unix #bashcore #hobbylinguist #hobbytranslator
-
@Codely @drupler It helps to build your complicated #RegularExpressions in pieces and store them in separate variables. You can then test them in isolation and not be confused when you concatenate them together for your actual matching.
Both #PHP and #JavaScript also support named capture groups if you’re doing replacements. They’re a lot more readable.
Also, PHP’s #PCRE-based engine has a PCRE_EXTENDED flag that lets you add whitespace, newlines, and comments.