Ask a regular expression of the relevant questions,

Source: Internet
Author: User
Tags sodium
Ask a regular expression of the problem, urgent urgent ~
Want to do a news gathering program, using curl to collect the HTML code
I want to use regular expressions to split up the data I need.
For example:






Keywords: mustard diet



Shepherd's Purse, also known as Incense camelina, ling, cabbage, Ching Ming cuisine, is a kind of light green flowers of the herb, is not only delicious wild vegetables, but also has a variety of efficacy of Chinese medicine. It has strong vitality, widespread distribution, spring fields can be excavation everywhere. As wild vegetables, shepherd's purse is a lot of cooking methods, can be cold, can be fried, can be stewed, can enter the soup, but also used to do stuffing, are rare in the spring green Jiapin.


As a drug, in the "daughter side, food treatment", "famous doctors do not record", "South Yunnan Materia Medica" and other Materia medica in the early records. Its sexual taste, gan, light, cool, can enter the liver, spleen, stomach, bladder meridian, with cool liver hemostasis, liver eyesight, heat and dampness efficacy; used for treating vomiting, epistaxis blood, hemoptysis, urine, metrorrhagia, eye swelling, bleeding, fundus hemorrhage, cold fever, hypertension, red and white dysentery, nephritis edema, celiac disease and many other diseases. such as the treatment of internal injuries to vomit with shepherd's purse, dates each 30 grams of water-fried clothing, metrorrhagia and menstrual too much with Shepherd's purse, dragon teeth grass each 30 grams of water-frying, urine with fresh shepherd's purse 125 grams of water-frying, winter honey clothing or add tan charcoal 3 grams blunt, treatment of hypertension with Shepherd's Purse, Prunella vulgaris 30 grams


Modern pharmacological research proves that: Shepherd's purse contains oxalic acid, tartaric acid, malic acid, pyruvate, amino benzene sulfonic acid and other organic acids and a variety of amino acids, and contains choline, acetylcholine, Sls alcohol, mannitol and potassium, calcium, sodium, chlorine, phosphorus, manganese and so on. The experimental study found that: Shepherd's purse decoction and the flow of extract to mice, cats, rabbits can make the uterus excited. Alcohol extracts can reduce blood pressure in dogs, cats, rabbits and rats. The effect of the extract on the coronary arteries of dogs and guinea pigs was inhibited by artificial gastric ulcer in rats, which had a diuretic effect on mice. Clinical practice has proved that the taste of the shepherd's purse is peaceful, has a wide range of uses and good curative effect, and all have no bogey, can rest assured use.




Article Source:





I want to get

Shepherd's Purse, also known as Incense camelina, ling, cabbage, Ching Ming cuisine, is a kind of light green flowers of the herb, is not only delicious wild vegetables, but also has a variety of efficacy of Chinese medicine. It has strong vitality, widespread distribution, spring fields can be excavation everywhere. As wild vegetables, shepherd's purse is a lot of cooking methods, can be cold, can be fried, can be stewed, can enter the soup, but also used to do stuffing, are rare in the spring green Jiapin.


As a drug, in the "daughter side, food treatment", "famous doctors do not record", "South Yunnan Materia Medica" and other Materia medica in the early records. Its sexual taste, gan, light, cool, can enter the liver, spleen, stomach, bladder meridian, with cool liver hemostasis, liver eyesight, heat and dampness efficacy; used for treating vomiting, epistaxis blood, hemoptysis, urine, metrorrhagia, eye swelling, bleeding, fundus hemorrhage, cold fever, hypertension, red and white dysentery, nephritis edema, celiac disease and many other diseases. such as the treatment of internal injuries to vomit with shepherd's purse, dates each 30 grams of water-fried clothing, metrorrhagia and menstrual too much with Shepherd's purse, dragon teeth grass each 30 grams of water-frying, urine with fresh shepherd's purse 125 grams of water-frying, winter honey clothing or add tan charcoal 3 grams blunt, treatment of hypertension with Shepherd's Purse, Prunella vulgaris 30 grams


Modern pharmacological research proves that: Shepherd's purse contains oxalic acid, tartaric acid, malic acid, pyruvate, amino benzene sulfonic acid and other organic acids and a variety of amino acids, and contains choline, acetylcholine, Sls alcohol, mannitol and potassium, calcium, sodium, chlorine, phosphorus, manganese and so on. The experimental study found that: Shepherd's purse decoction and the flow of extract to mice, cats, rabbits can make the uterus excited. Alcohol extracts can reduce blood pressure in dogs, cats, rabbits and rats. The effect of the extract on the coronary arteries of dogs and guinea pigs was inhibited by artificial gastric ulcer in rats, which had a diuretic effect on mice. Clinical practice has proved that the taste of the shepherd's purse is peaceful, has a wide range of uses and good curative effect, and all have no bogey, can rest assured use.



, how do you write a regular expression? The great God knows the words, please point out, thank you ~ ~ Regular Expressions PHP HTML


------Solution--------------------
Preg_match_all ('/

(. +) <\/p>/su ', $s, $m);
Print_r ($m);
------Solution--------------------
If you want to crawl more stable, it is recommended that you remove all the HTML tags, only keep the text, the text into an array, the advantage of the other side of the site has some small adjustment action will not affect your crawl.

  • 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.