version 1.1, 2012/02/21 23:05:52
|
version 1.1.1.2, 2013/07/22 08:25:57
|
Line 24 documentation. If you do not have a copy of the PCRE d
|
Line 24 documentation. If you do not have a copy of the PCRE d
|
this listing to re-create <i>pcredemo.c</i>. |
this listing to re-create <i>pcredemo.c</i>. |
</P> |
</P> |
<P> |
<P> |
The program compiles the regular expression that is its first argument, and | The demonstration program, which uses the original PCRE 8-bit library, compiles |
matches it against the subject string in its second argument. No PCRE options | the regular expression that is its first argument, and matches it against the |
are set, and default character tables are used. If matching succeeds, the | subject string in its second argument. No PCRE options are set, and default |
program outputs the portion of the subject that matched, together with the | character tables are used. If matching succeeds, the program outputs the |
contents of any captured substrings. | portion of the subject that matched, together with the contents of any captured |
| substrings. |
</P> |
</P> |
<P> |
<P> |
If the -g option is given on the command line, the program then goes on to |
If the -g option is given on the command line, the program then goes on to |
Line 65 tests like this:
|
Line 66 tests like this:
|
</pre> |
</pre> |
Note that there is a much more comprehensive test program, called |
Note that there is a much more comprehensive test program, called |
<a href="pcretest.html"><b>pcretest</b>,</a> |
<a href="pcretest.html"><b>pcretest</b>,</a> |
which supports many more facilities for testing regular expressions and the | which supports many more facilities for testing regular expressions and both |
PCRE library. The | PCRE libraries. The |
<a href="pcredemo.html"><b>pcredemo</b></a> |
<a href="pcredemo.html"><b>pcredemo</b></a> |
program is provided as a simple coding example. |
program is provided as a simple coding example. |
</P> |
</P> |
Line 100 Cambridge CB2 3QH, England.
|
Line 101 Cambridge CB2 3QH, England.
|
REVISION |
REVISION |
</b><br> |
</b><br> |
<P> |
<P> |
Last updated: 17 November 2010 | Last updated: 10 January 2012 |
<br> |
<br> |
Copyright © 1997-2010 University of Cambridge. | Copyright © 1997-2012 University of Cambridge. |
<br> |
<br> |
<p> |
<p> |
Return to the <a href="index.html">PCRE index page</a>. |
Return to the <a href="index.html">PCRE index page</a>. |