[quote] ??? [/ quote]을 (를) 감지하는 정규식을 설정하려고 시도 중입니다.RegEx를 통한 BBCode
는$post['body'] = preg_replace("/\[quote\](.+?)\[\/quote\]/is", '', $post['body']);
는 사람이 올바른 방향으로 날 지점 수 :
이것은 내가 가지고 있지만 그것이 작동하지 않는 무엇인가?
[quote] ??? [/ quote] 전후의 라인 브레이크도 제거하고 싶습니다.
$text = "I am trying to setup a regex that will detect [quote]???[/quote] and will remove it.\r\nThis is what I have but it is not working:";
$sentences = preg_replace("/\[quote\](.+?)\[\/quote\]/is", '', $text);
echo '<pre>'.print_r($sentences, true).'</pre>';
그리고 내 출력 :
I am trying to setup a regex that will detect and will remove it.
This is what I have but it is not working:
당신은 볼 수 있습니다
$post['body'] = preg_replace("/\[quote\](.+?)\[\/quote\]/is", '', $post['body']);
그냥 그것을 알아 냈 :'$ 포스트 [ '몸'] = preg_replace이다를 (".?/\ [인용 \] (+) \ [\/인용 \] /이다 ',' ', $ post ['body ']); $ body = trim (rtrim ($ post [0] [ 'body'])); ' – ATLChris