Hi, Im looking for a better regex
This is what I have
<div+\s?id\s?=\s?"[^"]*"*\s*>(?:About\s)(\d.+)\sresults
All I want to do is match the number with commas inside (2,4444,2222) and return that. This works as group 1 on regex101.
Regex optimize
Re: Regex optimize
Specifically, what is the desired output in your example?
Re: Regex optimize
The number within the html tag. Just the number
<div id="result-stats">About 3,440,000,000 results
<div id="result-stats">About 3,440,000,000 results
Re: Regex optimize
Code: Select all
str = <div id="result-stats">About -3,440,000,000.34 results</div>
RegExMatch(str, ">.*?\K[\d,.-]+", n), n := StrReplace(n, ",")
MsgBox, 64, Result, %n%
Who is online
Users browsing this forum: No registered users and 296 guests