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
- 4.2K All Categories
- 67 General
- 11 Training
- 202 Installation / Setup
- 1.1K Flows
- 106 Rules
- 262 Administration
- 212 Portal
- 490 General Q & A
- 695 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 179 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions