Skip to content
Advertisement

replace full bbcode tag by empty not working php

I need to replace a full bbcode tag by an empty space (in this example by a “M”)

This is my php code so far

JavaScript

regex replacement

JavaScript

EXPECTED OUTPUT

JavaScript

Im using this regex [MSG='(.*?)'](.*?)[/MSG] what is wrong with it?

Advertisement

Answer

Try this regex

or

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement