Say I have a string:
\foo\junk\f0\morejunk\
How can I extract 'f0' from it using regex? I essentially only want to match an 'f' followed by a number, without it getting caught on strings beginning with 'f' not followed by a number.
I have tried the following:
(?<=f)(\d*)
But this gets stuck on the first 'f' in the string, 'foo' and doesn't match the latter case of 'f0'. How can I put a quantifier on a lookbehind to match the string I want?
another option could be to split the string by the '\' delimiter and try to match each split, but this seems unnecessary?