What happens if the match fails? You need an if in there.
if (m|(<Id>)(.*?)(</Id>)|) { print "1 - '$1'\n2 - '$2'\n3 - '$3'\n"; } else { print "Hmm, no match. Is this what happened?\n"; }
In reply to Re: Regular Expression memory
by chromatic
in thread Regular Expression memory
by Mid_Ager
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |