4 Dec
2005
4 Dec
'05
10:22 a.m.
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.