Regular expressions are used for pattern matching in a number of CSVfix commands. The regular expression special characters understood by CSVfix are as follows:


Character

Meaning

.

Match any single character

*

Match zero or more occurrences of the preceding character or range.

[]

Specify character range

^

Match start of CSV field -  if first character in [] brackets, negates a range

$

Match end of CSV field.

 \(pat\)

Remember the matched pattern for later use

 \n

Recall matched pattern  (n is 1 to 9)

\

Remove special meaning for character



Examples:


Match a field consisting of a negative number:


^-[0-9][0-9]*$


Match a field containing M or F (only) in either upper or lower case:


^[MFmf]$


Match a field containing an asterisk (together with possibly other characters):


\*


Created with the Personal Edition of HelpNDoc: Full-featured EPub generator