I just ran that data line ( c:/loc1/loc2/loc3/84xxxxxB01_e1_1) through the above code and got 84xxxxxB01_e1_bot as expected, so I'm not sure why it didn't work for you.
while (<DATA>) { /\/([^\/]+)\d$/; print $1."bot\n"; } __DATA__ c:/loc1/loc2/loc3/84xxxxxB01_e1_1
All code is untested unless otherwise stated.
All opinions expressed are my own and are intended as guidance, not gospel; please treat what I say as such and as Abigail said Think for yourself.
If in doubt ask.
In reply to Re^3: extracting data from a line
by gothic_mallard
in thread extracting data from a line
by RCP
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |