3 ms·
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*%
by chinpokomon 12y ago
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 http://www.regexper.com/#%2F(%5Cd)%5CD*%24%2F
- ygra 12y agoTechnically, 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.)