Jump to content

[SOLVED] bbcode match front and back tags with or


sarathi

Recommended Posts

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.