Creating regular expression for multiple lines

Do you have anything to share with other users? Your opinions about our programs, suggestions for future products - everything goes here.
Post Reply
Posts: 24
Joined: Tue Feb 03, 2004 10:38 am
Location: Hungary

Creating regular expression for multiple lines

Post by gkiers »

Hi all,

I am trying to create a RE that would help me ignore a block of values that are printed over multiple lines. Say I have these:

file 1:
1 2 3 4
2 3

and file 2:
1 1 3 4
2 3

I would like to ignore all differences in the block labelled A. So I would create a RE that replaces all digits that come after A.
I would use \n for a line separator.

Search: A\n[ 0-9]*
Replace: A

Using Replace

But it does not work. Not even for the first line of the block. Any suggestions are more than welcome.

Kind regards, Gerrit

Site Admin
Posts: 1673
Joined: Tue Sep 23, 2003 7:37 pm

Post by grigsoft »

Unfortunately, currently this is not possible, since regexp are only processed on by-line basis.
This limitation will be removed in future. In next version I will probably add an ability to ignore text between two regexps.

Post Reply