If you have a string of text
(for example, "1234 quick 1234 brown 1234 fox")
and you wanted to use a regular expression to identify any words in that string of text, what is the c++ code that would do it?
Note: A word is defined as any sequence of letters that is not interrupted by a space.
I could really use an example of code.
What #include statements would I need? Is there a way to do it without including regex? Where do I get regex (if I try to include it now, my compiler gives me an error, so I assume I need to get it from somewhere)?
Please note, I don't need a tutorial on regular expressions. I understand regular expressions well enough as it is, I just need to know how to use them in C++.
2006-09-28
08:04:42
·
3 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design