I am up against a MS Word text formatting problem and wondered if there were any Regular Expression geeks who also use MS Word out there (unlikely, I know...)
I am trying to wrap a sentence that appears in italics in Word, using XML markup, e.g.
Text in italics
would become
<i>Text in italics</i>
I can do it for individual words, e.g.
<i>Text</i> <i>in</i> <i>italics</i>
but am having a tough time working out how to find the beginning and the end of a group of italicized text, rather than just individual words.
The only solution i have so far is to export the MS Word doc as wML and do the following:
<w:r w:rsidRPr="00FE6181">
<w:t><hi></w:t>
</w:r>
<w:r w:rsidR="00D555A7" w:rsidRPr="00D77C71">
<w:rPr>
<w:i/>
</w:rPr>
<w:t xml:space="preserve">Text in italics</w:t>
</w:r>
<w:r w:rsidRPr="00FE6181">
<w:t><</w:t>
</w:r>
and then reopen the doc in word. It's just a bit involved to roll out as a solution to a non-technical user.
It looks like this should be possible using RegExps (or maybe VBScript) I just don't know how to get there.
Any help appreciated
thanks