I don't really understand the last two comments. Braces for  multiline if/else is used. The only difference is that the brace is shifted on a new line, because of the very long regexp in the check. I tried different formatings and this one looked the best to me at the time.