Eugen Rogoza
2007-May-25 04:15 UTC
[asterisk-users] Matching "+" at the beginning of the line
Hello,
I'm trying to match a number in international format, like +49XXXX...
The regexp string "^\+49" doesn't work. Both in
$["+49..." : "^\+49"]
and ${REGEX("^\+49" ${NUMBER})}.
The error is: WARNING[12486]: func_strings.c:138 regex: Malformed input
REGEX(): Invalid preceding regular expression.
The regexp expression "^49\+" works. Does Asterisk have problems
matching the plus at the beginning of the string, or am I escaping
something incorrectly?
Eugene
--
Eugen Rogoza
VoIP Services
------------------------------------------------------------------------
Telefon: + 49 (0) 431 90 20 648
Telefax: + 49 (0) 431 90 20 559
E-Mail: eugen.rogoza@freenet-ag.de
Website: http://www.freenet-ag.de
------------------------------------------------------------------------
freenet Cityline GmbH
Ein Unternehmen der freenet AG
Hamburger Chaussee 2-4
24114 Kiel
------------------------------------------------------------------------
Gesch?ftsf?hrer: Eckhard Spoerr, Axel Krieger
Amtsgericht Kiel, HRB 6202
Anthony Francis
2007-May-25 07:22 UTC
[asterisk-users] Matching "+" at the beginning of the line
Eugen Rogoza wrote:> Hello, > > I'm trying to match a number in international format, like +49XXXX... > > The regexp string "^\+49" doesn't work. Both in $["+49..." : "^\+49"] > and ${REGEX("^\+49" ${NUMBER})}. > > The error is: WARNING[12486]: func_strings.c:138 regex: Malformed input > REGEX(): Invalid preceding regular expression. > > The regexp expression "^49\+" works. Does Asterisk have problems > matching the plus at the beginning of the string, or am I escaping > something incorrectly? > > Eugene > > > > >That's because you don't dial a + you dial 011 here in America, the + is meta for insert you international dialing prefix here.