You are here: Re: RegExp help « PHP Programming Language « IT news, forums, messages
Re: RegExp help

Posted by Steve on 11/08/07 20:23

<otrWalter@gmail.com> wrote in message
news:1194550910.202651.104320@t8g2000prg.googlegroups.com...
> Note: $code is a single line of code that the previous segment of this
> method has located.
>
> I have this...
>
> preg_match('/\bnew wBug\s*\(\s*(.+)\s*\);/i', $code, $arrMatches);
> $results = $arrMatches[1];
>
>
> it will find this...
>
> new wBug ( $myvar ); // <-- this is what $code contains
>
> and it will give me...
>
> $myvar

wait, wait, wait. so you are opening what apparently is a php script and
parsing it?

try:

/new\s+wBug\s?[^(]*\(\s*([^,)]*)[,)]/i

 

Navigation:

[Reply to this 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

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