Regex: Finding wrong hyperlink in url -


was looking see if knew of way detect, through regex, mismatched hyperlinks within link

example:

www.google.com, in email, hyperlinked yahoo.com

www.google.com, pointing internetbadguys.com

you can use /<a.*?href=\"http[s]?:\/\/([\w\.]+).*?\".*?>(?!\1).*<\/a>/g. test online

since have not provided sample code, have assumed few cases.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -