in reply to How to get only the next word matching the regex in the line

Please try a non-greedy match

  /Grab this\s+'(.*?)'/

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^2: How to get only the next word matching the regex in the line
by oysterperl (Novice) on Nov 11, 2019 at 05:30 UTC
    That worked, thanks!
      Great!

      Do you understand why? :)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice