I need a regex that gives me the word before and after a specific word, included the search word itself.
Like: "This is some dummy text to find a word" should give me a string of "dummy text to" when text is my search word.
Another question, it's possible that the string provided will contain more then once the search word so I must be able to retrieve all matches in that string with C#.
Like "This is some dummy text to find a word in a string full with text and words"
"dummy text to"
"with text and"
I hope any one can help me. Thx!