[COOK-4673] Fix rule check regex

Regex for checking rule is already applied is less greedy where FROM is
concerned