|
From: Shayne K. <err...@ne...> - 2003-05-06 15:54:22
|
Well I suppose if you were a masochist you could embed perl into your C application (examples on the Perl site). Or you could use the PCRE library (http://gnuwin32.sourceforge.net/packages/pcre.htm) There's probably a regex library from MS and maybe others, check http://www.freshmeat.net as well. - Shayne http://www.shaynekasai.com On Tue, 6 May 2003, Szathmary Laszlo wrote: > Hi! > > I first met regular expressions in Perl. In this language it's very easy > to use regexp, so could anyone tell me how to transform them to C? > Let's see an example: > > $line = "<name>QL</name><path>ql.exe</path>"; > if ($line =~ m#<name>(.*)</name><path>(.*)</path>#) > { > print "Name: $1, path: $2\n"; > } > > How could it be rewritten to C? Which regexp. library do you suggest > using? > > Thanks in advance, > > Laszlo > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |