Add: a minor improvement to regex matching (skip empty matches).