using Regular Expressions to Look References in Source Insight

2024-04-13 05:58

本文主要是介绍using Regular Expressions to Look References in Source Insight,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

using Regular Expressions to Look References in Source Insight :

想查找的内容为:

1.包含break

2.break后有一个空格,即不查找"break;

3.空格接下来是字母而不是分号(;),即不查找"break ;"

可在查找框中输入如下正则表达式:

    break\s[a-z]

查找结果如下:

---- break\s[a-z] Matches (11 in 5 files) ----
RcapiDevScriptDevice.java (java\nvprormapi):                    break loop;
RcapiFtpListener.java (java\nvprormapi):                    break thread_loop;
RcapiFtpMonitor.java (java\nvprormapi):                    break thread_loop;
RcapiFtpMonitor.java (java\nvprormapi):                        break monitoring_loop;
RcapiFtpMonitor.java (java\nvprormapi):                        break thread_loop;
RcapiFtpMonitor.java (java\nvprormapi):                        break monitoring_loop;
RcapiTftpListener.java (java\nvprormapi):                    break thread_loop;
RcapiTftpMonitor.java (java\nvprormapi):                    break thread_loop;
RcapiTftpMonitor.java (java\nvprormapi):                        break monitoring_loop;
RcapiTftpMonitor.java (java\nvprormapi):                        break thread_loop;
RcapiTftpMonitor.java (java\nvprormapi):                        break monitoring_loop;


附: Regular Expressions in http://www.sourceinsight.com/docs35/af1070763.htm:

Matching a Tab or Space

\t
\s
\w

\t matches a single tab character.

Example: \tint abc; matches a tab character followed by int abc;.

\s matches a single space character.

Example: \sif matches a space character followed by if.

\w matches a single white space character. In other words, \w matches either a tab or space character.

Example: \wwhile matches either a tab or space character, followed by while.


Matching Any in a Set of Characters

[ .. ]

When a list of characters are enclosed in square braces [..] then any character in that set will be matched.

Example: [abc] matches a, b, and c, but not d.

When a caret ^ appears at the beginning of the set, the match succeeds only if the character is not in the set.

Example: [^abc] matches d, e, or f, but not a, b, or c.

Sets can conveniently be described with a range. A range is specified by two characters separated by a dash, such as [a-z]. The beginning character must have a lower ASCII value than the ending character.

Example: [a-z] matches any character in the range a through z, but not A or 1 or 2.

Sets can contain multiple ranges.

Example 1: [a-zA-Z] matches any alphabetic character.

Example 2: [^a-zA-Z0-9] matches any non-alphanumeric character.




这篇关于using Regular Expressions to Look References in Source Insight的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/899308

相关文章

BD错误集锦1——[Hive]ERROR StatusLogger No log4j2 configuration file found. Using default configuration:

错误描述:在使用IDEA进行jdbc方式连接到hive数据仓库时,出现以下错误:                ERROR StatusLogger No log4j2 configuration file found. 问题原因:缺少log4j2.xml文件   <?xml version="1.0" encoding="UTF-8"?><Configuration><Appender

论文阅读--Efficient Hybrid Zoom using Camera Fusion on Mobile Phones

这是谷歌影像团队 2023 年发表在 Siggraph Asia 上的一篇文章,主要介绍的是利用多摄融合的思路进行变焦。 单反相机因为卓越的硬件性能,可以非常方便的实现光学变焦。不过目前的智能手机,受制于物理空间的限制,还不能做到像单反一样的光学变焦。目前主流的智能手机,都是采用多摄的设计,一般来说一个主摄搭配一个长焦,为了实现主摄与长焦之间的变焦,目前都是采用数字变焦的方式,数字变焦相比于光学

在WinCE的C#编程中,需要静态调用C++的动态库,需要添加using System.Runtime.InteropServices

using System.Runtime.InteropServices;         [DllImport("Win32DLL.dll", EntryPoint = "WriteREG_SZToRegTCHAR")]         private static extern bool WriteREG_SZToRegTCHAR(int iFlag, string regKeyP

source配置文件不生效 原创 2016年03月14日 18:43:55 3558 问题背景: 升级jdk 1.8之后,启动时报版本编译问题,查看$JAVA_HOME,$JRE_HOME

source配置文件不生效 原创  2016年03月14日 18:43:55 3558 问题背景:       升级jdk 1.8之后,启动时报版本编译问题,查看$JAVA_HOME,$JRE_HOME,没有问题。      初步推断是没有source,sourec .bashrc 之后查看$JAVA_HOME,$JRE_HOME变成1.8版本,但启动时还是报错,这就

为什么我使用source /etc/profile这个命令之后,新的环境变量只能在一个终端里面有效? 为什么我使用source /etc/profile这个命令之后,新的环境变量只能在一个终端里

为什么我使用source /etc/profile这个命令之后,新的环境变量只能在一个终端里面有效?   为什么我使用source /etc/profile这个命令之后,新的环境变量只能在一个终端里面有效? 各位大虾: 我从网上得知,在ubuntu中,使用source /etc/profile命令可以使新建立的环境变量立刻生效而不用重新启动系统,但是 如题,当我使用source /

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)问题

1.问题描述:   在myeclipse中发布web服务器,通过手机客户端访问MySQL数据库(也就是myeclipse中的tomcat连接的数据库),myEclipse 的控制台(Console)报出如下错误 java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) 2.自己

Elastic字段映射(_source,doc_value,fileddata,index,store)

Elastic字段映射(_source,doc_value,filed_data,index,store) _source: source 字段用于存储 post 到 ES 的原始 json 文档。为什么要存储原始文档呢?因为 ES 采用倒排索引对文本进行搜索,而倒排索引无法存储原始输入文本。一段文本交给ES后,首先会被分析器(analyzer)打散成单词,为了保证搜索的准确性,在打散的过程中

SP2010开发和VS2010专家食谱--第七章节--使用客户端对象模型(1)--Creating a list using a Managed OM

本文中,我们将学习如何使用托管对象模型创建列表。我们也将添加新栏,插入约10行数据到列表。本文中我们将创建一个使用generic list template的控制台应用程序。

Add Service References 和 Add Web References的区别

Add Service References 和 Add Web References的区别 在项目过程中,需要添加Web服务引用,发现两种用法。搜索了一下相关信息,才知道: VS2005里提供的Add Web Reference(添加Web服务引用)的功能主要是添加Web Service引用。VS2008保留了Add Web Reference(添加Web服务引用)也是为了版本向前兼容

File I/O source code--新建文件 相关方法阅读

虽然我们经常在用java的I/O,但是我们有没有想过,我们是怎样来创建文件的呢 首先我们来新建一个文件: try {File file = new File("c:\\newfile.txt");if (file.createNewFile()){System.out.println("File is created!");}else{System.out.println("File al