Help for this page
$ perl -E 'say "matched" if "foo-bar.baz" =~ /^[\w.-]+\z/' matched $ perl -E 'say "matched" if "foo-bar:baz" =~ /^[\w.-]+\z/'