code: public Regex then(Regex regex) {
        if (regex == null) {
           return this;
        }
        return re(this.pattern + regex.pattern);
     }
docs: Concatenates the given regex with this one.
  
  @param regex the regex to concatenate with this one
  @return the regex