Shortest
లభ్యం, .wl రిఫరెన్స్ నుండి భిన్నం
Pattern wrapper that tries the shortest match first — the default for both string and expression sequences
.wl రిఫరెన్స్ నుండి భిన్నం: `Longest`/`Shortest` in a definition
Shortest[p]
{a, b, c, d, e, f, g} /. {x__, Shortest[y__]} :> {{x}, {y}}
→ {{a}, {b, c, d, e, f, g}}{a, b, c, d, e, f, g} /. {Shortest[x__], y__} :> {{x}, {y}}
→ {{a}, {b, c, d, e, f, g}}StringCases["abcdefg", Shortest[x__] ~~ __ -> x]
→ {a} మొత్తం 6300 ఫంక్షన్లు ·
దీన్ని MCP క్లయింట్ నుండి వాడండి