nerdexam
Fortinet

NSE4 · Question #185

Which of the following Regular Expression patterns will make the term "bad language" case insensitive?

The correct answer is B. /bad language/i. In regular expressions, the 'i' flag appended after the closing delimiter makes the pattern match case-insensitively.

Submitted by joshua94· Apr 18, 2026Security Profiles and Content Inspection

Question

Which of the following Regular Expression patterns will make the term "bad language" case insensitive?

Options

  • A[bad language]
  • B/bad language/i
  • Ci/bad language/
  • D"bad language"
  • E/bad language/c

How the community answered

(41 responses)
  • A
    7% (3)
  • B
    88% (36)
  • C
    2% (1)
  • E
    2% (1)

Why each option

In regular expressions, the 'i' flag appended after the closing delimiter makes the pattern match case-insensitively.

A[bad language]

`[bad language]` is a character class that matches any single character present within the brackets, not the entire phrase 'bad language' case-insensitively.

B/bad language/iCorrect

The `/pattern/i` syntax is a widely adopted convention in regular expressions, where the 'i' flag at the end signifies that the pattern should be matched without regard to case (case-insensitively).

Ci/bad language/

The 'i' flag for case-insensitivity is appended after the closing forward slash, not placed before the opening one.

D"bad language"

`"bad language"` is a literal string and does not employ regular expression syntax to achieve case-insensitive matching.

E/bad language/c

The `/c` flag is not a standard regular expression flag for case-insensitivity; the correct flag for this purpose is 'i'.

Concept tested: Regular expression case-insensitivity flag

Source: https://docs.fortinet.com/document/fortimanager/7.0.0/admin-guide/700818/regex-for-matching-content

Topics

#Regular Expressions#Case Insensitivity#Pattern Matching#FortiGate Security Profiles

Community Discussion

No community discussion yet for this question.

Full NSE4 Practice