Versions Compared

Key

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

Summary

When using regex conditions (see Pattern match condition), there are substitution variables available for any capture group specified in your regex statement. These can be used and provide an indirect way of doing string manipulation. Even if you don't need the condition specifically for determining whether to create an issue or not (just make sure the condition statement is always matched).

Example

This was created to answer this question.

...

  • Issue project from pattern: %pattern1_1%
  • Issue number from pattern: %pattern1_2%
  • Remove dash from key: %pattern1_1%%pattern1_2% 

...

This regex has 2 capture groups - characters enclosed by parenthesis.

  • One for the first part of the key - ([A-Z]+)
  • One for the second part of the key - (\d+)

Note that all issues should pass the conditioning as stated, we are just using the condition to generate the replacement variables in this case (smile)

...

TitleProject key is available more easily
titleEasier way to get the project key

...

Include Page
SUPPORT:How to use pattern substitutions for string manipulation
SUPPORT:How to use pattern substitutions for string manipulation