View Single Post
 
Old 04-26-2009, 11:33 AM
chgeiselmann chgeiselmann is offline Windows 7 64bit Office 2010
Novice
 
Join Date: Apr 2009
Location: Munich
Posts: 3
chgeiselmann is on a distinguished road
Default Regex in Word: Replaced strings are in disorder

Dear all,

I have a problem with the search/replace tool in MS Word (Word 2000, on a Win XP SP2 machine).

I am using pattern maching (regular expressions, regex) in order to search strings in long texts, and replace it.

For example I would be looking for (Mouse)([a-zA-Z0-9]) and replace it with \1 \2 {mind the space between the two variables!}, meaning: 'Search for things like "Mouse3" and replace it with "Mouse 3" ' and so on. (This is just an example.)

My problem: Various weeks ago this stoped to work as it should (and as it actually did). Since then, the output strings are invariably in a strange disorder. Instead of "Mouse 3" something like "Mouse3 " appeears. [In this case: the space is put on the end instead of the middle of the string. - This is so not only with spaces but with any characters.]

This appears in all kinds of search/replace strings.

I have been asking for help in other forums, but nobody had a similar problem, or an explication, or a workaround.

Any idea what could be the reason?

Thank you for your help,

Christian
Reply With Quote