troubleshooting Question

Java String wildcard Matching

Avatar of micro_learner
micro_learner asked on
Java
8 Comments3 Solutions11494 ViewsLast Modified:
Java Pattern Matching ...


I have a list of Strings which represent the names ..for eg:

[hellothere ,cellomello ...]


I have an existing function which filters based on the user input, basically to see if there is any substring


if(name.indexOf(matchString) >= 0)


Hence this will return true if the user input is hello or hell etc ...

But now I need to fileter when there  are any wildcards like % or $ etc ..

so that it returns true for inputs such as hel* or he*l
ASKER CERTIFIED SOLUTION
ksivananth
Vice President

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros