- Editing Expressions/Actions
On the Actions page, double-click the regular expression or action that you want to edit or select it and press the button. A dialog will appear in which the expression text can be edited as you wish.
- Adding Expressions/Actions
Click the button to add a regular expression for Klipper to match. Klipper uses Qt™'s
QRegularExpression
, which uses PCRE (Perl Compatible Regular Expressions).You can add a description of the regular expression type (e.g. “HTTP URL”) by clicking in the Description column.
Note
You can find detailed information about the use of
QRegularExpression
regular expressions in the Qt upstream documentation.Edit the regular expression as described above. To add a command to execute, click and edit the command in an in-place text editing box. Double-clicking on a command allows you to edit it.
Note that %s in the command line is replaced with the clipboard contents, e.g. if your command definition is
kwrite %s
and your clipboard contents are/home/phil/textfile
, the commandkwrite
will be run. To include %s in the command line, escape it with a backslash, as so:/home/phil/textfile
\%s
.Entries
%0
through%9
will be replaced by the corresponding captured texts from the match pattern.