PHP regex not new line

newline, php, regex

Solution

The dot `.` does not match newlines unless you use the `s` modifier.

>>> preg_match("/./", "\n")
0
>>> preg_match("/./s", "\n")
1

Problem

How do I have a regex statement that accepts any character except new lines. This includes anything but also includes new lines which is not what i want: ``` "/(.*)/" ```

Original source