The regular expression: (?-imsx:[a-zA-Z][a-zA-Z][a-zA-Z]\d\d,\s+interlock) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?-imsx: group, but do not capture (case-sensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): ---------------------------------------------------------------------- [a-zA-Z] any character of: 'a' to 'z', 'A' to 'Z' ---------------------------------------------------------------------- [a-zA-Z] any character of: 'a' to 'z', 'A' to 'Z' ---------------------------------------------------------------------- [a-zA-Z] any character of: 'a' to 'z', 'A' to 'Z' ---------------------------------------------------------------------- \d digits (0-9) ---------------------------------------------------------------------- \d digits (0-9) ---------------------------------------------------------------------- , ',' ---------------------------------------------------------------------- \s+ whitespace (\n, \r, \t, \f, and " ") (1 or more times (matching the most amount possible)) ---------------------------------------------------------------------- interlock 'interlock' ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------