I have seen similar problems but I cant quite get them to work for my scenario.
I am trying to use regex to find an optional wildcard between 2 strings.
Here is an example of the strings that the regex does find correctly: not happy
if the string was:
not very happy
The code must still match both cases.
The code I have is:
/\b(?<=not(*?).)happy\b/
(happy
and very
would be variables)
Any help pointing me in the right direction would be very much appreciated.