refactored the regexp