Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Define patterns

Inside the slashes we can freely define our pattern. If you type a series of characters these characters will be taken as a literal, and the only match that you will accept is what you have inside the slashes. 

 

We can test if we have a matching pattern or not with the test function that is being executed on a regex and accepts the string, that our regex will be tested on. This function returns a boolean.

In this case line 7 will return a true value.

If you want to practice more, check this site here!