I have different types of strings which are like the following:
- Amount of Apples(1)(1234)
- Amount of Pears(2)(2345)
- (2)Amount of Bananas(2344)
- Amount of Oranges(Green)(3455)
I want to check if the value between the parenthesis is a number. But only for the ones that appear right before the 4 digit number at the end. So the 3rd on with an integer in the beginning of the string won't be checked. I'm using Javascript and was trying to using string.search(). I'm thinking of searching for ")(". I tried doing string.search("[)(] ") but it's not giving me the right position or searching it correctly. Does anyone have any recommendation on how to search for )( or some other way to get that value?