移除项目比方说,我有一个字符串:从逗号分隔的字符串
cat,mouse,dog,horse
是否有一个正则表达式或将表现为如下的功能?
1)"cat" return string ->"mouse,dog,horse"
2)"mouse" return string ->"cat,dog,horse"
3)"dog" return string ->"cat,mouse,horse"
4)"horse" return string ->"cat,mouse,dog"
我需要从字符串中消除选定的项目并返回字符串的其余部分。
嘿,谢谢很多人!并感谢codepad.org的介绍 – dinchakpianist 2011-12-30 06:06:09