4 ms·
I have wondered about K/Q, because I gather that K is actually a simplification relative to APL, to make it more focused and easier to use. I thought it might b
by wrp 11y ago
I have wondered about K/Q, because I gather that K is actually a simplification relative to APL, to make it more focused and easier to use. I thought it might be missing useful facilities for data munging. Like, I don't think it has regexes, does it?
- tlack 11y agoIt has a limited version of regular expressions available in the "like" and "ss" functions: http://code.kx.com/wiki/Reference/like http://code.kx.com/wiki/Reference/like There's also a port of re2 available: http://code.kx.com/wiki/Cookbook/regex http://code.kx.com/wiki/Cookbook/regex The C API seems pretty simple once you get over the insane function (and macro!) names, so I think a pcre port could be done. In practice though I think Q gods prefer a split-based vector oriented approach when it comes to string chomping. Q's built in verbs and adverbs function much like regex operators do, but at an abstraction level tied fundamentally to your data.