in reply to single quotes not allowing in perl
Why do you escape all those characters inside a character class?
--8<--- use 5.016; use warnings; my $title = "single quotes not allowing in perl"; $title =~ m/^([a-zA-Z0-9 \.\-\(\)\%\&\:\;\,\"\']+)$/ and say "Title matches original re"; $title =~ m/^([-a-zA-Z0-9 .()%&:;,"']+)$/ and say "Title matches simplified re"; -->8--- => Title matches original re Title matches simplified re
Enjoy, Have FUN! H.Merijn
|
---|
In Section
Seekers of Perl Wisdom