I want to change the spacing on citations in my document. They currently look like:

something [1]

And I want them to look like:

something[1]

There are dozens of citations in my document, so I would like to use the find feature in Word to make this less tedious.

From reading this I tried to make a wildcard that would match, but it doesn't work.

Find: ([A-z]@>) (\[[0-9]*\])

Replace: \1\2

The Find doesn't work. So, I do not know if the Replace will either. What am I missing? Thanks for your help!


Edit: here is what I get when I enter ^w:

^w is not a valid special character

link|improve this question

67% accept rate
Try replacing ` ([[0-9]+])` with \1. In regex, the asterisk means zero or more, while the plus means one or more, so you’ll want to indicate that there must be a number between the brackets. (In VisualStudio, there is an option in the Find dialog to use either basic wildcards or regex, so I imagine that Word does as well.) – Synetech Mar 17 '11 at 21:58
I am afraid there isn't such an option for Word. It would be nice... – wdkrnls Mar 21 '11 at 18:29
feedback

1 Answer

Word uses special characters in search and replace. If you are just trying to remove any white space before any instance of an open square bracket you can replace ^w[ with [. ^w is Word's way of representing white space for purposes of a find.

link|improve this answer
Sorry, I wasn't able to get ^w to work in Word. I tried "^w" and Ctrl-w. Neither of them worked to detect whitespace. – wdkrnls Mar 20 '11 at 19:16
Which version of Word were you using, and did you uncheck the wildcard option? – Jason Aller Mar 20 '11 at 23:43
I am using Word 2007. – wdkrnls Mar 21 '11 at 18:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.