2
votes

I have an MS Word document full of references in square brackets in a format like this – Lorem ipsum [1] dolor sit amet [2], consectetur adipiscing elit [3]. ... Proin eu auctor lectus [99].

I'd like to delete all of those, probably using regular expression, but square brackets have a special meaning in MS Word's regexp. I tried [ \[ (0-9){1,} \] ] but it does not produce what I'm expecting.

Any ideas?

1

1 Answers

2
votes

I just tried this one in Word 2010 with your example text and this worked for me:

(\[[0-9]*\])

It searches for a open square bracket \[, followed by numbers [0-9]* and a closing square bracket \], brackets escaped by a \

See office help for more detailed information about regex in word.