should give you what you want. You were right about the missing slash.$line =~ s/^(abc)\w+\s+\S+(?:,\s*\S+)*/$1/x;
In reply to Re^3: remove specific data from a line
by Roy Johnson
in thread remove specific data from a line
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |