diff --git a/docs/v1.9/reference/composition.md b/docs/v1.9/reference/composition.md index d264cf2e..e3a352a2 100644 --- a/docs/v1.9/reference/composition.md +++ b/docs/v1.9/reference/composition.md @@ -526,6 +526,7 @@ Currently only `multiply` is supported. * string transform type `Convert`, accepts one of `ToUpper`, `ToLower`, `ToBase64`, `FromBase64`. * string transform type `TrimPrefix`, accepts a string to be trimmed from the beginning of the input. * string transform type `TrimSuffix`, accepts a string to be trimmed from the end of the input. +* string transform type `Regexp`, accepts a string for regexp to be applied to. ```yaml # If you omit the field type, by default type is set to `Format` @@ -583,6 +584,15 @@ Currently only `multiply` is supported. string: type: TrimSuffix trim: '-test' + +# If the value of the 'from' field is 'arn:aws:iam::42:example, the value of the +# 'to' field will be set to "42". Note that the 'to' field is always a string. +- type: string + string: + type: Regexp + regexp: + match: 'arn:aws:iam::(\d+):.*' + group: 1 # Optional capture group. Omit to match the entire regexp. ``` `convert`. Transforms values of one type to another, for example from a string