Pattern Match Any Character Outside a Range

The following examples illustrate the matching of patterns outside a range of characters. The presence of the caret ( ^ ) character after the left bracket and before the range pattern indicates that a match occurs when a character is not within the specified range. For example, [^4-9] indicates any character outside the range of '4' through '9'.

Pattern Searched String Result
CUST[^4-9]FIL CUST1FIL Match
CUST[^4-9]FIL CUST2FIL Match
CUST[^4-9]FIL CUST6FIL No match
CUS1FL[^A-Z] CUST1FLA No match
CUST1FL[^a-z] cust1fla No match
CUS1FL[^A-Z] CUST1FL4 Match
CUST1FL[^A-Z] CUST1FLX No match
CUST1FL[^a-z] CUST1FLB Match
CUST1FL[^a-z] CUST1FLc No match
CUST1FL[^a-z] CUST1FL3 Match
CUST1FL[^4-9A-D] CUST1FL4 No match
CUST1FL[^4-9A-D] CUST1FLW Match
CUST1FL[^4-9A-D] CUST1FLg Match
cust1fl[^4-8a-e] CUST1FLA No match