Javascript-how to use regular expressions to match the text

Source: Internet
Author: User
& Quot; & amp; lt; pstyle & quot; text-align: center. 2 The company is mainly engaged in wholesale, with low profits and a large capacity of Superior. 3 Our factory shoes are produced independently, do not label not OEM 4 return for goods 7 days back 15 days for change, requirements: (1) does not affect secondary sales ..."

1 You do not need to compress the goods, zero inventory, we will send you a replacement.
2 The company is mainly engaged in wholesale, with low profits and a large capacity of Superior.
3. our factory produces shoes independently, without labeling or labeling.
4. 7 days for return and 15 days for replacement. requirements:
(1) secondary sales are not affected.
(2) seasonal products are not accepted
5. odor, chromatic aberration, easy removal of accessories, non-obvious rubber stains, scratches that cannot be clearly identified by the naked eye outside 1.5 meters, or small flaws that do not affect wearing, are not quality problems, all the shoes are processed from the factory. some shoes must have a slight taste and disappear after a day in the ventilated place. Different displays are used for each person, and light problems during photo taking may cause slight chromatic aberration, which is not a quality problem.

"

How can I use regular expressions to match the content in the p tag? As long as I am included by p tags, there may be span tags and strong tags in p tags. I also want these tags. In addition, the p tag may have other attributes such as class and style.

I only want the text contained by the p tag.

How can I use regular expression matching?

Reply content:

"

1 You do not need to compress the goods, zero inventory, we will send you a replacement.
2 The company is mainly engaged in wholesale, with low profits and a large capacity of Superior.
3. our factory produces shoes independently, without labeling or labeling.
4. 7 days for return and 15 days for replacement. requirements:
(1) secondary sales are not affected.
(2) seasonal products are not accepted
5. odor, chromatic aberration, easy removal of accessories, non-obvious rubber stains, scratches that cannot be clearly identified by the naked eye outside 1.5 meters, or small flaws that do not affect wearing, are not quality problems, all the shoes are processed from the factory. some shoes must have a slight taste and disappear after a day in the ventilated place. Different displays are used for each person, and light problems during photo taking may cause slight chromatic aberration, which is not a quality problem.

"

How can I use regular expressions to match the content in the p tag? As long as I am included by p tags, there may be span tags and strong tags in p tags. I also want these tags. In addition, the p tag may have other attributes such as class and style.

I only want the text contained by the p tag.

How can I use regular expression matching?

/^
  
   ].*>(.*)
   

&/

Phppreg_match_all

By the way, php should be enclosed in quotation marks

JsMatch (/The above regular expression/g)

Related Article

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.