News for hackers. Stuff that matters.
Re:Why Using .* in Regular Expressions Is Almost Never What ... by perlgeek on Wednesday June 04, 2014 @03:47PM (#7847718)
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 :-)

There are no comments on this comment yet.