Skip to content

Instantly share code, notes, and snippets.

View YatinAdityaT's full-sized avatar
🙃
Learning...

Sabito YatinAdityaT

🙃
Learning...
View GitHub Profile
@vitorbritto
vitorbritto / regex.md
Last active May 2, 2024 13:24
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@remram44
remram44 / http_directory.py
Last active September 16, 2022 00:14
Recursively download a directory with Python
from HTMLParser import HTMLParser
import urllib2
import os
import re
re_url = re.compile(r'^(([a-zA-Z_-]+)://([^/]+))(/.*)?$')
def resolve_link(link, url):
m = re_url.match(link)