in reply to Re: Using a regex function from a hash
in thread Using a regex function from a hash
Created by GeorgeO at the parker inn
date : 06-Aug-06:22.34.01 buncahstuffIdon'twant
Created by 7of9 at the parker inn
date : 06-Jan-06:22.34.01 buncahstuffIdon'twant
Please get me:
GeorgeO
06-Aug-06:22.34.01
7of9
06-Jan-06:22.34.01
my %functions_hash = ( '^Created by ' => sub { $_[0] =~ /^Created by (\w+)/; $_[0] = $1; }, '^date :' => sub ( $_[0] =~ /^data :(#HELP!!)/; $_[0] = $1 ); ... if ( $data =~ /$key/ ) { $value->( $data ); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Regex, extracting stuff from the middle of a line
by perlNinny (Beadle) on Aug 03, 2006 at 19:13 UTC | |
by ikegami (Patriarch) on Aug 03, 2006 at 19:29 UTC | |
by Fletch (Bishop) on Aug 03, 2006 at 19:29 UTC | |
by sh1tn (Priest) on Aug 03, 2006 at 19:28 UTC | |
by swampyankee (Parson) on Aug 03, 2006 at 20:38 UTC |