I need a comparator in java which has the same semantics as the sql \'like\' operator. For example:
myComparator.like(\"digital\",\"%ital%\"); myComparator.l
Regular expressions are the most versatile. However, some LIKE functions can be formed without regular expressions. e.g.
String text = "digital"; text.startsWith("dig"); // like "dig%" text.endsWith("tal"); // like "%tal" text.contains("gita"); // like "%gita%"