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

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -