Hello,
I would like to create a regular expression that will match the following use case:
Suppose I have got a paragraph and a
String as a search term. What I would like is to apply a regexp on the paragraph to let me know if the paragraph contains the search term itself or any of its words.
So, suppose the search term is "hello world" I would like to check if the paragraph contains the String "hello world" or any of the words "hello" or "wold".
The way I do it now is split the term by space and then search for each
word separately however I am guessing that this can be done in much more elegant way using regexp and in one go.
Any ideas...?