Split txt file into several txt files by specific row

Hi everyone! am stack! i have txt file wich have to split by rows into several txt file
for example file look loke this

and i have to split them by rows ONE , TWO and Three

Hello @Nursultan

You can use regex to split this to separate string and then you can write to multiple files.

System.Text.RegularExpressions.Regex.Split(YOURVARIABLE, “[a-zA-Z]”)

YOURVARIABLE is the variable after reading this text file. With the above expression you will get an array.

Thanks

hi @Nursultan,

You can try my code. Thanks.
SplitText.xaml (8.9 KB)

Kind regards,
Kenneth

thank everybody! i solved this by regex and write results to new txt files

1 Like

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