Agree with Priyank that using a parser is a safer bet. If you do go the route of using a regex, consider how you want to handle edge cases. It's easy to transform the simple case you mentioned in your question. And if that is indeed the only form the markup will take, a simple regex can handle it. But if the markup is, for example, user generated or from 3rd party source, consider cases such as these:
foo --> foo # a bare anchor tag, with no attributes
# the regexes listed above wouldn't handle this
boldness --> boldness
# stripping out only the anchor tag
Upper\ncase --> Upper\ncase
# and obviously the regex should be case insensitive and
# apply to the entire string, not just one line at a time.
boldbar --> boldbar
# cases such as this tend to break a lot of regexes,
# if the markup in question is user generated, you're leaving
# yourself open to the risk of XSS