标题可能表达的不清楚,看下面的例子。
比如有一段字符串和一个名字列表:
string = "David comes from china. he loves watching tv shows. Tom is an american, he loves games. Rick blablabla" names = ["David", "Tom", "Rick"]
想写个函数,要return的结果:
r = ["David comes from china. he loves watching tv shows.", "Tom is an american, he loves games.", "Rick blablabla"]
不一定非要用正则。
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...