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