以下是RegexBuddy的导出语句的翻译,可以辅佐领略正则表达式。
* Between zero and unlimited times, as many times as possible, giving back as needed (greedy)
反复匹配0个以上的字符,贪婪匹配
. Match any single character that is not a line break character
匹配一个不是换行的字符
? Between zero and one times, as many times as possible, giving back as needed (greedy)
+ Between one and unlimited times, as many times as possible, giving back as needed (greedy)
*? Between zero and unlimited times, as few times as possible, expanding as needed (lazy)
|前 Match either the regular expression below (attempting the next alternative only if this one fails)
|中 Or match regular expression number 2 below (attempting the next alternative only if this one fails)
|后 Or match regular expression number 3 below (the entire group fails if this one fails to match)
{2} Exactly 2 times
{1,3} Between one and 3 times, as many times as possible, giving back as needed (greedy)
{2,} Between 2 and unlimited times, as many times as possible, giving back as needed (greedy)
[…………] Match a single character present in the list below
[A-Z] Match a single character in the range between “A” and “Z”
[0-9] Match a single character in the range between “0” and “9”
[- /.] Match a single character present in the list “- /.”
[-] The character “-”
[/:*?] One of the characters “/:*?|”
[\r\n] A carriage return character A line feed character
[\r] Match a carriage return character
[^>] Match any character that is NOT a “>”
[^……] Match a single character NOT present in the list below
(………) Match the regular expression below and capture its match into backreference number 1
\1 Match the same text as most recently matched by capturing group number 1
x Match the character “xxx” literally
xxx Match the characters “xxx” literally
\t A tab character
\d Match a single digit 0..9
\W Match a single character that is a “non-word character”
\w Match a single character that is a “word character” (letters, digits, etc.)
\r Match a carriage return character
(?:……) Match the regular expression below
(?!……) Assert that it is impossible to match the regex below starting at this position (negative lookahead)
(?>……) Atomic group. Match the regex below, and do not try further permutations of it if the overall match fails.
(?=……) Assert that the regex below can be matched, starting at this position (positive lookahead)
(?<!……) Assert that it is impossible to match the regex below with the match ending at this position (negative lookbehind)
(?<=……) Assert that the regex below can be matched, with the match ending at this position (positive lookbehind)
\b Assert position at a word boundary
\A Assert position at the beginning of the string
^ Assert position at the beginning of the string
$ Assert position at the end of the string (or before the line break at the end of the string, if any)
\z Assert position at the very end of the string