PHP ereg () convert HTM to XML file implementation Method _php tutorial

Source: Internet
Author: User
Tags ereg
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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.