Reply to Re: Some help on using regex

Your name:

Reply:


Posted by Jamie Alessio on 03/30/05 03:26

> Im having a problem matcing some code using preg_match_all. The regex
> statement needs to be very flexiable. The code im using is:
>
> <project>(\n| |.)+<project>
>
[snip]
> -==- Output from socket -==-
> <project>
> <master_url>http://climateprediction.net/</master_url>
> <project_name>climateprediction.net</project_name>
> <user_name>Bob</user_name>

Why are you trying to parse this data with a regex? It looks like XML
data to me so you should be able to easily break the data up using PHP's
XML functions. If you're using PHP5 take a look at
http://us3.php.net/simplexml and if you're using PHP4 there a number of
other options but I'm not familiar enough with any of them to give a
recommendation.

- (a different) Jamie

[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

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