Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Exclude / Include Patterns


  • patterns
  • ignoreRegExpList
  • includeRegExpList

The spell checker combines the patterns, the ignoreRegExpList, and the includeRegExpList settings based upon the overrides and languageSettings for the file.

It uses includeRegExpList and ignoreRegExpList in the following way:

  1. Make a set of text to be included by matching against includeRegExpList (if empty, include everything).
  2. Make a set of text to be excluded by matching against ignoreRegExpList.
  3. Check all text that is included but not excluded.

includeRegExpList and ignoreRegExpList can include regular expressions or pattern names. Pattern names resolved against patterns defined in patterns.


  - Email
  - >-


  • Email is a predefined pattern.
  • /ftp:[^\s]*/g - will match anything that starts with ftp: until the first space.


Patterns allow you to define reusable patterns for excluding or

Verbose Regular Expressions

Version Description
^6.9.0 Initial support

Defining RegExp Patterns in .json or .yaml CSpell config files can be difficult.

This feature makes it easier to define patterns in a .yaml file.

CSpell now supports the x - verbose flag.

    ^(\s*`{3,}).*     # match the ```
    [\s\S]*?          # the block of code
    ^\1               # end of the block

Example of Ignoring code block in markdown.


  - name: markdown_code_block
    pattern: |
          ^(\s*`{3,}).*     # match the ```
          [\s\S]*?          # the block of code
          ^\1               # end of the block
  - languageId: markdown
      - markdown_code_block

Leading and trailing spaces are automatically trimmed from patterns, make it possible to avoid escaping in YAML by using > without the trailing -.

  - >
    /auth_token: .*/g
  - >-
    /this works too/g