close

Case 1:

myString =Regex.Replace(myString,"/kg","",RegexOptions.IgnoreCase);

Case 2: If you're going to do this a lot of times, you could do:

// You can reuse this object
Regex regex =newRegex("/kg",RegexOptions.IgnoreCase);
myString
= regex.Replace(myString,"");
arrow
arrow
    全站熱搜

    jimili 發表在 痞客邦 留言(0) 人氣()