Switched back to regexp implementation