Colleagues,
I have a variables that resembles the list below:
I would like to extract last portion of the string and obtain var2 with figures only:
Attempts with substr, like the one outlined, result in var2 containing the ")" sign as it is placed within the last three characters. In word, I'm looking for a regex that would extract last three numeric charters ignoring everything else.
I have a variables that resembles the list below:
Code:
var def (abc) 6 def (byz) 12 abc (ghi) 100
Code:
var2 6 12 100
Code:
generate var2= substr(var,-3,.)
Comment