q icon indicating copy to clipboard operation
q copied to clipboard

`replace` function does not work for spaces

Open avdv opened this issue 5 years ago • 0 comments

Hi.

I am using q 2.0.19.

$ ./q -d , "select replace(c1, '  ', ' ') from - " <<<'a  b  c,asdf'
a  b  c # <- note the double spaces here

Seems like replace works more like consecutive spaces are reduced to one before searching:

$ ./q -d , "select replace(c1, '  ', 'x') from - " <<<'a  b  c,asdf'
axxbxxc

Tried this in the sqlite3 console and it works as expected.

avdv avatar Dec 02 '20 12:12 avdv