adding special threatment for regex values.
making the code a little bit more readable