1) add an anchor at the beginning (^) 2) escape regex meta chars (quotemeta) 3) add an anchor at the end