Re: reg ex help

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

 



On Fri, 04 Nov 2005 14:09:06 -0500, conditional motion wrote:

> Here is what the field content from the database would look like.  I have
> removed any sensitive data.
> 
> str = "Name;;;;;Grill Transom (GT302)^%%%%% -----
> Sort;;;;;Find/Replace^%%%%% ----- Calc;;;;;2568.09x^%%%%% -----
> Type;;;;;Veck^%%%%% ----- PO Number;;;;;^%%%%% ----- Previous Order
> Number;;;;;^%%%%% ----- Fabric Whole;;;;;Dyna-Dry^%%%%% ----- Fabric
> ...

If you really want a regex.. something like:

  preg_match_all('/\s*([^;]+);{5}([^^]*)^/U', $str, $matches);
  var_dump($matches);

And you'll have an array of field => values (excuding the Coords field).


I do wonder why this is stored in the db like this.

Curt.
-- 
http://news.zirzow.dyndns.org/

-- 
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