I want to achieve what stack overflow does, so you can do _italics_ and *bold* and it changes it to <em>italics</em> and <strong>bold</strong>, however, I’m a beginner to regex, and i’m having a hard time writing the regex replace for this.
Thanks in advance ->
Will
StackOverflow uses Markdown to transform the syntax you reference (and more!) to HTML markup. You’d be wise to use this framework, or one like it, rather than rolling your own – why go to all that effort to reproduce something that works well?
If you do decide to roll your own, use something besides regular expressions, like a state machine – regular expressions will get complicated very quickly for task of this complexity.