You understood ^ and $ correctly, you probably test it wrong. Could you give us the code sample that makes you reach that conclusion ?
perl -E 'say /^lib/ ? "$_ matched" : "$_ did not match" for qw/nfcclib lib/;'
nfcclib did not match lib matched
Alternatively, you could also use \b which means word boundary (so the regex m<\blib>; or its equivalent /\blib/)
In reply to Re: Help with a regex
by Eily
in thread Help with a regex
by cspctec
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |