Let's assume I have some text:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- If I query for "sed do" I want to get "sed to" + additional 2 words on the left and on the right. In this case I want to get:
adipiscing elit, sed do eiusmod tempor
- If I query for "aliqua" I want to get:
dolore magna aliqua
etc
I believe the best way is to do it with Regex (it's not must-have), but I don't know how to construct such a query.
if-else
condition and two regexes – rock321987