Task: Implement a Regex to Match a Substring Not Followed by Another Substring
Task: Implement a Regex to Match a Substring Not Followed by Another Substring: a task in Terminal-Lego-15k (Harbor dataset). Write a program that implements a regular expression pattern to match strings containing "foo" that is not followed by "bar". The regex should match the entire string when…
The task
Write a program that implements a regular expression pattern to match strings containing "foo" that is **not** followed by "bar". The regex should match the entire string when "foo" appears without "bar" immediately after it.
Part of PrimeIntellect/Terminal-Lego-15k.