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 Link to comment https://forums.phpfreaks.com/topic/169167-solved-preg_replace-help/ 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"; Link to comment https://forums.phpfreaks.com/topic/169167-solved-preg_replace-help/#findComment-892602 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.