Sublime Text 中的 RegEx:匹配任何字符,包括换行符? [英] RegEx in Sublime Text: Match any character, including newlines?

查看:42
本文介绍了Sublime Text 中的 RegEx:匹配任何字符,包括换行符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法匹配 Sublime Text 中的任何字符,包括换行符?我看到 Sublime 使用了 Boost 的语法,但是 . 字符在没有设置特定标志的情况下不会匹配换行符.

Is there a way to match any character in Sublime Text, including newlines? I saw that Sublime uses Boost's syntax but that the . character won't match newlines without a specific flag set.

推荐答案

尝试添加 (?s) 内联标志开始模式的开始.这将使 . 匹配 任何 字符.

Try adding the (?s) inline flag start the start of the pattern. That will make . match any character.

这篇关于Sublime Text 中的 RegEx:匹配任何字符,包括换行符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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