|
I'm fairly new to C++ and I'm wondering what the regular expression library du jour is. For a project in my CS class, we have to parse fairly large files (right now I'm going line-by-line with the regular expression "^([A-Za-z0-9]+),([A-Za-z0-9]*),([A-Za-z0-9]*),(s?f?|f?s?);$"), and I'm using regex.h which is unfortunately incredibly slow. I see that there's Boost.Regex, but we have to hand in our source code at the end of the project and I'm not sure that it's feasible to merge the Boost shared library stuff into my makefiles just for this. Should I just parse it by hand? Is there a better solution? I'm used to being able to just go to the Java or Python docs and glance at the syntax in the manual but I'm having kindof a hard time doing that with C++.
|
# ¿ Mar 6, 2008 18:40 |
|
|
# ¿ May 4, 2024 01:43 |
|
Scaevolus posted:Do all the lines in the file match this? If so, a regex is overkill.
|
# ¿ Mar 7, 2008 05:38 |