It works! So a metacharacter inside a pattern that is referenced by a variable is still a metacharacter. How obvious it is now that it's been pointed out to me. Thanks to all who responded, basi