0
안녕하세요 저는 무한 루프가 발생하기 때문에 제거하려는 콜백 태그가 들어있는이 렉스 파서 템플릿을 가지고 있습니다.문자열에서 lex 태그 블록을 제거하십시오.
PHP로 시도한 preg_replace
하지만 흰색 화면이 나타납니다. 내가 제거하려는 태그는이 형식으로되어 있습니다 :
{{ search:query term="value" .. more attributes .. }}
// any content between these tags needs to be removed as well, including new lines
{{ /search:query }}
을 그리고 이것은 preg_replace이다에서 내 시도입니다 :
$text = preg_replace('@\{\{\ssearch:(.*?)\}\}(.*?)\{\{\s/search:(.*?)\s\}\}@is','',$text);
그러나이 작동하지 않습니다. 왜 그런 충고가 있니?