Let’s Know Somethings About RegEx

jwolt junaid
2 min readJul 6, 2021

What is RegExp

A regular expression is a sequence of characters that specifies a search pattern. Usually, such patterns are employed by string-searching algorithms for “find” or “find and replace” operations on strings, or for input validation. it’s a way developed in theoretical computing and formal language theory.

Learn More

Why do you need it

Regular expressions are useful in search and replace operations. Also, it’s being used application form validation. the standard use case is to seem for a substring that matches a pattern and replace it with something else. Most APIs using regular expressions allow you to reference capture groups from the search pattern within the replacement string.

Learn More

Best way to learn RegExp

Everyone has a different choice to learn new technologies, as every human is different. But here I will tell you what I would like to learn about new technologies.

When I have to learn about a new technology, at first I try to find a video tutorial. I try to learn the basic things by a video tutorial first. Once I have learned the basic things through a video tutorial then I read different documents and books to master that technology. So in a short word, video tutorial for the basic thing and then documents, books and google search to master that technology.

If you would like to learn through a video tutorial, here I am giving you a youtube playlist which I found really awesome to learn the basic things. Regular Expressions (RegEx) Tutorial

How Regular Expression looks like,

Okay, it’s being a few minutes, we are talking about Regular Expression, But maybe you are thinking that how Regular Expression looks like exactly? okay, now I am gonna show you a basic regular expression code that I have used for one of my website’s form validation. Okay, let’s take a look.

/^([a-z\d-]+)@([a-z\d-]+)\.([a-z]{2,8})(\.[a-z]{2,8})?$/

Probably it looks very complex to you right now. But believe me, it’s not that complex. You can understand this very well if you just spend 2–3 days with Regular Expression.

It’s quite easy but very handy. So without wasting any further time let’s jump to the world of RegExp le

--

--

jwolt junaid

Hi, I am Junaid. a self taught, passionate web developer. I am an expert in HTML, CSS, and JavaScript React. Also, I have good knowledge of nodeJS and more.