PDA

View Full Version : format changes with regexps



Gabor
02-23-2007, 05:02 AM
Could somebody please help me with regular expressions?
I have a long text to work on. I have to apply my own formatting but I wish to retain the italics of the original. The italics are either single words or passages of different lengths.
My idea is to make a series of changes throughout the whole text like this first:

This is a big house.
This is a #big& house.

I.e. the text in italics is to be given a prefix (an unused special character) and a suffix (a different unused special character). Any character may be OK which is not misinterpreted by Word.
Then I apply my own formatting to the whole text.
Then I would like to make a series of changes throughout the whole text like this:

This is a #big& house.
This is a big house.

Unfortunately I have never been able to understand the ?soul? of regexps and therefore I am completely at a loss now. However I can usually modify existing macros so if I am pointed to a relevant site with examples it is also valuable guidance for me. Any help would be highly appreciated. Thanks.