Reply to Re: [PHP] reg ex help

Your name:

Reply:


Posted by Curt Zirzow on 11/04/05 21:22

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/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация