Skip to content

Instantly share code, notes, and snippets.

@titsuki
Created November 17, 2016 15:02
Show Gist options
  • Save titsuki/10733f8e87bdd2276a653eb4cd52b48d to your computer and use it in GitHub Desktop.
Save titsuki/10733f8e87bdd2276a653eb4cd52b48d to your computer and use it in GitHub Desktop.
use v6;
my $email = 'john.doe@perl6.org';
my $regex = / <:L>+\.<:L>+\@<:L+:N>+\.<:L>+ /;
if $email ~~ $regex {
say $/ ~ " is a valid email";
} else {
say "This is not a valid email";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment