StripChars

Strip set of characters from prefix and/or suffix e.g. StripChar value=~!!~www.mydomain.com~!~!~ chars=!~ will return www.mydomain.com

python · Filters And Transformers

Details

IDStripChars
Languagepython
From Version5.0.0
Docker Imagedemisto/python3:3.12.13.10116658
Tagstransformer string

README

Strip set of characters from prefix and/or suffix
e.g. StripChar value=~!!~www.mydomain.com~!~!~ chars=!~ will return www.mydomain.com

Script Data


Name Description
Script Type python3
Tags transformer, string
Cortex XSOAR Version 5.0.0

Inputs


Argument Name Description
value Text to trim (e.g. “~!!~www.mydomain.com~!~!~”)
chars Characters to stripped from the text (e.g. “!~”)

Outputs


There are no outputs for this script.

from CommonServerPython import *

value = demisto.args()["value"]
chars = demisto.args().get("chars", "")

demisto.results(value.strip(chars))