Skip to content

Instantly share code, notes, and snippets.

View Meechlouch's full-sized avatar
🎯
Focusing

D. Dillard Meechlouch

🎯
Focusing
View GitHub Profile
@Meechlouch
Meechlouch / gist-template.md
Last active February 16, 2021 17:27
Tutorial of Regex that validates a URL

URL Validation using Regex.

Given a character of strings, we want to determine if the given string is a valid URL address. To do this in JavaScript would take many lines of code along with many conditional statements. Well, thank goodness we can get the job done with a little something called Regular Expressions. Regular Expressions or Regex for short, are a series of special characters that define a search pattern.

Summary

This is the Regex code snippet that is used to validate a URL: