Reputation: 7151
I need to replace all italicized text in a Word document with that same text wrapped in <em>
tags, such as:
Original: The fox jumped over the dog.
Replaced: The <em>
fox</em>
jumped <em>
over the dog</em>
.
I can see how to search for the italicized text, but how can I specify the original found text in the Replace: dialog? Word supports regex, so I was trying something along these lines:
Find: (*)
(w/ italic Font turned on)
Replace: <em>\1</em>
But instead of wrapping any italic string in em tags, it wraps every single character that is italic in an tag.
Thanks for any help. Note: yes, I could probably do this in another editor more easily; however, for a variety of reasons I need to leave it in Word.
Upvotes: 1
Views: 1502
Reputation: 31
A bit late, but here is the thing:
^&
.<em>^$</em>
Upvotes: 3