3 ms·
How many times have you actually written a regular expression that matches a bell, versus how many times have you had to explain to people that \a matches a bel
by DonHopkins 10y ago
How many times have you actually written a regular expression that matches a bell, versus how many times have you had to explain to people that \a matches a bell while \A matches the beginning of the string (which we know is at least once)?
- berntb 10y agoThe discussion was \z contra \Z. I always clear out the new lines and use \Z, so I never bothered. The ASCII table used to be the alpha and the omega. :-) That is, it was not so much of unnecessary extra detail when the char codes was inserted into Reg exps. The newfangled Regexps and grammars of Perl 6 cleaned out a lot of lint. You could probably make an argument for starting to remove, not only add, [more] features when you declare a perl version in a script. (And personally, I only ever used \n, \r, \t and similar. Everything else is as Cthulhu meant it to be, octal. Regular expressions' problem always was readability, I never used more features than I need and /x is my friend. That said, the "modern" Perl 5 regular expressions are like grammars, really cool.)