Hi All!
I am playing with markdown, dealing with inline markers and escaped characters.
Problem:
I want to transform this: some text *some number \* other number* more text
Into this: some text <strong>some number * other number</strong> more text
My current pattern is: /((?!\\)\*)(.*?)((?!\\)\*)/g
But the (.*?) group seems to capture the \ character, so the third group finds the second * character and stops looking for the third one, which should be its target.
Possible solution:
I can solve this problem using negative lookbehind: /((?<!\\)\*)(.*?)((?<!\\)\*)/g, but I'd like to avoid it, if it is possible.
Can I modify my other pattern to make it work?