470,848 Members | 1,763 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

regular expression in c++

Hi,

Is there some standard or semi standard library to do regular expressions in
c++? I need to recognize if some string is an ip address or not and decide
upon that.

Thanks,
Ron
--
weeks of software enineering safe hours of planing ;)
Jun 27 '08 #1
7 2737
Ron Eggler wrote:
Is there some standard or semi standard library to do regular expressions in
c++? I need to recognize if some string is an ip address or not and decide
upon that.
I believe there is one within Boost. www.boost.org

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jun 27 '08 #2
On Jun 5, 3:39 pm, Ron Eggler <unkn...@example.comwrote:
Hi,

Is there some standard or semi standard library to do regular expressions in
c++? I need to recognize if some string is an ip address or not and decide
upon that.

Thanks,
Ron
--
weeks of software enineering safe hours of planing ;)
It is considered in the new version of the standard, so-called TR1.
Some compilers, like Visual C++ 8, already have it implemented.

See:
http://www.open-std.org/jtc1/sc22/wg...2003/n1429.htm
http://msdn.microsoft.com/en-us/library/bb982727.aspx
http://www.codeproject.com/KB/string/TR1Regex.aspx

Although it is still a draft so far. So, you can consider other
options, like the aforementioned Boost.
Jun 27 '08 #3
Fernando Gómez wrote:
On Jun 5, 3:39 pm, Ron Eggler <unkn...@example.comwrote:
>Hi,

Is there some standard or semi standard library to do regular expressions
in c++? I need to recognize if some string is an ip address or not and
decide upon that.

Thanks,
Ron
--
weeks of software enineering safe hours of planing ;)

It is considered in the new version of the standard, so-called TR1.
Some compilers, like Visual C++ 8, already have it implemented.

See:
http://www.open-std.org/jtc1/sc22/wg...2003/n1429.htm
http://msdn.microsoft.com/en-us/library/bb982727.aspx
http://www.codeproject.com/KB/string/TR1Regex.aspx

Although it is still a draft so far. So, you can consider other
options, like the aforementioned Boost.
Does anyone know if there's something integrated into the GNU tools already?
I'm compiling using g++.
Jun 27 '08 #4
On Jun 5, 6:46 pm, Ron Eggler <unkn...@example.comwrote:
Fernando Gómez wrote:
On Jun 5, 3:39 pm, Ron Eggler <unkn...@example.comwrote:
Hi,
Is there some standard or semi standard library to do regular expressions
in c++? I need to recognize if some string is an ip address or not and
decide upon that.
Thanks,
Ron
--
weeks of software enineering safe hours of planing ;)
It is considered in the new version of the standard, so-called TR1.
Some compilers, like Visual C++ 8, already have it implemented.
See:
http://www.open-std.org/jtc1/sc22/wg...2003/n1429.htm
http://msdn.microsoft.com/en-us/library/bb982727.aspx
http://www.codeproject.com/KB/string/TR1Regex.aspx
Although it is still a draft so far. So, you can consider other
options, like the aforementioned Boost.

Does anyone know if there's something integrated into the GNU tools already?
I'm compiling using g++.
Like they said above there is tr1, and it's supported in gcc since
version 4.0
so, if your gcc can compile this
#include<iostream>
#include<tr1/tuple>
int main()
{
std::tr1::tuple<int, std::string, double, int, intt(12,"Hello",
43.56,1,2);
std::cout<<std::tr1::get<4>(t)<<std::endl;
}

you sure hace tr1::regex
After that all you need is google :D
Jun 27 '08 #5
Victor Bazarov wrote:
Ron Eggler wrote:
>Is there some standard or semi standard library to do regular
expressions in
c++? I need to recognize if some string is an ip address or not and
decide
upon that.

I believe there is one within Boost. www.boost.org
Yep, and it's the same API that will be in the next standard and is in
TR1, or close to it.
Jun 27 '08 #6
On Jun 6, 7:28*am, Noah Roberts <u...@example.netwrote:
Victor Bazarov wrote:
Ron Eggler wrote:
Is there some standard or semi standard library to do regular
expressions in
c++? I need to recognize if some string is an ip address or not and
decide
upon that.
I believe there is one within Boost. *www.boost.org

Yep, and it's the same API that will be in the next standard and is in
TR1, or close to it.
Yes, I also like the boost::regex, it's easy to use, fast.
Jun 27 '08 #7
On Jun 5, 4:12 pm, Fernando Gómez <fernando.a.gome...@gmail.com>
wrote:
It is considered in the new version of the standard, so-called TR1.
Some compilers, like Visual C++ 8, already have it implemented.
Sorry, a finger mistake. I meant Visual C++ 9.
Jun 27 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Buddy | last post: by
4 posts views Thread by Neri | last post: by
11 posts views Thread by Dimitris Georgakopuolos | last post: by
3 posts views Thread by James D. Marshall | last post: by
7 posts views Thread by Billa | last post: by
9 posts views Thread by Pete Davis | last post: by
25 posts views Thread by Mike | last post: by
1 post views Thread by NvrBst | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.