I have this:
var regExp:RegExp = new RegExp("((.*?)%)");
and want everything between the ( and the %)
the string looks like this: (-24%)
I now get a return back “(-24” and have searched for a long time to find a solution but didn’t find any.
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.
You need to escape the parentheses
use:
for example, given the string “(-24%)”, this regex will capture “-24”
edited my bad. forgot when creating the regex that way it needs double escape. fixed