Monday, January 9, 2012

Re: Request for feature upgrade/enhancement.....

On Mon, January 9, 2012 4:34 am, Linda W wrote:
>
>
> Could you please add a '\p' operand to regex's (cf. '\v'), to invoke
> standard perl pattern matching.
>
> I've tried vi's syntax, but it has too many gotcha's and not as much
> power, whereas, perl's pattern matching is considered 'best of breed'
> -- check references on wikipedia (or other general regex references).
> Wikipedia talks about different types of regex's: the standard, POSIX,
> "Extended", and "Perl" -- with Perl being 'best of breed'.
>
> Here's what wikipedia says @
> http://en.wikipedia.org/wiki/Regular_expression#Perl-derived_regular_expressions
>
>
>
> Perl-derived regular expressions
>
> Perl <http://en.wikipedia.org/wiki/Perl> has a more consistent and
> richer syntax than the POSIX basic (BRE) and extended (ERE) regular
> expression standards. An example of its consistency is that |\|
> always escapes a non-alphanumeric character. Other examples of
> functionality possible with Perl but not POSIX-compliant regular
> expressions is the concept of lazy quantification (see the next
> section), possessive quantifies to control backtracking
> <http://en.wikipedia.org/wiki/Backtracking>, named capture groups,
> and recursive patterns.
>
> Due largely to its expressive power, many other utilities and
> programming languages have adopted syntax similar to Perl's — for
> example, Java
> <http://en.wikipedia.org/wiki/Java_%28programming_language%29>,
> JavaScript <http://en.wikipedia.org/wiki/JavaScript>, PCRE
> <http://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions>,
> Python
> <http://en.wikipedia.org/wiki/Python_%28programming_language%29>,
> Ruby <http://en.wikipedia.org/wiki/Ruby_%28programming_language%29>,
> Microsoft <http://en.wikipedia.org/wiki/Microsoft>'s .NET Framework
> <http://en.wikipedia.org/wiki/.NET_Framework>, and the W3C's
> <http://en.wikipedia.org/wiki/World_Wide_Web_Consortium> XML Schema
> <http://en.wikipedia.org/wiki/XML_Schema_%28W3C%29> all use regular
> expression syntax similar to Perl's. Some languages and tools such
> as Boost <http://en.wikipedia.org/wiki/Boost_C%2B%2B_Libraries> and
> PHP <http://en.wikipedia.org/wiki/PHP> support multiple regular
> expression flavors. Perl-derivative regular expression
> implementations are not identical, and all implement no more than a
> subset of Perl's features, usually those of Perl 5.0, released in
> 1994. With Perl 5.10, this process has come full circle with Perl
> incorporating syntactic extensions originally developed in Python
> and PCRE.
>
> ------------------------------------------------------------------------
> /span>
>
> Even the standard util, 'grep', now has "-P' support for Perl syntax.
>
> Sadly, I waste hours of time trying to find the way to do it in vim and
> end up frustrated. I don't use it anywhere near as often (it's usually
> faster to get out of vim, and write a script!, that's how bad it
> is!)... It's not as well documented and it has more exceptions, and
> non-standard syntax. I'm not asking
> for an incompatible replacement, but only support for an option of using
> the top standard...
>
> You can see people asking for this at least 6 years ago:
> http://tech.groups.yahoo.com/group/vim/message/75081
>
> Another from 2008
> http://tech.groups.yahoo.com/group/vim/message/95477
>
> Saw one from me from 2 years ago...am sure I asked about it before that,
> but
> can't find a ref.... oh well.
>
>
> So far, neither of the 2 big things I've asked for over the years have
> managed to get into vim...something along the lines of the above (but I
> didn't have references to backup what I was saying (as if that ever
> **really** matters...) at that point)... and UTF-8 support on Windows by
> calling it's 'uniscribe' font display routine rather than some 8-bit
> variant.
>
> Possible? Upcoming? In the works? :-)

The atom \v does not help you?

regards,
Christian

--
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

No comments: