Boost logo

Boost Users :

From: Eric Niebler (eric_at_[hidden])
Date: 2008-07-20 18:59:43


Brad Tilley wrote:
> I'm using boost regular expressions with good results on text files
> (html, xml, txt, etc), however, I'm having issues on binary file formats
> (i.e. MS Office files, etc). I've goggled around, but not found any
> hints. Just wondering if someone had experience doing REs on binary
> files. I've tried different open methods ios::binary, etc... still no luck.

I'm not sure about Boost.Regex, but Boost.Xpressive (Boost's alternative
regex package) supports regexing on non-char data. See
http://tinyurl.com/5teeqz.

The version of Xpressive due out with 1.36 has expanded support for
searching non-char data. You can get an idea for what things are
possible by looking at the following code, taken from Xpressive's
regression test:

http://svn.boost.org/trac/boost/browser/branches/release/libs/xpressive/test/test_non_char.cpp

If you don't want to wait for 1.36, you can download the latest version
of Xpressive from the Boost File Vault:

http://www.boostpro.com/vault/index.php?direction=0&order=&directory=Strings%20-%20Text%20Processing&

HTH,

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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