develooper Front page | perl.perl5.porters | Postings from August 2010

Re: Any opposition still to the idea of syntax indicating defaultregex modifiers?

Thread Previous
From:
karl williamson
Date:
August 10, 2010 18:48
Subject:
Re: Any opposition still to the idea of syntax indicating defaultregex modifiers?
Message ID:
4C62014B.5080002@khwilliamson.com
Eirik Berg Hanssen wrote:
> On Tue, Aug 10, 2010 at 11:32 PM, karl williamson 
> <public@khwilliamson.com <mailto:public@khwilliamson.com>> wrote:
> 
>     If we're going to do this, I'd like to do it now before the new
>     regex modifiers go in.
> 
>     Aristotle withdrew his opposition and became a supporter after he
>     understood what the proposal really was.  Sorry for being unclear.
> 
>     If there's no opposition, we need to settle on what is the syntax
>     is. Ben originally proposed (?~  I thought (?.  was better because
>     the tilde can be too easily confused with a hyphen, (?-  which is
>     also legal right after the question mark.
> 
>     Another option is to make it a two character sequence, the first one
>     is a tilde, say, and I'm not sure what the second one should be.
>      This would allow future expansion so that some other 2nd char could
>     mean something else.  Mostly people wouldn't type this, it would be
>     inserted by the regex compiler.
> 
> 
> 
>   If this is happening, I think I prefer (??...-...:<re>).
> 
>   Like (?...-...:<re>), but different, just like (??{...}) is like 
> (?{...}), but different. :)
> 
> 
> Eirik

Note that if this goes forward that whatever is decided will be the 
stringification of all or nearly all regexes.

Thread Previous


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