From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: POSIX REGEX Date: 24 Oct 2002 16:21:34 GMT Organization: Aachen University of Technology (RWTH) Lines: 18 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1035476494 14021 137.226.32.75 (24 Oct 2002 16:21:34 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 24 Oct 2002 16:21:34 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Daniel Staudigel wrote: > regcomp(®ex,"uhoh\([[:alnum:]]\)",0); Those two: -----------------^------------^ almost certainly won't do what you want. \ is an active character in C source code. To get a literal '\' into your regex pattern string, you have to write: regcomp(®ex,"uhoh\\([[:alnum:]]\\)",0); You also neglected to check the return status of both your regex function calls --- they might have told you what the problem was, if you had. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.