Re: [pcre-dev] Matching file contents as one string using P…

Startseite
Nachricht löschen
Autor: pcunite
Datum:  
To: pcre-dev
Betreff: Re: [pcre-dev] Matching file contents as one string using PCRE_DOTALL
> Zoltán Herczeg
> dot (.) is the inverse of \R.
> If you need to match everything, use [\x00-\xff] or (.|\R) or \p{Any} (the latter only if
> Unicode is enabled). I would choose the first for ascii, and the third for Unicode matches.


Thank you for helping.

However, when a file only contains a single term: "hello", the regex (?=.*\p{Any}hello.*) does
NOT match it. Also, \p is slow. Since (?=.*hello.*) is working for Unicode (which I need) and
seems fast my question ... I guess ... is related to why NOT use PCRE_DOTALL and why does
PCRE not treat a subject string as a single line with no regard for line endings as stated in the
documentation?

Perhaps it's an issue with this bug: http://bugs.exim.org/show_bug.cgi?id=1351