I need to write a regular expression fails on the single occurrence of a carriage return. I have a regular expression that captures letters, numbers and special characters, I need to write an expression that basically fails if a carriage return is present in the same way an expression that's looking for numbers fails when you provide a letter.
This is my current expression:
^([\w ¬_@.&#`!\"£$%^*()+={[}:;'~<,>?/|]|[^\p{L}]){0,100}$
I need a way of saying if a carriage return is present, then nothing should match. I've done a bit of research and have found this is what I need to incorporate the following to my expression above: [^\r\n]+ to exclude carriage return but I'm not quite sure it's going to result in 0 matches if a carriage return is present.