如何在正则表达式中添加新行 [英] How add new line in regular expression

查看:366
本文介绍了如何在正则表达式中添加新行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在多行文本框中的第一行正则表达式上工作正常,但在下一行上却不起作用如何在正则表达式中添加新行,因此(\ d +,)* \ d +该表达式在多行文本框的所有行中都正常运行

on first line regular expression in multiline textbox working fine but on next line it is not working how to add new line in regular expression so (\d+,)*\d+ this expression working fine in all line at multiline textbox

推荐答案

使用\n.
例如,\w+\n匹配单词后跟换行.
Use \n.
For example, \w+\n matches words followed by a new line.


这篇关于如何在正则表达式中添加新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