Output Regex match groups as strings?

I've tried using the Regex Get Matches and Regex Get Matches Advanced steps to output multiple match groups as separate strings, but I only get the entire matched input string as my output.


As an example, with an input like this I'd want to get the 2 digit number at the end and the rest of the string as 2 separate strings:


dddwwwwbbbbbbb23


I've tried using this regex pattern but it hasn't worked:

(.*\D)(\d+)$

Comments

  • The Regex Get Matches and Regex Get Matches Advanced steps will only output inputs that match the given pattern.

    To get the individual match groups as strings you can use the Regular Expression step found in the toolbox under Data > Text.


    As seen in the below screenshots, you can provide the regular expression pattern, the input string, set options, and it will output the match groups as distinct strings:



    Please see the below documentation for additional information on Regular Expression steps in Decisions:

    https://documentation.decisions.com/step-library/docs/en/regular-expression-steps

Sign In or Register to comment.