Remove the last “\n” from a textarea

后端 未结 5 721
暖寄归人
暖寄归人 2021-02-06 21:30

How to remove the last \"\\n\" from a textarea?

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-06 22:01

    You can do it this way (.*[^\n])\n* Result: https://regex101.com/r/lWKzFy/1

提交回复
热议问题