RegEx for "equals or more"

jcknick

Client
Регистрация
10.05.2013
Сообщения
154
Благодарностей
9
Баллы
18
Hi guys,

In one of my projects I have reached to the need of triggering an action if a number on a page reaches 100 or more.

Is there a way to do it via switch? If yes, then what should I write in variable value?

If not, then what would be the best way of comparing the number to "100 or more"?

It would be great if you could also include an example for "100 or less"

Thanks in advance
 

s41mm3r

Client
Регистрация
23.01.2013
Сообщения
47
Благодарностей
3
Баллы
8
parse the number using DOM and assign it to a variable. Then drop a "if" step in a put {-variable.yourvariable-}==100 or >100

> is greater than
< is less than
== is equal to
!= is not equal to
 
  • Спасибо
Реакции: rostonix

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
That's correct
 

jcknick

Client
Регистрация
10.05.2013
Сообщения
154
Благодарностей
9
Баллы
18
Big Kudos, s41mm3r! It did exactly what I needed.
 

s41mm3r

Client
Регистрация
23.01.2013
Сообщения
47
Благодарностей
3
Баллы
8
no probs buddy :-)
 

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