![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| hi, novice on regex, i'm searching for THE master Regex will retieve php variable name like "$varname" in my script. $tagparse = fil_gzet_contents('myscript.php'); preg_match_all("(.\$)", $tagparse, $out ); thank for your help | |||
| Advertisements |
| | #2 | ||
| "Sebosac" <sebosac@wanadoo.fr> wrote in message news:1179425971_309@qrz.fr... > hi, novice on regex, i'm searching for THE master Regex will retieve php > variable name like "$varname" in my script. > > > $tagparse = fil_gzet_contents('myscript.php'); > preg_match_all("(.\$)", $tagparse, $out ); > > > thank for your help What at you trying to find in "myscript.php", any variable names? Maybe something like this... preg_match_all("/\$\S+/", $tagparse, $out ); Should do a pattern match for "$" and any not whitespace characters after the dollar sign. Tom -- Newsguy.com - Express Accounts - 30 GB $9.95 / month | |||
| | #3 | ||
| Tom a écrit : > "Sebosac" <sebosac@wanadoo.fr> wrote in message > news:1179425971_309@qrz.fr... >> hi, novice on regex, i'm searching for THE master Regex will retieve php >> variable name like "$varname" in my script. >> >> >> $tagparse = fil_gzet_contents('myscript.php'); >> preg_match_all("(.\$)", $tagparse, $out ); >> >> >> thank for your help > > What at you trying to find in "myscript.php", any variable names? Maybe > something like this... > > preg_match_all("/\$\S+/", $tagparse, $out ); > > Should do a pattern match for "$" and any not whitespace characters after > the dollar sign. > > Tom here what i'm trying to do : "myscript.php" ccontaint someyhing like this : $_Runtime_conf['config']['runtime']['_PRINCIPAL_CAT_SUBINDEXES_']=_CORE_MODULES_PRINCIPAL_MODULES_INDEXES($lien[1] ); foreach($_Runtime_conf['config']['runtime']['_PRINCIPAL_CAT_SUBINDEXES_'] as $dref){ //echo( "<a href=\"?p=".$dref[7]." \" class=\"poggle_blue\" > ".$dref[8]."</a> " ); echo("<li><a href=\"?p=".$dref[1]."\"> ".$dref[8]."<span></span></a></li>"); all_menu_site_map($dref); } and the reason of i need a regexp is to retrieve php Variable and Function name to Eval() them. i work on a Content System Manager, atemplate like system, after all my try, a simple get_file_content, replace keywork and finish with eval() on php code was unsuccessful and eval set me to "error in eval's code at line 1", why, i can't explain this. | |||
| Featured Websites | ||||
|
![]() |
| Tags: name, php, regex, variable |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| RE: split with regex | Armand B | PHP | 0 | 05-20-2007 6:33 PM |
| split with regex | Patrick | PHP | 4 | 05-20-2007 6:33 PM |
| Featured Websites | ||||
|