You are here: irt.org | BBS | Re: Perl string manipulation [This BBS is closed]
Posted by Jason Nugent on September 18, 1998 at 07:20:52:
In Reply to: Re: Perl string manipulation posted by Jason Turner on September 18, 1998 at 03:32:52:
:
: : : I have a perl variable that contains this text
: : : |password | +----------+ |rangers |
: : : (Password is the column name, rangers the data).
: : : Can anyone suggest how to extract the 'rangers' part of the string?
: : $data =~ s/| (\w+)|$/$1/; # neato regex
: s/neato/broken/ # :- (
: : let's go through it:
: I'll spare you that pain ;-)
You hurt me, Jason :) I hate it when you find problems with my stuff :) Anyway here is one that DOES work :)
$string =~ s/\|\w+\|\+-+\+\| (\w+?)\|$/$1/; # another neato regex
Jason
Follow-ups:
You are here: irt.org | BBS | Re: Perl string manipulation [This BBS is closed]