Regular expression indicates the rule after line feed. this is the content tip_lb_jianjie "& gt; updated on: & nbsp; 00:42:36 & lt; br & nbsp;/& gt; content preview: & nbsp; "Stop !? Who are you !?" Soldiers outside the compound raised the & nbsp; in their hands to express the rules after the new line,
This is the content
Tip_lb_jianjie "> Last Updated: 00:42:36
Content preview:
"Stop !? Who are you !?"
Soldiers outside the compound raised their hands a bit strange.
...
$ Guize2 = "/tip_lb_jianjie \"> Update Time \:(.*?)
[\ N * | \ r *] * content preview :(.*?) /I ";
You can get a time, but you cannot get the content. I also use \ n \ r for line breaks. But it cannot be matched.
Let me see. Shared to: Updated on? 00:42:36 Content preview :? "Stop !? Who are you !?" Soldiers outside the compound raised their hands ?... 'Data-pics = ''>
------ Solution --------------------
$ S = <TXT
Tip_lb_jianjie "> Last Updated: 00:42:36
Content preview:
"Stop !? Who are you !?"
Soldiers outside the compound raised their hands a bit strange.
...
TXT;
$ P = "/tip_lb_jianjie \"> Update Time :(.*?)
. * Content preview :(.*?) <\/Div>/is ";
Preg_match_all ($ p, $ s, $ r );
Print_r ($ r );
Array
(
[0] => Array
(
[0] => tip_lb_jianjie "> Last Updated: 00:42:36
Content preview:
"Stop !? Who are you !?"
Soldiers outside the compound raised their hands a bit strange.
...
)
[1] => Array
(
[0] => 00:42:36
)
[2] => Array
(
[0] =>
"Stop !? Who are you !?"
Soldiers outside the compound raised their hands a bit strange.
...
)
)