I have this string for example :
one two three four START four five four five six END seven
I want to search for the word “four” in it to replace it with REPLACED, this will give
one two three four START REPLACED five REPLACED five six END seven
I know that START(.*)END will give the words between and the delimiter.
I tried START(?<four>)END, but it gives nothing.
I’m working in Vbscript.
(?<name>is for named groups.What you need are look-ahead and look-behind assertions to match the
START.*and.*ENDpre and post-conditions, without actually matching them.yields:
one two three four START test five test five six END seven