Re: regex capture question

2015-06-18 Thread Shlomi Fish
Hi Tiago, Please reply to list if it's a mailing list post - http://shlom.in/reply . On Thu, 18 Jun 2015 10:20:57 -0300 Tiago Hori wrote: > Folks, > > I have the following regex: $_ =~ /(Crosses)(.*)(misses=)(\d+)/s > > It does what I need to do in terms of matching, but I also want to use th

Re: regex capture question

2015-06-18 Thread Илья Рассадин
Hi, Tiago! I can't reproduce such behaviour use Modern::Perl '2014'; my $string = 'Crosses misses=50 '; my (@matches) = ($string =~ /(Crosses)(.*)(misses=)(\d+)/s); use Data::Dumper; print Dumper \@matches; result: $VAR1 = [ 'Crosses', ' ', 'mis

regex capture question

2015-06-18 Thread Tiago Hori
Folks, I have the following regex: $_ =~ /(Crosses)(.*)(misses=)(\d+)/s It does what I need to do in terms of matching, but I also want to use the capture parenthesis. The data comes from tab-limited files and I use $4 to grab the last digits of the match, however it is also matching the trailing