This is the string: “-random text- $0.15 USD”
What I want to extract is the “0.15” behind, excluding the $ and USD. So the text will only contain “0.15” with all other words gone.
How do I go about doing this?
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.
Using regexes
The “main” part is
[0-9]+\.[0-9]+(one or more digits followed by a.followed by one or more digits). This expression must follow a$sign(?<=\$)and must be followed byUSD(there is a space beforeUSD) plus end of string(?= USD$).Online test: http://regexr.com?30aot