php - RegEx to find anchor element in HTML page -


i have string mixed content of plain text , html tags. example:

the state of <a href="/wiki/texas" title="texas">texas</a> cool place 

i want search specific string in html page using php file_get_contents().

eventually, want replace string string mixed content.

i tried preg_replace(), didn't work.

is going easy task regex? can give example? i'm starting out regex. if not suitable can please suggest solution.


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -