Searching for \n

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
Post Reply
gwgs
Posts: 87
Joined: Tue Nov 21, 2006 6:30 pm
Location: Auckland

Searching for \n

Post by gwgs » Fri Feb 24, 2017 2:49 am

Found a little bug while working today.

Scenario:
Open file to edit that has the text \n in it some where.
Find \n in file with 'Use regular expressions' un-ticked.
Find will now find every newline in the file, not the text '\n'

Not a biggie, but not the results I was expecting when searching for \n

Zeus 3.98h on Windows 10 Enterprise 64-bit



Grant

jussij
Site Admin
Posts: 2429
Joined: Fri Aug 13, 2004 5:10 pm

Re: Searching for \n

Post by jussij » Fri Feb 24, 2017 4:07 am

By design, the default search (i.e. even with regular expression turned off) recognises the \n mnemonic.

The same is true for the '\t' tab character.

So this means if you want to search for the \ character you need to delimit that character.

In other words to search for:

Code: Select all

\n
will require the following search string:

Code: Select all

\\n
Cheers Jussi

gwgs
Posts: 87
Joined: Tue Nov 21, 2006 6:30 pm
Location: Auckland

Re: Searching for \n

Post by gwgs » Sun Feb 26, 2017 9:26 pm

Thanks for that Jussi.


Grant

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: Bing [Bot] and 5 guests