Read this post for how regular expressions are used in JavaScript methods.
In this post series i'm trying to give you an idea about how to create an regex that matches a particular string.
Very Basic Rules
- Every regular expression literal starts and ends with a forward slash ("/").
- Pattern that we are trying to match goes between those slashes.
- After end slash "g", "i", "m" characters can be used as flags. Each letter has different purposes.