res_sorcery_astdb.c: Fix regex handling and keep simple prefix matching performance.
The sorcery astDB wizzard does not handle regex correctly if the pattern
begins with an anchor character.
This patch attempts to convert the anchored regex pattern to a prefix
pattern supported by astDB for performance reasons. If it is not able to
convert the pattern it falls back to getting all astDB members of the
family and doing a normal regex pattern matching on the retrieved records.
Review: https://reviewboard.asterisk.org/r/3161/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408385
65c4cc65-6c06-0410-ace0-
fbb531ad65f3