摘要:最大匹配(默认): 最小匹配(加一个问号): 匹配 // 注释: [\t ]*//.*[^\r\n] 匹配 /** */ doc注释和/* */ 块注释(): [\t ]*/\*[\s\S]*?\*/ 验证: /* * Copyright (c) 1994, 2013, Oracle and/or
阅读全文
摘要:目标识别需要具备的特征:有package,是class,/** ... */ doc文档,只识别单行 public static void main(String[] args) { System.out.println(getClassDoc( "package cn.zno.xxx;\r\n"
阅读全文
摘要:例一 <[^><]*> 解释: []* 匹配多个方括号里的 ^>< 非>非< <以< 开头 >以>结尾 [^abc] Any character except a, b, or c (negation) 示例: <input[^><]*> </input> 例二 to_date\([^\(\)]*\
阅读全文
摘要:\n\s*\r 应用: 搜索结果: 额外应用,消除xml文件的空白
阅读全文
摘要:package test; import java.util.Random; import java.util.regex.Pattern; public class CodeUtil { public static final char[] CHARS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B'...
阅读全文
摘要:http://www.w3school.com.cn/jsref/jsref_obj_regexp.asp/^[0-9a-zA-Z]*$/g
阅读全文