How can you remove specific characters from a string in Decisions?
Within a Flow I need to extract digits from a string of text. Is there a way I can remove specific characters from a string?
Comments
-
Hi there,
There are a multitude of ways you can accomplish this in Decisions, but here is one solution that might work for you:
Say I want to extract the digit “2” from the string “st2ring” making the resulting string “string”.
To do this, you can first pass the string you want to extract digits from through the Split String step. This will allow you to split the string up with respect to a given separator. Here, I make the string separator “2”.
The Split String step will output the broken up string as:
We can then pass the output of the Split String step into the Merge String List To Single String subflow’s List of Strings input to reconnect the broken up string from the Split String step. You can set the Separating Character input to ignore as it will not be used.
The resulting output will be the reconnected string with the digit “2” extracted:
You can then utilize an Add Item to List step to create a new list containing the resulting string with extracted digits.
Hope this helps!
Howdy, Stranger!
Categories
- 2.1K All Categories
- 17 General
- 154 Installation / Setup
- 980 Flows
- 86 Rules
- 198 Administration
- 203 Portal
- 426 General Q & A
- 592 Forms
- 280 Reports
- 3 Designer Extensions
- 38 Example Flows
- 32 CSS Examples
- 1 Diagram Tile
- 5 Javascript Controls
- 137 Pages
- 1 Process Mining
- New Features
- 144 Datastructures
- 49 Repository
- 163 Integrations
- 25 Multi-Tenant
- 21 SDK
- 39 Modules
- 36 Settings
- 18 Active Directory
- 12 Version 7
- 34 Version 8