develooper Front page | perl.perl5.porters | Postings from October 2009

Re: Rule 1 has been invoked [Re: What should \s \w \d match in5.12?]

Thread Previous | Thread Next
From:
Paul LeoNerd Evans
Date:
October 29, 2009 05:46
Subject:
Re: Rule 1 has been invoked [Re: What should \s \w \d match in5.12?]
Message ID:
20091029124630.7af2c0f8@nim.leo
On Wed, 28 Oct 2009 09:25:30 +0200
Yuval Kogman <nothingmuch@woobling.org> wrote:

> How difficult would it be to introduce special chars which aren't
> charclasses, which are probably more suitable for what people want anyway
> (things that agree with grok_number, with rules for natural numbers,
> integers, decimal fractions, and floating point notation)?
> 
> Seems like the distinction between matching a character that is a digit vs.
> matching ascii digits is mostly about what you do with the numbers
> afterwords. Perhaps it's better to just remove the extra duplication?

Vim uses foo vs \_foo to distinguish whether a linefeed is included or
not; e.g.

  abc.   <= literal followed by anything except linefeed
  abc\.  <= literal followed by anything including linefeed

Maybe we can find some suitable mangling to apply to \w, \d, \s, etc...
to say "with extra Unicode chars like these"

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About