digitalmars.D - Regular Expression problems...
- kinghajj (4/4) Jan 30 2005 On the Regular Expression "help" guide, it says that "\char" means to ma...
- Andrew Fedoniouk (6/8) Jan 30 2005 Try to use following sequence
- Chris Sauls (4/8) Jan 30 2005 Out of curiousity, are your regexp's in WYSIWYG strings or escaped (aka
- Manfred Nowak (12/14) Jan 31 2005 Seems you want to esacpe the escape character "\" by writing "\\"
On the Regular Expression "help" guide, it says that "\char" means to match that "char" literally. However, when I do this, I get a warning similar to this: undefined escape sequence \{ What do I do?
Jan 30 2005
undefined escape sequence \{ What do I do?Try to use following sequence [{] instead. I am not sure though will it work or not in this particular implementation. Andrew Fedoniouk. http://terrainformatica.com
Jan 30 2005
Out of curiousity, are your regexp's in WYSIWYG strings or escaped (aka double-quoted) strings? If using escaped strings, that could be the problem. -- Chris Sauls In article <ctk8pt$a54$1 digitaldaemon.com>, kinghajj says...On the Regular Expression "help" guide, it says that "\char" means to match that "char" literally. However, when I do this, I get a warning similar to this: undefined escape sequence \{ What do I do?
Jan 30 2005
kinghajj wrote: [...]undefined escape sequence \{ What do I do?Seems you want to esacpe the escape character "\" by writing "\\" instead. Because first the lexical phase scans your source into tokens the character seqence " \{" is recognized as space followed by the escape sequence '\{', which has no meaning to the lexical phase. But the character sequence " \\{" is recognized as space followed by '\\' and '{' from which '\\' is recognized as valid escape sequence with the meaning '\'. Therefore the chracters " \{" are passed to the RE-programs which then can recognize the "\{" as escaped sequence. -manfred
Jan 31 2005