| a |
matches the single character "a" |
| . |
matches any character |
| \. |
matches only "." and no other character |
| ^ |
matches the beginning of the text |
| $ |
matches the end of the text |
| [[:<:]] |
matches the point between the last non-word character and the beginning of a word |
| [[:>:]] |
matches the point between the last character of a word and the following non-word character |
| gigo |
matches "gigo", "gigoit" or "gigoit.org" |
| ^gigo |
matches "gigoit" but not "http://www.gigoit.org" |
| it$ |
matches "gigoit" but not "http://www.gigoit.org" |
| . |
matches any single character |
| .n |
matches "an", "on", "3n", etc. |
| [[:<:]]it |
matches "it" but not "gigoit" (no letters before "it") |
| gigo[[:>:]] |
matches "gigo" but not "gigoit" (no letters after "gigo") |
| [[:<:]]gigo[[:>:]] |
matches "gigo" but not "gigoit" or "www.gigoit.org" |
| [ |
begins a character class |
| ] |
ends a character class |
| ^ |
used inside square brackets, it negates the character class |
| - |
used inside square brackets, it separates the beginning and end of a range |
| [abc] |
matches one of "a", "b", or "c" |
| [abc][abc] |
matches the "ac" in "action", but not any part of "auction" |
| [Gg]igoit |
matches "Gigoit" or "gigoit" |
| gigo[^it] |
matches "gigo" or "gigo it " or "gigo-it", but not "gigoit" |
| [x-zX-Z] |
matches one of "x", "y", "z", "X", "Y" or "Z" |
| | |
matches nothing on its own, but lets the regex match if either the pattern before or after matches |
| gigo|it |
matches any string containing either "gigo" or "it" |
| GIGOIT|gigoit |
matches "GIGOIT" or "gigoit", but not "Gigoit" |
| GIGOIT|gigoit|Gigoit |
matches any of "GIGOIT", "gigoit", or "Gigoit" |
| ? |
matches zero or one of the preceding character or sequence |
| * |
matches zero or more (any number) of the preceding character or sequence |
| + |
matches one or more of the preceding character or sequence |
| gigo-?it |
matches "gigoit" or "gigo-it" |
| [Gg]igo-?it |
matches "Gigoit", "Gigo-it", "gigoit", or "gigo-it" |
| app.*s |
matches "apps", "apples", "applications" , "application forms", etc. |
| cho+se |
matches "chose" or "choose" (or "choooooose") |
| ( |
matches nothing on its own; delimits the beginning of a sequence |
| ) |
matches nothing on its own; delimits the end of a sequence |
| gigo(it)? |
matches "gigo" or "gigoit" but not "gigo-it" |
| (gigo|Gigo)[^it] |
matches "gigo" or "Gigo", but not "gigoit" or "Gigoit" |
| (Gigo.*|gigo.*).(Org|org) |
"matches "gigoit.org" or "gigoit.org", among others |