shawn wilson wrote:

Instead of implementing one or another regex type in core, it might be better to know about and hook into libs for their regex engines. For example, libperl for perl's engine when +perl or libpcre as another option. IDK you can do the same with python, I think you can with ruby and IIRC Lua uses libpcre.

----
I mostly agree. While I would *want* and love the +perl/libpcre option @ compile time, I wouldn't want it to change the standard/current
vim RE, else millions of lines of current macros would break.  Choosing
which RE, whether it be POSIX ex-RE's, or PCRE's (which I prefer even more), needs to be done in a _sane_ orthogonal way. Sadly, the method grep uses -{F,G,E,P} = fixed-strings, basic (often called obsolete RE's, though supported as default in most GNU
tools for compat. purposes), Extended, and PCRE's.

Maybe having "\X" & "\P" for extended and pcre's would be a start,
though I'd _like_ to see a way of choosing different RE's for
use in macros & .vim files (for compat), and a 2nd option for
interactive RE's (thus eliminating the need for the "/[vmMVXP]"
on each search or substitute).

   Note that PCRE's are frequently provided as a 4th option to the
3 POSIX RE's in gnu and other tools -- they are not just used in
Perl (as the name might lead some to think).  I think that's one
reason why Perl added the python-specific features so it could
still retain its "most feature rich" status (but that's speculation
on my part).

   The thing that blew me away -- PCRE's are faster than even
plain-text searches (let alone the Basic and Extended ones).




--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to