We only use [
]
as quantifier not {
}
like [n]
, [m,n]
.
In expression [m,n]
, m
or n
can be omitted like [,n]
, [m,]
.
And you can't use *
, +
, and ?
as quantifier anymore (first restriction).
*
is used as any single character with quantifier instead of .
. For example *[1]hoge
matches ahoge
, bhoge
, choge
.
Without quantifier, *
operates as a wildcard, which means it is interpreted as *[0,]
rather than *[1]
, so you can express partial matches like *hoge*
, hoge*
(forward match) and *hoge
(backward match). Now you can't express them like ^hoge
and hoge$
anymore (second restriction).
In turn, we use {
}
as group expression.
TODO User defined group
TODO