I use this regex expression :
(?<=Date of application (DD/MM/YYYY)+\n+\n)(.|\s)*?(?=Dealer name)
to split the “Mackay Isuzu” out as below picture
and the UI path shows the word below
as you can see the first write line function can run properly with almost the same regex expression code (?<=G-IDSS Serial Number )(.|\s)*?(?=\nAcknowledgement)
Could you please help me, I cannot find the same topic as I met the issue on the internet, many thanks
It might be line break matter. Can you try the following pattern.
(?<=Date of application \(DD/MM/YYYY\)+(\r?\n)+\r?\n)(.|\s)*?(?=Dealer name)
@poomnattawat Welcome you to Uipath Community
Kindly try this
(?<=Date of application \(DD\/MM\/YYYY\)\n\n).*(?=\nDealer Name)
System.Text.RegularExpression.Regex.Match(YpurString,"(?<=Date of application \(DD\/MM\/YYYY\)\n\n).*(?=\nDealer Name)").Tostring.Trim
Oh It works well, I can print out the Dealer name, but I found another issue again as below
In upper picture, it’s showing the same error, how I can fix this one of the line brake matters, could you please roughtly explain about the rule of the line brake please.
Many thanks for your guidance
I will try your code also
There are some types of linebreak in each environment.
Unix style : \n (text in regex101)
Windows style : \r\n
So if we need to handle both type of linebreak, I recommend to use
\r?\n instead of
\n. ( or
(\r?\n) if quantifier exists after it) as linebreak.
The above expression might be better like
(?<=modification \.\r?\n)(.|\s)*?(?=\*If you do not know)
Thanks a lot for your suggestion,It makes me continue my progress properly
I used your recommend codes and it showed as below
What does it mean, I check on the website It still collects the true data.
Can you share your input text as a file, if possible?
Please see the attached file below,
LSSdata.txt (1.9 KB)
The above expression works in my environment as the following. Can you check the following sample?
Sample20220909-3.zip (3.3 KB)
Thank you for your example files, In this case, I still struggle in my head with why I use your expression in the matches function, the UI path cannot run properly, but using the Assign function It can work well.
Anyway, I would like to say thank you again for your advice
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.