How to say i regret having done such a thing. in Hebrew word

1)אני מצטער שעשיתי דבר כזה.    
0
0
Translation by Eldad
2)אני מצטערת שעשיתי דבר כזה.    
Translation by EldadConnect Error: Too many connections