Boostを語れゴラァ pa ..
[
2ch
|
▼Menu
]
■コピペモード
□
スレを通常表示
□
オプションモード
□このスレッドのURL
■項目テキスト
186:デフォルトの名無しさん 07/12/14 19:14:30 sregex r = sregex::compile( "A([1-9]*|[a-z]*)A" ); string str1 = "A123A AaaaA A3b3A A9A"; if( regex_search( str1, m, r ) ) { ... } で、 "123" "aaa" "3b3" "9" という文字列を取り出すにはどういう記述をすればいいでしょうか? m[2].str() とか書いても、aaaとか取得できないんです。 sregexでなくxpressive利用でもいいです。 187:デフォルトの名無しさん 07/12/14 19:35:19 const_iterator begin()const; Effects: Returns a starting iterator that enumerates over all the marked sub-expression matches stored in *this. const_iterator end()const; Effects: Returns a terminating iterator that enumerates over all the marked sub-expression matches stored in *this. 188:デフォルトの名無しさん 07/12/14 19:35:19 regex_searchじゃなくてregrex_iteratorでも使っとけ
次ページ
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
レスジャンプ
mixiチェック!
Twitterに投稿
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch
4284日前に更新/65 KB
担当:undef