Get numbers from string with regex
Integer or float:
/\d+((.|,)\d+)?/
Try this:
(\d+)
What language are you using to parse these strings?
If you let me know I can help you with the code you would need to use this regular expression.
Assuming:
- you want to capture the digits
- there's only one set of digits per line
Try this:
/(\d+)/
then $1
(Perl) or $matches[1]
(PHP) or whatever your poison of choice is, should contain the digits.