develooper Front page | perl.beginners | Postings from February 2002

RE: Reg Exp help

Thread Previous | Thread Next
Busse, Rich
February 27, 2002 04:57
RE: Reg Exp help
Message ID:
Thanks Daryl & 'Japhy' for your suggestions. I ended up using:

	$Out = `$Cmd` ;
	$Out =~ /^\|GRP\|\s*(.*)/m ;

The data I want ends up in $1.

-----Original Message-----
From: Busse, Rich 
Sent: Tuesday, 26 February, 2002 09:35
To: Perl Beginners
Subject: Reg Exp help

I am capturing the output of a command in a string:

	$Out = `$Cmd` ;

The output always looks like:

List of Templates and Template Groups assigned to '':
Operation successfully completed.

It's always on 5 separate lines. How do I extract what follows |GRP| on the
third line to a variable? TIA...

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About