Can you use (?: )? to avoid capturing the space and speeding up the expression slightly.

(I learned this new trick from @leaverou)