Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2004

Tip: Looking for answers? Try searching our database.

Regex library

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Beeeeeeeeeeeeves - 30 Jul 2004 11:15 GMT
Hi
I do mostly programming in VB6 and C# although I like to dabble in C++ now and again, I was just wondering what is a good* regular expression library to use for C++, given that I DON'T want to use managed C++.

* I define "good" in this case as conforming to the following priorities, in order:
1- Easy to install, reference and use. I don't want loads of header file confusion before I've even started
2- Standardised/conformant (i.e. NOT gnu-based)
3- Fast

Thanks!
Jeff F - 30 Jul 2004 12:47 GMT
> Hi
> I do mostly programming in VB6 and C# although I like to dabble in C++ now and again, I was just wondering what is a good* regular expression library
to use for C++, given that I DON'T want to use managed C++.

> * I define "good" in this case as conforming to the following priorities, in order:
> 1- Easy to install, reference and use. I don't want loads of header file confusion before I've even started
> 2- Standardised/conformant (i.e. NOT gnu-based)
> 3- Fast

see http://www.boost.org/libs/regex/doc/index.html

Jeff F
Steve McLellan - 30 Jul 2004 12:54 GMT
> > Hi
> > I do mostly programming in VB6 and C# although I like to dabble in C++ now
[quoted text clipped - 11 lines]
>
> Jeff F

I agree, the Boost libraries are great for lots of reasons including regexs.
Especially check out their smart pointer classes (in particular
shared_ptr) - they make C++ much easier and safer. Plus it's all free! :-)

Steve
Arash Salarian - 30 Jul 2004 13:01 GMT
> see http://www.boost.org/libs/regex/doc/index.html

Exactly! One the main reasons I could not convince myself to move to C# from
C++, was the BOOST libraries. It seems I can't understand how people manage
to program anythign in C# or Java without BOOST, Blitz and Loki.
Beeeeeeeeeves - 30 Jul 2004 13:19 GMT
Thanks
It looks alright, but I don't know whether I've downloaded the right thing.
I've got about 7 .hpp files, totalling 190KB when unpacked.... is that it?
Or do I have to download something else and build it?

If it's the case that those 7 .hpp files is all I need, which of them do I #include, or do I #include them all?
Steve McLellan - 30 Jul 2004 13:55 GMT
> Thanks
> It looks alright, but I don't know whether I've downloaded the right thing.
> I've got about 7 .hpp files, totalling 190KB when unpacked.... is that it?
> Or do I have to download something else and build it?
>
> If it's the case that those 7 .hpp files is all I need, which of them do I #include, or do I #include them all?

Hi,

7 might be it for the regex part of it, but you'd be well advised to
download the whole Boost library. The regex stuff is slightly harder to get
going than the rest of the library - read the docs properly. The file you
need to include is boost/regex.hpp.

I haven't set it up for ages, but there are two options; either you can
build the regex lib and link against it, or you can define
BOOST_REGEX_NO_LIB, and include the CPPs it requires in your project. Read
the documentation though.

Steve
Jeff F - 30 Jul 2004 19:13 GMT
> Thanks
> It looks alright, but I don't know whether I've downloaded the right thing.
> I've got about 7 .hpp files, totalling 190KB when unpacked.... is that it?
> Or do I have to download something else and build it?
>
> If it's the case that those 7 .hpp files is all I need, which of them do I #include, or do I #include them all?

Probably not boost_1_31_0.zip is 13MB. Yes you'll need to build the regex
library. Follow the directions on www.boost.org getting started.

You probably only downloaded some patched headers, not the complete boost
library.

Jeff F
Carl Daniel [VC++ MVP] - 30 Jul 2004 15:05 GMT
> Hi
> I do mostly programming in VB6 and C# although I like to dabble in
[quoted text clipped - 6 lines]
> want loads of header file confusion before I've even started 2-
> Standardised/conformant (i.e. NOT gnu-based) 3- Fast

As others have said, boost::regex is a fine library - I've used it many
times.

You might also want to check out GRETA from Microsoft Research.  The
original page for it is here:

http://research.microsoft.com/projects/greta/

and you can get a version with more pleasing license terms here:

http://www.gotdotnet.com/team/cplusplus/  (it's in the VC++ PowerTools)

Note that regular expressions will be included in the upcoming Library
Technical Report that the ISO C++ Committee is working on.  The interface
that's defined by TR1 is much closer to that of boost::regex than it is to
GRETA.  The authors of GRETA and boost::regex both contributed to the design
of the TR1 version of regex, which should eventually become part of the next
version of the C++ standard.

-cd

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.