I have a severe, error while implementing with regex "%" followed by a name to search like "%srin" for example: Code: - List l = new ArrayList(); l.add("srinivas"); l.add("Sridharsrinivas"); l.add("manojsrinivas"); l.add("abc");
How can i able to implement by searching like %srin should give me the whole contents that are available. Help me please, I am awaiting for your replies guys,
What is the '%' supposed to do - does it just mean there can be any prefix to the 'srin'? If so, no regexp is necessary - plain old String.indexOf should do nicely.