Regular expression: Difference between revisions
From Planfix
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{#seo: | |||
|title=Regular expression in Planfix | |||
|titlemode=append | |||
|keywords=planfix, regular expression, rules, email, task, extracting data from the email | |||
|description=Using regular expressions in Planfix | |||
}} | |||
Regular expressions in [[Rules for creating tasks by email | rules for processing emails]] allow you to isolate a desired fragment of text when [[Email rules: Extracting data | extracting data]] from an email. | Regular expressions in [[Rules for creating tasks by email | rules for processing emails]] allow you to isolate a desired fragment of text when [[Email rules: Extracting data | extracting data]] from an email. | ||
== Important == | == Important == | ||
*The use of regular expressions typically requires programming skills. If you don't know any programming languages, you should ask for help. | *The use of regular expressions typically requires programming skills. If you don't know any programming languages, you should ask for help. | ||
*In Planfix, regular expressions operate with the Pattern.DOTALL and Pattern.MULTILINE options. For validation, you can use the online validator, which is configured with the settings [https://p.pfx.so/pf/nG/2iUOoF.png gms]. | |||
*Regular expressions can also be used with the REGEXPFIND function. | |||
== Formatting regular expressions == | == Formatting regular expressions == | ||
Planfix uses the regular expression format used in Java. The syntax of regular expressions uses the symbols <([{\^-=$!|]})?*+.>, which can be combined with letters to create metacharacters. The most frequently used metacharacters are listed in this table: | Planfix uses the regular expression format used in Java. The syntax of regular expressions uses the symbols <([{\^-=$!|]})?*+.>, which can be combined with letters to create metacharacters. The most frequently used metacharacters are listed in this table: |
Revision as of 08:13, 28 October 2024
Regular expressions in rules for processing emails allow you to isolate a desired fragment of text when extracting data from an email.
Important
- The use of regular expressions typically requires programming skills. If you don't know any programming languages, you should ask for help.
- In Planfix, regular expressions operate with the Pattern.DOTALL and Pattern.MULTILINE options. For validation, you can use the online validator, which is configured with the settings gms.
- Regular expressions can also be used with the REGEXPFIND function.
Formatting regular expressions
Planfix uses the regular expression format used in Java. The syntax of regular expressions uses the symbols <([{\^-=$!|]})?*+.>, which can be combined with letters to create metacharacters. The most frequently used metacharacters are listed in this table:
Metacharacter | Meaning |
---|---|
^ | beginning of input |
$ | end of input |
\d | digit |
\D | non-digit character |
\s | space character |
\S | non-space character |
\w | alphanumeric character or underscore |
\W | any character except alphanumerics and underscores |
. | any character |
\t | tab character |
\n | newline symbol |
\r | carriage return symbol |
[abc] | any of the characters listed (a, b, or c) |
[^abc] | any character except those listed (not a, b, or c) |
[a-zA-Z] | multiple ranges (Latin characters from A to Z, case-insensitive) |
[a-d[m-p]] | combining characters (from a to d and from m to p) |
[a-z&&[def]] | overlapping characters (d, e, f) |
[a-z&&[^bc]] | subtracting characters (a, d-z) |
? | one or not exist |
* | match zero or one |
+ | one or more times |
{n} | n times |
{n,} | n or more times |
{n,m} | at least n times and no more than m times |
Helpful information
- The result of text processing using a regular expression becomes the first capturing group. Accordingly, what is needed in the result should be enclosed in parentheses, and the rest of the groups should be made non-capturing (?:)