minor regex improvements for DB.pm

A char class is cheaper than "|" and use non-capturing groups.