find:

1、

该正则表达式:

initEcharts *:{1} *\{{1}

匹配:

initEcharts  :  {

其中冒号两边允许无限个空格;

2、
#[a-zA-Z]*#
匹配:
两边以井号结束,中间无数个字母的字符串; 说明:点击 Regex右边的问号可以查看正则表达式的规则,如下:

Summary of regular-expression constructs
Construct
Matches
 
Characters
x
The character x
\\
The backslash character
\0n
The character with octal value 0n (0 <= n <= 7)
\0nn
The character with octal value 0nn (0 <= n <= 7)
\0mnn
The character with octal value 0mnn (0 <= m <= 3, 0 <= n <= 7)
\xhh
The character with hexadecimal value 0xhh
\uhhhh
The character with hexadecimal value 0xhhhh
\t
The tab character ('\u0009')
\n
The newline (line feed) character ('\u000A')
\r
The carriage-return character ('\u000D')
\f
The form-feed character ('\u000C')
\a
The alert (bell) character ('\u0007')
\e
The escape character ('\u001B')
\cx
The control character corresponding to x
 
Character classes
[abc]
a, b, or c (simple class)
[^abc]
Any character except a, b, or c (negation)
[a-zA-Z]
a through z or A through Z, inclusive (range)
[a-d[m-p]]
a through d, or m through p: [a-dm-p] (union)
[a-z&&[def]]
d, e, or f (intersection)
[a-z&&[^bc]]
a through z, except for b and c: [ad-z] (subtraction)
[a-z&&[^m-p]]
a through z, and not m through p: [a-lq-z](subtraction)
 
Predefined character classes
.
Any character (may or may not match line terminators)
\d
A digit: [0-9]
\D
A non-digit: [^0-9]
\s
A whitespace character: [ \t\n\x0B\f\r]
\S
A non-whitespace character: [^\s]
\w
A word character: [a-zA-Z_0-9]
\W
A non-word character: [^\w]
 
POSIX character classes (US-ASCII only)
\p{Lower}
A lower-case alphabetic character: [a-z]
\p{Upper}
An upper-case alphabetic character:[A-Z]
\p{ASCII}
All ASCII:[\x00-\x7F]
\p{Alpha}
An alphabetic character:[\p{Lower}\p{Upper}]
\p{Digit}
A decimal digit: [0-9]
\p{Alnum}
An alphanumeric character:[\p{Alpha}\p{Digit}]
\p{Punct}
Punctuation: One of !"#$%&'()*+,-./:;=>?@[\]^_`{|}~

\p{Graph}
A visible character: [\p{Alnum}\p{Punct}]
\p{Print}
A printable character: [\p{Graph}\x20]
\p{Blank}
A space or a tab: [ \t]
\p{Cntrl}
A control character: [\x00-\x1F\x7F]
\p{XDigit}
A hexadecimal digit: [0-9a-fA-F]
\p{Space}
A whitespace character: [ \t\n\x0B\f\r]
 
java.lang.Character classes (simple java character type)
\p{javaLowerCase}
Equivalent to java.lang.Character.isLowerCase()
\p{javaUpperCase}
Equivalent to java.lang.Character.isUpperCase()
\p{javaWhitespace}
Equivalent to java.lang.Character.isWhitespace()
\p{javaMirrored}
Equivalent to java.lang.Character.isMirrored()
 
Classes for Unicode blocks and categories
\p{InGreek}
A character in the Greek block (simple block)
\p{Lu}
An uppercase letter (simple category)
\p{Sc}
A currency symbol
\P{InGreek}
Any character except one in the Greek block (negation)
[\p{L}&&[^\p{Lu}]] 
Any letter except an uppercase letter (subtraction)
 
Boundary matchers
^
The beginning of a line
$
The end of a line
\b
A word boundary
\B
A non-word boundary
\A
The beginning of the input
\G
The end of the previous match
\Z
The end of the input but for the final terminator, if any
\z
The end of the input
 
Greedy quantifiers
X?
X, once or not at all
X*
X, zero or more times
X+
X, one or more times
X{n}
X, exactly n times
X{n,}
X, at least n times
X{n,m}
X, at least n but not more than m times
 
Reluctant quantifiers
X??
X, once or not at all
X*?
X, zero or more times
X+?
X, one or more times
X{n}?
X, exactly n times
X{n,}?
X, at least n times
X{n,m}?
X, at least n but not more than m times
 
Possessive quantifiers
X?+
X, once or not at all
X*+
X, zero or more times
X++
X, one or more times
X{n}+
X, exactly n times
X{n,}+
X, at least n times
X{n,m}+
X, at least n but not more than m times
 
Logical operators
XY
X followed by Y
X|Y
Either X or Y
(X)
X, as a capturing group
 
Back references
\n
Whatever the nth capturing group matched
 
Quotation
\
Nothing, but quotes the following character
\Q
Nothing, but quotes all characters until \E
\E
Nothing, but ends quoting started by \Q

Special constructs (non-capturing)
(?:X)
X, as a non-capturing group
(?idmsux-idmsux) 
Nothing, but turns match flags on - off
(?idmsux-idmsux:X)  
X, as a non-capturing group with the given flags on - off
(?=X)
X, via zero-width positive lookahead
(?!X)
X, via zero-width negative lookahead
(?<=X)
X, via zero-width positive lookbehind
(?<!X)
X, via zero-width negative lookbehind
(?>X)
X, as an independent, non-capturing group
More on Regular Expressions: Full Java Regular Expressions syntax description, Using Regular Expressions in Java.

idea正则表达式查找代码的方法的更多相关文章

  1. LINUX中,find结合grep正则表达式,快速查找代码文件。

    ###目的###LINUX中,find结合grep正则表达式快速查找代码. 例如经常有需求:查找当前目录下所有.h文件中,"public开头,中间任意字符,以VideoFrameReceiv ...

  2. 浅析正则表达式模式匹配的String方法

    在JavaScript代码中使用正则表达式进行模式匹配经常会用到String对象和RegExp对象的一些方法,例如replace.match.search等方法,以下是对一些方法使用的总结. Stri ...

  3. 编写高效Lua代码的方法

    编写高效Lua代码的方法 翻译自<Lua Programming Gems>Chapter 2:Lua Performance Tips:Basic fact By Roberto Ier ...

  4. 浅析正则表达式模式匹配的 String 方法

    在JavaScript代码中使用正则表达式进行模式匹配经常会用到String对象和RegExp对象的一些方法,例如replace.match.search等方法,以下是对一些方法使用的总结. Stri ...

  5. 正则表达式start(),end(),group()方法

    一.捕获组的概念 捕获组可以通过从左到右计算其开括号来编号,编号是从1 开始的.例如,在表达式 ((A)(B(C)))中,存在四个这样的组: 1     ((A)(B(C))) 2     (A) 3 ...

  6. eclipse快捷键 (包括查找类、方法、变量)

    ♦[Ct rl+T] 搜索当前接口的实现类 1. [ALT +/] 智能提示     此快捷键为用户编辑的好帮手,能为用户提供内容的辅助,不要为记不全方法和属性名称犯愁,当记不全类.方法和属性的名字时 ...

  7. 每日扫盲:eclipse快捷键 包括查找类、方法、变量汇总

    [Ct rl+T] 搜索当前接口的实现类 1. [ALT +/]    此快捷键为用户编辑的好帮手,能为用户提供内容的辅助,不要为记不全方法和属性名称犯愁,当记不全类.方法和属性的名字时,多体验一下[ ...

  8. eclipse快捷键 包括查找类、方法、变量

    [Ct rl+T] 搜索当前接口的实现类 1. [ALT +/]    此快捷键为用户编辑的好帮手,能为用户提供内容的辅助,不要为记不全方法和属性名称犯愁,当记不全类.方法和属性的名字时,多体验一下[ ...

  9. SQL中批量删除被注入的恶意代码的方法

    下文将为您介绍SQL中批量删除被注入的恶意代码的方法,供您参考,如果您也遇到了这样的问题,不妨一看,相信对您会有所帮助. 1,如果你的数据表很少的话,那么写几条简单的sql就搞定了 对于表中的nvch ...

随机推荐

  1. 移动端网页使用flexible.js加入百度联盟广告样式不一致问题解决

    flexible.js是淘宝推出的一款移动端手机自适应的库,源码内容很简洁,当网页使用了该库之后,页面会在head中加入对应的页面响应式的meta标签. 当使用flexible.js的时候,引入百度联 ...

  2. level1 - unit 1 - 句子结构

    preface 学习英语做为一种爱好,就是希望有一天能够和老外流畅沟通,目前来看,日常沟通还是没有问题的和我的外教. 知识日积月累,现在就把以前学习的(从初中到现在)知识总结下.每天一更,更到单元总结 ...

  3. CorelDRAW中如何再制对象详解

    再制对象指的是快捷地将对象按一定的方式复制为多个对象,此种复制是复制的复制,再制不仅可以节省复制的时间,再制间距还可以保证复制效果.本教程将详解如何在CorelDRAW软件中再制对象. CorelDR ...

  4. PHPCMS V9 全站通用日期时间标签

    用PHPCMS V9 建站时,经常会用到时间标签,它是通用标签调用-日期时间格式化,适用全站. 1.日期时间格式化显示: a\标准型:{date('Y-m-d H:i:s', $rs['inputti ...

  5. python2内置属性

    # encoding: utf-8 # module __builtin__ # from (built-in) # by generator 1.145 from __future__ import ...

  6. Android数据库升级、降级、创建(onCreate() onUpgrade() onDowngrade())的注意点

    以下内容可以作为面试官在面试的时候的问题,感觉比较好,是比较常用的知识点,可以用来考察基础是否扎实. 也可以程序猿学习.开发中的注意点.因为稍微不注意,就有可能导致数据库不能用. DBAdapter. ...

  7. Java虚拟机(三):Java 类的加载机制

    1.什么是类的加载 类的加载指的是将类的.class文件中的二进制数据读入到内存中,将其放在运行时数据区的方法区内,然后在堆区创建一个java.lang.Class对象,用来封装类在方法区内的数据结构 ...

  8. 5 -- Hibernate的基本用法 --4 7 二级缓存相关属性

    Hibernate的SessionFactory可持有一个可选的二级缓存,通过使用这种二级缓存可以提高Hibernate的持久化访问的性能. Hibernate的二级缓存属性: ⊙ hibernate ...

  9. PHP从数组中找到指定元素的位置

    群里有人问,有个数组五个元素 分为1到5  现在要求 循环找出3元素的索引,怎么做性能才是最高. 我不知道哪个性能最高,但是我想提出可以用多种方式进行查找,然后进行比较选择. 我想,最简单最基础的 应 ...

  10. 01python初识—编辑器&版本&变量知识

    python2.0和3.0版本变化很大,要跟随脚步,学新的,用新的.3.0 python开发工具pycharm 5.0 python的交互器 python的程序一般放到Linux环境下运行. pyth ...