aizatto.com
aizatto.com
Build.my
GitHub
Linkedin
aizatto.com
Table of Contents
Portfolio, Projects, Tools, Toys
Interview Guide
Engineering Code
Engineering Management
Why GitBook?
Getting into Tech
Personal Goals
Daily Drivers
Notes
AWS
Digital Ocean
GraphQL
JavaScript
Array
Async & Await / Promises
Booleans
Collections
Cons/Dislikes
fetch
Map
Modules
Object
Regex
Set
Style Guides
Versions
Life
Node.js
Prototyping
Raspberry Pi
Serverless
Software Engineering
Technical Due Diligence
Web Development
Archive
Powered by GitBook

Regex

  • ​MDN​

Matching one string

"aaaa".match(/[a]/)

Result:

["a"]

Matching multiple substrings

"a a123a a123a b123b c".match(/a(123)a/g)

Result:

["a123", "a123"]

Note the trailing /g

  • You cannot select individual groups while using g

Previous
Object
Next
Set
Last updated 2 years ago
Contents
Matching one string
Matching multiple substrings