In PHP Remove Value of Attributes using Regex -
say have following string:
<a name="anchor" title="anchor title">
currently can extract name , title strpos , substr, want right. how can regex? , if wanted extract many of these tags within block of text?
i've tried regex:
/name="([a-z,a-z])\w+/g
but gets name=" part well, want value.
the regex (\s+)=["']?((?:.(?!["']?\s+(?:\s+)=|[>"']))+.)["']?
can used extract attributes
Comments
Post a Comment