On Thu, 28 Aug 2003 16:13, Jacob Anawalt wrote:Thanks, but I already had. compile my regex, then execute it, check for errors then free it. _That_ made me look for a C++ class, but I didn't find one that overloaded the =~ s/<pattern>/<pattern>/ "operator" :P
bob parker wrote:Try man regex.
C is easier to learn than shell scripting, the elements at least, much less
Perl. I personally find it quicker to code a dirty fix in C than anything else and would not really consider shell programming for anything other than glue for a sequence of other commands.
Just my 2 bits.
Another great example on why the variety is a good thing. I agree on the C vs shell. The only way I write shell scripts is by example. I don't understand it well enough to write a script from a blank page. On the otherhand, I _so_ find myself wishing I could use regexp's this way in C/C++:
Seems that there are regex libraries for the C hacker. Never had need to use them myself yet but someday??
Maybe the class is out there, and maybe there are some good examples of using regcomp(3). If it is, point me at it. I think in JavaScript I can assign a regex string (ie "s/<pattern>/<pattern>/") into a regex object. I was almost able to do with that what I do with regex patterns in Perl. It didn't seem to make the group expressions available after matching though. That's a nice feature in Perl.
Jacob
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]