![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 234
Rep Power: 3
![]() |
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.
__________________
Project::Soulstorm (personal homepage) |
|
|
|
|
|
#2 |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 498
Rep Power: 4
![]() |
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.
__________________
I Like Ike. Vote for Dwight Eisenhower this November. --This message brought to you by the the Procrastinators Club Of America. |
|
|
|
|
|
#3 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 816
Rep Power: 4
![]() |
Re: C++ cross-platform Regular Expression Library
I can recommend PCRE.
|
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Re: C++ cross-platform Regular Expression Library
Installing Boost is easy with MacPorts.
|
|
|
|
|
|
#5 | |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 234
Rep Power: 3
![]() |
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:
__________________
Project::Soulstorm (personal homepage) |
|
|
|
|
|
|
#6 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 816
Rep Power: 4
![]() |
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.
|
|
|
|
|
|
#7 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 234
Rep Power: 3
![]() |
Re: C++ cross-platform Regular Expression Library
I am using OS X. Could you be more specific? If you are using windows, where do you find those files on windows? It may help me with this...
__________________
Project::Soulstorm (personal homepage) |
|
|
|
|
|
#8 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 816
Rep Power: 4
![]() |
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).
|
|
|
|
|
|
#9 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 234
Rep Power: 3
![]() |
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!
__________________
Project::Soulstorm (personal homepage) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP Regular Expression: Matching All Possible Characters | kruptof | PHP | 3 | May 30th, 2007 6:22 PM |
| Date Regular Expression | King | C# | 2 | Apr 30th, 2006 9:41 PM |
| Word Frequency Regular Expression | hoffmandirt | C# | 4 | Feb 27th, 2006 8:21 PM |
| Regular Expression | toghian | C++ | 12 | Dec 28th, 2005 10:12 PM |
| Regular Expression HELP -- thanks | paulchwd | JavaScript and Client-Side Browser Scripting | 3 | Oct 11th, 2005 4:40 PM |