开发者

How to search the particular character in one word in asterisk server?

开发者 https://www.devze.com 2023-03-27 02:02 出处:网络
How to search the particular character in given sentence in asterisk server? Ex:- word=\"test\" here word - variable name

How to search the particular character in given sentence in asterisk server?

Ex:-

word="test"

here

word - variable name

test - value of the variable

I want to search the 'e开发者_StackOverflow中文版' character is present or not in given "test" value in asterisk server.

Is the any inbuilt command in asterisk server?


The REGEX function returns 1 if data matches regular expression or 0 otherwise.

So,

exten => s,n,Set(foo=${REGEX("[e]" ${word})})

The foo returns the "1" because the letter "e" matched

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号