Regular Expressions 101

Library entries

URL

Vote

1

Regular Expression
pcre

/
^(?:(?:http|https|ftp|news)[:][\/]{2})?(?:www[\.])?(?:(?:[%][2-6][0-9a-fA-F]|[%][7][0-9a-eA-E]|[a-zA-Z0-9\-\._~])+)?(?:[\.]abogado|academy|accountants|active|actor|adult|aero|agency|airforce|app|archi|army|associates|attorney|auction|audio|autos|band|bar|bar|bargains|beer|best|bid|bike|bio|biz|black|blackfriday|blog|blue|boo|boutique|build|builders|business|buzz|cab|camera|camp|cancerresearch|capital|cards|care|career|careers|casa|cash|catering|center|ceo|channel|cheap|christmas|church|city|claims|cleaning|click|clinic|clothing|club|coach|codes|coffee|college|com|community|company|computer|condos|construction|consulting|contractors|cooking|cool|coop|country|credit|creditcard|cricket|cruises|dad|dance|dating|day|deals|degree|delivery|democrat|dental|dentist|desi|diamonds|diet|digital|direct|directory|discount|domains|eat|edu|education|email|energy|engineer|engineering|enterprises|equipment|esq|estate|events|exchange|expert|exposed|fail|farm|fashion|feedback|finance|financial|fish|fishing|fitness|flights|florist|flowers|fly|foo|forsale|foundation|fund|furniture|futbol|gallery|garden|gift|gifts|gives|glass|global|gop|gov|graphics|gratis|green|gripe|guide|guitars|guru|haus|healthcare|help|here|hiphop|hiv|holdings|holiday|homes|horse|host|hosting|house|how|immo|immobilien|industries|info|ing|ink|institute|institute|insure|int|international|investments|jetzt|jobs|juegos|kaufen|kim|kitchen|land|lawyer|lease|legal|lgbt|life|lighting|limited|limo|link|loans|lotto|ltda|luxe|luxury|maison|management|market|marketing|media|meet|meme|memorial|menu|mil|mobi|moda|moe|money|mortgage|motorcycles|mov|museum|name|navy|net|network|new|ngo|ninja|ong|onl|ooo|org|organic|partners|parts|party|pharmacy|photo|photography|photos|physio|pics|pictures|pink|pizza|place|plumbing|poker|porn|post|press|pro|productions|prof|properties|property|pub|qpon|realtor|recipes|red|rehab|reise|reisen|reit|ren|rentals|repair|report|republican|rest|rest|restaurant|reviews|rich|rip|rocks|rodeo|rsvp|sarl|schule|science|services|sexy|shiksha|shoes|singles|social|software|solar|solutions|soy|space|supplies|supply|support|surf|surgery|systems|tattoo|tax|technology|tel|tienda|tips|tires|today|tools|top|town|toys|trade|training|travel|university|uno|vacations|ventures|versicherung|vet|viajes|villas|vision|vodka|vote|voting|voto|voyage|wang|watch|webcam|website|wed|wedding|whoswho|wiki|work|works|world|wtf|xxx|xyz|yoga|zone)(?:[\.](?:ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|bq|br|bs|bt|bv|bw|by|bz|bzh|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw))?(?:[\/](?:[%][2-6][0-9a-fA-F]|[%][7][0-9a-eA-E]|[a-zA-Z0-9\-\._~]+)?(?:(?:[%][2-6][0-9a-fA-F]|[%][7][0-9a-eA-E]|[a-zA-Z0-9\-\._~])+)?)?(?:(?:[#](?:[]%][2-6][0-9a-fA-F]|[%][7][0-9a-eA-E]|[a-zA-Z0-9\-\._~])+)|(?:[?][=](?:[%][2-6][0-9a-fA-F]|[%][7][0-9a-eA-E]|[a-zA-Z0-9\-\._~])+))?$
/

Description

Loading markdown...
Submitted by anonymous - 7 years ago