|
Boost Users : |
Subject: [Boost-users] regex traits for glib::ustring
From: Simon Wibberley (sw206_at_[hidden])
Date: 2009-07-14 09:19:32
Hi there,
I'm attempting to build an application which requires multibyte
character support, for which I'm using the Glib::ustring, and needs
also to use regex.
From what I understand you need to tell boost regex exactly how to
iterate over your strings.
I've got as far as:
typedef boost::match_results<Glib::ustring::iterator,
std::allocator<gunichar> > umatch;
typedef boost::reg_expression<Glib::ustring,
boost::regex_traits<Glib::ustring> > uregex;
//making the
regex_match<ustring::iterator, std::allocator<gunichar>, ustring,
regex_traits<ustring> >(str.begin(), str.end(), m, re);
//where str is a ustring, re is a uregex and m is a umatch as defined
above
However I get the feeling I'm completely missing a trick, ie that's
it's a lot more complex than this...
I'm using boost 1.39 and glibmm 2.4.
Could anyone provide any guidance on this, whether it's even possible
without writing a lot of code, or possible alternatives?
Many thanks,
Simon
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net