Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When in action, the input rich text field would be checked against the regex pattern for a match, if a match is found the same would be updated to the ‘Priority’ field in Jira.

Regex Helper

We recommend to Visit the 'Manage Apps’ → ‘Regex Helper' module available in the 'Manage Apps’ section of your Jira to test Regex patterns against input texts before using them in Rules.

...

Crafting a valid regular expression requires precision in considering the pattern's structure and matching criteria. Successful matches, shown in blue, exemplify the data to be inserted into the custom field on the issue page, while red highlights indicate mismatches. Regular expressions serve as potent tools for efficient pattern matching in programming and text processing.

...

In this example, the given regex pattern is returning a value ‘High’ based on the input data. Once the same pattern is used in a Rule as shown below, the rule can set the field ‘Priority’ as ‘High’.

...

Invalid Regular Expression or Input Data:

To test for errors, enter either an invalid regular expression in the "REGULAR EXPRESSION" field or provide invalid input data in the "INPUT DATA" text area. Leaving one of these fields empty will trigger an error message, indicating that no match was found. This validation process ensures that the system accurately detects and communicates issues with either the pattern or the input data, helping to maintain the integrity of the matching mechanismWhen the regular expression is invalid or a regex match is NOT found in in the Input Data, a corresponding error message is shown in Red color. Tweak the regex/ input data to get a success output before using it in a actual rule.

...


Clearing Input Fields:

To clear the input fields, entered values in both the "REGULAR EXPRESSION" and "INPUT DATA" fields, and then click the "Cancel" link. This action will swiftly reset both fields, providing a convenient way to start fresh or make changes to the regular expression and input data without manual deletion. The "Cancel" link simplifies the process, ensuring a user-friendly experience in managing input data and refining regular expressions as needed..

Sample regex patterns for reference:

Guide on regex patterns! Below, you'll find a collection of sample regular expressions (regex) to help you validate and extract phone numbers from text etc….

Input Data

priority=High
name=ABC
profile=ABC,
more details here,
Thank you.
assign=admin@admin.com

Priority Extraction:
Regex: priority\s*=\s*(\S+)

Extracted Value: High

Name Extraction:

Regex: name\s*=\s*([a-zA-Z]+)

Extracted Value: ABC

Profile Extraction (up to 3 lines):
Regex: profile=([^\n](?:\n[^\n]){0,3})
Extracted Value: ABC,
more details here,
Thank you.

Email Address Extraction:
Regex: assign\s*=\s*([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})

Extracted Value: admin@admin.com

Phone Number Extraction:
Regex: phone\s*=\s*(\+?[0-9\s-]+)

Extracted Value: +1234567890