(?=\d) is a lookahead assertion.
In order to check for the presence of a digit before the rest of the match, you need a lookbehind assertion: (?<=\d)
See perlreref#EXTENDED-CONSTRUCTS for an overview of the different look-around constructs.
In reply to Re: zero-width assertions for extended regular expressions
by smls
in thread zero-width assertions for extended regular expressions
by johnrcomeau
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |