Alice cos Alice dress Alice in Wonderland Alice Crazy return Alice Flower Pot Alice hands-on Alice maid Alice Park Alice Phil Alice hand bag Alice Retro-Love-Alice-Alice
I'm going to take this page now.
to the
The value of the title in this section and the value of the HREF, because the page has this format elsewhere, so it is now used directly
$contents _key = ' ~ ';p reg_match_all ($contents _key, $html, $contentskey);
This will include the DD tag in the same format as well, ask how this regular should be written?
Reply to discussion (solution)
In two steps, we first match the contents of the DD tag and apply your regular.
First put
to the
Between the grab to go out and then to parse inside the title and link
In two steps, we first match the contents of the DD tag and apply your regular.
But now the direct crawl of the DD tag is also not captured
There are many spaces in the middle of the DD tag, which I can't match with (. *?).
What is the end result you want?
What is the end result you want?
I want to title= "Here is what I want" href= "here is what I want", and it is best to be a regular, feel two regular to match two times, efficiency is not a bit too low?
$s =<< Alice cos alice dress Alice in Wonderland Alice Crazy return Alice Flower pot Alice Hands-on Alice maid Alice School Park Alice Phil Alice hand bag Alice Retro Dafdsafdiv;preg_match ('/
(. +?) <\/dd>/s ', $s, $m); echo $m [1];
Alice Cos
Alice dress
Alice in Wonderland
Alice's crazy comeback
Alice Flower Pot
Alice hands
Alice
Maid
Alice Learning Park
Alice Phil
Alice Hand Bag
Alice Retro
Try this match for DD content
$pattern = '/
. *<\/dd>/is '
Modifier I: not case
Modifier s: A "point" in the pattern will match all characters, including line breaks. Without him, the change would be ruled out. This modifier is equivalent to the/s modifier in Perl
$contents _key = ' ~
([\s\s]*?)
~';
I thought of it myself, this is done.