String pattern = " ba * * * * * ab " ; String pattern = " ba * ab " ; String pattern = " a * ab " ; String pattern = " a * * * * * ab " ; String pattern = " * a * * * * * ab " ; String pattern = " ba * ab * * * * " ; String pattern = " * * * * " ; String pattern = " * " ; String pattern = " aa ? ab " ; String pattern = " b * b " ; String pattern = " a * a " ; String pattern = " baaabab " ; String pattern = " ? baaabab " ; String pattern = " * baaaba * " ;
if ( strmatch ( str , pattern , str . length ( ) , pattern . length ( ) ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }