# regular expression error in 3.0.x not present in 3.0.6

Aaron Hurt ahurt at ena.com
Fri Mar 6 17:25:34 CET 2015

```The regexp will not compile with just 2 backslashes it seems to translate \\ to \ (correct) and then escapes out the following ] (not correct)

Things do work however with 4 backslashes \\\\ in the policy.d configuration and oddly enough it also works with 3 backslashes \\\ … am I missing something here as to how correct_escapes is supposed to function?

This isn’t really an issue as I can make it work and get the expected behavior.

with correct_escapes = true

In policy.d file:

simple_nt_regexp = "^([^\\]*)\\(.*)\$”

/etc/raddb/policy.d/strip-user-domain[9]:               ^ Pattern compilation failed: missing terminating ] for character class

>
>
>> On Mar 6, 2015, at 3:11 AM, Phil Mayers <p.mayers at imperial.ac.uk> wrote:
>>
>>> When old style domain names come into FR they seem to always contain
>> That's just a printout escaping thing in debugging. It's really one \ in the packet, and thus \\ is sufficient to match it in the regex with correct escapes set to true.
>
> Good to know, thank you.
>
>> --
>> Sent from my mobile device, please excuse brevity and typos
>> -
>
> -