I'm creating my own forum and stuck with removing multiple quoted text from replies. I'll try to explain this with example.
Let's say we got first message with text Hello A.
Then somebody quotes this and we get: [q]Hello A[/q] Hello you too
in database.
And if third person quotes second reply it goes more ugly and will be something like: [q] [q]Hello A[/q] Hello you too[/q] Hello both
.
What I want do to is to remove all but the last quoted replies from quoted text. So in this case on third reply I want to strip [q]Hello A[/q]
inside 3rd quote.
How to make it work on unlimited [q]'s?
edit: How to replace multiple [q]something[/q] inside the main [q] which is the first one? -> [q] [q]A[/q] B[/q] -> becomes -> [q]B[/q]
OR [q][q][q]A[/q]B[/q]C[/q] -> becomes -> [q]C[/q]