Annika Posted June 10, 2022 Posted June 10, 2022 The "Replace" utility supports regexp matches. Complex extraction of string parts into vars could be supported using regular expression named capture groups, for example: ^(?<first>\w+)\s+(?<second>\w+)$ This regexp could create two variables "first" and "second" with the contents of the two named groups.
vitor Posted June 10, 2022 Posted June 10, 2022 Welcome @Annika, It feels somewhat out of scope that the replace utility would also set variables. But it’s possible to get what you want by composing a few objects. In the example, you can replace the output with \1,\2 (tip: you can insert a literal newline with ⌥↵, to make it more resilient) then use a Split Argument to Variables Utility to make it into variables. You can take it one step further by connecting that to an Argument and Variables Utility to rename your newly-created sequential variables into something else.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now