I'm working on kind of search in my app and need to check if my text contains the word that the user entered.
currently my code is:
if (textToCheck.toLowerCase().contains(input.toLowerCase())) {
Which works perfectly fine. But , i would like my search to be smarter , and search only on Alphabets so if for example a text contains other symbols (rather than a-z) the app will ignore them :
Example : if this is my text and this is my input , i want a match.
textToCheck = "The search will not work with, comma, brackets, or any other symbol"
input = "work with comma brackets"