Skip to content

Instantly share code, notes, and snippets.

View Ronin1702's full-sized avatar

KodeBear Ronin1702

View GitHub Profile
@IVignollesJeong
IVignollesJeong / HexValueRegex.md
Last active September 6, 2023 22:39
This is a Gist of Hex Value regular expressions

Hex Value matching Regex Tutorial

Regex (Regular Expressions) are a series of special characters used to define a search pattern. Hex values are typically used to identify colors, though they have other uses as well. This Gist was created to serve as a tutorial for understanding the components of regular expressions!

Summary

Hex values are typically used to identify elements such as color. You may have seen them in CSS files or even in the paint section at home improvement stores! These values begin with a # followed by a mix of six numbers or letters.

@ceresmarkley
ceresmarkley / URLregex.md
Last active August 31, 2023 00:44
URL Regular Expression (Regex) Tutorial

URL Regex Search Pattern

Hello and Welcome! This is a quick tutorial on a URL regex, also known as a regular expression!

Summary

Regular expressions, or REGEX for short, are a series of special characters that define a search pattern. Take the following example of a regular expression, which we’ll call “Matching a URL”:

/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/

JC's Regex Tutorial

Regex is short for regular expression, and you may also see some people use RE to refer to that as well. This is a concept in computer science. By using this rule you can match the string. So that Regular expressions are often used to match, retrieve, and replace text that matches a pattern.

Summary

We will talk about the basic Regex components next. Hopefully you will understand /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/ after reading this tutorial. Just a reminder; if you want to use Regex in JavaScript, add / before Regex without space and add another / after Regex without space to let JS know you want to get string only.

Table of Contents

@derekmeduri
derekmeduri / RegexTutorial.MD
Last active August 31, 2023 00:14
Matching a URL with Regex Tutorial

Matching a URL with Regular Expression Tutorial

This guide was created to help myself and you learn more about regular expressions and how to use them. Regular expressions are special characters that define a search pattern.

Summary

The regular expression, or regex for short, below is a search pattern for matching a Url. Since this regular expression is between two slashes it is called a regular expression literal. It is made up of anchors, grouping constructions, bracket expressions, and quantifiers. We will look at each component of the regular expression so they make more sense.
/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/