groovy中的replaceAll长句无用

I have this paragraph(this is just a random text) which I want to remove the last part of the paragraph. I have tried using replaceAll but it only works for shorter sentences, for example, The virus that causes COVID-19

但我想删除:如果您与患有COVID-19的人非常接近,或者通过接触被污染的表面,然后是眼睛,鼻子或嘴巴,则可以通过吸入病毒来感染您。\ n \ n大多数患有COVID-19的人如果生病,会出现轻度至中度症状,无需特殊治疗即可康复。

“导致COVID-19的病毒主要通过被感染者咳嗽,打喷嚏或呼气时产生的飞沫传播。这些飞沫太重而无法悬挂在空中,并迅速掉落在地板或表面上。\ n \ n如果您与患有COVID-19的人非常接近,或者通过接触被污染的表面,然后触摸您的眼睛,鼻子或嘴巴,则通过呼吸病毒感染。\ n \ n大多数因COVID-19患病的人会感到轻度减轻症状,无需特殊治疗即可康复。”

  String comment = "The virus that causes COVID-19 is mainly transmitted through droplets generated when an infected person coughs, sneezes, or exhales. These droplets are too heavy to hang in the air, and quickly fall on floors or surfaces.\n\nAlso, SOS stands for Style Or Service and we?re here to help you with all your shopping needs. Feel free to contact us at 1.877.765.3009 or e-mail us at sos@solesociety.com. #mysolesociety Have a great day! Feel free to contact us at 855-435-5050 or customerservice@vincecamuto.com if you have any further questions or concerns. Have a great day!"

//produces the right result.
println(comment.replaceAll("Also, SOS stands", " ")) 
//this does not produce the right result, instead it prints the entire paragraph with this part included.
println(comment.replaceAll("Also, SOS stands for Style Or Service and we?re here to help you with all your shopping needs. Feel free to contact us at 1.877.765.3009 or e-mail us at sos@solesociety.com. #mysolesociety Have a great day! Feel free to contact us at 855-435-5050 or customerservice@vincecamuto.com if you have any further questions or concerns. Have a great day!", " ")) 

请提供有关如何解决此问题的建议

评论