In Perl regexps, "\d" matches any digit. Thus, "\w" in the default locale is just "[\da-zA-Z_]", and an integer is "[-+]?\d+".
\d
\w
[\da-zA-Z_]
[-+]?\d+
"\D", however, stands for "[^\d]", or any non-digit character.
\D
[^\d]
printable version
chaos
Log in or register to write something here or to contact authors.
Sign up