Problem:
User inputs an IP address and the gateway needs to be created from that input.
In this case a /24 is used and the gateway is at the low end.
Example:
User input is 10.20.30.40 and the output for the gateway should be 10.20.30.1
Here is the workflow:
Using a string split with regex and a set varaibles
Workflow has 2 variables:
one user input and one global variable
The split string looks like this:
Note the regex( \.\d+$ ) which returns the first 3 octets and end up in the first part of the split return
The set variable takes the first part and attaches the .1
The result is this:
https://github.com/ogelbric/CCCAOWorkflows/tree/master/definition_workflow_1CmKxQqlRkqtZyC2hJucyRflM4w