Cast type user-name

Bassem Mettichi mettichi at gmail.com
Sun Apr 17 09:48:04 UTC 2022


sorry by mistake i have writen this: if (User-Name =~
\^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$\)

but what i use actually on my freeradius server is this:

if (User-Name =~ /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/)


and i get the same error message:

Failed to find "{" as a module or policy.


Le dim. 17 avr. 2022 à 10:33, Nathan Ward <lists+freeradius at daork.net> a
écrit :

> I haven’t read the regex itself to see if it makes sense, but / is not \ -
> so start there.
>
> > On 17/04/2022, at 9:31 PM, Bassem Mettichi <mettichi at gmail.com> wrote:
> >
> > Hello,
> >
> > i have used this regex for ipv4addr
> >
> >
> > if (User-Name =~ \^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$\)
> >
> > {
> >
> > }
> >
> >
> > but when i try to start freeradius i get this error message:
> >
> >
> > default[424]: Failed to find "{" as a module or policy.
> > default[424]: Failed to parse "{" entry.
> >
> > How could I resolve this?
> >
> > Thanks
> >
> >
> > Le sam. 16 avr. 2022 à 20:00, Matthew Newton <mcn at freeradius.org> a
> écrit :
> >
> >> On 16/04/2022 19:50, Bassem Mettichi wrote:
> >>> Thanks a lot Alan please could you give me an example for regexp that
> >> match
> >>> ipv4 and ipv
> >>
> >> https://duckduckgo.com/?q=regex+to+match+ip+address
> >>
> >> --
> >> Matthew
> >> -
> >> List info/subscribe/unsubscribe? See
> >> http://www.freeradius.org/list/users.html
> >>
> > -
> > List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>


More information about the Freeradius-Users mailing list