I created below regex function in regex website.
\S.+\n(?=(~PART#)|( PART#)|(PART#)|\n(PART#))
In Regex website it is working fine.
But in Uipath i used in Matches activity
In Matches activity \n(PART#) is not working.
I think \n is not working
I created below regex function in regex website.
\S.+\n(?=(~PART#)|( PART#)|(PART#)|\n(PART#))
In Regex website it is working fine.
But in Uipath i used in Matches activity
In Matches activity \n(PART#) is not working.
I think \n is not working
try \r?\n
\S.+\r?\n(?=(~PART#)|( PART#)|(PART#)|\n(PART#))
As Windows comes along the carriage return and line feed for the line break
Also check for the Multiline option.
Maybe you can share some sample data with us along with a description of the expected output
Hi @BNK , I hope you are doing well.
For your problem you can try:
I hope any 1 of the above 3 will get you your desired solution.
Thanks & Regards,
Shubham Dutta
Hi @BNK
As per @ppr’s reply, some Samples, expected Output and information on the Pattern will greatly assist with a reliable Regex Pattern.
In the meantime can you try this pattern:
\S.+[\n\r]+(?=(~PART#)|( PART#)|(PART#)|[\n\r]+(PART#))
Hopefully this helps
Cheers
Steve
I tried all the above solution it is working fine in regex website but it is not working in Matches activity(I am not using any flages in regex website)
Samples:
PARTS
PART#
just provide the sample text as text file or by formated text usingg </>
from editor
share with us, what is achieved
in general you should handle \n as \r?\n
But maybe already set by the tool
m - Multiline option
Hi @BNK
As per @ppr said can you try multiline flag?
I had a small typo on the Regex pattern (on mobile). Can you try:
\S.+[\n\r]+(?=(~PART#)|( PART#)|(PART#)|[\n\r]+(PART#))
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.