Common Patterns
| Pattern | Description | Example |
^ | Start of string | ^H matches strings starting with "H" |
$ | End of string | L$ matches strings ending with "L" |
. | Any single character | C.V matches "CAV", "CIV", etc. |
* | Zero or more | CV* matches "C", "CV", "CVV", etc. |
+ | One or more | CV+ matches "CV", "CVV", but not "C" |
? | Zero or one | CV? matches "C" or "CV" |
| | OR operator | H|L matches "H" or "L" |
[] | Character class | [HL] matches "H" or "L" |
[^] | Negated class | [^HL] matches anything except "H" or "L" |
\d | Any digit (0-9) | \d+ matches one or more digits |
\w | Word character | \w+ matches letters, digits, underscore |
\s | Whitespace | \s+ matches spaces, tabs, newlines |
() | Grouping | (CV)+ matches "CV", "CVCV", etc. |
Flags
i - Case insensitive (automatically enabled in this app)
Examples for Linguistic Data
^CV - Words starting with CV syllable
V$ - Words ending with a vowel
^(H|L)$ - Exactly H or L tone
.*HL.* - Contains HL sequence anywhere
^[HL]+$ - Only H and L characters
\d{4} - Exactly 4 digits (e.g., Reference IDs)