hi,
If my guess is correct, then follow the below said code:
while (<DATA>) { print "$&\n" if ($_=~/^\/(.+)modem$/); } __DATA__ /1sbc/dasds/sdf/dsd/modem /2sbc/dasds/FSFsdf/dsd/modem1 /3sbc/dasdFDAs/sFDASFdf/dsd/modem /4sbc/dasFSDAds/sdf/dFDsd/modem3
output
/1sbc/dasds/sdf/dsd/modem
/3sbc/dasdFDAs/sFDASFdf/dsd/modem
regards
franklin
Don't put off till tomorrow, what you can do today.
In reply to Re: Regular expression
by l.frankline
in thread Regular expression
by lax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |