Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
3.7k views
in Q2A Core by
Want to fetch full content under "<div class="qa-main">".
Im using preg_match to get that.. But im not able to find perfect pattern (regular expression) to get full content under qa-main class div.
Could you please help me on this?
by
I don't understand, what is the purpose of the regular expression?
by
Hi DisgruntledGoat, I want to extract Question, answers and comments in same format as shown in Q2A page.. I want to create a page to shown several questions and answers in single page or with pagination.

Could you please help me on this?

1 Answer

0 votes
by
$pattern = '~<div.*class="qa-main".*>(.*)<h2>Related questions</h2>~iUs';

Above pattern gives the exact content what i am expecting..
Thank you all, for looking into this issue..
...