2018-10-16 21:32:40 +05:30

633 B

title
title
Match Anything with Wildcard Period

Match Anything with Wildcard Period

Hint 1:

The dot . is the key in this challenge.

Hint 2:

You should put the dot on the right position.

Solution

let exampleStr = "Let's have fun with regular expressions!";
let unRegex = /.un/; // Change this line
let result = unRegex.test(exampleStr);

Explaination

The period . will be any one character so the strings "run", "sun", "fun" and "pun" have the same un charaters.