use regex triplet, add unit test