My regex:
https?://[\w-]+(?:\.[\w-]+)+(?:/[\w-]+)*(?:[./%?=&#-]\w+)+)?
In Ruby, I get the following error:
unmatched close parenthesis:/https?://[\w-]+(?:\.[\w-]+)+(?:/[\w-]+)*(?:[./%?=&#-]\w+)+)?/'
How can I fix this?
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.
I don’t know how I could be clearer than the error message. Your regex has an unmatched close parenthesis.
Notice how there’s 3
(and 4)Further reading in regexes http://www.regular-expressions.info/tutorial.html
Specifically, you may want to check out the character information http://www.regular-expressions.info/characters.html