Logic operator names please

jp1

Client
Регистрация
23.01.2011
Сообщения
234
Благодарностей
2
Баллы
0
What logic operators does ZP use other than 'if'? (I only see 'if' as it's default)

Thanks.
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
Any logic operations for JavaScript,
'or','and'
 

BobPull

Client
Регистрация
05.08.2011
Сообщения
20
Благодарностей
0
Баллы
0
Could you explain how to use these logic operation?

For example, i would like to check parsed text : "Dad is angry" OR "Mum is tired". How do this?
 

gcomm

Client
Регистрация
01.03.2011
Сообщения
332
Благодарностей
93
Баллы
28
If you are looking for that text on a page > highlight the text you want to check on the page > right click > text presence check > hit the checkbox.

If you want to parse contents of a page to find "mom is a drunken mess" or similar you could try the above method (without highlighting the unknown text in this case> SEE second logic operation in template below which you can run in Project Maker to see what I mean.

Посмотреть вложение TEXT PRESENCE CHECK.xml



Otherwise you can parse anything on the planet using and learning regex - Check Iamthedarkwiz youtube videos - STELLAR !

The regex for my example would be Mom is a drunken mess.* which can be built in the Regular expression builder in Project Maker... it gets fun after awhile ;-)

=======================================
Building the Regex for the above:

Macros builder > Regular Expression > Parse with Regular Expression -
IT WOULD LOOK LIKE THIS - {-RegExp.RegExp-|-{-FieldData.FieldData-|-●9●8●3●5●0●6●-|-≡1≡1≡2≡7≡9≡1≡3≡2≡6≡2≡-}-|-Mom is a drunken mess.*-|-all-}

BOLD indicates the execution result of getting the text of the webpage -
=======================================
 
  • Спасибо
Реакции: BobPull

BobPull

Client
Регистрация
05.08.2011
Сообщения
20
Благодарностей
0
Баллы
0
Thanks gcomm, i'm yet a newbie with zennoposter, so you lost a little myself with regular expression syntax but i'm confident and i will understand!

Your regular expression compares if the check text parsed before is the same with the second expression/sentence ? I don't understand the end *-|-all Maybe you could indicate me a little page with simple syntax that i could learn?
 

gcomm

Client
Регистрация
01.03.2011
Сообщения
332
Благодарностей
93
Баллы
28
After you view all of the videos shown above. Anything about regex or email processing by iamthedarkwiz will help you grasp it.

Afterwards play with the regular expression builder - at the top of the screen if you click on URL / EMAIL - that will copy a regular expression into your clipboard thereby you paste it into the area where the regex "formula" is to be inserted.


Put a bunch of urls, email address or source code into the area which processes the text - then click "text a regular expression" in the middle area. The results will be shown in the right column.



===============================
Now if you want to apply that regex formula to a text file or to a webpage to strip data. You would use the ProjectMaker Template Editor and open macros editor > regular expressions > parse with regular expressions >

-under input string you would put either the execution result for "getting a block of text" or execution result of "get page source" or similar.
-under the regular expression you would add the formula you have built in the regular expression builder
-number of match you can put a numeric value - for the amount of results you want to fetch or put "all" to get all results available
-finally copy the macro and use it...


I will upload a template when I have a moment. Again there a few videos which show how to parse links from bing and amazon out there... very informative.

I wouldn't get frustrated, just play with the regular expression builder - it becomes very easy after time and there is a ton of stuff you can do with ZennoPoster without using regex at all.

Take care.
 

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