随笔分类 - RegEx
摘要:http://www.vaikan.com/regular-expression-to-match-string-not-containing-a-word/经常我们会遇到想找出不包含某个字符串的文本,程序员最容易想到的是在正则表达式里使用,^(hede)来过滤”hede”字串,但这种写法是错误的。...
阅读全文
摘要:CTRL + space in the textboxes gives you all kinds of suggestions for regular expression writing.查找替换Be sure to check out the \C regular expression ope...
阅读全文
摘要:http://msdn.microsoft.com/zh-cn/library/ae5bf541(v=vs.80).aspx正则表达式是一种文本模式,包括普通字符(例如,a 到 z 之间的字母)和特殊字符(称为“元字符”)。模式描述在搜索文本时要匹配的一个或多个字符串。正则表达式示例表达式匹配/^\s*$/匹配空行。/\d{2}-\d{5}/验证由两位数字、一个连字符再加 5 位数字组成的 ID 号。/]*)?>[\s\S]*/匹配 HTML 标记。下表包含了元字符的完整列表以及它们在正则表达式上下文中的行为:字符说明\将下一字符标记为特殊字符、文本、反向引用或八进制转义符。例如,“n”
阅读全文
摘要:http://www.eclipse.org/tptp/home/downloads/installguide/gla_42/ref/rregexp.htmlRegular expression grammarThe Adapter Configuration Editor allows you to use regular expressions to describe how log files should be transformed into Common Base Event records. The following tables are a guideline to regu
阅读全文