> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Regex Input

Allows you to display regex input controls for your widget. Regex setting can capture and provide conditional state to other schema settings.

---

**Widget Configuration Output**

```json showLineNumbers={false}
{
  "videoUrl": {
    "value": "https://www.youtube.com/watch?v=-5EQIiabJvk",
    "parts": {
      "type":"youtube"
    }
}
```

**User Interface Output**

![output](/_fern-img/faccb0ee9337d3be2468f96e0f823193acfecd61df8e1af0d415b8ffe6e80dc8.webp)

---

**JSON Schema**

| Property                              | Type    | Description                                                                         | Example                        |         |         |
| ------------------------------------- | ------- | ----------------------------------------------------------------------------------- | ------------------------------ | ------- | ------- |
| `type`                                | string  | The type of setting component to display.                                           | regexInput                     |         |         |
| `label`                               | string  | The user friendly message to inform the user how this setting will be used.         | "Video URL (YouTube or Vimeo)" |         |         |
| `id`                                  | string  | The variable name where the setting value will be available in the widget template. | videoUrl                       |         |         |
| `default`                             | string  | The default value to use when rendering the widget for the first time.              | ""                             |         |         |
| `typeMeta`                            | object  | Additional information needed based on the selected setting type.                   |                                |         |         |
| `typeMeta.placeholder`                | string  | Placeholder text in the text editor.                                                | "https\://"                    |         |         |
| `typeMeta.regExPatterns`              | array   |                                                                                     |                                |         |         |
| `typeMeta.regExPatterns[].pattern`    | string  |                                                                                     | "(vimeo                        | youtube | youtu)" |
| `typeMeta.regExPatterns[].matchIndex` | integer |                                                                                     | 0                              |         |         |
| `typeMeta.regExPatterns[].configKey`  | string  |                                                                                     | type                           |         |         |