in reply to A regex question with 2 pieces of data
use strict; use warnings; use Regexp::Common; $_ = '<span class="style">28.56</span><span class="style">-1.22</span> +' . '<span class="style">-4.1</span><span class="style">04/02</span>' +; my ($f, $s) = /($RE{num}{decimal}).*?($RE{num}{decimal})/; print "$f $s\n"; __END__ 28.56 -1.22
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A regex question with 2 pieces of data
by bilbozilla (Initiate) on Apr 08, 2003 at 00:24 UTC | |
by The Mad Hatter (Priest) on Apr 08, 2003 at 00:45 UTC | |
by diotalevi (Canon) on Apr 08, 2003 at 00:54 UTC | |
by Anonymous Monk on Apr 08, 2003 at 01:05 UTC | |
by The Mad Hatter (Priest) on Apr 08, 2003 at 01:12 UTC |