{
  "schemaVersion": "1.0",
  "item": {
    "slug": "regex",
    "name": "Regex",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ivangdavila/regex",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/regex",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/regex",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=regex",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/regex"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/regex",
    "agentPageUrl": "https://openagent3.xyz/skills/regex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/regex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/regex/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Greedy vs Lazy",
        "body": ".* is greedy—matches as much as possible; .*? is lazy—matches minimum\nGreedy often overshoots: <.*> on <a>b</a> matches entire string, not <a>\nDefault quantifiers + * {n,} are greedy—add ? for lazy: +? *? {n,}?"
      },
      {
        "title": "Escaping",
        "body": "Metacharacters need escape: \\. \\* \\+ \\? \\[ \\] \\( \\) \\{ \\} \\| \\\\ \\^ \\$\nInside character class []: only ], \\, ^, - need escape (and ^ only at start, - only mid)\nLiteral backslash: \\\\ in regex, but in strings often need \\\\\\\\ (double escape)"
      },
      {
        "title": "Anchors",
        "body": "^ start, $ end—but behavior changes with multiline flag\nMultiline mode: ^ $ match line starts/ends; without, only string start/end\n\\A always string start, \\Z always string end (not all engines)\nWord boundary \\b matches position, not character—\\bword\\b for whole words"
      },
      {
        "title": "Character Classes",
        "body": "[abc] matches one of a, b, c; [^abc] matches anything except a, b, c\nRanges: [a-z] [0-9]—but [a-Z] is invalid (ASCII order matters)\nShorthand: \\d digit, \\w word char, \\s whitespace; uppercase negates: \\D \\W \\S\n. matches any char except newline—use [\\s\\S] for truly any, or s flag if available"
      },
      {
        "title": "Groups",
        "body": "Capturing () vs non-capturing (?:)—use (?:) when you don't need backreference\nNamed groups: (?<name>...) or (?P<name>...) depending on engine\nBackreferences: \\1 \\2 refer to captured groups in same pattern\nGroups also establish scope for alternation: cat|dog vs ca(t|d)og"
      },
      {
        "title": "Lookahead & Lookbehind",
        "body": "Positive lookahead (?=...): assert what follows, don't consume\nNegative lookahead (?!...): assert what doesn't follow\nPositive lookbehind (?<=...): assert what precedes\nNegative lookbehind (?<!...): assert what doesn't precede\nLookbehinds must be fixed-width in most engines—no * or + inside"
      },
      {
        "title": "Flags",
        "body": "i case-insensitive, m multiline (^$ match lines), g global (find all)\ns (dotall): . matches newline—not supported everywhere\nu unicode: enables \\p{} properties, proper surrogate handling\nFlags syntax varies: /pattern/flags (JS), (?flags) inline, or function arg (Python re.I)"
      },
      {
        "title": "Engine Differences",
        "body": "JavaScript: no lookbehind until ES2018; no \\A \\Z; no possessive quantifiers\nPython re: uses (?P<name>) for named groups; no \\p{} without regex module\nPCRE (PHP, grep -P): full features; possessive ++ *+; recursive patterns\nGo: RE2 engine, no backreferences, no lookahead—guaranteed linear time"
      },
      {
        "title": "Performance",
        "body": "Catastrophic backtracking: (a+)+ against aaaaaaaaaab is exponential—avoid nested quantifiers\nPossessive quantifiers ++ *+ prevent backtracking—use when backtracking pointless\nAtomic groups (?>...) don't give back chars—similar to possessive\nAnchor patterns when possible—^prefix is O(1), unanchored prefix is O(n)"
      },
      {
        "title": "Common Mistakes",
        "body": "Email validation: RFC-compliant regex is 6000+ chars—use simple check or library\nURL matching: edge cases are endless—use URL parser, regex for quick extraction only\nDon't use regex for HTML/XML—use a parser; regex can't handle nesting\nForgetting to escape user input—regex injection is real; use literal escaping functions"
      },
      {
        "title": "Testing",
        "body": "Test edge cases: empty string, special chars, unicode, very long input\nVisualize with tools: regex101.com shows matches and explains\nCheck which engine documentation you're reading—features vary significantly"
      }
    ],
    "body": "Greedy vs Lazy\n.* is greedy—matches as much as possible; .*? is lazy—matches minimum\nGreedy often overshoots: <.*> on <a>b</a> matches entire string, not <a>\nDefault quantifiers + * {n,} are greedy—add ? for lazy: +? *? {n,}?\nEscaping\nMetacharacters need escape: \\. \\* \\+ \\? \\[ \\] \\( \\) \\{ \\} \\| \\\\ \\^ \\$\nInside character class []: only ], \\, ^, - need escape (and ^ only at start, - only mid)\nLiteral backslash: \\\\ in regex, but in strings often need \\\\\\\\ (double escape)\nAnchors\n^ start, $ end—but behavior changes with multiline flag\nMultiline mode: ^ $ match line starts/ends; without, only string start/end\n\\A always string start, \\Z always string end (not all engines)\nWord boundary \\b matches position, not character—\\bword\\b for whole words\nCharacter Classes\n[abc] matches one of a, b, c; [^abc] matches anything except a, b, c\nRanges: [a-z] [0-9]—but [a-Z] is invalid (ASCII order matters)\nShorthand: \\d digit, \\w word char, \\s whitespace; uppercase negates: \\D \\W \\S\n. matches any char except newline—use [\\s\\S] for truly any, or s flag if available\nGroups\nCapturing () vs non-capturing (?:)—use (?:) when you don't need backreference\nNamed groups: (?<name>...) or (?P<name>...) depending on engine\nBackreferences: \\1 \\2 refer to captured groups in same pattern\nGroups also establish scope for alternation: cat|dog vs ca(t|d)og\nLookahead & Lookbehind\nPositive lookahead (?=...): assert what follows, don't consume\nNegative lookahead (?!...): assert what doesn't follow\nPositive lookbehind (?<=...): assert what precedes\nNegative lookbehind (?<!...): assert what doesn't precede\nLookbehinds must be fixed-width in most engines—no * or + inside\nFlags\ni case-insensitive, m multiline (^$ match lines), g global (find all)\ns (dotall): . matches newline—not supported everywhere\nu unicode: enables \\p{} properties, proper surrogate handling\nFlags syntax varies: /pattern/flags (JS), (?flags) inline, or function arg (Python re.I)\nEngine Differences\nJavaScript: no lookbehind until ES2018; no \\A \\Z; no possessive quantifiers\nPython re: uses (?P<name>) for named groups; no \\p{} without regex module\nPCRE (PHP, grep -P): full features; possessive ++ *+; recursive patterns\nGo: RE2 engine, no backreferences, no lookahead—guaranteed linear time\nPerformance\nCatastrophic backtracking: (a+)+ against aaaaaaaaaab is exponential—avoid nested quantifiers\nPossessive quantifiers ++ *+ prevent backtracking—use when backtracking pointless\nAtomic groups (?>...) don't give back chars—similar to possessive\nAnchor patterns when possible—^prefix is O(1), unanchored prefix is O(n)\nCommon Mistakes\nEmail validation: RFC-compliant regex is 6000+ chars—use simple check or library\nURL matching: edge cases are endless—use URL parser, regex for quick extraction only\nDon't use regex for HTML/XML—use a parser; regex can't handle nesting\nForgetting to escape user input—regex injection is real; use literal escaping functions\nTesting\nTest edge cases: empty string, special chars, unicode, very long input\nVisualize with tools: regex101.com shows matches and explains\nCheck which engine documentation you're reading—features vary significantly"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivangdavila/regex",
    "publisherUrl": "https://clawhub.ai/ivangdavila/regex",
    "owner": "ivangdavila",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/regex",
    "downloadUrl": "https://openagent3.xyz/downloads/regex",
    "agentUrl": "https://openagent3.xyz/skills/regex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/regex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/regex/agent.md"
  }
}