I was trying to do a search that spans over several paragraphs.
While the "." dot-wildcard does sometimes not work beyond a paragraph border (=the "backwork P-symbol"), I know "[\w\W]" usually works, and it does work here also. But I do not want do search for "anything", but for "anything except '>)' " in the form "[^>)]"
To my surprise it does not work across Paragraph boundaries. Any hints? any work arounds?
Thanks in advance
WiLi
Regex search across paragraph boundaries?
Re: Regex search across paragraph boundaries?
WiLi wrote:… for "anything except '>)' " in the form "[^>)]"
Code: Select all
(?:[^>)]|\n)
philip
Re: Regex search across paragraph boundaries?
oho,
menni tenku, menni tenku
(for englisch literates: Thank you so much, I will include you into my bedtime prayer)
yes, what such a tiny modification can make a difference …
you saved me a lot of work
You supplied some insider background info about the Regex implementation of NWP. Is there a source to consult for the like?
with greetings from Europe
WiLi
menni tenku, menni tenku
(for englisch literates: Thank you so much, I will include you into my bedtime prayer)
yes, what such a tiny modification can make a difference …
you saved me a lot of work
You supplied some insider background info about the Regex implementation of NWP. Is there a source to consult for the like?
with greetings from Europe
WiLi
Re: Regex search across paragraph boundaries?
From the look of your question, you actually seem to already have some understanding of regex yourself. In many ways, the Nisus Powerfind Pro is quite similar to the regex used in perl, so information for the latter transfers pretty well.WiLi wrote:You supplied some insider background info about the Regex implementation of NWP. Is there a source to consult for the like?
Joe Kissell wrote a good introduction for Powerfind (Pro) of Nisus Classic in his book the Nisus Way, but many things have changed since those days. (The gist is still the same.)
For a more full-bore explanation, some people have recommended:
Mastering Regular Expressions. By Jeffrey E.F. Friedl. O'Reilly Media
philip
Re: Regex search across paragraph boundaries?
good to know.… is quite similar to the regex used in perl …
I only was a bit surprised that those paragraph boundaries apply, so I'd like to know about such specialties, or better: I would like to know where to look for such relevant info.
Some years ago I did a lot of Regex with Dreamweaver, where there are no paragraph or line boundaries. On the other hand, DW does not have "look around" capabilities.
Thank You!
WiLi