Hey guys I'm here again with another problem. I want to search in a string for a string with quotes in it.
Example:
String to search = {' </a></div></div></div><div class="clearfix"><table cellspacing="0" class="wsod_quoteData"><tr><td class="wsod_last wsod_lastIndex" nowrap="nowrap" '}
What to search for = {' <table cellspacing="0" class="wsod_quoteData"> '}
Then if found, from there, search for {' </table> '}
How can I search for the first string if it has quotes and spaces in it?
What I have so far:
//DataHolding is a string that contains the entire HTML file contents in it.
size_t Start = DataHolding.find("<table cellspacing=\"0\"" " class=\"wsod_quoteData\">", 46);
size_t End = DataHolding.find("</table>", Start, 8);
The strings never get found..
My PHP version (THIS WORKS):
$content = str_replace($newlines, "", html_entity_decode($raw));
$start = strpos($content,'<table cellspacing="0" class="wsod_quoteData">');
$end = strpos($content,'</table>',$start) + 8;
$table = substr($content,$start,$end-$start);
preg_match_all("|<td(.*)</td>|U",$table,$rows);