If I have a formula similar to this: a + b – c * (exp(a*b) ) / 3
I want to match only variables(a, b, c). For me, [a-zA-Z]+ does the job. However I do not want to match exp function. How can I achieve this with regular expressions? I use javascript.
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.
more common notion of acceptable variable names would be
with dots in function names it becomes
(the variable will be in the first capturing match)