Added output rule for regex with spaces

Space in the rule must be represented by an underscore, but will be
outputted as a space.