sarathi Posted July 31, 2009 Share Posted July 31, 2009 I have this regex code to use with preg_replace();, It's part of an array. '/(\[code|html|php|css\])(.+)(\[b\])(.+)(\[\/b\])(.+)(\[\/code|html|php|css\])/Usi', and I'm wondering if it is possible to make it so the opening and closing tags e.g.(code|html|php|css) have to match for this to work? Quote Link to comment https://forums.phpfreaks.com/topic/168224-solved-bbcode-match-front-and-back-tags-with-or/ Share on other sites More sharing options...
sarathi Posted July 31, 2009 Author Share Posted July 31, 2009 Nvm, I figured out that I can use [/\\2] instead of to match the first tag. Quote Link to comment https://forums.phpfreaks.com/topic/168224-solved-bbcode-match-front-and-back-tags-with-or/#findComment-887344 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.