I want to first break a string to list of strings and based on a condition I want to return an item of a list as long.
Func:{[x]
Temp:vs "-" x;
if["AAA" ~ Temp[0];:"J"$Temp[1];:"J"$Temp[2]]
}
Func["AAA-809-AXSDF"]
This function returns 809 but when I do:
809 ~ Func["AAA-809-AXSDF"]
It returns 0b
This means it's not converting list item to long. Please suggest