9
Why won't this work?
(lazysoci.al)
Welcome to the RegEx community! This is a place where you can learn about and get help with regular expressions
A regular expression is a sequence of characters that specifies a match pattern in text. Theyre usually used for find, or find and replace operations on strings, or for input validation.
If you're expecting decimals, that's the preferred solution:
(?<!\d)(\d+\.)?\d+(?=\s*$)
Otherwise you could do simply
(?<!\d)\d+(?=\s*$)
I added the lookahead
(?=\s*$)
to match digits at the end of the line only with possible trailing spaces.