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 -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -