对于ex:string = Regex.Replace(string, @"(\b(1[7-9]|2[0-9])\d{2}\b)", "<Year>$1</Year>");some of texts 1999 some of texts <year>1986</year>
注意:一年将不止一次,谢谢,萨兰
我有一个黑名单来保存标签id列表,例如1-3,7-9,实际上它代表1,2,3,7,8,9。{1..3,7..9}; do for j in {$i}; do echo -n "$j,"; done; done但首先,我应该将-转换为..1..3,7..9echo -n "1-3,7-9" | sed 's/-/..for i in {@};