Merge pull request #8058 from bbodenmiller/patch-14

simplify DHE parameter generation
Replace regex methods by string ones since faster

and more readable.