dadamssg Posted August 7, 2009 Share Posted August 7, 2009 this is a pattern that matches "{b}whatever{/b}" $regex = "#([{]b[}])(.*)([{]/b[}])#e"; how do i replace the {'s with brackets? trying to write some bulletin board code so i want it to match "[ b ]whatever[ /b ]"...except without the spaces Quote Link to comment Share on other sites More sharing options...
dadamssg Posted August 7, 2009 Author Share Posted August 7, 2009 nevermind..figured it out! $regex = "#([\[]b[\]])(.*)([\[/]/b[\]])#e"; 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.