1. I regret breaking the window.

2. I regret to break the window.
-------------------
Are both grammatical? What is the difference between the two sentences?

3. I regret having broken the window.
4. I regret to have broken the window.
-------------------
Are both grammatical? What is the difference between the two sentences?

1 and 3 are correct. 2 and 4 are not.

1. "I regret breaking the window" and 3. "I regret having broken the window" are both grammatically correct sentences. The difference between these two sentences is the tense and the structure of the verb.

In sentence 1, "breaking" is a gerund, which functions as a noun. It indicates that the act of breaking the window is the cause of regret.

In sentence 3, "having broken" is a present perfect participle construction, which indicates that the action of breaking the window occurred before the expression of regret. This structure emphasizes that the breaking of the window is already completed and now regretted.

2. "I regret to break the window" and 4. "I regret to have broken the window" have some grammatical issues. These sentences contain an incorrect use of the verb "regret."

The verb "regret" is not usually followed by the infinitive form of a verb ("to break"), but instead by either a finite verb (such as "breaking" or "having broken") or a noun phrase.

Therefore, the correct forms would be:

2. "I regret breaking the window"
4. "I regret having broken the window"

In summary, sentences 1 and 3 are grammatically correct, while sentences 2 and 4 have incorrect constructions. The difference between sentences 1 and 3 lies in the structure of the verb and the tense used.

1. "I regret breaking the window" is grammatically correct. In this sentence, the verb "regret" is followed by the gerund form "breaking," which acts as a noun. It indicates that the speaker feels remorse or disappointment about the action of breaking the window.

2. "I regret to break the window" is less commonly used and may not be as grammatically standard. In this sentence, the verb "regret" is followed by the infinitive form "to break." This construction suggests that the speaker feels a sense of obligation or duty to break the window, which is likely not the intended meaning. It may convey a sense of reluctance or apology, but the structure is less common and might be seen as less idiomatic.

Regarding the second set of sentences:

3. "I regret having broken the window" is also grammatically correct. The verb "regret" is followed by the present participle form "having broken," which indicates that the regret is about the action of breaking the window that occurred in the past. This form emphasizes the completion of the action.

4. "I regret to have broken the window" is less commonly used and may not be as grammatically standard. In this sentence, the verb "regret" is followed by the infinitive form "to have broken." This construction suggests that the speaker feels a sense of obligation or duty to have broken the window, which is likely not the intended meaning. It may convey a sense of reluctance or apology, but the structure is less common and might be seen as less idiomatic.

In both sets of sentences, options 1 and 3 are more commonly used and preferred due to their grammatical standardness and naturalness in conveying the intended meaning of regret.