I have this expression
<h3 id="productPageRightSectionTop-authors-h3">de <a id="productPageRightSectionTop-author-lnk" data-id="2316">José Saramago</a>; Ilustração: <a id="productPageRightSectionTop-entidade-lnk">João Caetano</a> </h3>
i made this one
<h3 id="productPageRightSectionTop-authors-h3">de <a id="productPageRightSectionTop-author-lnk" data-id="[0-9]+">(.+)</a>
but is getting everything and i just want this part
<a id="productPageRightSectionTop-author-lnk" data-id="2316">José Saramago</a>
Do you have any idea how i can do that?
The problem is at the end of the regex:
data-id="[0-9]+">(.+)</a>
(.+)
is too greedy and match everything afterwards. Changing that part to:
data-id="[0-9]+">[^<]*</a>
should fix the selection. The selector should look like:
<h3 id="productPageRightSectionTop-authors-h3">de <a id="productPageRightSectionTop-author-lnk" data-id="[0-9]+">[^<]*</a>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments