If it is consistently formatted then you can be more specific with your capture and look for 'test\d+'.
$current_line =~ /Grab this\s+('test\d+')/
In reply to Re: How to get only the next word matching the regex in the line
by swl
in thread How to get only the next word matching the regex in the line
by oysterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |