I'm stumped. I've got two regexs that are doing what I need individually, but I'm not sure how to get them to work in conjunction.
\b([a-zA-Z])?\d{5}\b
is correctly finding strings in the pattern of an optional single letter followed by 5 digits.
<a\s+(?:[^>]*?\s+)?href="([^"]*)"
is matching the URL in an anchor tag.
Now what I want to match on (for replacement purposes) is the 5 digit number (with or without the preceding letter) that occur within the URL of an anchor tag.
Sample content:
<a href="/uploads/2014/04/Draft-99990-Details.doc">Draft 99995 Details</a>
<a href="/uploads/2014/04/01090-vs-G01010-series.pdf">01095 vs G01015 Series</a>
There should be 3 matches in this text, the 3 numbers ending in 0 and not those ending in 5.