using find-replace

Discussion Forums discussion using find-replace

This topic contains 0 voices and has 4 replies.

Viewing 5 posts - 1 through 5 (of 5 total)
Author Posts
Author Posts
June 18, 2006 at 2:48 am #75

Kyote
Member

How do I search for consecutive new lines? used to I could could do nn to find blank lines in a text file and then replace with n but now it gives me a warnign saying specified text not found.

June 20, 2006 at 5:34 am #15010

simon
Key Master

Do you have Backslash Expressions turned on in the Find Dialog? If not, that’s why it’s not working.

If not, you’ll probably find that you’re working with a CRLF file so you need to find rnrn instead.

January 9, 2007 at 12:37 pm #15011

Kyote
Member

Thanks alot Simon. That was my problem. The rnrn. I apologize for not coming back sooner to let you know that your solution worked.

January 12, 2007 at 10:32 am #15012

paulfeakins
Member

I’m having the same problem.

‘Regular expression’ and ‘Allow backslash expressions’ are checked.

I’m searching for ‘n’ or ‘r’ and I have tried ‘rn’ but it finds nothing in a text file that I know has CR and LF characters in because when I go ‘Show line end markers’ they show up.

Ideas appreciated.

Paul.

January 15, 2007 at 9:23 am #15013

simon
Key Master

Due to a limitation in the regex library used by the editor control, multi-line regular expressions are not supported. This also means that using regular expressions to work with end-of-line characters (e.g. to remove blank lines) does not currently work. For these types of search, backslash expressions are currently the best solution. I am hoping to replace the built-in regex with a better solution over the next couple of releases. Stay tuned!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.