I'm trying to highlight a specific paragraph in a large body of text using regex. The issue is the text I need to highlight has had some special characters removed, so I'm having trouble writing a regex to find the match in the body. I started by pulling out all the whole words from the string I need to find, like so:
- Starting string: "Hello, this is my search string"
- Resulting string: "Hello this is my search string"
I'm now trying to match the resulting string in the body, but since the body still has some special characters (which I can't remove for display purposes) I am having difficulty with the regex.
- Body: "This is the body, where you can find lots of special characters. Hello, "this" is my search string without the correct punctuation."
How can I match this sentence? Hello this is my search string and ignore the extra characters in the body?