# RegExp Guru

**URL:** <https://forum.kirupa.com/t/regexp-guru/284291>\
**Category:** flash\
**Created:** [March 17, 2009, 5:08pm UTC](https://forum.kirupa.com/t/regexp-guru/284291 "2009-03-17T17:08:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![creatify](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@creatify](https://forum.kirupa.com/u/creatify)\
**Post date:** [March 17, 2009, 5:08pm UTC](https://forum.kirupa.com/t/regexp-guru/284291/1 "2009-03-17T17:08:58Z")

</div>

I’m utilizing CMS content within Flash. The CMS has been trimmed down to allow very low level formatting bold, underline, italic.

I need to keep the formatting within the content for printing purposes in coordination with device fonts - so everything is good there.

However, for custom embedded fonts, I’m having to parse/replace the formatting. I’m not that great with RegExp, so looking for some help. I can easily set up RegExp for each of the potential formatting tags, but know there has to be a more efficient way - maybe not without possible bugs, not sure.

Tags needing replaced:

```auto

<span style="font-weight: bold;">

<span style="font-style: italic;">

<span style="text-decoration: underline;">

<span style="font-weight: bold; font-style: italic;">

<span style="font-style: italic; font-weight: bold;">

<span style="text-decoration: underline; font-weight: bold;">

```

the problem is, styling may appear within any order:

```auto

<span style="text-decoration: underline; font-weight: bold; font-style: italic;">
<span style="font-weight: bold; text-decoration: underline; font-style: italic;">
<span style=" font-style: italic; text-decoration: underline; font-weight: bold;">

```

Basically, I need to parse and replace each of these options with the appropriate custom CSS class I’ve set up.

\<span class=“uib”\>

any help is much appreciated!
