Why does this regex not work: '\([0-9a-zA-z]*\)'; -


I want to remove the part of a string that is in parentheses.

For example, to be able to "Hello" from "Hello" (World).

I am using var input2 = '([0- 9a-zA-z] * \). '; As my expression statement, and using regular expression to match this method.

Can anyone tell me what's wrong? I should avoid "(" and ")"

as AZ

If you want to be safe with those backslashes, avoid the backslash so that you get back to the \\ ( and \) Nothing seems wrong with.


Comments