There is a better way to simplify this Regex to a more terse format, but I can't seem to implement character groups properly for reuse. Any other recommendations for how to better go about accomplishing this match would be apprecitated.
Intended match:
<Formatting Type="B">any text</Formatting>
This could be nested within other Formatting tags like so
<Formatting Type="B"><Formatting Type="I">any text</Formatting>any text</Formatting>
The following Regex does the trick, but seems more complicated than it should be, as I am repeating myself with this section three times
The end goal is to replace all instances of <Formatting
with standard HTML tags <B> <I> <U>
etc.
[\040\w!\?\:\.]*
Overall Regex is the following
<Formatting Type="[BIU]{1}">([\040\w!\?\:\.]*(<[BIU]>)*[\040\w!\?\:\.]*(</[BIU]>)*[\040\w!\?\:\.]*)*</Formatting>