+1 glad to hear you weren't seriously hurt. It's coming to something when you can't walk around at night without having to consider anyone walking on the same side of the street as a potential threat.
Something similar happened to me last month; heading home from my brother's house at midnight, two young chavs started following me asking for cigarettes etc. It was fairly obvious what was about to go down, but there were no real exit routes for me once they started keeping pace with me, so I waited until we were walking past a large grassy area and stepped from the pavement onto the grass to reduce the likelihood of getting a concussion when they attacked me.
One chav produced a glass bottle and demanded money and phone etc, and the other tried to grab my backpack; as he did, the first raised the bottle, so I stepped in as close to him as I could to reduce his swing length, and tilted my head down to protect my face. The bottle hit me just over the hairline and cracked rather than smashing, so I got a cut about an inch long - it bled a lot but didn't go deep and at the time I barely even felt it due to adrenaline. After that there was a short brawl (40 seconds at most) and then they ran off, leaving me in possession of my bag, wallet and phone, but drenched in blood from head to toe and feeling rather unamused by the whole performance. Some dude walking down to town saw me and called an ambulance, the police were there in under a minute and by 4am I was back home and laughing about it online with my friends.
The worst part of the night was how boring it is to sit in A&E waiting to be seen, especially when you look like something out of Hellraiser. Two days later I was bombing down a street on my skateboard and hit a crisp packet, resulting in some road rash that hurt a hell of a lot more than being glassed. :D