Expression | Meaning |
^abc | Match "abc" at beginning of line |
abc$ | Match "abc" at end of line |
^abc$ | Match the line "abc" exactly |
^\s*abc | Match "abc" at beginning of line, but allow leading whitespace |
^\s*end;?\s*$ | Match a line containing only "end" or "end;" with leading or trailing whitespace |
abc|def | Matches either "abc" or "def" |
a(b|c)d | Matches "abd" or "acd" |
a(b|c)d\1 | Matches "abdb" or "acdc", but it does not match "abdc" |
Sample Regular Expressions
最新推荐文章于 2024-02-08 16:02:20 发布