I have an ArrayList of strings and I want to perform a search method on them. So far I only have this:
public void searchNote(String searchCertainNote)
{
for (String note: notes)
{
if (note.contains(searchCertainNote))
{
System.out.println(note);
}
}
}
I would like to improve this search method a bit by allowing the user to search for a string like:
String searchCertainString = "a?c" ... Possible search results: "abcd"; "a4c"; "Abc", "a22c", "a$c", etc...
The question mark "?" should represent all characters that are out there.
I did some googling and found out that I could implement this by using regex and String.matches() ...
But I still need your help on this!
Thanks =)