正则表达式中的记事本++换行符 [英] Notepad++ newline in regex

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

问题描述

假设你有这个文件:

x
a
b
c
x
x
a
b
c
x
x

你想用 Notepad++ 找到 sequence abc(并选择整 3 行).请问如何用正则表达式表示换行符?

and you want to find the sequence abc (and select the whole 3 lines) with Notepad++ . How to express the newline in regex, please?

推荐答案

Notepad++ 可以轻松做到这一点,你甚至不需要正则表达式

Notepad++ can do that comfortably, you don't even need regexes

在查找对话框中查看左下角并将您的搜索模式切换到允许 等的扩展.

In the find dialogue box look in the bottom left and switch your search mode to Extended which allows etc.

如果您正在处理 Windows 格式的文件,您可能会寻找 (回车,换行符)

As odds on you're working on a file in windows format you'll be looking for (carriage return, newline)

a
b
c

将找到超过三行的模式

这篇关于正则表达式中的记事本++换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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