How do I strip emojis from text?
Comments
-
Hello, thanks for reaching out to us through the forum!
If you only expect the basic English chars and punctuation, you can use a step called “Strip Non Ascii Characters from String”. This will strip all non-Ascii chars from the string, which means everything that's not an English character, simple punctuation, or a number will be removed.
Strip Non Ascii Characters from String: https://documentation.decisions.com/step-library/docs/en/strip-non-ascii-characters-from-string
Next, if you do expect the users to add non-English characters like the letters above, then I would recommend a regex expression. For example, using the regex "[^\W]" returns only letters in most language and numbers. The step is called "Regular Expression" and it is located in the step toolbox by going to DATA > TEXT > Regular Expression step. Following that step, you do have to use a "Join Strings" step and the input would be “Regex Match Results.All Value” and the separator would be blank.
Regex Steps: https://documentation.decisions.com/step-library/docs/regular-expression-steps
Join Strings: https://documentation.decisions.com/step-library/docs/join-strings
Here are screenshots of the flow I built that satisfies your use case.
Flow Overview:
Strip Non Ascii Character Step:
Regular Expression Step:
Join Strings Step:
Thank you again for using the forum!
Best regards,
Andrew || Decisions Support
Howdy, Stranger!
Categories
- 4.3K All Categories
- 73 General
- 11 Training
- 206 Installation / Setup
- 1.1K Flows
- 109 Rules
- 268 Administration
- 212 Portal
- 496 General Q & A
- 709 Forms
- 339 Reports
- 3 Designer Extensions
- 48 Example Flows
- 56 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 184 Pages
- 5 Process Mining
- New Features
- 185 Datastructures
- 69 Repository
- 229 Integrations
- 28 Multi-Tenant
- 27 SDK
- 81 Modules
- 57 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 142 Lunch And Learn Questions