Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

cubryto on "Filter content with preg_replace"

$
0
0

Hi,
I have the content with the following format

1) This is question 1?
Answer: Answer for question 1

2) This is question 2?
Answer: Answer for question 2
...

I would like to use prey_replace to replace the answer after the word "Answer:". So it will look like this

1) This is question 1?
Answer: Some strings

2) This is question 2?
Answer: Some strings
...

I am not familiar with regular expression. I've trying but cannot get what I want. I hope someone can help me on this one. Thank you.


Viewing all articles
Browse latest Browse all 8245

Trending Articles