var str = "A=1111&B=2222&C=3333", regExp = /(A|B|C)=(\d){1,}(&)?/g clearedStr = str.replace(regExp, "");