3 ms·
Yes, but that's harder to do for more complicated regexes, because you need to negate a regex (here \d => \D) for this trick. If you have a complicated regex $
by perlgeek 12y ago
Yes, but that's harder to do for more complicated regexes, because you need to negate a regex (here \d => \D) for this trick.
If you have a complicated regex $r, you can only negate it with (?:(?!$r).), and in that case, .$r is much easier to read :-)