Delete part of text by delimiters [duplicate]

1

Text:

Example [caption id="attachment_90" align="alignleft" width="400"] xxxxxxxxxxxxxxxxxxxx [/ caption]

How to exclude every expression above the text.

    
asked by anonymous 02.06.2016 / 18:35

1 answer

1

You can use regex to remove. If you're using PHP, you can use preg_replace (see the manual ) with following expression: \[.*?\] .

Take a look at this example here: link

    
02.06.2016 / 21:20