Javascript: edit hint (#19229)

This commit is contained in:
greggubarev
2018-10-16 01:33:13 +04:00
committed by Jonathan Grah
parent 76881d4404
commit 086758250b

View File

@ -1,12 +1,13 @@
---
title: Match Characters that Occur One or More Times
---
## Match Characters that Occur One or More Times
## the problem:
## Problem:
You want to find matches when the letter s occurs one or more times in "Mississippi". Write a regex that uses the + sign.
## the solution
## Solution:
```js
let difficultSpelling = "Mississippi";
let myRegex = /s+/g; // this is the solution
let result = difficultSpelling.match(myRegex);
```