develooper Front page | perl.perl5.porters | Postings from January 2012

Deprecating '\w {' in v5.16

Thread Next
Karl Williamson
January 22, 2012 19:41
Deprecating '\w {' in v5.16
Message ID:
I was cleared to deprecate the sequence backslash, 
ASCII-alpha-character, left brace in 5.14 in regular expression 
patterns, but in looking through the list of candidates someone 
furnished, I saw only two that I thought we would ever might want to 
co-opt, and so \b{ and \B{ are now deprecated; I have heard of no user 

But I and others think that there are uses for other sequences, such as 
\w{, and I wondered why I hadn't thought so before.  It turns out that 
the list which I blindly accepted didn't contain that as a possibility.

So now, I would like to get clearance to deprecate this sequence, for 
any ASCII alpha character for which it is not already defined.

In an earlier thread, someone pointed out that \w{3,4}, for example has 
current meaning.  Of course we can't change that.  It would be handled 
the same way we currently handle sequences like


which means to match 3 or 4 'A's in a row, or


meaning to match any number of ':' characters in a row.  We could at 
some point v5.20 or later define


to mean at least one of whatever \w{foo} is chosen to mean.

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