Description


Start button

Performs search/replace, etc. with a regular expression

Library

When launched, the program checks the files in the "Library" folder and adds them to the list of libraries. The library contains regular expressions, flags and text processing. The content of the library is displayed on the right side of the window. Clicking on a library element inserts the data into the fields. Two buttons (Add and Delete) are intended for adding (overwriting) and deleting items. By default, the name of the selected item is used, which allows you to overwrite, i.e. update item data. If you need to add a new one, then specify the new name of the item. The library allows you not to lose important regular expressions and always have access to them.

Result Output

The result is displayed in the lower left window. The result depends on the search mode. This can be found-not-found text, or the result of a replacement, or a list of elements, as well as a regular expression error warning in English. language.

Modes

The flag " With markup " allows you to make the output of the results more visual, with the numbers of the found elements.

Execution speed

There are two fields below the "Start" button. The bottom one shows the execution time of the current regular expression on the current text. The top one is the time of the previous test. This is necessary for speed comparison. If the current test is completed faster than the previous one, then the lower field is highlighted in green, otherwise in red.

Design style

Ini, you can set the color of the window elements and the highlight color of metacharacters in the regular expression field. The style is selected like this: style=style1, while the ini-file should contain the [style1] section with color settings. For example, the ini file contains several predefined styles.

Inserting wildcards

Some combinations can be inserted using the "asterisk" - "*" button, the menu of which can be made independently in Menu.ini.

Story

The history button saves 30 items of the last regular expression usage. Adjusted by parameter maxhistor=30.

Command line

As a tool in PureBasic, you can add with a com line:
-l:PureBasic -nu -i:4 "%TEMPFILE"

Here the keys have the following meaning:
-l:PureBasic - library selection
-nu - do not update (or freeze the processed text so that it does not change when other items are clicked)
-i:4 - select the 4th item, counting from 0. The parameter must be be after the -l key: otherwise it will work when the library is not open
"%TEMPFILE" the path in quotes of the file being opened in the window of the processed text.
This functionality allows you to automatically open RegExpPB with the necessary settings and search or process the source using regular expressions.

Flags

OnTop - short name "On top of all windows"
Do not update - when pasting from the library, the text for processing is not replaced. Suppose you need to process your text with different regular expressions.
There are also 5 included flags that can be included in the regular expression itself using the (?s) method, etc.

Buttons

Описание ini-файла

[Set] - секция основных параметров
width = 800 - ширина окна
height = 600 - высота окна
fontsize = 11 - размер шрифта
maxhistor = 30 - максимальное число пунктов истории
topmost = 0 - поверх всех окно
lastlib = PureBasic - последняя библиотека, выбираемая при запуске программы
copysel = 0 - Флаг переключения выбора шаблона методом открытия файла
style = style1 - выбор секции стиля

[regexp] - история регулярных выражений
1 = [А-Яа-яЁё]+ - один из элементов истории
2 = (\r\n|\r|\n){2,}

[style1] - секция стиля
gui = f - цвет окна (только Windows)
gadget = f - цвет гаджетов (поле ввода) (только Windows)
gadgetfont = f - цвет шрифта (тексты окна, чекбоксы, надписи) (только Windows)
type = 1 - тип цвета, фон или шрифт (для регулярных выражений)
background = f - цвет фона
default = 0 - цвет шрифта
select_bg = f99 - цвет фона выделенного текста
select_fnt = 0 - цвет шрифта выделенного текста
caret = 0 - цвет курсора
re_Repeat = BFFFBD - цвет повтора {n,m}
re_SqBrackets = BDF7FF - цвет квадратных скобок []
re_RndBrackets = FFBDBD - цвет круглых скобок ()
re_AnyText = E6DDFF - color of any text .*?
re_Meta = FFFFA5 - color of \w metacharacters, etc.
re_Borders = FFDFA5 - border color \A \b etc.
re_ChrH = FFC1F7 - character code color \x01 \x{01}
The color can be set in a simplified way, for example "F" means "FFFFFF", "3F" = "3F3F3F", "F95" = ""FF9955"



Original text