Complex find and replace routine

N

Nomey

Hi all,

I'm trying to search the following sequence:

hard return,
followed by a number from 1 to 250,
followed by one or more hard returns,
followed by a page break

....and replace it by the same sequence, but with the number between brackets [] and no page break.

Can this be done with a regular expression, without a macro? If so, how?

Best wishes,
Shirley
 
N

Nomey

Oops, sorry to have bothered you. I already had the solution, but it didn't work because the list separator on my machine is a semicolon, not a comma.

Search: (^13)([0-9]{1;3})(^13{1;})(^12)
Replace: \1[\2]\3

Cheers,
Nomey
 
Top