I am trying to match parts of a larger block of content and I only want to match things at the beginning of the line or with the preceding space, and I only want to combine objects that end at the end of the line or followed by a space. Unfortunately, my regex-fu is a little weak to figure it out on my own. Help me stack overflow, you are my only hope.
Basically, they should all be subject-to-match;
the-thing-to-match blah
blah the-thing-to-match
blah the-thing-to-match blah
source
share