I built a Perl-style regex to match function calls in C-like
languages where $name is the functions name. The functions
are assumed to accept a single string as parameter.

Here it is.


The expression is successfully preg_match'ed on a stream
of code, but when preg_replace is passed the same expression
it does not return. The piece of code I tested this with was
fairly small so that an increased demand of computation time
is unlikely be the reason for this behaviour.

Substituting the subexpression (.*) by ([^\"]*) remedies this.

The version of the PHP install is 4.05.

Any ideas?

  D. Alvarez Arribas <[EMAIL PROTECTED]>

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to