I need help with little replacing:
Some text [ id ]
to…
Some text | id
I’m new in regular expression and I just don’t know, how to safely keep text inside [ ]… And I don’t want to use str_replace and trim… I have to use expressions (don’t ask why 😀 )… Can somebody help me?
This should work for non-nested square brackets:
OUTPUT