$string1 = "2_0_1AU13682.0AV+0.2"
$string2 = "2_0_1AT+0.1CD13681.9"
I have these 2 strings. How do I extract the 7 char decimal number from both of them?
From string 1 that would be 13682.0 and from string 2 that would be 13681.9.
The decimal number is always 7 characters and always in the form of xxxxx.x
Try doing this using regex and match operator :
See Extracting-matches and Regexp-Quote-Like-Operators.