idiomatic? The only difference with your code is the use of if/else instead of the next statement. And next is really not very idiomatic. Other languages have a similar construct.
holli, /regexed monk/
Comment on Re^3: nested reg ex over multiple lines