How do I select specific updates with regular expressions (/match, /nomatch)?
If you want to select specific updates by using regular expressions (e.g. for the switches /match or /nomatch), WuInstall checks the expression against the title and the update ID of each update. The expression may match any part of the title, and upper and lower case must match. WuInstall 3 uses .NET regular expressions (see the .NET regular expression quick reference); WuInstall 2.9.x uses the ECMAScript syntax of the C++ standard library. Common elements such as ., .*, [0-9], (a|b), ^ and $ work the same in both versions.
To ignore upper and lower case in WuInstall 3, start the expression with (?i); WuInstall 2.9.x does not support (?i). In a /matchfile or /nomatchfile file, a line #nocase makes the following expressions case-insensitive in both versions; write these expressions in lower case.
Example:
WUInstall /install /nomatch "Preview"
Installs all updates except the ones with "Preview" in the title, such as the optional cumulative update previews.
A regular expression that finds the cumulative updates for Windows 11 and their previews:
WUInstall /search /match "Cumulative Update (Preview )?for Windows 11"
⚠️ In an
/optionsfile, WuInstall 2.9.x and 3.0.0 accept only letters, digits and: - + \ / = . _in a value (blanks only inside quotes). An expression with characters such as|,(,[,*or^is dropped there, and/matchor/nomatchthen takes the switch on the next line as its expression. WuInstall 3.0.1 and later read the whole value. With older versions, put such expressions into a/matchfileor/nomatchfile.
👉 See also: Filter Options and Other Options (/options files)