There is probably a really simple explanation but I just don't see it right now... I have this regex:
(\s.+?\sstress)
I want it to match something like [SPACE]some word[SPACE]stress
. However it matches to much:
This will cause a lot of work stress
will match: will cause a lot of work stress
But .+?
should be non-greedy so I expected it to only match work stress
.
Click here to open this in regex101.