www.digitalmars.com Home | Search | CTG | RTL | IDDE | STL
Last update Wed Oct 25 16:04:19 2006
Compiler & Tools Guide

Compiling
Compiling Code
C Implementation
C++ Implementation
Language Extensions
Mixing Languages
Assembly Language
Inline Assembler
Optimizing Code
Numerics Programming
Regular Expressions
Acrtused
Pragmas
Precompiled Headers
Predefined Macros
Warning Messages
Error Messages
Runtime Messages


Linking
Optlink
Switches
Module Definition Files
Operation and Design
Error Messages


Win32 Programming
Win32 Programming


DOS and Win16
Programming

Memory Models
16 Bit Pointer Types
and Type Modifiers

Handle Pointers
DOS
DOS 32 (DOSX)
Win16
Win16 DLLs
Win16 Prolog/Epilog


C/C++ Extensions
Contract Programming
__debug statement
__debug declaration
Dynamic Profiling
Embedding C in HTML


Tools
BCC
CHMOD
CL
COFF2OMF
COFFIMPLIB
DMC
DIFF
DIFFDIR
DUMP
DUMPOBJ
DUMPEXE
EXE2BIN
FLPYIMG
GREP
HC
IMPLIB
LIB
LIBUNRES
MAKE
MAKEDEP
ME
OBJ2ASM
PATCHOBJ
RC
RCC
SC
SHELL
SMAKE
TOUCH
UNMANGLE
WHEREIS


Porting to DMC++
Switching to DMC++
from Microsoft
from Borland
Porting Guide


Regular Expressions

The Digital Mars regular expression engine is common to both the C++ Library RegExp and the D Library RegExp. Regular expressions are patterns specified by the following sequences:

c matches literal character c.
. matches any character.
* matches previous character/subexpression 0 or more times.
+ matches previous character/subexpression 1 or more times.
? matches previous character/subexpression 0 or 1 times.
^ matches beginning of line.
$ matches end of line
{n} matches previous character/subexpression n times.
{n,} matches previous character/subexpression n or more times.
{n,m} matches previous character/subexpression n to m times.
[class] match character in character class.
[^class] match character not in character class.
A|B matches regular expression A or regular expression B.
(exp) matches regular subexpression exp.

Escape sequences:

\nnn starts out a 1, 2 or 3 digit octal sequence, where n is an octal digit. If nnn is larger than 0377, then the 3rd digit is not part of the sequence and is not consumed. For maximal portability to other regular expression engines, use exactly 3 digits.
\xXX starts out a 1 or 2 digit hex sequence. X is a hex character. If the first character after the \x is not a hex character, the value of the sequence is 'x' and the XX is not consumed. For maximal portability to other regular expression engines, use exactly 2 digits.
\uUUUU is a unicode sequence. There are exactly 4 hex characters after the \u, if any are not, then the value of the sequence is 'u', and the UUUU is not consumed.
\b matches a backspace character (in character classes only).
\b matches a word boundary (when not in character classes).
\B matches when not on a word boundary (when not in character classes).
\cC matches the control character corresponding to the letter C.
\d matches a 0..9 digit.
\D matches any character but a 0..9 digit.
\f matches a formfeed character.
\n matches a linefeed character.
\r matches a carriage return character.
\s matches whitespace, one of \f, \n, \r, \t or \v.
\S matches any character but those recognized by \s.
\t matches a tab character.
\v matches a vertical tab character.
\w matches a word character.
\W matches any character that is not a word.
\\ matches the \ character.
\char matches char literally if char is not one of the above.

attributes[] contains zero or more of the following:

g global match - used to pick off a sequence of matches rather than starting over each time from the beginning of the input string.
i case insensitive
m multiline