I need to find and replace tags in an HTML string. What I need is to find few specific custom tags (tagA, tagB, tagC), and replace them with other strings, different for each tag.
What will be more efficient?
- To run a Regex find and replace for each tag
- run one regex search to find all tags, iterate each result and look for its type be the tag name
- other way that I didn't think of
Thanks