yohhoyの日記

技術的メモをしていきたい日記

C++11正規表現ライブラリ

C++11標準の正規表現ライブラリでは6種類の正規表現文法をサポートする。既定値はECMAScript(+一部変更)となっている。

N3337 28.5.1/p1より引用。

The type syntax_option_type is an implementation-defined bitmask type (17.5.2.1.3). Setting its elements has the effects listed in table 138. A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript, basic, extended, awk, grep, egrep, set.

ECMAScript ECMAScript*1(いわゆるJavaScript)の正規表現+一部変更
basic 基本POSIX正規表現*2
extended 拡張POSIX正規表現*3
awk awkコマンドの正規表現*4
grep grepコマンドの正規表現*5
egrep grep -Eコマンドの正規表現*6

関連URL