How to extract one part of the string

Hi team ,

I have below -

stringA - C:\ABC_Company\AP_Bot_Invoices - Documents\Development\AP\Sep 2022\09242022\HRC12309853768\In-Progress\HRC12309853768_2022-09-24_12.pdf

I want to get

stringB - Development\AP\Sep 2022\09242022\HRC12309853768\In-Progress\HRC12309853768_2022-09-24_12.pdf

i.e Want to extract everything after Documents\

I always want to extract part of string after “Documents\”

Can you please help achieve this

1 Like

you can get stringB using regular expression
System.Text.RegularExpressions.Regex.Match(stringA, "Documents\\(.*?)$").groups(1).Value

use this sequence for reference
Sequence.xaml (7.4 KB)

result

1 Like

Hello @gokul1904
You can hse thesplit method

Split(yourstring,”Document\”)(1)

Thanks

thanks a lot

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.