PHP Tutorial Ereg () convert HTM to XML file implementation method
Syntax: int ereg (string pattern, string string, array [regs]);
return value: Integer/array
$text = "
This was some text here "
".
";
Ereg ("
(([^< "]| [^<]*<[^/][^<]) * ("[^"]* "([^<"]|[ ^<]*<[^/][^<]) *)?
", $text, $matches);
echo "Found text:". $matches [1]. "N";
?>
Content Description
This function parses string strings with the rule of pattern. The value returned from the result is placed in the array parameter regs, Regs[0] content is the original string, string, Regs[1] is the first rule of the string, Regs[2] is the second rule of the string, and so on. If the parameter regs is omitted, it is simply a comparison, and the return value is true if found.
http://www.bkjia.com/PHPjc/445344.html www.bkjia.com true http://www.bkjia.com/PHPjc/445344.html techarticle PHP Tutorial Ereg () converts the HTM into an XML file implementation method syntax: Int ereg (string pattern, string string, array [regs]); return value: integer/Array $text = This is som e text here. ; Ereg ...