Hi, There are some lines which has some text after 2018 but some don’t. I would to split the after text from 2018 from the string. Right now, I am using delimiters and hardcoding it.
@Manjuts90 Thanks for your effort. It works. But I also want the text after the date. I know how to get it. But I don’t know how to split it from the string.
System.Text.RegularExpressions.Regex.Match(date1, “(?<=2018 )\d+”).ToString
How can I split it.
It working but it only get the last text after 2018. But idk how to split it from the string
Eg I am getting 420 as a different variable. I want to split the after text from 2018 from the string. So suppose to be S|Scale-up|RAM(|Hhh,|SLC:|95%)|01|Apr|2018|to|30|Apr|2018 as another variable
Hi @Manjuts90 thanks alot bro. I got one more question.
Your code above works for the strings below
But for strings like below, the code is not working. Correct me if I am wrong - your code finds “2018” then the length. The below strings have “2018” too. Then why isn’t it working for below strings?
i would like to get |ER1|Date|Downup|(Weekly/Monthly|File)|Apr|2018 frsplitted.
Shoudn’t this code be able to do that?
Str.Substring(0,str.IndexOf(“2018”,str.IndexOf(“2018”)+1)+“2018”.Length)
Example of the lines
S|ERl|Date|Downup|(Weekly/Monthly|File)|Apr|2018|230|GA(s)
S|ERl|Date|Downup|(Daily|File)|Apr|2018|124|WE(s)