ZebroidDocumentationProgram interfaceRegular expressions kit

Regular expressions kit

Documentation is not ready yet! If you have any questions - please contact with us using contact form
Regular expressions kit allows to facilitate the creation of regular expressions for those users who are versed in them. So, with the help of this tool you can check the accuracy of expression for search and replacement.

Regular expressions kit window

Regular expressions kit window


Regular expressions kit can be run from any tool in the program, which provides the use of regular expressions, such as "Search and Replace", "Fields collector" и "Split articles".

Conditionally window is divided into 3 parts:

  1. Regular expressions kit
  2. The regular expression itself and replacement rule (for testing)
  3. Tester of Regular Expressions




Constructor itself consists of three parts:

  1. The text that is before what we looking for
  2. The text itself, which we looking for
  3. The text that is after what we looking for

In turn, for the text which we search consists of 3 parts: the beginning text, the middle and the termination.

Such division allows to receive convenient quantity of groups for the subsequent replacement. The group is a part of regular expression which is allocated in brackets. It will be most easier to understand about what there is a speech having considered a simple example: it is admissible to us it is necessary to find the text which is in tags «div» and begins with a word «against», and comes to an end with a word to «fight» :

Example of filling of the regular expressions kit

Example of filling of the regular expressions kit


We press the button «Create regular expression» and it is received:

(<div>)(Against.+?fight)(</div>)


We have 3 groups: opening tag div, the text which begins with Against, and comes to an end to «fight» and closing tag div. We check regular expression:

Check regular expression

Check regular expression


As we see has coincided precisely as it is necessary for us: has not grasped improper tag in others div's and has not grasped the similar text, but not in tag div.

Now we come back to groups and what for they are necessary: and they are necessary for convenient replacement of the text. For example we want, that the text not in tags «div», and in tags «backquote». For this purpose in the field a replacement Rule we write the following:

<backquote>\2</backquote>


The combination \2 will be as a result replaced with the second group of our regular expression (i.e. on the text which begins with Against, and comes to an end to «fight»). Replacement testing will show the following:

Testing of replacement with use of regular expressions

Testing of replacement with use of regular expressions


As we see have achieved what wanted. If you need to use the first or third group — simply write in proper places \1 or \3 accordingly.

Attention: if the field «Text before always» or «After the text always» is not filled, the program will not allocate it in separate group so groups will be less and their order can will cause a stir that in an example. As the program never allocates this text in separate group if to start the designer not for tool «Replacement».