php tutorial ereg() how to convert htm to xml file
Syntax: int ereg(string pattern, string string, array [regs]);
Return value: integer/array
$text = "
This is some text here "
".";
ereg("(([^<"]|[^<]*<[^/][^<])*("[^"]*"([^<"]|[^< ;]*<[^/][^<])*)*)?
", $text, $matches);
echo "Found text: " . $matches[1] . "n";
?>
Content Description
This function uses pattern rules to parse and compare string strings. The value returned by the comparison result is placed in the array parameter regs. The content of regs[0] is the original string, regs[1] is the first string that conforms to the rules, and regs[2] is the second string that conforms to the rules. string, and so on. If the parameter regs is omitted, it will simply be compared, and the return value will be true if found.