Please note that this is the old documentation on the last version of Skript I released.
If you use a fork of Skript, please refer to that fork's documentation to find all new & updated information.
Skript uses its own pattern syntax to find out what a piece of text is supposed to mean, e.g. a pattern %player% is sneaking will match any input that's like ‘<anything can go here> is sneaking’, e.g. player is sneaking or this sentence doesn't make sense is sneaking, though the latter will result in an error.

Apart from text that is matched one-to-one, such patterns consist of the following constructs:
Groups in parantheses (part 1|part 2|...) The pattern will match either part 1, or part 2, etc., e.g. shel(f|ves) matches ‘shelf’ and ‘shelves’.
Optional parts [part] Makes a part of the pattern optional, e.g. item[s] matches both ‘item’ and ‘items’.
Expressions %expression type 1/expression type 2/...% Indicates that there must be an expression of the given type(s) at this point in the pattern. This is sometimes limited to literals only (%*type%: no expressions or variables, but only static values) or expressions only (%~type%: variables and expressions, but no static values).
Regular Expressions <...> Denotes part of a pattern as a Regular Expression, e.g. <.+> matches anything. The matched text will usually be checked for correctness by some code that's not documented, so refer to the description and/or examples for more information.
A backslash \ escapes the next character, i.e. it will be matched 1:1 and is not regarded as part of the pattern syntax, e.g. \(actual parantheses\) will match “(actual parantheses)”.

NB: Double spaces as well as spaces at the beginning or end of a pattern are ignored, e.g. [a] b will match both ‘b’ and ' b', and a [b] c will match ‘a c’ and ‘a  c’.