Getting Variables from Single line in file

jbalter

Client
Регистрация
12.10.2012
Сообщения
12
Благодарностей
0
Баллы
1
I created hotmail accounts in a text file like this:
email: password

Then, I would like to use it to sign up for other accounts directly. Hence, I used list processing and a list.
My question though, is:

How can I get {-Variable.Email-} and {-Variable.Password-} when they are both on the same line? Please advise..
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
831
Баллы
113
I guess it was discussed many times already on the forum :-)
1. Get a list line
2. With word processing and regexp option find the first part .*(?=:-)
3. With word processing and regexp option find the second part (?<=:-).*
 
  • Спасибо
Реакции: jbalter

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
I dont know why should you even think about using list processing or regex like HB suggested... most basic solution is to use table processing and get those variables straight away from it...

check it here: http://www.youtube.com/watch?v=ibaRVMcyYf4
 
  • Спасибо
Реакции: jbalter

hotohori

Client
Регистрация
10.02.2012
Сообщения
154
Благодарностей
40
Баллы
28
A lot of times I find myself using list instead of table because in table you cannot simply write data to last line.
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
hahahaaaa... did you ever test table processing at all???
It is always writing data to last line if you didnt notice! :D

Beside, who cares even if that wasnt a case, he asked about pulling data in, not writing, and if you like list processing so much, you can still ad it at the end when you need to write data :D
 

hotohori

Client
Регистрация
10.02.2012
Сообщения
154
Благодарностей
40
Баллы
28
lol... my bad, i meant to say write to 1st line. :p
Like if I want to have a bad end action to write data back to first line so that the next thread can reuse the same data.
Of course, like you said, this is beyond the point of the original question. :-)
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
in my case I almoast never care to which line is data written... I pull data on random to leave less footprint, and if im after something explicit, than I just put macros with regex to use...so it really doesnt matter in which line data is located...and that is only thing that you can say is reliable if you run multithreading :-) ...so again FIRST LINE/LAST LINE... who cares :D
 

jbalter

Client
Регистрация
12.10.2012
Сообщения
12
Благодарностей
0
Баллы
1
Thank you @HB. That was very helpful.
I tried searching on the forum for solutions but for some reason, cannot seem to find it. Probably because I did not search for the correct keyterm. I really appreciate you explaning it to me again.

@drvosjeca, thank you for the tip and link! I will try table processing next :-)
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)