Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Match links in the text which are not being inside any HTML element or as element's attribute
(?<!="|>)(((ht|f)tps?\:\/\/)\S+)(?!")
="http://example.com">dsodjfaf</a> fhfdjhdjs fdjhksd http://example.com <a href="http://example.com">dsodjfaf</a> dsskjgdhjghsjg dsad asda <a href="#">http://example.com</a> <div>http://example.com</div> example.com http://example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment