Skip to content

Instantly share code, notes, and snippets.

View karthick18's full-sized avatar

A R Karthick karthick18

View GitHub Profile
Single-line version of pattern:
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))
Extended version of same pattern:
(?xi)
\b
( # Capture 1: entire matched URL
int main()
{
__asm__(";foo");
char a[1024] = {0,};
__asm__(";end");
/*
# 4 "x.c" 1
;foo
# 0 "" 2
leal 12(%esp), %ebx