Add optional space after carrot to regexp

Not sure if we should allow only one space or arbitrary many.

@samuelkadolph