Slip Online Interpreter

Note: Slip is still evolving, so some behaviours/syntax may change in future updates

Normal regex features

`<char>                     Escape to char (using ` not \, non-alphanumeric only)
abc                         Concatenation
a|b|c                       Alternation
(abc)                       Groups
(?:abc)                     Noncapturing groups (experimental)
* + ? {n} {,n} {n,} {n,m}   Quantifiers (lazy counterparts also available)
[abc] [^abc]                Character classes/negated character classes
(?<group>) (?R)             Regex recursion (experimental)

Note: -|]^ currently need escaping inside a character class.

Extended regex features

(?_(<group>) <regex> )      Length assert; Match <regex> if same length as group
(?| <regex> )               Stationary group; Reset movement state after match
[pos|neg]                   Extended char class; Match all pos not in neg


<>            Turn left/right 90 degrees
/\            Slip left/right orthogonal to current direction
#             No move; Don't move after matching next char
%             No slip; Don't perform next slip command
^0 ... ^7     Set match pointer direction to absolute direction (N, NE, S, ..., NW)

                 7 0 1
                 5 4 3
^*            Any octolinear direction (^0|^1|^2|^3|^4|^5|^6|^7)
^+            Any orthogonal direction (^0|^2|^4|^6)
^T            Either turn direction (<|>)


$0 ... $7    Anchor N edge/NE corner/E edge/etc.
$*           Anchor any corner ($1|$3|$5|$7)
$+           Anchor any edge ($0|$2|$4|$6)
$<lower>     Set custom anchor
$<upper>     Match corresponding custom anchor
$^           Match if next movement would put pointer out of bounds

Configuration flags

f      First match only
i      Case-insensitive
n      Number of matches
o      Overlapping matches
p      Position of matches
r      No-repeat
v      Verbose output

Predefined character classes

`a     Alphabetical (upper/lowercase letter)
`c     Consonant (upper/lowercase)
`d     Digit (0-9)
`h     Hexdigit (0-9a-fA-F)
`l     Lowercase letter
`o     Octdigit (0-7)
`p     Punctuation
`s     Whitespace (space or tab)
`u     Uppercase letter
`v     Vowel (upper/lowercase)
`w     Word character (a-zA-Z0-9_)
`y     Vowel with y (upper/lowercase)

Note: Predefined character classes currently cannot be used in regular character classes, and do not yet support Unicode.