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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -