Good day!
I would like some help in removing strings inside the square brackets and including the square brackets.
The string looks like this:
$string = "Lorem ipsum dolor<br /> [ Context are found on www.example.com ] <br />some text here. Text here. [test] Lorem ipsum dolor.";
I just would like to remove the brackets and its contents that contain "www.example.com". I would like to retain "[test]"
in the string and any other brackets have no "www.example.com"
in them.
Thanks!