当在字符串 1 中找到匹配的子字符串时,我需要删除匹配的子字符串,忽略空格和 - 等字符。
我的例子是:
string 1="The LawyerWhat happened to A&O's first female partner?The LawyerWhen Clare Maurice was made up at Allen & Overy (A&O) in 1985 she was the sole female partner at the firm. Twenty-five years later, gradual change in the";
我需要在字符串 1 中匹配下面的 string2 并将其从字符串 1 中删除。
string 2="What happened to A&O's first female partner? - The Lawyer";
非常感谢