import java.util.regex.Matcher;
import java.util.regex.Pattern;
// Check if input match a pattern
Pattern curPat = Pattern.compile( "tanvir"+ "(.)+" + "tanvir");
Matcher mymatcher;
String input="tanvirAAAAAAAtanvir";
mymatcher = curPat.matcher( input );
if(mymatcher.find())
{
System.out.println("Matched pattern: "+ input );
}
// List all hit with position in input string
m= ConstantValue.patReplicaFantom.matcher(colNameUnReadable) ;
while (m.find()) {
System.out.print("Start index: " + m.start());
System.out.print(" End index: " + m.end());
System.out.println(" Found: " + m.group());
}
// Split a input according to pattern
Pattern patFastaHeade = Pattern.compile("[>_]+");
String text=">aaaa";
String tmp[];
tmp = patFastaHeade.split(text);
for( int i=0; i
}
Comments
Post a Comment