/[pcre]/code/trunk/doc/html/pcresample.html
ViewVC logotype

Contents of /code/trunk/doc/html/pcresample.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 99 - (hide annotations) (download) (as text)
Tue Mar 6 12:27:42 2007 UTC (7 years, 1 month ago) by ph10
File MIME type: text/html
File size: 3081 byte(s)
1. Move the comment about version numbers from pcre.h.in to configure.ac 
because that's where they are now set.
2. Update all the man pages to remove the use of .br and .in because this
causes trouble for some HTML converters. Also standardised the final sections 
giving author information and revision date.
3. Update the maintain/132html man page converter to handle .nf/.fi and to barf 
at .br/.in.

1 nigel 63 <html>
2     <head>
3     <title>pcresample specification</title>
4     </head>
5     <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6 nigel 75 <h1>pcresample man page</h1>
7     <p>
8     Return to the <a href="index.html">PCRE index page</a>.
9     </p>
10 ph10 99 <p>
11 nigel 75 This page is part of the PCRE HTML documentation. It was generated automatically
12     from the original man page. If there is any nonsense in it, please consult the
13     man page, in case the conversion went wrong.
14 ph10 99 <br>
15 nigel 75 <br><b>
16     PCRE SAMPLE PROGRAM
17     </b><br>
18 nigel 63 <P>
19     A simple, complete demonstration program, to get you started with using PCRE,
20     is supplied in the file <i>pcredemo.c</i> in the PCRE distribution.
21     </P>
22     <P>
23     The program compiles the regular expression that is its first argument, and
24     matches it against the subject string in its second argument. No PCRE options
25     are set, and default character tables are used. If matching succeeds, the
26     program outputs the portion of the subject that matched, together with the
27     contents of any captured substrings.
28     </P>
29     <P>
30     If the -g option is given on the command line, the program then goes on to
31     check for further matches of the same regular expression in the same subject
32     string. The logic is a little bit tricky because of the possibility of matching
33     an empty string. Comments in the code explain what is going on.
34     </P>
35     <P>
36 nigel 75 If PCRE is installed in the standard include and library directories for your
37     system, you should be able to compile the demonstration program using this
38     command:
39 nigel 63 <pre>
40 nigel 75 gcc -o pcredemo pcredemo.c -lpcre
41     </pre>
42     If PCRE is installed elsewhere, you may need to add additional options to the
43     command line. For example, on a Unix-like system that has PCRE installed in
44     <i>/usr/local</i>, you can compile the demonstration program using a command
45     like this:
46 nigel 63 <pre>
47 nigel 75 gcc -o pcredemo -I/usr/local/include pcredemo.c -L/usr/local/lib -lpcre
48     </pre>
49     Once you have compiled the demonstration program, you can run simple tests like
50     this:
51     <pre>
52 nigel 63 ./pcredemo 'cat|dog' 'the cat sat on the mat'
53     ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
54 nigel 75 </pre>
55 nigel 63 Note that there is a much more comprehensive test program, called
56 nigel 75 <a href="pcretest.html"><b>pcretest</b>,</a>
57     which supports many more facilities for testing regular expressions and the
58     PCRE library. The <b>pcredemo</b> program is provided as a simple coding
59     example.
60 nigel 63 </P>
61     <P>
62 nigel 75 On some operating systems (e.g. Solaris), when PCRE is not installed in the
63     standard library directory, you may get an error like this when you try to run
64     <b>pcredemo</b>:
65 nigel 63 <pre>
66     ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
67 nigel 75 </pre>
68 nigel 63 This is caused by the way shared library support works on those systems. You
69     need to add
70     <pre>
71     -R/usr/local/lib
72 nigel 75 </pre>
73     (for example) to the compile command to get round this problem.
74 nigel 63 </P>
75 ph10 99 <br><b>
76     AUTHOR
77     </b><br>
78 nigel 63 <P>
79 ph10 99 Philip Hazel
80 nigel 63 <br>
81 ph10 99 University Computing Service
82     <br>
83     Cambridge CB2 3QH, England.
84     <br>
85     </P>
86     <br><b>
87     REVISION
88     </b><br>
89     <P>
90     Last updated: 06 March 2007
91     <br>
92     Copyright &copy; 1997-2007 University of Cambridge.
93     <br>
94 nigel 75 <p>
95     Return to the <a href="index.html">PCRE index page</a>.
96     </p>

Properties

Name Value
svn:eol-style native
svn:keywords "Author Date Id Revision Url"

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12