Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a input frequency value coming from multiple sources along with the model name of electrical equipment. I need to strip out the frquency value from the model name. Looking for a regex solution for the same.

Ex: My input values could be Whirlpool_60H, WhirlPool_60Hz, WhirlPool_60hz

I want to write something like

 if (inputstring.matches (a regex to cover all the cases above)
 {
    inputString.replace("regex", "");
 }

If along with the solution you could also give a little explanation of symbols used in the regex that would be great. I have very little knowledge of regex. Thanks

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.