If No Characters In Text File

Mulcts

Новичок
Регистрация
10.09.2015
Сообщения
4
Благодарностей
0
Баллы
1
Hi

Is there a way of checking whether a text file contains any characters a-z then doing an IF on that result.

I was orginally use count lines but I was finding that even if the lines was blank it still counted.

Thanks
 

Mulcts

Новичок
Регистрация
10.09.2015
Сообщения
4
Благодарностей
0
Баллы
1
Figure it out:
Read file to variable- regex: [A-Za-z0-9] -> if 'Variable'==0
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
Just a friendly note. That regex will give you a match for each letter or number. The match is also not limited to integer values and should therefor use quotes when using IF.
PHP:
"{-Variable.Name-}" == "" // Variable is empty
"{-Variable.Name-}" != "" // Variable is not empty
 

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