zoukankan      html  css  js  c++  java
  • editplus 常用正则

    EditPlus的查找,替换,文件中查找支持以下的正则表达式:

    Expression Description
    Tab character.
    New line.
    . Matches any character.
    | Either expression on its left and right side matches the target string.
    For example, "a|b" matches "a" and "b".
    [] Any of the enclosed characters may match the target character.
    For example, "[ab]" matches "a" and "b". "[0-9]" matches any digit.
    [^] None of the enclosed characters may match the target character.
    For example, "[^ab]" matches all character EXCEPT "a" and "b".
    "[^0-9]" matches any non-digit character.
    * Character to the left of asterisk in the expression should match 0 or more times.
    For example "be*" matches "b", "be" and "bee".
    + Character to the left of plus sign in the expression should match 1 or more times.
    For example "be+" matches "be" and "bee" but not "b".
    ? Character to the left of question mark in the expression should match 0 or 1 time.
    For example "be?" matches "b" and "be" but not "bee".
    ^ Expression to the right of ^ matches only when it is at the beginning of line.
    For example "^A" matches an "A" that is only at the beginning of line.
    $ Expression to the left of $ matches only when it is at the end of line.
    For example "e$" matches an "e" that is only at the end of line.
    () Affects evaluation order of expression and also used for tagged expression.
    scape character. If you want to use character "" itself, you should use "\".

    示例:

    ^[^D].*$ 获取不是以D开头的行
    ^[ ]* 获取空行

  • 相关阅读:
    python -- 内存与垃圾回收源码分析
    机器学习:决策树
    leetcode -- 树操作
    树:基本树形
    树:遍历算法
    查找:字符串匹配算法 -- KMP
    Java 8 新特性
    Java学习书籍推荐
    Guava基本工具--Throwables:简化异常和错误的传播与检查
    Guava基本工具--排序: Guava强大的”流畅风格比较器”
  • 原文地址:https://www.cnblogs.com/king1302217/p/6678474.html
Copyright © 2011-2022 走看看