input -
- M.T. DHT LEOPARD - here I need to extract whatever is after word M.T.
2.CP dated 09/11/2019
- here I need to extract 09/11/2019
3.LAYCAN - 09/24/2019 β 09/26/2019
- here I need to extract the two dates
input -
2.CP dated 09/11/2019
- here I need to extract 09/11/2019
3.LAYCAN - 09/24/2019 β 09/26/2019
Try this:
Str = βM.T. DHT LEOPARDβ
Str = Str.Replace("M.T. ","") or
Str = Str.Split("."c)(2)
Str = βCP dated 09/11/2019β
Str = Str.Split(" "c)(2) or
System.Text.RegularExpressions.Regex.Match(Str,"\d{2}\/\d{2}\/\d{4}").ToString.Trim
Same way other one also.
3.LAYCAN - 09/24/2019 β 09/26/2019
in this one I need to consider LAYCAN as well as there can be data in string like 09/26/2019 which I donβt need , I just need those two dates which are in same line as the word LAYCAN