BAD : In any case I didn't regret to stay at home.
GOOD : In any case I didn't regret staying at home.
BAD : I now regret not to have worked harder at school.
GOOD : I now regret not having worked harder at school.
Regret is followed by a to-infinitive in formal letters to introduce a piece of bad news: 'I regret to inform you that your application for a scholarship has been unsuccessful.'
When you are talking about the past, use regret doing sth or regret that : 'I have often regretted leaving the police force.' 'I wonder if they ever regret not having gone to live abroad?' 'Now that it was too late, he regretted that he hadn't worked harder at school.'