I’m new with python and regular expressions.
I have this regular expressions and i don’t know what is the purpose of this
r'(\d+)\.(\d*)'
all I know is it matches a digit from 0 to 9.
can anyone help me explain it?
thanks..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It matches a string containing one or more decimal digits, followed by a decimal place, followed by 0 or more decimal digits – ie, a floating-point number. It returns the two strings of digits.
For example, if you try it on the string “123.456” it will return (“123”, “456”).