One of the biggest challenges of programming with web interfaces and various web applications is consistently parsing through URLs.
It can often be incredibly difficult and messy to find certain pieces of a URL, or even just simply determining if a user input is a URL to begin with.
Thankfully most general purpose programming languages these days have built in or third party libraries that allow usage of matchers called Regular Expressions (often called "regex" or "regexp"). These handy character sequences allow developers to easily detect and parse through strings fitting a particular pattern.
In this gist, I'll be breaking down one to help with URLs: