I want to implement this function:
boolean check(String str,String exp)
that gets a string, and an expression and see if it mathches.
But (!), according to a format by '*' (maybe similar to the SQL LIKE statement, but with * instead of %).
Examples of tests of this function that should work:
boolean b3=check("55-210.txt", "55*"); // starts with 55 assertEquals(b3,true); boolean b5=check("f1.txt", "*.txt"); // ends with *.txt assertEquals(b5,true); b=check("897", "8*8*"); // 8...8... assertEquals(b,false);
I don't mind, and even prefer to use existing external jars that can help, like Jakarta RegExp, JOSQL, and such.
Thanks in advance