RE: [PHP] Regular Expressions? Help!
| From: | Rick Emery | Date: | Mon, 25 Mar 2002 19:28:12 +0000 |
| Subject: | RE: [PHP] Regular Expressions? Help! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90076@lists.php.net to get a copy of this message | ||
With there be a specifc number of variables returne? Or can the number of
variables vary?
-----Original Message-----
From: Walker, Roy [mailto:Roy.Walker@GEZWM.com]
Sent: Monday, March 25, 2002 1:26 PM
To: 'php-general@lists.php.net'
Subject: [PHP] Regular Expressions? Help!
I am trying to do a match for an expression and it to a variable from the
output of a command:
<?php
$lines = file ($file);
while (list ($line_num, $line) = each ($lines)) {
$trimline = trim ($line);
$output = shell_exec ("$prog $cmdline $trimline &");
}
?>
How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"
I want to set each variable to a string and write it to a file.
Thank You for you help.
Roy
************************** PLEASE NOTE **************************
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above. If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php