Filter Word from Variable

Is it possible to filter different words from the variable ${SIP_HEADER(From)} in the extensions.conf?
I can edit with CUT and filter different characters with FILTER.
But can I also say somehow that if “anonymous” occurs in the variable, that exactly this is written into a new variable?
Thanks for the help.

    expr1 : expr2
    The `:' operator matches expr1 against expr2, which must be a regular expression. The regular expression is anchored to the beginning of the string with an implicit `'.

If the match succeeds and the pattern contains at least one regular expression subexpression `', the string corresponing to `\1' is returned; otherwise the matching operator returns the number of characters matched. If the match fails and the pattern contains a regular expression subexpression the null string is returned; otherwise 0.

Normally, the double quotes wrapping a string are left as part of the string. This is disastrous to the : operator. Therefore, before the regex match is made, beginning and ending double quote characters are stripped from both the pattern and the string.

NOTE: I’m pretty sure that that some special characters have been garbled. You should probably refer to standard references on Posix regular expressions.

also combine it with TOLOWER() to fix Anonymous != anonymous

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.