I have a query which loads a lot of fields, and removes duplicate spaces, tabs and line breaks.
regexp_replace(FIELD, E'[\|\\s\\n\\r]+', ' ', 'g' ) as FIELD
When I test this using Sql Manager for PostgreSQL (Windows Environment), it works as expected. But...
But this query is at a PHP file, which is ran daily using crontab (Linux Environment), it remove duplicate spaces, tabs, line breaks and "s"
Example, the string ahead:
"Small
unicorns are smart"
Turns into:
"mall unicorn are mart"
Why is that happening?
echoyour query?\rand\nare subgroup of\s(whitespace).