I am looking for an easy way to get some numeric parameters from a string.
Consider having a string like: W400Y345655T23. From this string I need to get: W=400, Y=345655 and T=23.
The number of parameters to retrieve is always the same (3 in the example: W, Y and T). Names of parameters also remain constant. But the number length can differ for each numeric value (I can have W10Y34T334 but also W100000Y2T90). Also, parameters appear in the same order.
Using Bash, is it possible to solve this using some sort of fancy scanf or String.Format equivalent way? Thankyou
W100000Y2Y90has twoYand noT, is this correct?W100000Y2Y90has twoYand noT, is this correct?'If variable change positions fedorqui'as approach fails.??? What did you try?