I'm terrible with regex, but I've had a try and a Google (and even looked in reddit's source) and I'm still stuck so here goes:
My aim is to match the following 'codes' and replace them with the HTML tags. It's just the regex I'm stuck with.
**bold text**
_italic text_
~hyperlink~
Here's my attempts at the bold one:
^\*\*([.^\*]+)\*\*$
Can anyone point out why this isn't working? I'm using the preg syntax.
Thanks