# PurgeChar – função de script e gráfico

PurgeChar() retorna uma string contendo todos os caracteres na string de entrada ('text'), exceto para qualquer caractere presente no segundo argumento ('remove\_chars').

Sintaxe:

PurgeChar(text, remove\_chars)

Tipo de dados de retorno: caractere

Argumentos:

Argumentos PurgeChar

| Argumento | Descrição |
| --- | --- |
| text | A string original. |
| remove\_chars | Uma string contendo os caracteres no text a ser removido. |

**Tipo de dados de retorno:** caractere

Exemplos e resultados:

Exemplos e resultados

| Exemplo | Resultado |
| --- | --- |
| `PurgeChar<br>( 'a1b2c3','123' )` | Retorna 'abc' |
| `PurgeChar<br>( 'a1b2c3','312' )` | Retorna 'abc' |

## Saiba mais

* [KeepChar – função de script e gráfico](https://help.qlik.com/pt-BR/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/KeepChar.htm)