Why is this simple regex not matching a carriage return? For reference, my data is the result of a SQL query and I have replaced linefeed \n with a single space.
\r
SRUS55 KSLC 082010\r\r HMTSLC\r\r
Why is this simple regex not matching a carriage return? For reference, my data is the result of a SQL query and I have replaced linefeed \n with a single space.
\r
SRUS55 KSLC 082010\r\r HMTSLC\r\r
There is no \r
in your demo.
This is a newline character, either you were looking for \\r
or [\n\r]+
if your string happens to include newlines.
For a more in-depth answer, see this explanation.