I am creating a RegEx-based parser for Markdown. While working on RegEx, to find link labels in link style, I ran into an error in my RegEx that I don't see a problem with.
Given the following Markdown:
[me]: http://example.com
[her]: http://somewhere.com
[1]: http://nhs.net
[2]: http://test.com
[google it]: http://google.com
And this RegEX:
\[(\w+\s?+\w+)\]
It seems I can only detect [me], [her] and [google it], but not the tags [1] and [2]. I thought I \wshould detect both alphabetic and numeric characters?
Edit: Using the PCRE RegEx parser
Garry source
share