reg->regexp
This commit is contained in:
parent
4232a53219
commit
32e20fc97c
35 changed files with 132 additions and 132 deletions
|
@ -10,8 +10,8 @@ Step by step:
|
|||
In action:
|
||||
|
||||
```js run
|
||||
let reg = /"(\\.|[^"\\])*"/g;
|
||||
let regexp = /"(\\.|[^"\\])*"/g;
|
||||
let str = ' .. "test me" .. "Say \\"Hello\\"!" .. "\\\\ \\"" .. ';
|
||||
|
||||
alert( str.match(reg) ); // "test me","Say \"Hello\"!","\\ \""
|
||||
alert( str.match(regexp) ); // "test me","Say \"Hello\"!","\\ \""
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue