0

I want to return a citation string using wild card search in MS Word. The citations are superscript, so it is easy to isolate them from other text. The search requirements are:

  • Numbers can be any length
  • Citation can have commas or dashes
  • I want to return only the whole string so I can surround it with a delimiter (|)

Examples

6,7,11,16

1

4,5-7,810,12-32,2

The following Word wildcard term will correctly find the string, but then continues to return all of the sub-strings within the result. I need it to continue the search after finding the entire string:

[0-9\-,]{1,}

Thanks!

1 Answer 1

1

To surround such strings with a delimiter in Find field use (in your case you will probably use comma instead of semicolon - this is a regional setting):

([0-9\-,]{1;})

In Replace field:

|\1|

Just tested. Works on your example.

1
  • Thanks a ton - appreciate the help!
    – Mitch
    Dec 23, 2020 at 18:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .