in reply to Re^2: Return string that starts and ends with specific characters
in thread Return string that starts and ends with specific characters

Thanks this is great! How would I get it to print only to the leftmost j?
  • Comment on Re^3: Return string that starts and ends with specific characters

Replies are listed 'Best First'.
Re^4: Return string that starts and ends with specific characters
by gilthoniel (Novice) on Jun 02, 2016 at 17:26 UTC
    to clarify, I want it to start at any available "f", but end at only the first "j" after that "f". Thanks
      #!/usr/bin/perl # http://perlmonks.org/?node_id=1164776 use strict; use warnings; print "$1\n" while 'asdfgfhjkljjj' =~ /(?=(f.*?j))/g