preset ^ and $ to the pattern strings