So as most of you will probably know, my C++ knowledge is limited. I mainly use PHP. I am working on a C++ program for a class and figured it out except for some basic output, when I realized a regular expression would work great on it. Soon after I realized I had no clue how C++ handled Regular Expressions at all. I asked my teacher and he was not so sure what I was talking about so it might not be in any standard libraries. I am hoping that it is, and if so how would I use it?
Or would it be better to get an external library? Which seems a bit much for a small class project, I might try and find a different way of solving my output issue.
RegEx in C++
Started by BlaineSch, Nov 10 2009 01:37 PM
2 replies to this topic
#1
Posted 10 November 2009 - 01:37 PM
|
|
|
#2
Posted 10 November 2009 - 01:45 PM
It's not supported in the C++ standard library, RegEx didn't become the "in" thing to add to languages by the time the standard popped up. Anyway, you can pick up RegEx with Boost, which as far as I've found for any serious project using C++ you need Boost.
You'll find a few things are left to be desired by the standard library, for the most part Boost fills that void.
You'll find a few things are left to be desired by the standard library, for the most part Boost fills that void.
Wow I changed my sig!
#3
Posted 14 November 2009 - 12:02 AM
sscanf can read formatted strings. Usually when I think I need a regular expression sscanf does the trick.


Sign In
Create Account



Back to top









