StripAccentMarksFromString
Strip accent marks (diacritics) from a given string. For example: "Niño שָׁלוֹם Montréal اَلسَّلَامُ عَلَيْكُمْ" Will return: "Nino שלום Montreal السلام عليكم".
- Type
- python
- Pack
- CommunityCommonScripts
Source
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import unicodedata
string = demisto.args()["value"]
normalized = unicodedata.normalize("NFKD", string)
res = ""
for character in normalized:
if not unicodedata.combining(character):
res += character
demisto.results(res)
README
Strip accent marks (diacritics) from a given string.
For example: “Niño שָׁלוֹם Montréal اَلسَّلَامُ عَلَيْكُمْ”
Will return: “Nino שלום Montreal السلام عليكم”
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | transformer, string |
Inputs
| Argument Name | Description |
|---|---|
| value |
Outputs
There are no outputs for this script.