I have the following string
var str = "Format-ABC-D Type-O"
I would like to get “ABC-D” out of this string. so fat I have
str.(/Format-(\w+)/i)[1]
But this just gives me “ABC”. How can I match up to a whitespace?
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.
Match anything else than whitespaces, not just word characters: