Regex multiple line search + redirect search results / possible improvement?
-
Hi,
I use quite often the regex search on multiple line.but I found a couple of limitation:
-
The results frame shows only the first line for the matched text block . In some case this limitation is useful though, especially when a pattern matches many large text blocks. In some cases it would be useful to select the behavior or at least to export the output to a new tab (see point 2)
-
it could be useful to have an option in the search window to export the search results to a new tab .
Do you know if either the above feature can be implemented or a plugin already exists? I spent some time without any luck.
I know could use grep or its variants but it would be handy to have those options. -
-
I don’t know if you are just making feature requests, or if you might be interested in workarounds.
-
Thanks for your comment Scott,
I filed an enhancement request.
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3569Regarding the workaround, I am still not sure if that is what I was looking for…I have to learn how to run a python script in N++ first :)
-
Just as a reference…
The quickest workaround I found is to use a cygwin shell with “pcre” package installed…
$ pcregrep -M “BGP neighbor is.\r\n.\r\n.\r\n.\r\n.*\r\n.*state.*Established.*3w” file.txt(the above example look for a 6 lines string block such as:
BGP neighbor is xxxx
Remote AS xx, local AS xx, internal link
Description: xxxx
Remote router ID xxxx
Cluster ID xxxx
BGP **state **= Established, up for 3w5dhope this helps.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login