One justification I have heard people make (not that I subscribe to the idea myself) is that one doesn't have to worry so much about meta-characters, in that nearly every single character loses its meta function in a character class.
Instead of having to write /a\+b/, one can write /a[+]b/. Thus, instead of having to worry about whether a punctuation character needs to be escaped or not, one can stick it in a character class and be done with it.
I think this is a false economy, but, if it makes you happy...
• another intruder with the mooring in the heart of the Perl
In reply to Re: Why would one want in a regex a class with only a single entry?
by grinder
in thread Why would one want in a regex a class with only a single entry?
by ack
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |