Implemented regex.