-
Notifications
You must be signed in to change notification settings - Fork 10
Regular Expression Basics
WARNING: This page may seem redundant to you, since there are a lot of other resources on this available.
.
Placeholder for any character
*
Modifier for any number of characters from 0 to probably "2 to the power of 32"[Roughly 4 billion] on most machines.
+
Modifier for any number of characters from 1 to probably "2 to the power of 32"[Roughly 4 billion] on most machines.
?
Modifier for either one or none character of the aforementioned kind.
|
OR: Conjugation of different word-definitions. For example: a|fooBar
filters words that are either just "a" or "fooBar"
^
NOT the following sign. For example: [^1]
means any character but 1
.
()
are used for grouping characters. For example ...(....)? means that the words have to be either 3 or 7 chars long, since the question-mark defines the "4 Chars extra" as either there or not.
.*
characterizes any word, even the empty word.
...+
characterizes any word, that is at least three character long.
[^word]*
characterizes any word that DOES NOT include the small letters w, o, r or d.