Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
tr1/regex ライブラリを使用する場合、正規表現パターンをどのように定義すればよいですか?
#include <tr1/regex> const regex pattern("[^-]-[^-]");
動作していません...コンパイル時にエラーが発生します:「正規表現」は型に名前を付けていません
regex is in the tr1 namespace so you either need to declare that you are using tr1 or specify that regex is in the tr1 namespace:
regex
tr1
using namespace tr1;
or
const tr1::regex pattern("[^-]-[^-]");