Answer the question
In order to leave comments, you need to log in
How to find part of a word using a regular expression?
It is necessary to find a word or part of a word in the content using regex
There is a line:
With this approach:String INPUT = "social network facebook";
Boolean result = INPUT.matches("\\w*face\\w*"); // false
the result will be false because it looks for the whole word (matches) . matcher.find()
(which works with this regular expression as I need it) if possible ...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question