Extract Characters into different variable form a path

  • Thread starter Thread starter Priya Bange
  • Start date Start date
P

Priya Bange

Guest
Hi Experts,

I need to extract from a file path and assign them to different variables like

File Path example
filename = "C:\\Data\\Store\\Path\\SR_HDCN_Instance1_DB_Emp_FN_Client.txt"


To identify the pattern I have the keywords SR, DB, FN embedded in the file path which tells the starting position for extraction

output



string SR = 'HDCN_Instance1'

string DB = 'Emp'

string FN = 'Client'


SR: Server Name, DB : Database Name, FN : FileName

Please support

Thanks

Priya

Continue reading...
 
Back
Top