"12/27/23 12 L3670 1.0 189.60 66.40 1 24.64 24.64 98.56"This is my string, i want to get third last value 24.64 from the string, i am using substring and regex pattern for this, but unable to resove this, suggest any suitable substring like i am applying (substring.length-35)35, how i applying this to get this value
You can follow this approach:
- Assign strInput = β12/27/23 12 L3670 1.0 189.60 66.40 1 24.64 24.64 98.56β
- Assign pattern = β\d+(.\d+)?β
- Use Matches Activity
- Input: strInput
- Pattern: pattern
- Result: matches
- Assign thirdLastValue = matches(matches.Count - 3).Value
Thanks,
Ashok
Hi @Arvind1
Regex.Matches(input, "\d+\.\d+").Cast(Of Match)().Select(Function(m) m.Value).Reverse().Skip(2).FirstOrDefault()
Hi @Arvind1
Try this
thirdLastValue = inputString.Split(" "c)(inputString.Split(" "c).Length - 3)
Regards,
Hi @Arvind1
str_Input = β12/27/23 12 L3670 1.0 189.60 66.40 1 24.64 24.64 98.56β
Take Assign Activity with Variable lastThirdValue to store the Third Last Value
lastThirdValue = Split(str_Input," ")(Split(str_Input," ").Count-3)
Hope itβll helps you
Cheerss!!
no third last value, its gives second last
04/29/24 12 L0650 1.0 1,934.22 497.72 49.77 49.77 447.95
04/15/24 12 E0163NU 1.0 163.48 66.79 66.79
04/15/24 12 E0143NU 1.0 148.58 60.70 60.70
03/21/24 12 L3670LT 1.0 246.40 60.07 60.07 60.07 0.00
12/27/23 12 L3670 1.0 189.60 66.40 1 24.64 24.64 98.56
i want to get third last value from each string
Hi @Arvind1
Check the below xaml for refernce:
Sequence10.xaml (8.3 KB)
Regex:
(\d+\.\d+)(?=\s*\d+\.\d+\s*\d+\.\d+$)
Regards
(\d+.\d+)(?=\s*\d+.\d+\s*\d+.\d+$)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.