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

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

Thread Previous | Thread Next
From:
Abigail
Date:
February 6, 2019 16:00
Subject:
Re: RFC: Adding \p{foo=/re/}
Message ID:
20190206160955.GO20714@almanda.fritz.box
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.


Abigail

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