resago Posted February 6, 2008 Share Posted February 6, 2008 this $a=preg_replace('/md5 *\( *(.+) *\)/is','$1',$a);#in case we missed some in the first pass mostly works, except for: before: $sQuery = "UPDATE `Profiles` SET `Password` = md5(`Password`) WHERE `ID`='{$memb_arr['ID']}'"; and after: $sQuery = "UPDATE `Profiles` SET `Password` = `Password`) WHERE `ID`='{$memb_arr['ID']}'"; any suggestions? I'm guessing cause my regex is greedy, but I don't see how its matching if its being greedy. Quote Link to comment Share on other sites More sharing options...
resago Posted February 6, 2008 Author Share Posted February 6, 2008 its leaving the ) in the match for some reason? the regex is to remove the md5 function from my scripts without me having to edit them all by hand. it reads the entire file into a string, hense the /s Quote Link to comment Share on other sites More sharing options...
laffin Posted February 6, 2008 Share Posted February 6, 2008 $a=preg_replace('/md5 *\( *([^\)]+) *\)/is','$1',$a); try a different approach Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.