I have one string which contains multiple parenthesis: Like this:
(This) (is a (test)) string, (Testing) should be (done (here)).
I have already tried some regex which I have found on the net. But as I am not so familiar with regex. Help is needed.
I have tried this:
$text = '(This) (is a (test)) string, (Testing) should be (done (here)).';
preg_match_all("/\([^\)]*\)/", $text, $matches);
You can have a look at this: https://regex101.com/r/8QCwOP/1
And I want result like this
- This
- is a (test)
- Testing
- done (here)