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

Re: Regex warning

Thread Previous | Thread Next
Karl Williamson
September 27, 2011 08:06
Re: Regex warning
Message ID:
On 09/27/2011 05:25 AM, Zsbán Ambrus wrote:
> On Thu, Sep 22, 2011 at 6:32 AM, Aristotle Pagaltzis<>  wrote:
>> * Karl Williamson<>  [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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About