On Apr 7, 2005 12:46 AM, Paolo Alexis Falcone <[EMAIL PROTECTED]> wrote: > On Apr 6, 2005 11:28 PM, Bopolissimus Platypus Jr > <[EMAIL PROTECTED]> wrote:
> The Boost library includes POSIX regular expression functions. thanks paolo. i've looked at boost, and also at pcre. i've decided that i can't stand to use pcre :). no doubt, given the way C is, pcre is a relatively good interface, but i've been spoiled by higher level languages and i just won't work with one arm behind my back unless really required :). boost is much easier to use, e.g., const regex e("([0-9]{3})(-| )([0-9]{4})"); string phone(" 549-1886 "); match_results<string::iterator> mr; if(regex_match(phone.begin(),phone.end(),mr,e)) { cout << "match" << endl; for(int ctr=1;ctr<mr.length();ctr++) cout << "\t" << mr[ctr]<<endl; } else cout << "no match" << endl; tiger -- Gerald Timothy Quimpo http://bopolissimus.blogspot.com [EMAIL PROTECTED] [EMAIL PROTECTED] Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78" Mene sakhet ur-seveh -- Philippine Linux Users' Group (PLUG) Mailing List plug@lists.q-linux.com (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie