Versions Compared

Key

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

...

Below is an example of a simple regex that will match the word“Testing”word “Testing”. To test the expressions you can use the Dynamic Evaluation feature, this will run the expressions against a Test Case and will show where the expressions matched.

...

From testing the expression we can see that most of the content has been removed as the regex Regex found a match for “Testing” (which is on the second line) and removed the content after that point.

...

If your Profile is converting HTML to Wiki Markup for Jira to render the emails then the expression will become more complicated. Wiki markup Markup adds extra characters to the email body so that when Jira renders the email content it will display the text using the style that is defined by the Wiki Markup. This makes the regex Regex more complicated to make as the expression will need to also match these characters if the word/phrase uses Wiki markup Markup to change the appearance. To check if you are using Wiki markup Markup go to Profile > Email > HTML and inhere there are some settings that enable you to select which styles you would like to render. For example Bold and Italic.

...

The rendered content will make the text use the formatting that is defined and will remove the wiki markup Wiki Markup tags from the text. The non rendered content will have the Wiki markup Markup tags within the text. Below is an example showing the difference between the rendered and non rendered content.

...

Regex contains special characters that have a special meaning with the regexRegex. These Special characters tells the expression to look for values that match the condition. For example “*.” means to look for a word that has characters before the word, indicating that the word is mid sentence.

...

Example of using Special characters

When using Wiki markup Markup it will insert extra characters into the body content as these characters are used to render the email content. Sometimes these characters used in wiki markup Wiki Markup are the same as special characters for Regex. To overcome this you would use “\” followed by the special character, this will stop that character from being used as a special character.

Example Regex

This regex Regex will check if there is any characters before Bold text* and escapes “*“ so that it can found within the content and then checks if *Bold text* is used within the content. If this matches it will then remove the content that follows.

...