I am quite new to kdb+q. I've come across this problem of extracting a number out of string.
Any suggestions?
Example:
"AZXER_1234_MARKET" should output 1234 //Assume that there is only one number in the
string
I am quite new to kdb+q. I've come across this problem of extracting a number out of string.
Any suggestions?
Example:
"AZXER_1234_MARKET" should output 1234 //Assume that there is only one number in the
string
If you have multiple numbers, here is a variation of the above, which allows for multiple numbers in one string
I can suggest the following if we assume only one number in the string:
Then of course you can cast it to any type you want.
Extract the numbers then cast to required type.