[Solved] RegEx find escaped MetaChars

Started by Stefan, March 11, 2009, 08:37:59 AM

Previous topic - Next topic

Stefan

I try to search for text =>  \n
and replace this by \n (new line)

Since \n is an sign of RegEx  i escaped the meaning by adding an leading  backslash => \\n

[X] RegEx is ticked.
But HE says it didn't find \\n  while HE should search for \n.
(see pic)

Am i wrong?
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hello Stefan,

no, you are right...
It is a bug. Once more related for the multiline search..

I would fix it next version.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Arthur

You know, I think I better add to this post:

I also did some extensive searches today on a huge log file and used the Regular Expression mechanism.

I was about to construct my search criteria and clicked on Zero or One ( the ? mark) using the GUI (Ctrl-F, right arrow on the right off the Find What text box and chose it from the small pop-up window).
At this point the ? sign was not inserted into the Find What text box, but others seem like do (did not try every single one).

I also have spotted that: sometimes the search symbols get appended and sometimes just get in-between.

I think both things are bugs.

PS: Play around there by highlighting the search pattern, etc.

Sorry if my explanations are incomplete, need to run,
thanks

Stefan

632
RegEx search \\n replace by \n works
RegEx search \\n replace by \\n\n works too

Just a note for they are curiously:  Issues found by Arthur are not investigated yet but noted, thanks.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Arthur

In addition to the above I have found that if one places any regex char (e.g. *) into the initially empty search box, adds text, then positions the cursor to the end of the typed in text (say the search criterion now becomes *test) and picks another regex char from the available patterns window, for example \s, the text in the Find What box becomes *tes\st - so it cuts into the word in-between, not good.

alex

Hi Arthur, can be... THere were some time ago problems like this.
With "?", I would check. Maybe some simple bug.
For wrong position reason is that edit field does not store position when focus is lost, so it is real problem to find where rto insert text when focus is on menu :) But I would try to solve this.

Thanks a lot for bug report.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

Beta 1.42 Build 637

Fixed. Problems with incorrect position of the cursor in Find What field, when inserting regexp tags from helper menu in Find dialog.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-