regret to have done?

Hi,

I regret to have done such a thing.

I think the sentence above should be corrected into “I regret having done such a thing.” As far as I know, “regret to” is used with say or inform to announce bad news while “regret -ing” is used to say one is sorry about what s/he did in the past.

One more question.

  1. I regret having done such a thing.
  2. I regret doing such a thing.

I want to know the exact difference between the two sentences. Am I right?

  1. I feel sorry about what I did, but it still affects now: I feel sorry about what I have done.
  2. I feel sorry about what I did in the past.