RE: Regex help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Smith wrote:
> I'm trying to save myself some time by extracting certain variables
> from a string:
>
> 102-90 E 42 X 42 X 70 3/8

If this string is always in this format 

<xxx> E <panel> X <width> X <height>

then you could try something like:

// Very much untested
$unit = '102-90 E 42 X 42 X 70 3/8';
$split1 = explode('E', $unit);
list($panel, $width, $height) = explode('X', $split1[1]);

Albert

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.17/228 - Release Date: 2006/01/12
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux