Regex code cleanup

Code maintenance in std.regex.

Includes tidying up versions and adoption to the prevalent code formatting.

Also addresses dead code, code duplication.

Best viewed commit by commit.