.contains seems to return true for most things, even if one or two chars match. Is there a way to make it more restrictive?
Jump to Post
I assume you're talking about String.contains(), please be specific there are lots of contains methods :)
If you want to match a string more restrictively to patterns, i would suggest looking at regular expressions, which allow you to create a definition of a pattern, for example
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.