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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

php - How do you embed a video into a custom theme on WordPress? -