robust regex match