Thank you Darren. But I am still confused. $1 is matched to "this" or "that", so they will not be upper cased. $2 matched to other words other than "this" or "that" and change them to upper cases, in this example, the "and" was changed to "AND". It seems to me that the "and" was assigned to $2, why you thought that $2 will always be undefined? Thanks.