Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Please read the Terms of Use for Materials on ZennoLab |
Table of contents
Expand | ||||
---|---|---|---|---|
| ||||
|
...
The properties window consists mainly of three areas:
The input string is text, a variable, or a combination of both.
Actions on the string, properties and their settings.
The output string (result) in a variable.
...
Info |
---|
Set the cursor in the input line area, press Ctrl + Space and select useful constants and project variables from the drop-down list. For example, this way you can quickly insert a proxy of the project |
...
All possible operations with this "cube":
...
Escaping sequences. This action replaces the characters * +? | {[() ^ $. #
(places a "slash" in front of each specified character -\
) This technique is often used to work with queries and for the regex engine to use these characters literally, rather than as commands or metacharacters.
...
In this field, you must enter a regular expression, which will be used to search the text. Example -(?<=<title>).*(?=</title>)
Regular Expression Tester can help you in writing regular expressions
...
It is very similar to the previous function (To variables) with the difference that not one result is saved here, but everything is stored in a table. You can exclude some of the groups found from the final result.
...
Let's look at a specific example - parsing links with regular expressions, composed using a tester.
For example, we have a task - to get links to the profiles of active users of the ZennoLab forum. Let's get started:
...
With the help of the cube Get value, we get the HTML code of the element in which links to users who are online on the forum are posted.
Add the “Regex” action. To compose the pattern used in the properties of the “Regex” action, use the Regular Expression Tester.
Add the “html“ variable to the input in the action properties, and save the result to the “urls” list.
After running the cube, we get unique id in the list, which can be used to form the URL of user profiles.
...
Spintax
Randomization or uniqueness of text. With the help of spintax it is convenient to create synonymization of texts. Spinax is a construction of curly braces and vertical slashes that allows you to randomly substitute substrings from a string. In its simplest form, the spintax looks like this: {variant1 | variant2 | variant3}
. When executing this action, one of the three options will accidentally fall into the resulting variable.
...
Replaces all uppercase characters in the text with lowercase.
It was | Has become |
---|---|
CHANGES REGISTER OF LETTERS TO LOWER | changes the case of letters to lowercase |
Beginning of words
Changes the case to lowercase for the first character of each word in the text.
It was | Has become |
---|---|
CHANGES REGISTER OF LETTERS TO LOWER | cHANGES rEGISTER oF lETTERS tO lOWER |
The first character
Changes the case of only the first character in the specified text.
It was | Has become |
---|---|
CHANGES REGISTER OF LETTERS TO LOWER | cHANGES REGISTER OF LETTERS TO LOWER |
...
ToUpper
...
Changes the case of letters to uppercase depending on the selected property. For example, let's take a string lowercase text
...
Replaces all lowercase characters in the text with uppercase.
It was | Has become |
---|---|
lowercase text | LOWER CASE TEXT |
Beginning of words
Changes the case of the first character of each word in the text to uppercase.
It was | Has become |
---|---|
lowercase text | Lower Case Text |
The first character
Changes the case of only the first character in the specified text.
It was | Has become |
---|---|
lowercase text | lower case text |
...
Trim
This function is used to remove extra characters at the beginning and \ or end of the passed string.
...
Only Latin letters, numbers and a few punctuation marks are allowed in the URL. All other characters that are transmitted in the HTTP request must be encoded using UrlEncode, otherwise the server may misinterpret the request.
...
This action splits the text using the specified in the properties of the separator into lines and writes them to the list.
Separator
Enter - newline character
Space
Custom text - here you can specify both a single character (for example
;
) and several characters (note: if you specify several characters here, they will be considered as one separator!)Custom Regex - using regular expression .
...
To table
This action splits the transmitted text into rows and columns (according to the specified separators) and places the data into a table.
Separators
Enter - newline character
Space
Custom text - here you can specify both a single character (for example
;
) and several characters (note: if you specify several characters here, they will be considered as one separator!)Custom Regex - using regular expression.
...
Replace
...
This action searches the string for a substring, replaces it with another, and then saves the result to a variable.
...
The substring to find (or a regular expression if the Regex search type is selected).
...
Processes a string for correct use in JavaScript. Mostly escapes quotes and other specials. symbols. This macro prepares text so that it can be inserted as a string in a JavaScript or IF action. ProjectMaker has a JavaScript tester where you can inspect (test) your code. This "cube" will help you to escape quotes, apostrophes and other special characters.
...
Sometimes it is required to write Cyrillic words using Latin alphabet. You can do it with this action.
...