find parenthesis using jquery

joyacv2
joyacv2 used Ask the Experts™
on
I have the following text:

10X5 (h) testing (20) - boxes

i want to only have 10X5 (h) testing

I need a code that find the last ( and then trim to this one - 1 character. I have many different text lengths, this is the reason why i need the last (. any idea?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
myString.replace(/\([^(]*$/, "") can be used.

I tested by running the following
var myString ="10X5 (h) testing (20) - boxes";
myString =myString.replace(/\([^(]*$/, "");
alert(myString);

Author

Commented:
works excellent!!!!!!!!!!!!!!!!!!!!!!!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial