Regular mining, is the Chinese have questions about (Help the teacher do the project, if this is difficult to remove, will not be able to evaluate the scholarship, thank you)

Source: Internet
Author: User
Regular mining, is the Chinese have problems (help the teacher to do the project, if this is difficult to remove, will not be able to evaluate the scholarship, thank you)
$str = " Chinese Medicine name " Ai ye Aiye

";


There are 1265 strings, as in the preceding code fragment.
There are two questions:
1. Capture the wormwood leaves Aiye, my code is as follows, why not? The content is empty.
Preg_match ('/' TCM name <\/strong> ' (. *) <\/p>/ius ', $str, $match 1);

2. I want to collect the Aiye is the English part, other don't, how to write code.
------Solution--------------------
 $str = ""  Chinese Medicine name  "AI yeh Aiye 

";
Preg_match ('/' Chinese Medicine name <\/strong> ' (. *) <\/p>/ius ', $str, $match 1);
Print_r ($match 1);
  Array 
(
[0] = " Chinese Medicine name " AI yeh aiye


[1] = wormwood leaves Aiye
)
why not?
 $str = ""  Chinese Medicine name  "AI yeh Aiye 

";
Preg_match ('/' Chinese Medicine name <\/strong> '. * (\w+) <\/p>/ius ', $str, $match 1);
Print_r ($match 1);
  Array 
(
[0] = " Chinese Medicine name " AI yeh aiye


[1] = AIYE
)
  • 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.