Regex Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I have  a quirky behavior I'm trying to resolve.
I have a REGEX that will find a function definition in a php file:
.....function InsertQuery($table,$fields,$values).....
the REGEX is:
$regex='/function [a-z]* *([$a-zA-Z]*)/';
the problem is that:
1. a slash is automattically put in front of the $. This is good but I dont 
know how it gets there.
2.a slash is NOT put in front of the parenthesis. Thats bad
3. If I try to escape the parenthesis with a \ , I get \\.
Help 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux