You need to create a set of escaped (with \) parentheses (that match the parentheses) and a group of regular parentheses that create your capturing group:

var regExp = /\(([^)]+)\)/;
var matches = regExp.exec("I expect five hundred dollars ($500).");

//matches[1] contains the value between the parentheses
console.log(matches[1]);

Breakdown:

  • \( : match an opening parentheses
  • ( : begin capturing group
  • [^)]+: match one or more non ) characters
  • ) : end capturing group
  • \) : match closing parentheses

Here is a visual explanation on RegExplained

Answer from go-oleg on Stack Overflow
🌐
DevGenius
blog.devgenius.io › regex-parentheses-examples-of-every-type-aba8441be761
Regex Parentheses: Examples of Every Type | by Tyler J Funk | Dev Genius
October 19, 2020 - I’m not sure what to make of this person’s high “CAT” count, but hopefully it demonstrates the repeatability of the pattern in the parentheses. ... / — Opens or begins regex . (CAT) — Capture group with the pattern “CAT” inside. + — One or more of whatever came directly before it, in this case it’s the capture group instead of a single character.
🌐
Bubble
forum.bubble.io › need help
Regex expression to include parentheses - Need help - Bubble Forum
August 24, 2022 - Hi Guys I am using the following regex ^sometext$ to have an exact match of two words the problem i am facing now is that when sometext uses parentheses the expression is not working to be more specific if i have the text S UK 10-15 everything is fine while if the text is S (UK 10-15) i am ...
Discussions

Regex- How to Match Parentheses
Something like this? https://regex101.com/r/rH0zB0/1 More on reddit.com
🌐 r/javascript
4
1
July 25, 2016
regex - Regular Expression to get a string between parentheses in Javascript - Stack Overflow
I am trying to write a regular expression which returns a string which is between parentheses. For example: I want to get the string which resides between the strings "(" and ")"... More on stackoverflow.com
🌐 stackoverflow.com
RegEx to match stuff between parentheses
I'm having a tough time getting this to work. I have a string like: something/([0-9])/([a-z]) And I need regex or a method of getting each match between the parentheses and return an array of matc... More on stackoverflow.com
🌐 stackoverflow.com
RegEx expression - Get text inside parentheses
Hi Experts I need a RegEx expression that can extract the text inside parantheses but only if a specific text pattern is met. If more than one set of parantheses exists it should only be the text in the last set that should be looked at. The validation rule should be 1-3 three letters in the ... More on forum.uipath.com
🌐 forum.uipath.com
12
0
September 5, 2019
🌐
Regular-Expressions.info
regular-expressions.info › brackets.html
Regex Tutorial: Parentheses for Grouping and Capturing
In a regular expression, parentheses can be used to group regex tokens together and for creating backreferences. Backreferences allow you to reuse part of the regex match in the regex, or in the replacement text.
🌐
SDSU
edoras.sdsu.edu › doc › nedit-5.5-rp › parenConstructs.html
Regular Expressions
Capturing Parentheses are of the form `(<regex>)' and can be used to group arbitrarily complex regular expressions. Parentheses can be nested, but the total number of parentheses, nested or otherwise, is limited to 50 pairs.
🌐
Webagility
webagility.com › posts › the-basics-of-regex-explained
The basics of Regex explained / Webagility
June 8, 2020 - First off, the parentheses are for grouping and remembering what is found. So the Regex-code inside here will find something and store it in memory so we can use it in some way.
🌐
Unbounded Systems
unbounded.systems › home › 3 kinds of parentheses: are you a regex master?
3 Kinds of Parentheses: Are you a RegEx Master? | Unbounded Systems
May 3, 2018 - If not, you can use non-greedy (reluctant) matching in Perl. See https://stackoverflow.com/questions/1103149/non-greedy-reluctant-regex-matching-in-sed ... Use “[^)]*” instead of “.*?” to capture until the next parenthesis.
Find elsewhere
🌐
GNU
gnu.org › software › gawk › manual › html_node › Regexp-Operator-Details.html
Regexp Operator Details (The GNU Awk User’s Guide)
The alternation applies to the largest possible regexps on either side. ... Parentheses are used for grouping in regular expressions, as in arithmetic.
🌐
Impact
help.impact.com › brand › what-would-you-like-to-learn-about › platform-features › promo-codes › regular-expression › regex-inside-the-parentheses
Regex Inside the Parentheses | I'm a Brand | impact.com Help Center
August 11, 2026 - Add the regex character ^ before the opening parentheses to assert the position at the start of the line, ensuring that there are no preceding characters.
🌐
Artyom Bologov
aartaka.me › paren-regex.html
5 (Wrong) Regex To Parse Parentheses
So the simplest way to match parentheses is to... match parentheses. And nothing/anything else in between: ... Is matched as one piece due to regex greediness.
🌐
Atlantiswordprocessor
atlantiswordprocessor.com › en › help › regex_parentheses.htm
Atlantis Word Processor Help. Examples of regular expressions: searching for parentheses
Paste the following regular expression to the "Find what" box of the Find/Replace panel of the Control Board to match any text in parentheses in your document: \([!()]{0,}\)
🌐
EITCA Academy
eitca.org › home › what is the role of parentheses in regular expressions and how do they affect the order of operations?
What is the role of parentheses in regular expressions and how do they affect the order of operations? - EITCA Academy
August 2, 2023 - One role of parentheses in regular expressions is to group subexpressions together. This allows for the application of operators to a specific part of the expression, rather than the entire expression. For example, consider the regular expression (ab)+. The parentheses group the subexpression ...
🌐
Impact
help.impact.com › en › support › solutions › articles › 48001232744-regex-inside-the-parentheses
Regex Inside the Parentheses
By placing part of a regex inside parentheses, you can group that part of the regex together. The Match Expression tool can then extract the values you place between the brackets and find a match in the accompanying exception list items you provide.
🌐
Medium
medium.com › @gustavoinzunza › how-to-solve-balanced-parenthesis-problem-with-regex-in-ruby-113eff30a79a
How to solve balanced parentheses problem with regex in ruby | by Gustavo Inzunza | Medium
January 31, 2023 - balanced = / ^ # the regular expression is going to start with the instruction that is after that ( # start of the group 1 \(\) # means that we are expecting () )* # end of the group 1, 0 or more times $ # the regular expression is going to finish with the instruction that is before that /x # this is used to be able to define a regex with spaces and line breaks · The problem is that we are not able to validate cases like: “(())”, “(())()”, etc. ... Because we can’t validate cases that have parentheses inside parentheses we need to use an instruction to define those scenarios.
🌐
UiPath Community
forum.uipath.com › help
RegEx expression - Get text inside parentheses - Help - UiPath Community Forum
September 5, 2019 - Hi Experts I need a RegEx expression that can extract the text inside parantheses but only if a specific text pattern is met. If more than one set of parantheses exists it should only be the text in the last set that should be looked at. The validation rule should be 1-3 three letters in the ...
🌐
Rexegg
rexegg.com › regex-disambiguation.php
Advanced Regex Tutorial—Regex Syntax
In regex as in the (2+3)*(5-2) of arithmetic, parentheses are often needed to group components of an expression together. For instance, the above operation yields 15. Without the parentheses, because the * operator has higher precedence than the + and -, 2+3*5-2 is interpreted as 2+(3*5)-2, ...
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Regular_expressions
Regular expressions - JavaScript - MDN Web Docs
March 17, 2026 - The RegExp.escape() function returns ... only the string "a*b". Parentheses around any part of the regular expression pattern causes that part of the matched substring to be remembered....