Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
已经在评论中回答,总结为答案
有几个选项可以在 SAS 中进行查找和替换,我建议使用tranwrd。
SAS 将换行解释为“0A”x。 对于回车,您将使用 '0D'x。
所以你的解决方案是:
test_txt =tranwrd(text,"the",cat('0A'x,"the"));