I want to extract and print a variable number ‘-34.99’ from the string:
myString = "Test1 [cm]: -35.00/-34.99/-34.00/0.09"
The values in the string will change.
How can I do it with the regular expression in Python?
Thanks in advance
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.
Non-regex solution is:
Test this code here.
One of regex solutions would be:
Test this code here.
Explanation: