Reply to Capturing substrings with preg_match_all()

Your name:

Reply:


Posted by ngmr80 on 06/05/07 15:18

Hi,

I'm experiencing a problem when trying to capture substrings with
preg_match_all() from strings like

"set('Hello','World')"

using the following Regular Expression (PERL syntax):

"/^set\((?:'([^']+)'(?(?!\)),))+\)$/"

The resulting matches array looks like this:

Array
(
[0] => Array
(
[0] => set('Hello','World')
)

[1] => Array
(
[0] => World
)

)

I wonder why "Hello" is not in the matches array. Did I do something
wrong in my Regular Expression?

Thanks in advance.
Ingmar

[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

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