Hi i have written a regex to match some tags ..the issue is when i try to match "-"(HYPHEN) in the tag , "_"(UNDERSCORE) is also getting matched...the regex is written below:-
$Prefix='DOC_'; if ($line =~ /$Prefix[a-zA-Z]*[0-9]*-*[0-9a-z]{3}/)
the tags are
DOC_001_123
DOC_002_214
DOC_001-548
DOC_001-987
I want the last two tags with the - but im getting every tags... where is the issue in the above regex..thanks....
In reply to Regex MATCH by stallion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |