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

RFC: use re '/x[]';

Thread Next
Karl Williamson
September 5, 2014 17:56
RFC: use re '/x[]';
Message ID:
I'm proposing two additions to the "use re" pragma.  One is covered 
here, and the other in a separate thread, to lessen confusion.

This pragma would mean that any patterns compiled within its scope would 
be /x, but additionally any white-space in bracketed character classes 
would be ignored unless escaped.  This is already the behavior of the 
experimental feature (?[...]).

This would allow a programmer to optionally extend this behavior to 
regular bracketed character classes.  White-space can make these much 
more legible.

I do not propose making '#' special, to introduce a comment.  A '#' in a 
[...] would continue to mean \N{NUMBER SIGN}, as how (?[...]) behaves now.

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