![]() |
C++ cross-platform Regular Expression Library
I am building something that seems to be an IRC chat client... :)
I have managed to do all connections and send and receive text from the server. However, the difficult part is to actually process the received messages. I figured out I need regular expressions for this, only I don't know how to implement them! Installing Boost (which has regular expressions) is a pain in the butt for OS X, so can anyone provide me with a cross-platform regular expression Library? I am using OS X, so Windows specific answers will not help. |
Re: C++ cross-platform Regular Expression Library
use boost Regular Expressions, but I don't know if it supports your os or not. Probably does because it can be compiled for both *nix and MS-Windows. Read all about boost libraries here.
|
Re: C++ cross-platform Regular Expression Library
I can recommend PCRE.
|
Re: C++ cross-platform Regular Expression Library
Installing Boost is easy with MacPorts.
|
Re: C++ cross-platform Regular Expression Library
I don't want to use boost. It is a pain in the butt to install. And Ooble's recommendation was nice, but it didn't work for me, because for some reason, because the script fails to install the .profile file inside my user directory. So, I can't install anything.
Quote:
|
Re: C++ cross-platform Regular Expression Library
Have a look at the pcrecpp.h file - it should be in the pcre directory. It is a wrapper for use with c++. This makes it a lot easier to use the library. There is a lot of instructions and examples in the .h file.
|
Re: C++ cross-platform Regular Expression Library
Quote:
|
Re: C++ cross-platform Regular Expression Library
They were in the base of the library. Probably the best thing to do would be to download the zip file from the site and use the source code that comes with it. It should compile OK on OS X (I think a friend of mine has tried it).
|
Re: C++ cross-platform Regular Expression Library
What do you mean by that? To just throw the folder into my project and just type "include "pcre.h""?
Actually, I am trying to do this, but it always complain about files it can't find! |
Re: C++ cross-platform Regular Expression Library
What complaints do you get? Are they compiler errors or linker errors?
|
| All times are GMT -5. The time now is 9:06 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC