abdel
(Robot usa)
March 19, 2019, 5:10pm
1
Hello,
I’m truyin to extract the word between “Code IFLS” and “Rgpt” in following text:
“Code IFLS : K66842 3607381018012 DVD OP 4 DVD=20 RENTREE BOX 12 Rgpt : 00”
i’m using: text.Substring(text.IndexOf(“Code IFLS”)+9, ((text.IndexOf(“Code IFLS”)+9)-(text.IndexOf(“Rgbt”)+4)) )
but it gives a wrong word
pavanh003
(Pavan Harisha)
March 19, 2019, 5:27pm
5
Hi,
Try this (?<=(Code IFLS).\s[:]). (?=(Rgpt))
use a matches activity and then give this pattern and then the output will be of INumberable collection
so to get the matched value use the below code
MatchesOutPutVariable.cast(of Object).First.tostring
Let us know if this helps.
Regards,
Pavan H
abdel
(Robot usa)
March 20, 2019, 8:48am
6
i tryed it:
but got the following error: sequence contain no element
anil5
(Anil Kumar Bandam)
March 20, 2019, 8:55am
7
Hi @abdel ,
Use the below regular expression
(?<=IFLS :)(.+?)(?=Rgpt)
You can test the above in regex101.com
Import System.text.regularexpressions
Use an assign statement
Basically the syntax is Regex.match(Inputstring, Pattern)
Regex.match(“Code IFLS : K66842 3607381018012 DVD OP 4 DVD=20 RENTREE BOX 12 Rgpt : 00”,“?<=IFLS :)(.+?)(?=Rgpt)”).tostring
Store the above output in string variable
2 Likes
abdel
(Robot usa)
March 20, 2019, 10:01am
8
Thanks anil it works
i had an Urgent matter: a treatement that need to be done on the following screen;
type into x and send hotkey “enter” in the ligne corresponding to “03032000”
after that other screen will appear and other treatment is done
right now i’m able to do that on the First ligne but i need to do the treatment for every lignes where “03032000” appear. Etape 8.xaml (134.8 KB)
attached is tha workflow,
abdel
(Robot usa)
March 20, 2019, 4:23pm
9
Hello have anybody any idea
Your workflow is very difficult to follow.
Are you saying you want to add a new line everytime the code “03032000” appears in the data you presented above?
So:
03032000 87946902
K66842 01 3607381018012 PBA
Becomes
03032000 87946902
K66842 01 3607381018012 PBA
system
(system)
Closed
March 23, 2019, 5:29pm
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.