# Asterisk Project : Asterisk 13 Function_FILTER

Created by wikibot on Aug 08, 2014

# FILTER()

### Synopsis

Filter the string to include only the allowed characters

### Description

Permits all characters listed in allowed-chars, filtering all others outs. In addition to literally listing the characters, you may also use ranges of characters (delimited by a `-`

Hexadecimal characters started with a `\x`(i.e. \x20)

Octal characters started with a `\0` (i.e. \040)

Also `\t`,`\n` and `\r` are recognized.

Note

Icon

If you want the `-` character it needs to be prefixed with a {{}}

### Syntax

    FILTER(allowed-chars,string)

##### Arguments

- `allowed-chars`
- `string`

### See Also

### Import Version

This documentation was imported from Asterisk Version SVN-branch-13-r420538