You guys, please advise how to write a regular expression. Capture a piece of content in the webpage: {code...} the regular expression I wrote is: {code...} can pass through the regular expression tester, but cannot run the result on php. How should I modify it? You guys, please advise how to write a regular expression. Capture a piece of content on a webpage:
Business Address: opposite to the north gate of Sunshine Plaza, Asian Games Village, Chaoyang district, Beijing
My regular expression is:
"\s*?.*?(.*?)\s*?
"
It can pass through the regular expression tester, but cannot run the result on php. How should I modify it?
Reply content:
You guys, please advise how to write a regular expression. Capture a piece of content on a webpage:
Business Address: opposite to the north gate of Sunshine Plaza, Asian Games Village, Chaoyang district, Beijing
My regular expression is:
"\s*?.*?(.*?)\s*?
"
It can pass through the regular expression tester, but cannot run the result on php. How should I modify it?
You can solve this problem by using xpath. "// P // span [contains (@ class, 'info-detail')]/text () [1]"
How to write the regular expression.