strange regex question

Herwin Weststrate herwin at quarantainenet.nl
Thu Oct 9 14:15:03 CEST 2014


On 09-10-14 06:01, Xin wrote:
> ...
> 
> I'm using 'Windows Phone\\\\(.*)' or 'Windows Phone\\(.*)', all worked and
> returned me 'test'.  
> But what's wrong on unlang regex?(version: 2.2.5)

Probably the same thing as in 3.0.3 and earlier is happening here: the
value is escaped before the regex match is tries. This means the value
that is being matched isn't 'Windows Phone\test', but 'Windows
Phone\\test'. To get the match you're looking for, you'll actually need
8 slashes (or upgrade to 3.0.4).

-- 
Herwin Weststrate


More information about the Freeradius-Users mailing list