Re: Parsing a string
| From: | Michael J. Pawlowsky | Date: | Fri, 03 Jan 2003 14:58:37 +0000 |
| Subject: | Re: Parsing a string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130107@lists.php.net to get a copy of this message | ||
Just use explode() and then dont use what you dont want.
Mike
*********** REPLY SEPARATOR ***********
On 03/01/2003 at 9:49 AM Greg wrote:
>Hi-
>I'd like to parse the string returned by popen("uptime", "r");. The
>string
>that is returned is:
>
>9:47am up 37 days, 16:24, 1 user, load average: 0.09, 0.02, 0.00
>
>What I'd like is 5 strings...the first contains "37 days, 16:24", the
>second
>"1 user", the third "0.09", the fourth "0.02", and the fifth
>"0.00".
>
>Any easy way to do this? Thanks very much in advance!
>-Greg
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php