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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -