Regular expression (. *?) Or (* +)

turn:

Regular Expression in the reptile can better take the data you want, when you can deal with some of those anti-crawling sites.

Behind one more? He expressed lazy mode. 
Must follow * + or behind with 
as: <IMG src = " test.jpg " width = " 60px " height = " 80px " /> 
if the contents of the regular non-lazy src matching pattern matching 
src = " . * " 
Matches They are: src = " test.jpg " width = " 60px " height = " 80px " 
meaning from = " next match until the last " match ends 
 
lazy regular pattern: 
src = " .= " Test.jpg " 
because the first match , " ended a match will not continue to match back, because he was lazy thing. 
 
. Represents any character except \ n The
 * indicates a match 0- infinity

+表示匹配1-无穷

 

Guess you like

Origin www.cnblogs.com/sggggr/p/12368890.html