☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

pattern_flags

Table of contents

Description:

This key defines the flags (e.g. case-insensitive searching) for the regular expression set in options.pattern.

Appears in:
└── _inputs
    └── *
        ├── Text Input
        │   └── options
        │       └── pattern_flags
        ├── Textarea Input
        │   └── options
        │       └── pattern_flags
        ├── Code Input
        │   └── options
        │       └── pattern_flags
        ├── Color Input
        │   └── options
        │       └── pattern_flags
        ├── Rich Text Input
        │   └── options
        │       └── pattern_flags
        ├── File Input
        │   └── options
        │       └── pattern_flags
        ├── URL Input
        │   └── options
        │       └── pattern_flags
        ├── Select Input
        │   └── options
        │       └── pattern_flags
        └── Choice Input
            └── options
                └── pattern_flags
Type:
Object
Properties:
dot_allboolean#

This key defines the s flag - . matches newline characters.

Defaults to: false

globalboolean#

This key defines the g flag - Search globally.

Defaults to: false

This key defines the i flag - Case-insensitive.

Defaults to: false

multilineboolean#

This key defines the m flag - ^ and $ match the start and end of each line rather than the entire string.

Defaults to: false

unicodeboolean#

This key defines the u flag - Pattern is treated as a sequence of Unicode code points.

Defaults to: false

This key defines the v flag for extended unicode mode.

Defaults to: false

Examples:

In this example, we have configured pattern flags for a text input to enable case-insensitive searching.

Copied to clipboard
_inputs:
  search_term:
    type: text
    options:
      pattern: ^[a-z]+$
      pattern_flags:
        ignore_case: true
{
  "_inputs": {
    "search_term": {
      "type": "text",
      "options": {
        "pattern": "^[a-z]+$",
        "pattern_flags": {
          "ignore_case": true
        }
      }
    }
  }
}
Open in a new tab