code: public Stream<HString> findAllPatterns(@NonNull Pattern regex) {
        return Streams.asStream(new Iterator<HString>() {
           Matcher m = regex.matcher(HString.this);
           int start = -1;
           int end = -1;
  
           private boolean advance() {
              if (start == -1) {
                 if (m.find()) {
                    start = m.start();
                    end = m.end();
                 }
              }
              return start != -1;
           }
  
           @Override
           public boolean hasNext() {
              return advance();
           }
  
           @Override
           public HString next() {
              if (!advance()) {
                 throw new NoSuchElementException();
              }
              HString sub = substring(start, end);
              start = -1;
              end = -1;
              //If we have tokens expand the match to the overlaping tokens.
              if (document() != null && document().isCompleted(Types.TOKEN)) {
                 return union(sub.tokens());
              }
              return sub;
           }
        });
     }
docs: Finds all occurrences of the  given regular expression in this HString starting from the beginning of this
  HString
  
  @param regex the regular expression to search for
  @return A list of HString that are matches to the given regular expression