| delorie.com/archives/browse.cgi | search |
| From: | Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> |
| 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: | <ap96me$dm5$1@nets3.rz.RWTH-Aachen.DE> |
| References: | <BD3EB335-E75B-11D6-A767-000A277B4E20 AT san DOT rr DOT com> |
| 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 <dstaudi AT san DOT rr DOT com> 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.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |