Fortinet black logo

User Guide

Search syntax help

24.1.0
Copy Link
Copy Doc ID af1daa65-c273-11ec-9fd1-fa163e15d75b:609442
Download PDF

Search syntax help

Regex search examples

Find any vlan with IDs 1020 or 1030:

vlan (1020|1030)

Find any vlan in the 10xx range:

vlan 10\d{2}

Find any router with OSPF router-id in 10.0.0.0/24

router-id=10.0.0.\d+

Make search case insensitive (will find 'VLAN 1002' or 'vlan 1002')

(?i)vlan 1002

Regex cheat-sheet

Token

Description

.

any single character

\d

any number

\h

any horizontal white-space (space, tab, etc.)

Token

Description

?

one or zero times

any number of times (even zero - zero or more times)

+

at least once (one or more times)

{2}

Repeats 2 times

Token

Description

[abc]

any of the characters inside ('a' or 'b' or 'c')

[a-z]

any of the characters inside the range (a through z)

|

or

()

group - for example '(foo|bar)' - 'foo' or 'bar'

Modifier

Description

(?i)

Case insensitive

Search syntax help

Regex search examples

Find any vlan with IDs 1020 or 1030:

vlan (1020|1030)

Find any vlan in the 10xx range:

vlan 10\d{2}

Find any router with OSPF router-id in 10.0.0.0/24

router-id=10.0.0.\d+

Make search case insensitive (will find 'VLAN 1002' or 'vlan 1002')

(?i)vlan 1002

Regex cheat-sheet

Token

Description

.

any single character

\d

any number

\h

any horizontal white-space (space, tab, etc.)

Token

Description

?

one or zero times

any number of times (even zero - zero or more times)

+

at least once (one or more times)

{2}

Repeats 2 times

Token

Description

[abc]

any of the characters inside ('a' or 'b' or 'c')

[a-z]

any of the characters inside the range (a through z)

|

or

()

group - for example '(foo|bar)' - 'foo' or 'bar'

Modifier

Description

(?i)

Case insensitive