{
    "content": [
        {
            "type": "text",
            "text": "# expr (pydoc)\n\n## TLDR\n\n> Evaluate expressions and manipulate strings.\n\n- Get the length of a specific string:\n  `expr length \"{{string}}\"`\n- Get the substring of a string with a specific length:\n  `expr substr \"{{string}}\" {{from}} {{length}}`\n- Match a specific substring against an anchored pattern:\n  `expr match \"{{string}}\" '{{pattern}}'`\n- Get the first char position from a specific set in a string:\n  `expr index \"{{string}}\" \"{{chars}}\"`\n- Calculate a specific mathematic expression:\n  `expr {{expression1}} {{+|-|*|/|%}} {{expression2}}`\n- Get the first expression if its value is non-zero and not null otherwise get the second one:\n  `expr {{expression1}} \\| {{expression2}}`\n- Get the first expression if both expressions are non-zero and not null otherwise get zero:\n  `expr {{expression1}} \\& {{expression2}}`\n\n*Source: tldr-pages*\n\n---\n\n## Full Content\n\n"
        }
    ],
    "structuredContent": {
        "command": "expr",
        "section": "",
        "mode": "pydoc",
        "summary": null,
        "synopsis": null,
        "tldr_summary": "Evaluate expressions and manipulate strings.",
        "tldr_examples": [
            {
                "description": "Get the length of a specific string",
                "command": "expr length \"{{string}}\""
            },
            {
                "description": "Get the substring of a string with a specific length",
                "command": "expr substr \"{{string}}\" {{from}} {{length}}"
            },
            {
                "description": "Match a specific substring against an anchored pattern",
                "command": "expr match \"{{string}}\" '{{pattern}}'"
            },
            {
                "description": "Get the first char position from a specific set in a string",
                "command": "expr index \"{{string}}\" \"{{chars}}\""
            },
            {
                "description": "Calculate a specific mathematic expression",
                "command": "expr {{expression1}} {{+|-|*|/|%}} {{expression2}}"
            },
            {
                "description": "Get the first expression if its value is non-zero and not null otherwise get the second one",
                "command": "expr {{expression1}} \\| {{expression2}}"
            },
            {
                "description": "Get the first expression if both expressions are non-zero and not null otherwise get zero",
                "command": "expr {{expression1}} \\& {{expression2}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": []
    }
}