[SOLVED]Regular expressions checking, by the format "*,txt",ab* etc'
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:
I don't mind, and even prefer to use existing external jars that can help, like Jakarta RegExp, JOSQL, and such.
boolean b3=check("55-210.txt", "55*"); // starts with 55
boolean b5=check("f1.txt", "*.txt"); // ends with *.txt
b=check("897", "8*8*"); // 8...8...
Thanks in advance