我想把正则表达式“翻译”成人类可读的解释。
例如:/^[a-z0-9_]{6,18}/将被翻译成类似于:
A string start with 6 to 18 char(s) in a range of a to z, 0 to 9 and _.
发布于 2012-01-23 16:14:34
Expresso,一个免费的工具,可以做到这一点(并且做得很好)。
Expresso 3.0 on Microsoft's regular expression Webcast series
发布于 2012-01-23 16:31:39
使用RegexBuddy (但在我看来,这是最好的工具),表达式的文档记录如下:
// ^[a-z0-9_]{6,18}
//
// Options: ^ and $ match at line breaks
//
// Assert position at the beginning of a line (at beginning of the string or after a line break character) «^»
// Match a single character present in the list below «[a-z0-9_]{6,18}»
// Between 6 and 18 times, as many times as possible, giving back as needed (greedy) «{6,18}»
// A character in the range between “a” and “z” «a-z»
// A character in the range between “0” and “9” «0-9»
// The character “_” «_»该工具还允许您在文档中选择一行,并显示正则表达式中的部分。

https://stackoverflow.com/questions/8968676
复制相似问题