develooper Front page | perl.perl5.porters | Postings from February 2019

Re: RFC: Adding \p{foo=/re/}

Thread Previous | Thread Next
February 6, 2019 16:00
Re: RFC: Adding \p{foo=/re/}
Message ID:
On Tue, Feb 05, 2019 at 03:47:18PM -0700, Karl Williamson wrote:
> Certain things aren't clear to me about how it should behave.  Should  
> the default be anchored (as currently) so that you have to begin and/or  
> end with '.*' to unanchor it?  I think most uses will want it anchored  
> as implied by the equals sign, but that's not how other patterns behave,  
> and that inconsistency probably would be too confusing.  One thing that  
> might emphasize that it isn't anchored is to make them write

My vote goes to it being unanchored. Although I'd expect most cases
will prefer an anchored match, it's only one character to make it
anchored. So, defaulting to anchoring is a small gain, and, IMO,
not worth the inconsistency compared to regular regular expressions.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About