Returns true if pat matches with text .
public static boolean regexMatch ( String text , String pat ) { int lenText = text . length ( ) ; int lenPat = pat . length ( ) ; char [ ] Text = text . toCharArray ( ) ; char [ ] Pat = pat . toCharArray ( ) ;