ma_roberge
09-30-2016, 12:40 PM
I need to be able to insert unbreakable spaces between (1) a name and a roman numeral and (2) the word "op." (opus) and a number. I have the following find and replace strings with wildcards checked:
Find: ([A-Za-z])( )([CDILMVX]){1;}, Replace: \1^s\3
Find: ([op.])([ ])([0-9]), Replace: \1^s\3
My problem is that more than I need gets an unbreakable space, because Word/VBA does not understand that it should not pick any letter in the find strings and consider them valid matches.
"Louis XIV" needs a space, but "tell Vincent" does not; and "op. 12" needs one, but "pop 12" does not.
Is there a way to achieve what I want, or is Word's implementation of regular expressions not complete enough? Thanks in advance.
Find: ([A-Za-z])( )([CDILMVX]){1;}, Replace: \1^s\3
Find: ([op.])([ ])([0-9]), Replace: \1^s\3
My problem is that more than I need gets an unbreakable space, because Word/VBA does not understand that it should not pick any letter in the find strings and consider them valid matches.
"Louis XIV" needs a space, but "tell Vincent" does not; and "op. 12" needs one, but "pop 12" does not.
Is there a way to achieve what I want, or is Word's implementation of regular expressions not complete enough? Thanks in advance.