#seems like the string "branch from" is not matching since $1 below prints nothingThe string "branch from" is matching, and you can prove it by using some visible delimiters (Tip #3 from Basic debugging checklist) as follows:
print ">>>$1<<<\n";#doesnt print anything
However, $1 is undefined because you need to use capturing parentheses in your regex. You really should use strict and warnings and perltidy.
In reply to Re: Match problem
by toolic
in thread Regex problem
by perl_mystery
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |