if you know for sure that there are only going to be 2 places where you have a list of digits in your string and that is the only thing you are going to pull out then you should be able to simply use

\d+
Answer from Seattle Leonard on Stack Overflow
🌐
UiPath Community
forum.uipath.com › help › studio
Please help me with a RegEx to extract only the numbers from a string variable - Studio - UiPath Community Forum
March 12, 2024 - Hi, I have a string variable which contains both text and numbers assigned to a string variable. I want to extract the numbers from the string using RegEx. Example: If the text is “Text#$1234”, I want to extract “1234” …
Discussions

How to extract numbers within a string?
You want to look into regular expressions (regex) and Python's re module . import re string = "CORSAIR VENGEANCE RGB 16GB (2X8GB) DDR4 3200MHZ CL 16" matches = re.findall("(\d+)", string) print(matches) Output: ['16', '2', '8', '4', '3200', '16'] The regex pattern \d+ matches 1 or more numerical characters in sequence. By putting it in brackets ( ) it captures each occurrence of that pattern as a group. And the re.findall method returns those groups in a list. Note that they are still strings, not numbers. More on reddit.com
🌐 r/learnpython
17
38
January 7, 2018
Extract Number After Certain Word With Regex
Hi everybody, I have a column with string which contains also numbers something like this : hi abc 21 bye 2 good abc 5 abc 890 also noted that there is always a space between abc and number! what I want is only the numbers after abc : 21 5 890 how can I do this with regex ? thanks in advance 🙏 More on forum.knime.com
🌐 forum.knime.com
1
1
December 24, 2021
RegEx extract numbers before and after text string
Hi All, I would appreciate some help with using a RegEx or suitable tool to do this. Essentially extract all digits before and after text Account IDID 1ID2ID31234D983.221234D983.2212N4445.5612N4445.564Z33.334Z33.33 Thanks More on community.alteryx.com
🌐 community.alteryx.com
August 27, 2022
Regex to extract string and number
Help me please to create a regex to extract string and number from a string like 906D3829.22 into 906 D 3829.22 So far, I have been able to extract numbers using [\d.]+ into 906 3829.22 More on community.alteryx.com
🌐 community.alteryx.com
June 11, 2022
🌐
Glide Community
community.glideapps.com › ask for help
Extract only numbers using Regex - Ask for Help - Glide Community
May 13, 2022 - How might I do the exact opposite of what is demonstrated in this thread? Rather than extracting alphabetic characters, I need to extract only the numbers from another column. Continuing the discussion from Regex to Rem…
🌐
Splunk Community
community.splunk.com › t5 › Splunk-Search › Regex-to-extract-a-number-from-string › m-p › 265179
Solved: Regex to extract a number from string - Splunk Community
March 8, 2019 - Solved: Hello, I am trying (rather unsuccessfully) to extract a number of varying length form a sting. The constants are 0s and us with the string in
🌐
R-bloggers
r-bloggers.com › r bloggers › extracting numbers from strings in r
Extracting Numbers from Strings in R | R-bloggers
June 11, 2024 - The stringi package is another excellent tool for string manipulation, providing robust and efficient functions. Here’s an example: library(stringi) # Sample string text <- "The price is 45 dollars and 50 cents." # Extract numbers using stringi numbers <- stri_extract_all_regex(text, "\\d+") # Convert to numeric numeric_result <- as.numeric(unlist(numbers)) print(numeric_result)
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › extract-a-number-from-a-string-using-javascript
Extract a Number from a String using JavaScript - GeeksforGeeks
This function takes a regular expression as an argument and extracts the number from the string. The regular expression for extracting a number is (/(\d+)/). Example 1: This example uses the match() function to extract numbers from strings with ...
Published: July 11, 2025
🌐
Microsoft Support
support.microsoft.com › en-us › office › regexextract-function-4b96c140-9205-4b6e-9fbe-6aa9e783ff57
REGEXEXTRACT Function | Microsoft Support
REGEXEXTRACT always return text values. You can convert these results back to a number with the VALUE function. Copy the example data and paste it in cell A1 of a new Excel worksheet. If you need to, you can adjust the column widths to see all the data. Extract names based on capital letters with pattern "[A-Z][a-z]+"
🌐
Alteryx
community.alteryx.com › home › participate › discussions › alteryx one
Regex to extract string and number - Alteryx
June 11, 2022 - Help me please to create a regex to extract string and number from a string like 906D3829.22 into 906 D 3829.22 So far, I have been able to extract numbers using [\d.]+ into 906 3829.22
🌐
UiPath Community
forum.uipath.com › help › studio
Extract number from webpage string regular expression - Studio - UiPath Community Forum
January 13, 2023 - I’m building an automation using a Public Website. Below is a list of steps to get to my issue. For every search i do the result number will be different and depending on the number in the results between the to and of there will be conditions. if extracted number is 100 perform these actions, ...
🌐
Bardeen
bardeen.ai › answers › how-to-extract-numbers-from-a-cell-in-google-sheets
Extract Numbers from Strings in Google Sheets: A Guide
March 6, 2024 - The REGEXEXTRACT function in Google Sheets allows you to extract specific parts of a text string that match a given regular expression pattern. To isolate numbers from a cell containing mixed content, you can use REGEXEXTRACT with a pattern that targets numeric characters.
🌐
Make Community
community.make.com › questions
REGEX to extract phone number from Text - Questions - Make Community
September 22, 2022 - Hi Makers, I’m trying to extract a phone number from a text. I tried multiple Regular Expressions but it does not match any pattern. Here is one of the Regex I used : /+?\d{1,4}?[-.\s]?(?\d{1,3}?)?[-.\s]?\d{1,4}[-.\s]…
🌐
OutSystems
outsystems.com › forums › discussion › 74127 › get-only-numbers-from-string
Get only numbers from string | OutSystems
October 27, 2021 - Hello, I have a string that can take numbers simbols etc... For example: · 1231asdnk123-.as1 and I want to take only the numbers like this
🌐
UiPath Community
forum.uipath.com › help › activities
How to extract only number from a string - Activities - UiPath Community Forum
July 3, 2024 - Hi Everyone, I have to extract only number from a string. The string is provided below: Abcde 123456 abcfjggh89 Number to extract - 123456 Please help me to achieve this. Thankyou
Top answer
1 of 4
3

