Fortinet Document Library

Version:


Table of Contents

User Guide

21.4.0
Copy Link

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