anarchoi Posted February 7, 2008 Share Posted February 7, 2008 i'm trying to remove anything between parentheses in $meuh2 i tryed this: $result = preg_replace ("/((.*))/", "new stuff", $meuh2); but it won't work Also, would it be possible to do the replacement only if the parentheses are at the BEGINNING of $meuh2 ? thanks Quote Link to comment Share on other sites More sharing options...
effigy Posted February 7, 2008 Share Posted February 7, 2008 Parentheses are metacharacters, so they must be escaped when you want to match literals. /\A\(.*?\)/ 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.