Best,
Christian
--
Mögest Du leben, solange Du willst - und wollen, solange Du lebst!
--
--
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 vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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.
There is https://github.com/vim/vim/issues/99 You might want to check, if this works for you.
There is https://github.com/vim/vim/issues/99
You might want to check, if this works for you.
If I'm not mistaken that's "extended" as in /x, a different sense from "extended" as in ERE.
i would like to have "extended as in /x" FWIW.
I wonder if a different approach might help.
Vim already has :perldo, :pydo, etc. Perhaps a :perlmatch, :pymatch, etc. could be added for basic searching in those languages?
There is also a patch in the todo list for :bvimgrep. Maybe a :bgrep command could also be added. I think that would allow searching the current buffer using whatever tool you like.
That's why I listed libperl *and* libpcre. I definitely find libpcre lacking (being a perl user).
On 15 April 2016, Erik Christiansen <dva...@internode.on.net> wrote:
On 14.04.16 14:40, Christian Brabandt wrote:
Am 2016-04-14 12:14, schrieb Erik Christiansen:So many unix utilities support POSIX "Modern" EREs, that it is the best standard to conform to.
----And that is an argument for what, considering that vi comes from a time, where BRE where the default RE dialect?
Consistent regexes across unix utilities. Perhaps I was not sufficiently explicit in that regard? I note the deep attachment to obsolete BREs expressed above, but the rest of the world has moved on to modern EREs.
O'Reilly's "Mastering Regular Expressions" mentions that "POSIX standardized the workings of over 70 programs, including traditional regex-wielding tools such as awk, ed, egrep, expr, grep, and sed." (And mutt, lex, ...)[...] "Consistent regexes across unix utilities"? You sir are either a troll, or simply have no idea what you're talking about.
Take a look here: https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines So why ERE instead of PCRE? Oniguruma? RE2?
Actually, try something simpler: $ grep --version grep (GNU grep) 2.24 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>. $ echo 'foo bar' | egrep -o '[[:<:]]bar' grep: Invalid character class name
That's because GNU grep has its own \< and \> instead of POSIX [[:<:]] and [[:>:]]. Have you considered starting a crusade to convince GNU people to adhere to POSIX conventions, in the name of consistenty? As for Vim: its regexes have features not present in any other language.
People use them, and thousands of plugins and syntax files rely on them.
You're asking to break all of them because you _prefer_
something else?
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).
Wake up please.