Welcome to the Monastery | |
PerlMonks |
Re^3: regular expression to check if the textbox contains only special charactersby Anonymous Monk |
on Oct 18, 2016 at 09:54 UTC ( [id://1174189]=note: print w/replies, xml ) | Need Help?? |
print /^(?:[A-Z_]+,?)+(?<!,)$/ ? 'good' : 'bad';
Hi I tried your suggestion as below
Good string format are ABC,ABC_TO and ABC_TO,DEF,GHI_JKL,GHI_JK1_TO but somehow I am getting this as BAD ABC_TO,DEF,GHI_JKL,GHI_JK1_TO
In Section
Seekers of Perl Wisdom
|
|