-4

I would like to use LIKE in Java. How can you get the same functionality in Java that I offer function LIKE in sql. I use Cassandra and SpringData does not LIKE operator. EXAMPLE:

Input data: dog

Output that satisfies the condition : dogabc, abcddog, abdogd

1 Answers1

0

For this particular case you could just write string.contains("dog"), however if you need something a little more complicated you can look at String similarity libraries.

Here are some good pointers: How can I detect common substrings in a list of strings

Sebastiaan van den Broek
  • 5,818
  • 7
  • 40
  • 73