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