I am trying to create a regular expression that searchs for all html tags and attributes that start with 'mso', ending with a semi-colon. If found, it would replace it with an empty string.
eg. Input string:
<span style="font-family: Arial, sans-serif; font-size: 11pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">My text goes here</span>
<span style="font-family: Arial, sans-serif; font-size: 11pt;">My text goes here</span>
All the attempts I have tried have yielded no results. I have tried: (\bmso)\w*[;]\b and this - \bmso\w+(?=;\b) among many other variations of the two. Any help would be appreciated.
View Complete Post