Files

32 lines
605 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Match Anything with Wildcard Period
---
# Match Anything with Wildcard Period
---
## Hints
### Hint 1
2018-10-12 15:37:13 -04:00
The dot `.` is the key in this challenge.
### Hint 2
2018-10-12 15:37:13 -04:00
You should put the dot on the right position.
---
## Solutions
<details><summary>Solution 1 (Click to Show/Hide)</summary>
2018-10-12 15:37:13 -04:00
```javascript
let exampleStr = "Let's have fun with regular expressions!";
let unRegex = /.un/; // Change this line
let result = unRegex.test(exampleStr);
```
#### Code Explanation
2018-10-12 15:37:13 -04:00
The period `.` will be any one character so the strings "run", "sun", "fun" and "pun" have the same un charaters.
</details>
2018-10-12 15:37:13 -04:00