Francesco Del Vecchio wrote:
>
> String "aaaa bb=somestuff someotherstuff"
>
> I don't know what "somestuff" and "someotherstuff" are...I only know
> that they are two words separed by a space.
>
> How can I extract 'somestuff' from the string?
Hi Francesco .
It depends how you want to define where it is. To get the
last word on the line (with possible trailing spaces):
my $stuff;
($stuff) = ($string =~ /(\w+)\s*$/);
\w is a 'word' character: A-Z, a-z, 0-9, and underscore.
\s is a whitespace character.
Is this what you want?
HTH,
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]