Using Regular Expressions for Searching
Many screens first open as a search screen. From these screens, you can look for existing records that meet the criteria you choose to search with. Then from the search results, you can view the details of one or more of those records. In addition, you can search multiple times in a row to build on the existing results to create a custom set of results specific to your needs.
Wildcard characters and regular expressions
Tip
Wildcards are single characters used as a substitute for other characters when searching. The * (asterisk) is a commonly known wildcard. However, when used in combinations, they become very powerful tools to help you find exactly what you are looking for. These combinations are called regular expressions.
For simplicity, regular expressions are referred to as wildcards in this explanation.
When searching for existing records, you may not be sure of the exact values to enter as criteria. Or you may want to start with a large list of search results so that you can select the specific records you need. In these situations, using wildcard characters and regular expressions can be helpful.
Note
Searching with wildcards is not available on the Employee search screen.
The following table shows how you can improve your searching. The examples shown assume you are searching for evening activity codes from the Activity Code screen ().
|
Wildcard characters |
Explanation |
|---|---|
|
No wildcard characters |
When no wildcard characters are used, all records that begin with the value you enter are returned. Example Entering E finds all evening activity codes like E1500-8 and E1900-4, but also finds all other activity codes beginning with E like Education and Extra. Adding additional characters would refine your results. |
|
. (period) |
The period matches any single character. Example Entering E. finds all activity codes that start with E but not an activity code that is just E because at least one more character is expected. Entering E1.00 finds activity codes that match that pattern, like E1500-8 and E1900-4, but not E1930-4 or E2300-8. |
|
+ (plus) |
The plus matches one or more instances of the previous character. Example Entering E15+ finds activity codes that match the pattern, like E1500-8 and E1500-10, but not E1430-8 or E2300-8. |
|
* (asterisk) and .* |
When used by itself, an asterisk matches zero or more instances of the previous character. Example Entering E15* finds activity codes that match the pattern, like E1500-8 and E1430-8, but not ED or E2300-8. When used in combination with a period, the asterisk works as a flexible multi-character wildcard. Example Entering E.*10 finds activity codes that match the pattern, like E1500-10 and E2300-10, but not E1500-8. Entering E15.* finds activity codes like E1500-10 and E1530-8 but not E1900-8. See Combining wildcard characters below. |
|
$ (dollar) |
When the dollar sign is placed after a value, the search results end with the final character; there will not be any other characters after it. This can also be used to indicate an exact match. Example Entering E$ finds only the E activity code, not any of the other evening activity codes. Entering E15$ finds no matching activity codes. Entering Educ$ finds EDUC but not Education. |
|
| (vertical bar) |
The vertical bar is an "or" operator, finding either the first value or the second value. Example Entering E1500|E1530 finds E1500-8, E1500-10, E1530-8, and E1530-4, but not E1900-8 or E1430-8. |
|
{ } (curly brackets) |
Curly brackets quantify the number of instances of the preceding character. Example Entering E13{2} finds E1330-8, but not E1300-8. |
|
( ) (parentheses) |
The parentheses are used to group characters and are used with another wildcard character. Example Entering E15(0|3)* finds E1500-8 and E1530-8, but not 1545-8. See Combining wildcard characters below. |
| [ ] (square brackets) |
Use square brackets to specify that one or more letters or one or more numbers must be included. Example Entering E[a-z] finds Evening and Education, but not E1500-8 or E2000-8. Entering E[d] finds Education, but not Evening. Entering E[1-9] finds E1500-8 and E2000-8, but not Evening or Education. Entering E[2] finds E2000-8, but not E1500-8. |
Multiple wildcard characters can be combined to indicate a complex search with different variables.
For example, entering *.Manager$ will return all records that begin with any characters, but must end with Manager. The period and asterisk at the beginning indicate any characters can be in front of the word Manager. The dollar sign at the end indicates the value must end with the word Manager.
As another example, entering .*(Manager|Supervisor) will return all records that include Manager or Supervisor. The period and asterisk at the beginning indicate any characters can be in front of the word. The parentheses and vertical bar indicate the results must include either word.
Searching for wildcard characters
Wildcard characters include: . $ ^ { } [ ] ( ) | * + ?
If you want to search for a record that has a wildcard character as a part of it, you need to include \ (backslash). For example, if you search for an activity code using D$ only the D activity code is returned because the dollar sign indicates the end. But if you do need to find the D$ activity code, enter \ before the wildcard character, like D\$. This returns the D$ activity code.
If the reserved wildcard, or regular expression, characters are used in a search field, but the characters entered do not follow the correct pattern or usage, a warning message appears. For example, if you search with a single [ (square bracket), the message will appear because the system is looking for the corresponding ] bracket.