나는이 스레드에서 다른 인용, 인용 부호로 둘러싸이지 않은, 인용, 인용 부호로 둘러싸이지 않은 ... 경우에 대한 정규식에 대한 질문을했습니다 . quoted, quoted, quoted, quoted, quoted ... etc ...와 같이 인용 부호가 붙은 따옴표가 아닌 이 있습니다. 나는 iterative 또는 recursive를 수행해야한다고 생각한다 ... 나는 예제를 설명 할 것이다.견적 태그 정규식 PHP는 일반적인 경우
some unquoted text11
[quote="person1"]some quoted text11[/quote]
[quote="person2"]some quoted text22[/quote]
[quote="person3"]some quoted text33[/quote]
some unquoted text22
...
[quote="person4"]some quoted text44[/quote]
...
결과 배열은 다음과 같아야합니다
Array //PRESERVED ORDER
(
[0] => Array
(
['type'] => unquoted
['name'] => ''
['text'] => some unquoted text11
)
[1] => Array
(
['type'] => quoted
['name'] => person1
['text'] => some quoted text11
)
[2] => Array
(
['type'] => quoted
['name'] => person2
['text'] => some quoted text22
)
[3] => Array
(
['type'] => quoted
['name'] => person3
['text'] => some quoted text33
)
[4] => Array
(
['type'] => unquoted
['name'] => ''
['text'] => some unquoted text22
)
...
[5] => Array
(
['type'] => quoted
['name'] => person4
['text'] => some quoted text44
)
...
}
안녕하세요. 당신이 시도한 것을 보여 주시겠습니까? – HamZa