I need to split date, time, name and messages as a variable without using regular expression

new.txt (5.9 KB)

Any one help me with this!

@pravin_calvin,

Share the expected output from the text file…

Use string.substring functionality if the string will be in a same format and length always

actually its a message from telegram i used data scraping to read all the messages then i used for each row to iterate the messages then the messages comes with the empty spaces i used myString.Replace(Environment.newLine,"") to remove the spaces then i used append line to check the output in the text file now i need to split the date , time , messages, names and as variable and store it the db.

I am a begginer!

regex will be a lot easier for you, just the text file still dont have very good format, you have more than one day there and can be hard to do…

ok! if its easy with regex then how to assign the variable to date , time , name and messages could you please share that
and for checking purpose only i used to write in a text file

thanks@bcorrea

i hope you already have a code to read the lines one at a time, right?

yeah! it is itrerated from for each loop

telegram_process.zip (18.2 KB)

I am stucked with this is in more than 3 days!

well, you dont have that yet… do you want to have your text file, or go straight to the database?

i want to hit directly to the data base i dont need that text file its for my reference!

Thanks@bcorrea

sorry to say, but maybe you started this wrong, you should be using the API:

by using the above messages is there any possibles to split

its only possible through api only ahh?

But i have started the whole process with the telegram web only its a final stage in the process is there any possibles through the above messages that i iterated.

thanks@bcorrea

i dont want to misguide you, you will have a lot of trouble to do the way you are doing and the API will sure to give everything the best way possible…

1 Like

oh well !

Thanks@bcorrea