GoConqr has a new look! Let us know what you think.

Module 15 of 33 · Media

Literal

Kostas Diakogiannis

Literal

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!

 

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?