pattern_flags

On this page

Description:

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

Appears in:
├── Text Input
│   └── options
│       └── pattern_flags
├── _inputs
│   └── *
│       ├── 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
│       └── Choice Input
│           └── options
│               └── pattern_flags
├── URL Input
│   └── options
│       └── pattern_flags
└── Select Input
    └── options
        └── pattern_flags
Type:
Object
Properties:
dot_allboolean#

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

Defaults to: false

Appears in: pattern_flags.

globalboolean#

This key defines the g flag - Search globally.

Defaults to: false

Appears in: pattern_flags.

This key defines the i flag - Case-insensitive.

Defaults to: false

Appears in: pattern_flags.

multilineboolean#

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

Defaults to: false

Appears in: pattern_flags.

unicodeboolean#

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

Defaults to: false

Appears in: pattern_flags.

This key defines the v flag for extended unicode mode.

Defaults to: false

Appears in: pattern_flags.

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