Skip to main content
Silver
New Member
February 24, 2015
Solved

Reg. Expression

  • February 24, 2015
  • 1 reply
  • 3246 views

Dear All,

 

Anyone can clear me about what is reg.expression in fortigate and how's it working exactly. In which situation we can use this config. And how to configure it

 

Thanks

    Best answer by ede_pfau

    A 'reg. expression' in the context of filters is a Regular Expression, i.e. a means of expressing a search pattern. You can find numerous articles on REs on the web (Wikipedia,...) as well as sites where you can test your RE online, or tutorials.

     

    Tools that understand REs are mainly derived from Unix: vi, sed, (e)grep. In Windows, findstr understands REs. Many (script) languages offer RE support, like python, perl, awk.

     

    In contrast to REs so called 'wildcard' patterns only use very few placeholders like '*' and '?'. Here, the meaning of these placeholders are different from their meaning in REs. Wildcard patterns are used in the DOS/Windows console.

     

    Hope this gets you on the right track.

    1 reply

    ede_pfau
    SuperUser
    ede_pfauAnswer
    SuperUser
    February 24, 2015

    A 'reg. expression' in the context of filters is a Regular Expression, i.e. a means of expressing a search pattern. You can find numerous articles on REs on the web (Wikipedia,...) as well as sites where you can test your RE online, or tutorials.

     

    Tools that understand REs are mainly derived from Unix: vi, sed, (e)grep. In Windows, findstr understands REs. Many (script) languages offer RE support, like python, perl, awk.

     

    In contrast to REs so called 'wildcard' patterns only use very few placeholders like '*' and '?'. Here, the meaning of these placeholders are different from their meaning in REs. Wildcard patterns are used in the DOS/Windows console.

     

    Hope this gets you on the right track.