There should be some super cool RegEx, which I can use. However after short research I wasn't able to find it. So, I created a simple function which does the job.