Pattern substitutions for string manipulation

Pattern substitutions for string manipulation

Summary

When using regex conditions (see How to use pattern matching conditioning), 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 matches).

Example

Condition Value

Regex Pattern

Example Substitution Variable Use

Explanation

Condition Value

Regex Pattern

Example Substitution Variable Use

Explanation

%original_key%

([A-Z]+)-(\d+)

  • 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

Easier way to get the project key

%original_project% is a simple way of getting the project key, so the above technique is not needed if this is all you need.

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.