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

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -