Corrected MOF method to add ^ and $ to regex