The + quantifier means one or more of the previous token. Turn a single digit \d into a full number with \d+, or a word character into a whole word with \w+. It needs at least one match—unlike *, which allows zero.
Remember
token+ → one or more of token (same as {1,})
/\d+/ on "item42" → "42"
/\w+/ on "Hi!" → "Hi"
/a+/ on "" → null (+ needs at least one)
greedy by default; use +? for lazy (minimal) matching
Short, copy-ready snippets. Open DevTools Console, or use Try It Yourself for a live editor.
Example 1 — Extract Numbers with \d+
Match runs of digits; add g for every run.
JavaScript
const text = "order 12 items for $49.99";
console.log(text.match(/\d+/)); // ["12"] — first run only
console.log(text.match(/\d+/g)); // ["12", "49", "99"]
Match a run.\s+ finds one or more whitespace characters together.
Replace each run. Every match becomes a single space.
Global flag.g cleans every gap in the string, not just the first.
Result. Multiple spaces collapse into one without a manual loop.
Example 3 — Greedy + vs Lazy +?
See how greediness changes what gets matched between tags.
JavaScript
const html = "<b>bold</b> and <i>italic</i>";
console.log(html.match(/<.+>/g));
// ["<b>bold</b> and <i>italic</i>"] — greedy spans too far
console.log(html.match(/<.+?>/g));
// ["<b>", "</b>", "<i>", "</i>"] — lazy stops early
ab+ repeats only b. Use parentheses when the whole sequence must repeat.
greedy
Greedy can overshoot
.+ often matches too much in nested text. Try +? for the shortest valid run.
decimals
Floats need more than \d+
49.99 is two digit runs. Use something like \d+\.\d+ for one decimal number.
Compatibility
Browser & Runtime Support
The + quantifier is part of core JavaScript regular expression syntax (ES3+).
✓ Baseline · ES3+
RegExp + quantifier
Supported in every browser and Node.js version. Use + for one-or-more repetition of any token or group.
99%Universal syntax
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
+Excellent
Bottom line: Safe everywhere. + is the standard way to match runs of one or more characters.
Analysis
Performance Notes
Approach
Cost
Best for
/\d+/g
Linear over input
Extracting runs
/\s+/g replace
Linear
Whitespace cleanup
Nested (a+)+
Can explode
Avoid on untrusted input
Simple + on a class or metacharacter is fast. Nested greedy quantifiers like (a+)+ can cause catastrophic backtracking—keep patterns simple on untrusted text.
Remember
Key Takeaways
Role:+ means one or more of the previous token.
Shorthand:+ equals {1,}.
Lazy: use +? when greedy matching goes too far.
vs *: use * only when zero matches should succeed.
One line: use + when you need a run of one or more characters—digits, words, spaces, or a whole group.
Frequently Asked Questions
The + quantifier means one or more of the preceding token. For example, \d+ matches a sequence of one or more digits. It requires at least one match—unlike *, which allows zero.
+ requires at least one repetition of the previous token. * allows zero or more. So /a+/ fails on an empty string, but /a*/ succeeds (matching zero a characters).
Yes. The + quantifier is shorthand for {1,}, which means at least one and no upper limit. Both are greedy by default in JavaScript.
+ is greedy—it matches as many characters as possible. +? is lazy (non-greedy)—it matches as few as possible while still satisfying the one-or-more rule.
Yes. When placed after a group like (ab)+, it repeats the entire group one or more times. Example: (ha)+ matches ha, haha, hahaha.
The + quantifier is core JavaScript regex syntax since ES3. It works in every browser and Node.js version without polyfills.