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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -