Wildcards and Regular Expressions
Universal Controller supports the use of wildcards and regular expressions in the user interface and remote interfaces.
For files, wildcards and regular expressions can be used only in:
- Source file specifications, not destination file specifications. (Under some operating systems, it is possible for * and ? to be valid characters in a file name. If they appear in a destination file, they are treated as file characters, not as wildcards or regular expressions.)
- File name portion of file specifications, not as part of the directory.
Wildcards
Universal Controller supports two wildcards:
- Asterisk (*)
- Question mark (?)
You can use wildcards in record searches and when applying some rule or command against records. Fields that support wildcards are identified in their field description.
Wildcard | Meaning |
|---|---|
Asterisk (*) | Represents a wildcard of any number of characters. For example, a search for string "FEE*SF" returns all records whose name begins with "FEE" and ends with "SF", with any number and type of characters between the two strings. |
Question mark (?) | Represents a wildcard of one character in a specific position. For example, a search for string "FEE?SF" returns all records whose name begins with "FEE" and ends with "SF", with any single character between the two strings. |
Multiple questions marks | Represent wildcards of multiple characters in a specific position. For example, a search for string "FEE??SF" returns all records whose name begins and ends with "FEE" and "SF", respectively, with any two characters between the two strings. |
File Name Examples
File Names
test.txttest1.txttest2.txttest3.txttest.bintest1.bintest2.bintest3.bin
Wildcard Matches
*,*.*,test*.*, andtes?**.will match all of the files.*.txtwill match files 1 - 4.*.binwill match files 5 - 8.test?.txtwill match files 2 - 4.
Regular Expressions
POSIX Extended Regular Expression syntax is used for file name matching and string matching.
You can use regular expressions only on Windows and UNIX operating systems; you cannot use them on z/OS.
File Name Examples
File Names
test.txttest1.txttest2.txttest3.txttest.bintest1.bintest2.bintest3.bin
Regular Expression Matches
.+,tes.+, andte.+[tn]$will match all of the files..+txt$will match files 1 - 4..+bin$will match files 5 - 8.te..[123].+bin$will match files 6 - 8.
String Examples
| Matches C:\UDM\TEST\OUT\LinuxSystem.D20171001.T235159.* |
| Matches C:\UDM\TEST\OUT\LinuxSystem.D171001.T235159.* |
| Fails C:\UDM\TEST\OUT\LinuxSystem.D2017201033.T235159.* month 20 day 33! |
| Fails C:\UDM\TEST\OUT\LinuxSystem.D171001.T266159.* hour 26 minutes 61! |