Extract all the numbers from string and output their SUM. I’m struggling to achieve same using REGEX in powershell

String ='“Total Facility A Commitments” means the aggregate of the Facility A Commitments, being £2,500,000 at the date of this Agreement.
“Total Facility B Commitments” means the aggregate of the Facility B Commitments, being £2,500,000 at the date of this Agreement.
“Total Facility C Commitments” means the aggregate of the Facility C Commitments, being £2,500,000 at the date of this Agreement.
[“Total Incremental Facility Commitments” means, in relation to an Incremental Facility, the aggregate of the Incremental Facility Commitments relating to that Incremental Facility.] ’
Output = £7,500,000

2 of 4
1

You said you are struggeling, what have you tried so far?

Please share your code so we can help.

You can use the ‘-match’ operator and then look for numbers in the string.

If you post code, please use the insert code button! Please and thank you!

PLEASE READ BEFORE POSTING! Read if you're new to the PowerShell forum! Programming & Development
Hi, and welcome to the PowerShell forum! Don’t apologize for being a “noob” or “newbie” or “n00b.” There’s just no need – nobody will think you’re stupid, and the forums are all about asking questions. Just ask! Use a descriptive subject. Don't say "Need help" or "PowerShell Help", actually summarize what the problem is. It helps the rest of us keep track of which problem is which. Don’t post massive scripts. We’re all volunteers and we don’t have time to read all that, nor will we copy, past…

🌐
Make Community
community.make.com › questions
Regex - Extract digits from a url - Questions - Make Community
January 16, 2024 - Hi people, thanks for help me I’ve this URL https://yoursite.com/?fluent-booking=calendar&host=barberia-valbuena&event=210min&userid=1082199790 I need extract all numbers after &userid= and save it like usuarioid with REGEX I use this code ([\d]+) But only show me 1st numbes on the url “210” ...
🌐
UiPath Community
forum.uipath.com › help
Extract numeric from given string - Help - UiPath Community Forum
September 25, 2018 - I have few strings like follows, Str1 = abc, xyz.tucr@pqr.com 123-456-7890 str2 = abc, xyz.tuck@pqr.com +61 123 321 222 str3 = abc - DEF jke@xyz.com (404) 123-1111 ext. 4444 I want to get only numeric (Phone number…