RE: [PHP] Regex help
| From: | Albert | Date: | Fri, 13 Jan 2006 14:07:09 +0000 |
| Subject: | RE: [PHP] Regex help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-228557@lists.php.net to get a copy of this message | ||
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