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

angular - DownloadURL return null in below code -

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -