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.
Qt QRegExp で簡単な正規表現を書きたい
Qstring のすべての部分文字列をtable(i, d)、引用符なしで、i「ハード ライト」でd任意の整数を表してフェッチしたいと考えています。そして、cap を使用して の値を取得しますd。私が提案する
table(i, d)
i
d
qREgExp reg ( "table(i,\\s*(\\d+)\\s*)") ;
そのときの希望を大切にします
reg.cap(2)
ここで問題を教えてdください。
どのように言えますか?
使ってみて
qREgExp reg ( "\\btable\\(i,\\s*(\\d+)\\s*\\)" );
と
reg.cap(1)