How can I allow a literal dot in a Perl regular expression?

Posted by goe on Stack Overflow See other posts from Stack Overflow or by goe
Published on 2010-04-15T11:44:36Z Indexed on 2010/04/16 4:03 UTC
Read the original article Hit count: 264

Filed under:
|
|

I use this condition to check if the value is alphanumeric values:

$value =~ /^[a-zA-Z0-9]+$/

How can I modify this regex to account for a possible dot . in the value without accepting any other special characters?

© Stack Overflow or respective owner

Related posts about perl

Related posts about regex