I want to capture all occurrences of a letter, followed by a digit, but no letter before the above letter.
So, there is a f9
match in f9
, 3f9
, f99
, but not in af9
.
I have the following regex: ([^a-z]|^)([a-z])(\d)
.
Why doesn't it match both f9
and x0
in f9x0
and how to achieve this? It matches only f9
.
In f9 x0
there are two matches.
Thank you.