Check if a line is already in a txt file ?

ganeshiva

Client
Регистрация
24.02.2011
Сообщения
6
Благодарностей
1
Баллы
0
Hi guys,

I would like to check if {-Variable.XXX-} (an unique line) is already in a .txt file containing multiples lines sperated by enters.
If my .txt file contain {-Variable.XXX-} , i would like a fail exit. In other words i want to add users only if they are don't already present in my .txt file.
thank you !
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Take your text from the file and put it into a variable, let's say variable1. Take your {-Variable.XXX-} and do a regex on variable1 in a word processing action. If a result is found then you won't add the user.
 

ganeshiva

Client
Регистрация
24.02.2011
Сообщения
6
Благодарностей
1
Баллы
0
Take your text from the file and put it into a variable, let's say variable1. Take your {-Variable.XXX-} and do a regex on variable1 in a word processing action. If a result is found then you won't add the user.
Thank you for the quick answer :-)

I understand your first step, but how to deal with regex, what to input in this fields ? I don't know how to say 'search if this line exist' in Regex. sorry I'm new to this.
regex.jpg
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
RegEx Building.jpg
 

ganeshiva

Client
Регистрация
24.02.2011
Сообщения
6
Благодарностей
1
Баллы
0
It works great !
Thank you Big C you're the man :cool:
 
  • Спасибо
Реакции: bigcajones

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