Hi
i have a scenario where i will be getting the codes from pdf… and iam extracting it
and placing in one variable for example
Codes = “T42.52,M65.89,S98.33,M24.572,Z47.89,R26.2,S83.51,Z33.90”
so, 1) if these codes have start with “Z” then we have to take it as main priority.
2) If these codes doesnt start with “Z” then we can take available codes
we don’t know how many codes we get… but we have to take only four codes … and apply the above conditions… and also we may get less than 4 codes also…
codesList = Codes.Split(","c)
Prioritylist=New List(Of String)
If code.StartsWith(“Z”) Then
Add to priority collection list
else
Add to available codes list
Firstly you can split the text by using the split or regex pattern so after that it will give the collection, so then based on index you can cal add to an array then you can pass in the for each loop
Take if activity and pass the condition like this
System.Text.regularexpression.regex.match(currentitem(0).Tostring,“[Z]{1}\d{1,5}.\d{1,5}”).Value
It will match the Z starting then add to one variable- in then section
Or else if it not match then it not contain Z in else you can add to another variable.
For the reference please check the below screenshot for regex pattern !