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.
如何仅在双引号之间找到 \n 和 \r ?
我基本上需要preg_replace.
preg_replace
preg_replace( '/["]*(\n).*["]/', '', $str );
在“qoutemarks”之间替换 \n 怎么样?