java - Find the whole word from a Sentence with matching String -
i trying filter whole word sentence.
like example
text : question programming language.
search text : pro
result should : programming
basically want whole words sentence.
i referred how find whole word in string in java also. searching matching words , not characters
i appreciate help
thanks
do regex: like
about pro.*?\b
will match pro , characters , word boundary (a whitespace or punctuation mark). way don't have make multiple substrings (which costly operation).
Comments
Post a Comment