A positive expression matches the attribute value of an html tag. A positive expression matches the attribute value of an html tag. the expression attribute value needs to obtain the attribute value of an html tag due to work requirements. the regular expression is immediately generated. the tag is as follows: a positive expression matches the attribute value of an html tag, expression attribute value
Today, due to work requirements, we need to get the attribute values of html tags. now we think of a regular expression. the tags are as follows:
Required The cx and cy attribute values of the tag. after thinking about it, I wrote one:
$ Circle is the content of the above circle label
Preg_match_all ('/<\ s * circle \ s + [^>] *? Cx \ s * = \ s * (\ '| \")(.*?) \ 1 [^>] *? Cy \ s * = \ s * (\ '| \")(.*?) \ 1 [^>] *? \/? \ S *>/I ', $ circle, $ arr );
Var_dump ($ arr );
$ Arr [2] is the cx value, and $ arr [4] is the cy value.
Today, due to work requirements, the author needs to obtain the attribute value of the html tag and immediately thinks of a regular expression. the tag is as follows :...