News for hackers. Stuff that matters.
Re:Why Using .* in Regular Expressions Is Almost Never What ... by chinpokomon on Wednesday June 04, 2014 @10:36AM (#7845756)
As others before me have said, this pattern works as expected. Putting it through regexper, you can visually see this.

http://www.regexper.com/#%2F(%5Cd)%5CD*%24%2F

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.)