Regular expressions for searching and filtering modules
You can use regular expressions when you search or filter formal modules.
Meaning | Example | Matches | |
---|---|---|---|
* | Zero or more occurrences | a*
|
Zero or more a characters (every string
matches this expression) |
+ | One or more occurrences | a+
|
One or more a characters |
. | Any single character except newline | * |
Any number of any characters except for newline characters (in other words, any string) |
\ | Escape (turns off the special meaning associated with a character) | \. |
A period (.) character |
^ | Beginning of line (if it is at the start of the expression) | ^The.*
|
Any line that starts with the string
The |
$ | End of line (if it is at the end of the expression) | Monday\.$
|
Any line that ends with the string Monday
followed by a period (.) |
() | Groupings | (ref)+(bind)* |
At least one ref string then zero or more bind strings |
[] | character range (letters or digits) | [sS]hall.*\.$ |
Any line that contains either shall or
Shall , and ends with a period (.) |
[^abc]
|
Any character except a ,
b , or c |
||
[a-zA-Z] |
Any alphabetic character (uppercase or lowercase) | ||
[0-9] |
Any numeric character (number between 0 and 9) | ||
| | alternative | (dat|doc) |
Either the string dat or the string
doc |