> On Feb. 18, 2014, 2:35 p.m., opticron wrote:
> > /trunk/res/res_sorcery_astdb.c, lines 237-243
> > <https://reviewboard.asterisk.org/r/3161/diff/2/?file=54049#file54049line237>
> >
> >     This could also be a regex character class such as \d or \s which is 
> > too complicated for prefix matching.

No, that's perl regex. Regular REG_EXTENDED doesn't do those.

See also regex(7).

"""a '\' followed by any other character(!)  (matching that character taken as 
an ordinary character, as if the '\' had not been present(!))"""


- wdoekes


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3161/#review10898
-----------------------------------------------------------


On Feb. 18, 2014, 1:18 a.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3161/
> -----------------------------------------------------------
> 
> (Updated Feb. 18, 2014, 1:18 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> 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 gets all astDB members of the family and then does a normal regex 
> pattern matching on the resulting records retrieved.
> 
> 
> Diffs
> -----
> 
>   /trunk/res/res_sorcery_astdb.c 408290 
> 
> Diff: https://reviewboard.asterisk.org/r/3161/diff/
> 
> 
> Testing
> -------
> 
> Simple regex patterns that are just prefixes are converted and the astDB just 
> fetches the matching records.  More complex patterns fallback to getting all 
> astDB family records and searching them by regex.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to