Regex multiple line search + redirect search results / possible improvement?
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.
For feature requests, it might be better to do it here
For workarounds on the topic you raise, you might have a look here.
Thanks for your comment Scott,
I filed an enhancement request.
Regarding 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
Remote router ID xxxx
Cluster ID xxxx
BGP **state **= Established, up for 3w5d
hope this helps.