Documenting Perl Regular Expressions
Published on 30 Jan 2005Regular expressions can easily be documented which is demonstrated in the following example matching floating point numbers:
Regular expressions can easily be documented which is demonstrated in the following example matching floating point numbers:
In one of my projects I needed to process XML files with document type definitions (DTD). The first couple of attempt failed miserably. But after some research I managed to cope:
In addition to the commonly known properties of a statistic, a special analysis of the data can be performed based on the type of the individual values:
The internal variable INPUT_RECORD_SEPARATOR
determines which string of characters closes a line of input data.
Although regular expressions are a complex but extremely useful tool for the analysis of strings, they are based on fuzzy logic and, therefore, have high computational demands. Although there can be no universal statement, some rules of thumb can be compiled to support a case-to-case decision whether simple string analysis based on index()
, substr()
, chr()
and ord()
is able to improve the time complexity of a perl script with respect to regular expressions.
The xmessage
that comes with Xorg (or XFree) displays a customizable message box. Although its set of features is extended by the gxmessage
command, the following listing applies to both command:
The internal commands pack and unpack have been the source of much confusion, therefore, I will shortly present typical scenarios when to use pack and unpack.
Instead of publishing subversion repositories via its integration in the apache web server, you can use the svnserve
daemon which run on port 3690 by default (but can be used with an inetd).
The Java virtual machine provides a limited amount of memory which can be used for application data. By default, this memory allocation pool is initialized to 2 megabytes and is limited to 64 megabytes. There are two command line options that control the size of the pool:
This Java build system is based on ant
. It comes with a build.xml
that contains project configuration variables. This file includes include.xml
that defines the available targets.