in reply to Re^4: single quotes not allowing in perl
in thread single quotes not allowing in perl
If the hyphen is in the middle of a character class, it defines a range. /[a-z]/ matches any lower case character. In the same way /[ -.]/ defines the range of ASCII characters between " " and "." and these are: !"#$%&'()*+,-.. If the hyphen is at the start of the class, it will be taken as a hyphen and not to define a range.
|
|---|