I have a use case where I am searching for a particular sub string in a string and if that particular string contains another particular sub string I want it to be rejected.
Ex:
pikachu_is_the_best_ever_in_the_world_go_pikachumew_is_the_best_ever_in_the_world_go_mewraichu_is_the_best_ever_in_the_world_go_raichu
I want my Regex expression to pick up the string having the word "best" and not the word "mew", i.e the first and third string.
I have tried combining ^(.*best).*$ and ^((?!mew).)*$ into the below expressions and the second regex one only ignores words if "mew" is present in the start of the string.
^(.*best)((?!mew).).*$
And have tried
^((?!mew).)(.*best).*$