Skip to main content

Celonis Product Documentation

DELETE_CHARACTERS
Description

DELETE_CHARACTERS returns a string with the characters defined in the match string removed.

Supported input column types: STRING

Output column type: STRING

Syntax
 DELETE_CHARACTERS ( table.column, match_string )
Match string

A match string may be begin with a ^ to invert the matching characters. The remaining characters either specify single characters or character ranges to remove. A character range is specified by the the lower and upper character, separated by dash (-).

NULL handling

If the value is NULL, the result is NULL as well. Additionally, strings with an incomplete unicode character at the end are mapped to NULL

Examples

[1]

Delete ',' and '.'.

Query

Column1

         DELETE_CHARACTERS ( "Table1"."Column1" , '.,' )
        

Input

Output

Table1

Column1 : string

'33.333,33'

'44.444,44'

'44.444.44'

'44,444,44'

'55.555,55'

null

Result

Column1 : string

'3333333'

'4444444'

'4444444'

'4444444'

'5555555'

null

[2]

Delete all non ',' and '.'.

Query

Column1

         DELETE_CHARACTERS ( "Table1"."Column1" , '^.,' )
        

Input

Output

Table1

Column1 : string

'33.333,33'

'44.444,44'

'12^34.,'

'44,444,44'

'55.555,55'

null

Result

Column1 : string

'.,'

'.,'

'.,'

',,'

'.,'

null

[3]

Delete upper case ASCII characters

Query

Column1

         DELETE_CHARACTERS ( "Table1"."Column1" , 'A-Z' )
        

Input

Output

Table1

Column1 : string

'Ab33'

'cc44.,'

'DD44'

'Zz44'

'z44'

null

Result

Column1 : string

'b33'

'cc44.,'

'44'

'z44'

'z44'

null

See also: