Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-12-04 05:22:13


> Hi, from Japan.I'm pretty new to c++ and I'm trying to work out on
> regex. When I compile these lines,it ends with "undefined reference
> to ..." Please let me know how to use regex properly.
> I use on FC4 and newest boost version,compiling in Anjuta.

You don't say what compiler you're using?
Presumably you need to add the -lboost_regex to your linkers command line.

Note also that [0-9] will only match the first character of "1234567890" so
the call to regex_match will fail (regex_match requires that the whole of
the text is matched in order to succeed). Use regex_search if you want to
match a sub-string of the text.

John.


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