JA_UK Posted December 9, 2023 Share Posted December 9, 2023 Hi, I have a workflow where I need to enter a 4-digit number (eg - 5825), and I want to split it into 2 variables; the first variable being the first 2 digits of the number (eg - 58) and the second variable being the last 2 digits of the number (eg - 25). Is there a way to accomplish this, please? I have seen the split variable action, but can’t figure out a way to use it to make this happen. Thanks. Link to comment
vitor Posted December 9, 2023 Share Posted December 9, 2023 Have a Keyword Input to receive your number. Pass it to a Replace Utility set to Replace regex (\d\d)(\d\d) with $1,$2. This will split into numbers separated by commas. Then use the Split Arg Utility set to split on commas and output variables. Link to comment
JA_UK Posted December 9, 2023 Author Share Posted December 9, 2023 That's great - thank you. Link to comment
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