public Seq<CharSeq> scan(String regex){
  Pattern pat=Pattern.compile(regex);
  Matcher m=pat.matcher(str);
  MutableSeq<CharSeq> charSeq=Seqs.newMutableSeq();
  while (m.find()) {
    charSeq.appendInPlace(CharSeq.of(m.group()));
  }
  return charSeq;
}

public Seq < CharSeq > scan ( String regex ) { Pattern pat = Pattern . compile ( regex ) ; Matcher m = pat . matcher ( str ) ; MutableSeq < CharSeq > charSeq = Seqs . newMutableSeq ( ) ; while ( m . find ( ) ) { charSeq . appendInPlace ( CharSeq . of ( m . group ( ) ) ) ; } return charSeq ; }
scan through this charseq iteratively , generate a seq of charseq with all the matching substrings .
