Re:Why Using .* in Regular Expressions Is Almost Never What ...
by ygra on Wednesday June 04, 2014 @10:46AM
(#7845816)
Technically, while they both capture the same digit, the match itself it different, including either everything before that digit or everything after it. But I tend to liberally use lookaround to keep the actual match clean myself; maybe others go more often for a capturing group. (Well, and not being able to use arbitrary-length lookaround in most engines might be a reason too.)
http://www.regexper.com/#%2F(%5Cd)%5CD*%24%2F