mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-21 20:36:33 +00:00
Quartz sync: May 6, 2024, 10:40 PM
This commit is contained in:
parent
aee9145691
commit
4ef8371441
635 changed files with 22281 additions and 6 deletions
21
content/20201104101924-javascript_regexp_exec_method.md
Normal file
21
content/20201104101924-javascript_regexp_exec_method.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
id: 879b1425-8e59-4a5b-a2d8-08838e193b88
|
||||
title: JavaScript RegExp Exec Method
|
||||
---
|
||||
|
||||
exec[^1] returns `null` if no match was found or an object with
|
||||
information about the match otherwise:
|
||||
|
||||
``` javascript
|
||||
let match = /\d+/.exec("one two 100");
|
||||
console.log(match);
|
||||
console.log(match.index);
|
||||
```
|
||||
|
||||
# See also
|
||||
|
||||
- [match](20201104102212-javascript_regexp_match_method)
|
||||
|
||||
# Footnotes
|
||||
|
||||
[^1]: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec>
|
Loading…
Add table
Add a link
Reference in a new issue