Add optional space after carrot to regexp