Page 1 of 1

New and need help

Posted: Fri Sep 10, 2010 6:18 am
by trimguy
I am using the "find" command to find all instances of blocks of text that contain "Label=M" as follows:

[POLYGON]
Type=0x6
Label=M
Data0=(50.43214,-120.97473),(50.42825,-120.97703),(50.42956,-120.98306),(50.43357,-120.98068)
[END]

What should the find string look like to make this happen? I actually want to delete those blocks and the blank line after [END] in each instance.

(pulling my hair out)
Thanks

Posted: Fri Sep 10, 2010 10:56 am
by Mike Olds
Try:

>Search>Replace

Find:
Label=M \n

Replace:
{empty}

Replace All

Regular Expression on

Posted: Fri Sep 10, 2010 2:22 pm
by trimguy
I had tried that and I get a message: Cannot find regular expression 'Label=M\n'

Just to make sure we are on the same page, I have many blocks of text in my file that look like this:

[POLYGON]
Type=0x6
Label=M
Data0=(50.43214,-120.97473),(50.42825,-120.97703),(50.42956,-120.98306),(50.43357,-120.98068)
[END]

The only thing that changes from block to block is some will have Label=P which I want to keep and the values for Data=0 will change from block to block. Anyway, with all blocks that contain Label=M, I want to delete them starting from [POLYGON] to [END] and delete the one blank line after [END].

Thanks so much for your help.

Posted: Fri Sep 10, 2010 3:10 pm
by Mike Olds
Label=M\n

Label=M \n

Note space on my example. When I copied and pasted your example and selected to the beginning of the following line there is a space before the newline.