Help with a Find/Replace in Word
July 7, 2008 9:52 AM Subscribe
I’m at the end of my rope trying to figure out how to write a find/replace expression in MS Word (syntax is similar to regex)
I need to turn this:
[xv][#AuthorA:2001] text text text text text [123][#AuthorB:2000] text text text text [456-78][#AuthorC:1999]
into this:
{AuthorA:2001@xv} text text text text text {AuthorB:2000@123} text text text text {AuthorC:1999@456-78}
Searching for \[(*}\]\[#(*)\] and replacing with \{\2\@\1\} doesn’t work (the search isn’t specific enough and will match "[xy][#AuthorA:2001] text text text text [123]" which screws up the replace).
Can anyone help me figure this out? Alternately, is there any kind of expression builder that could help with this? I am very much not a programmer of any kind. THANKS!
posted by agent99 to computers & internet (6 answers total) 2 users marked this as a favorite
[Pages][#Author:Date]
into
{Author:Date@Pages}
Find: \[(*)\]\[#(*):([0-9]{4})\]
Replace: {\2:\3\@\1}
That should work. I successfully tested it on Word 2007.
posted by jedicus at 10:24 AM on July 7, 2008