![]() but which is based on the previous version 2.2.7.0 of Scintilla, used by Notepad++ ! I, usually, keep an improved version of the N++ regex engine, created by François-R Boyer, in May-June 2013. matches newline option, in the Replace dialog, for this kind of search/replacement ! To delete the first thirty characters of any line, use :ĭON'T check the.To delete the first five characters of any line, use :.The remainder of the line, after a first string 20, is stored as the group 1, which is rewritten in the replacement part. So, how to get the right behaviour ? Just use the search/replacement below, as a work-around : Indeed, once the ending 20 is deleted, the cursor location is, now, just before the EOL characters of the line, which can't, obviously, match the string 20 ! ![]() This wrong behaviour doesn't occur when we search, for example, the string 20, at the end of a line, with the regex 20$. It's definitively not a bug but the simple result of the way the regex engine works !Īs you said in your post, as soon of the first string "20" is deleted, the cursor is, then, located before the next 20 string, which still match the complete regex ^20 :-( it's quite at the beginning of the current line, isn't it ? The subject if I'm just not getting something. Know if I'm just wrong - my regex foo is weak and I'll defer to experts on Thoughts? Is this a real bug? If so, I'll file one, but I first want to Inconsistent with the results I'm seeing when using "^". The regexĮngine doesn't do that though (which is good), but that appears Have expected that it might have buggily matched three times. ![]() with the regex "20$" matches the last line just once, whereas I would This a bug or feature? I guess I was expecting a regex with a leading "^" Like repeatedly to the same line, so it matches the ^ more than once. I think it might be due to the way the regex is being applied: it looks The result then is this:Įven trying something like "^(20)" doesn't seem to work, it will match It just removes every instance of “20” in the start of the string, as if I Regex “^20” to remove the leading “20” from the number. ![]() I used the Replace All (replacement = empty string) functionality with the Quick question – I have a list of numbers like:
0 Comments
Leave a Reply. |