refactored regexp