remove lex tag block from string
===

Hello i have this lex parser template which contains a callback tag which i want to be removed because i get an infinite loop.

i tried with php preg_replace but then i get a white screen.

the tag that i want to remove is in this format:


{{ search:query term="value" .. more attributes .. }}

  // any content between these tags needs to be removed as well, including new lines

{{ /search:query }}


And this is my try at preg_replace:

$text = preg_replace('@\{\{\ssearch:(.*?)\}\}(.*?)\{\{\s/search:(.*?)\s\}\}@is','',$text);

somehow i did something wrong! but what?