develooper Front page | perl.perl5.porters | Postings from September 2011

Re: Regex warning

Thread Previous | Thread Next
From:
Karl Williamson
Date:
September 27, 2011 08:06
Subject:
Re: Regex warning
Message ID:
4E81E679.2090503@khwilliamson.com
On 09/27/2011 05:25 AM, Zsbán Ambrus wrote:
> On Thu, Sep 22, 2011 at 6:32 AM, Aristotle Pagaltzis<pagaltzis@gmx.de>  wrote:
>> * Karl Williamson<public@khwilliamson.com>  [2011-09-22 04:50]:
>>> I now regret not also deprecating '\w{'
>>
>> Let’s do that? It’ll take another cycle but so what.
>
> DON'T do that.  We could deprecate /\b{/ because /\b{3,12}/ is
> equivalent to just a single /\b/.  However, /\w{3,12}/ is very
> different from just /\w/, and so it is actually useful in a regular
> expression.
>
> Ambrus
>

Good point.  I think though that we could accept quantifiers while 
deprecating other instances.  The current \b doesn't distinguish, but is 
immaterial.  However, I think you've found a bug for \B{3,12}.

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