code: public HString findPattern(@NonNull Pattern regex) {
        Matcher m = matcher(regex);
        if (m.find()) {
           return union(substring(m.start(), m.end()).tokens());
        }
        return Fragments.empty(document());
     }
docs: Finds the given regular expression in this HString starting from the beginning of this HString
  
  @param regex the regular expression to search for
  @return the HString for the match or empty if no match is found.