Available Regular Expressions

This page describes regular expressions that can be used for Conversions (convert) of config.yml.

Character class
Regular expressionDescription
.An arbitrary character (except new-line characters)
[]Any one of the characters
Example) [xyz], [x-z]
[^]

None of the characters
Example) [^xyz], [^x-z]

\dDecimal digit [0-9]
\DNon-decimal digit [^0-9]
\wWord constituent character [a-zA-Z0-9_]
\WNon-word constituent character [^a-zA-Z0-9_]
\sSpace character [ \t\r\n\f]
\SNon-space character [^ \t\r\n\f]
Repetition
Regular expressionDescription
*0 times or more (longest match)
+1 time or more (longest match)
?0 times or 1 time (longest match)
{n}Just n times (n is a numeric character)
{n,}n times or more (n is a numeric character) (longest match)
{n,m}At least n and at most m times (n and m are numeric characters) (longest match)

*?

0 times or more (shortest match)
+?1 time or more (shortest match)
??0 times or 1 time (shortest match)
{n}?Just n times (n is a numeric character)
{n,}?n times or more (n is a numeric character) (shortest match)
{n,m}?At least n and at most m times (n and m are numeric characters) (shortest match)
Capture and grouping
Regular expressionDescription
(pat)Regular capture and grouping
(?:pat)Grouping without capturing
Selector
Regular expressionDescription
pat1|pat2Either matches
Anchor
Regular expressionDescription
^Match the line head
$Match the line end
\AMatch the head of a string
\zMatch the end of a string
\bMatch word boundary
\BMatch non-word boundary