Formatting List of Sting

Hello friend,
I had a List of String:

“Catégorie : Réception 2.”
“File 1, 936-F325-01/12/2020(259205;259206).”
“File 2, 936-F325-01/12/2020(259207;259208).”
“Catégorie : Traité 1.”
“File 3 , 936-F325-01/12/2020(259204).”

i want to keep ony the part blow “Catégorie : Traité 1”, the “1” can be (2,3,4…)

I can use List.GetRange(index, index) but how to deal with the variable part, here “1”?

Hi @abdel ,

Just create another List Of string variable and Assign the below code

lstStr = lststr.Where(Function(v) v.Contains(“Catégorie : Traité”)).ToList;

The above code will filter the values

no it does not work
i want only to keep the lines below “Catégorie : Traité 1.”