iv php regex에서 질문이 있습니다. 예를 들어 우리는 콘텐츠를PHP는 preg_match var 길이를 계산합니까?
<?php
$str = '[code]anything[/code]';
preg_replace('#\[code\](.*?)\[/code\]#is', 'Code:'.strlen($1).'<pre>$1</pre>', $str)
?>
를 계산 내가 같이 어떤 일을 할 수있는 방법
<?php
$str = '[code]anything[/code]';
preg_replace('#\[code\](.*?)\[/code\]#is', 'Code:<pre>$1</pre>', $str)
?>
를 사용하는 경우 그 내 질문입니다. 희망 답변을 찾을 수 있습니다.
당신은'preg_replace_callback()'기능으로 살펴 봐야 할 수 있습니다. – ridgerunner