Hi isha, I am not clear with your question. The problem may be in variable name $t1, which should be $t and inside character class range should be [A-Z], since you are using underscore seprately in the character class.
if($t1 !~ /A_[A_Z0-9_]+/i) it should be if($t !~ /A_[A-Z0-9_]+/i) Output: ------- $CD = 'A_TAG_HSSL_LBA_1'; #matches $CD = 'A_TAG_HSSL_LBAB_1'; #not matches
Also look into this How do I post a question effectively?
Regards,
Velusamy R.
In reply to Re: Regular expression query
by Samy_rio
in thread Regular expression query
by isha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |