{
  "version": "1.0",
  "timestamp": "2026-06-17T18:44:27.354Z",
  "stackScript": "",
  "backscripts": "",
  "objects": [
    {
      "name": "card",
      "id": "card",
      "type": "card",
      "position": {
        "left": "",
        "top": "",
        "width": "",
        "height": ""
      },
      "script": "",
      "properties": {
        "visible": "true",
        "layer": "1",
        "backgroundColor": "rgb(103, 87, 0)"
      }
    },
    {
      "name": "title",
      "id": "1",
      "type": "field",
      "position": {
        "left": "50px",
        "top": "49px",
        "width": "460px",
        "height": "53px"
      },
      "script": "",
      "properties": {
        "visible": "true",
        "asBackground": false,
        "rotation": 0,
        "layer": "2",
        "textalign": "left",
        "scrollable": false,
        "locktext": true,
        "multiline": false,
        "autotab": false,
        "widemargins": false,
        "sharedtext": false,
        "dontwrap": false,
        "textsize": 24,
        "vScroll": 0,
        "hScroll": 0,
        "visibleLines": "1",
        "isIframe": false,
        "caretColor": "",
        "ignorefind": false,
        "styledtext": true,
        "showborder": false,
        "backgroundColor": "rgba(0, 0, 0, 0)",
        "textStyle": "normal",
        "foregroundColor": "rgb(0, 0, 0)",
        "bordercolor": "rgb(0, 0, 0)",
        "borderwidth": "0",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "fontWeight": "700",
        "field": "styledText",
        "borderColor": "rgb(0, 0, 0)",
        "borderWidth": "0px",
        "textAlign": "left"
      },
      "content": "replace with regex",
      "formattingCommands": [
        "set the textsize of field \"title\" to 24",
        "set the textstyle of field \"title\" to Bold",
        "set the textcolor of field \"title\" to rgb(0, 0, 0)",
        "set the textcolor of field \"title\" to 0,0,0",
        "set the textstyle of field \"title\" to normal",
        "set the textcolor of field \"title\" to 137,137,137"
      ]
    },
    {
      "name": "basic replacement regex",
      "id": "2",
      "type": "button",
      "position": {
        "left": "50px",
        "top": "98px",
        "width": "298px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Basic pattern replacement (replaces all 'a' characters with 'X')\n   clear message box\n   put replaceRegex(\"banana\", \"a\", \"X\")\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "3",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "clickText": "replacement",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "replace digits",
      "id": "3",
      "type": "button",
      "position": {
        "left": "50px",
        "top": "139px",
        "width": "196px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Replace sequences of digits with '#'\n   clear message box\n   put replaceRegex(\"abc123def456\", \"\\d+\", \"#\")\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "4",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "clickText": "digits",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "Replace whitespaces",
      "id": "4",
      "type": "button",
      "position": {
        "left": "50px",
        "top": "180px",
        "width": "261px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Replace whitespace sequences with a single dash\n   clear message box\n   put replaceRegex(\"hello  world   test\", \"\\s+\", \"-\")\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "5",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "Replace using variable",
      "id": "5",
      "type": "button",
      "position": {
        "left": "50px",
        "top": "220px",
        "width": "300px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Store pattern, replacement and text in variables\n   clear message box\n   put \"[a-z]+\" into pattern\n   put \"#\" into replacement\n   put \"abc123def456\" into text\n   put replaceRegex(text, pattern, replacement)\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "6",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "Using flags (case insensitive)",
      "id": "6",
      "type": "button",
      "position": {
        "left": "49px",
        "top": "260px",
        "width": "329px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Case-insensitive matching with 'i' flag\n   clear message box\n   put replaceRegex(\"aAa\", \"a\", \"X\", \"i\")\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "7",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "Using flags (ignorecase)",
      "id": "7",
      "type": "button",
      "position": {
        "left": "49px",
        "top": "300px",
        "width": "329px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- replacement matching with 'i' flag but using the 'ignorecase' keyword\n   clear message box\n   put replaceRegex(\"aAa\", \"a\", \"X\", \"ignorecase\")\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "8",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "replace using noglobal (replace first match)",
      "id": "8",
      "type": "button",
      "position": {
        "left": "48px",
        "top": "340px",
        "width": "395px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Replace only the first occurrence (using the 'noglobal' flag)\n   clear message box\n   put replaceRegex(\"banana\", \"a\", \"X\", \"noglobal\")\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "9",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "multiline regex replace",
      "id": "9",
      "type": "button",
      "position": {
        "left": "50px",
        "top": "380px",
        "width": "322px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Multiline mode with 'm' flag (matches start of each line)\n   clear message box\n   put \"abc\" & return & \"def\" into multilineText\n   put replaceRegex(multilineText, \"^.\", \"X\", \"m\")\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "10",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "format phone numbers",
      "id": "10",
      "type": "button",
      "position": {
        "left": "489.5px",
        "top": "100px",
        "width": "259px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Format phone numbers\n   clear message box\n   put \"Phone: 1234567890\" into text\n   put replaceRegex(text, \"(\\d{3})(\\d{3})(\\d{4})\", \"($1) $2-$3\")\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "11",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "remove html tags",
      "id": "11",
      "type": "button",
      "position": {
        "left": "490px",
        "top": "140px",
        "width": "286px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Remove HTML tags\n   clear message box\n   put \"<p>Hello <b>World</b></p>\" into html\n   put replaceRegex(html, \"<[^>]*>\", \"\")\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "12",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "verify email address format",
      "id": "12",
      "type": "button",
      "position": {
        "left": "490px",
        "top": "180px",
        "width": "370px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Validate email format\n   clear message box\n   put \"test@example.com\" into email\n   put replaceRegex(email, \"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\", \"valid\")\n   -- If result is \"valid\", email format is valid\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "13",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    },
    {
      "name": "handle invalid regex",
      "id": "13",
      "type": "button",
      "position": {
        "left": "490px",
        "top": "260px",
        "width": "404px",
        "height": "30px"
      },
      "script": "on mouseup\n   -- Handle invalid regex patterns with try/catch\n   clear message box\n   try\n      put replaceRegex(\"abc\", \"[\", \"X\")\n   catch error\n      put \"Error caught: \" & error\n   end try\n   -- Result: Error message about invalid regex pattern\nend mouseup",
      "properties": {
        "visible": "true",
        "hilighted": false,
        "autoHighlight": true,
        "isCheckbox": false,
        "isRadiobutton": false,
        "isMenu": false,
        "menuText": "",
        "disabled": false,
        "textAlign": "center",
        "textsize": 16,
        "textColor": "#000",
        "textFont": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "textStyle": "normal",
        "asBackground": false,
        "label": "",
        "accentColor": "",
        "icon": "",
        "iconGravity": "top",
        "layer": "14",
        "foregroundColor": "rgb(255, 255, 255)",
        "fontFamily": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
        "rotation": 0,
        "backgroundColor": "rgb(137, 137, 137)",
        "bordercolor": "rgb(153, 153, 153)",
        "borderwidth": "1",
        "fontWeight": "400",
        "borderColor": "rgb(153, 153, 153)",
        "borderWidth": "1px"
      }
    }
  ]
}