regex mechanism added to getting proper rule