Difference between revisions of "Pattern Matching"
From The Foundry MODO SDK wiki
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | ''modo'' features a basic yet powerful pattern matching system based loosely on | + | ''modo'' features a basic yet powerful pattern matching system based loosely on the design from AmigaOS. Some [[Command System|commands]] support pattern matching, as do the 'F' search fields in many parts of ''modo'''s user interface. |
− | + | The following table describes the syntax used by ''modo'''s pattern matching mechanism. ''Expression'' is defined as a single character, or characters wrapped in parentheses or square braces as described below. | |
{| align="center" | {| align="center" | ||
Line 10: | Line 10: | ||
! colspan="3" | Example | ! colspan="3" | Example | ||
|- | |- | ||
− | ! Inputs | + | !Inputs |
− | ! Pattern | + | !Pattern |
− | ! Matches | + | !Matches |
|- | |- | ||
|<nowiki>*</nowiki> | |<nowiki>*</nowiki> | ||
Line 22: | Line 22: | ||
|<nowiki>#</nowiki> | |<nowiki>#</nowiki> | ||
|Zero or the next sub pattern. | |Zero or the next sub pattern. | ||
− | |Ae, Ape, Appe, App, Axe | + | |style=white-space:nowrap|Ae, Ape, Appe, App, Axe |
|A#pe | |A#pe | ||
− | |Ae, Ape, Appe | + | |style=white-space:nowrap|Ae, Ape, Appe |
|- | |- | ||
|<nowiki>?</nowiki> | |<nowiki>?</nowiki> | ||
Line 41: | Line 41: | ||
|Any one of the items separated by the vertical bar character. Any number of vertical bars can be used, including none. | |Any one of the items separated by the vertical bar character. Any number of vertical bars can be used, including none. | ||
|Axe, Ape, Abe | |Axe, Ape, Abe | ||
− | |A(x|b)e | + | |<nowiki>A(x|b)e</nowiki> |
|Axe, Abe | |Axe, Abe | ||
|- | |- | ||
Line 47: | Line 47: | ||
|Any one of the characters inside the square braces. | |Any one of the characters inside the square braces. | ||
|Axe, Ace, Abe, Abc, ACE | |Axe, Ace, Abe, Abc, ACE | ||
− | |A[bcBC]e | + | |<nowiki>A[bcBC]e</nowiki> |
|Ace, Abe, ACE | |Ace, Abe, ACE | ||
|- | |- | ||
|<nowiki>[a-z]</nowiki> | |<nowiki>[a-z]</nowiki> | ||
|Any of the range of characters within the square braces. Multiple ranges cab be combined, such as ''[a-dA-Dxyz]''. | |Any of the range of characters within the square braces. Multiple ranges cab be combined, such as ''[a-dA-Dxyz]''. | ||
− | |Axe, Ace, | + | |style=white-space:nowrap|Axe, Ace, Abe, Ate, ABE |
− | |A[a-kA-K]e | + | |style=white-space:nowrap|<nowiki>A[a-kA-K]e</nowiki> |
|Ace, ABE | |Ace, ABE | ||
|- | |- | ||
Line 65: | Line 65: | ||
<small>Originally based on the description provided by the ''Amiga User Interface Guide'', pages 108-110. Notable differences are that ''%'' is not currently supposed and a comma is not required between ranges in the ''<nowiki>[a-z]</nowiki>'' syntax.</small> | <small>Originally based on the description provided by the ''Amiga User Interface Guide'', pages 108-110. Notable differences are that ''%'' is not currently supposed and a comma is not required between ranges in the ''<nowiki>[a-z]</nowiki>'' syntax.</small> | ||
+ | |||
+ | [[Category:Top level]] |
Latest revision as of 15:54, 2 April 2012
modo features a basic yet powerful pattern matching system based loosely on the design from AmigaOS. Some commands support pattern matching, as do the 'F' search fields in many parts of modo's user interface.
The following table describes the syntax used by modo's pattern matching mechanism. Expression is defined as a single character, or characters wrapped in parentheses or square braces as described below.
|
Originally based on the description provided by the Amiga User Interface Guide, pages 108-110. Notable differences are that % is not currently supposed and a comma is not required between ranges in the [a-z] syntax.