I'm strugglig with regex. I need to find regex for pregmatch. If the string contains "\n" and not "\c\n", do something.
I do have a sentence "Thank you for tuning in to I-See News.\c\nJames Movesworth reporting.Today, let’s learn about\nQuick Attack." I tried something, but it's not working at all.
preg_match('/(?!\\c)(\\n)/', $string);
Thank you!
edit: My previous topic was closed, because it's simmilar to (Regular expression for a string containing one word but not another). Perhaps it is, but still if I modify my pattern according to the suggested topic,
^(?!.*\\c).*(\\n).*$
it still doesn't correctly display the answer. (In this case it displays "false" - but it shoud be true, before "Quick Attack" in the sentence is "\n".