$54 GRAYBYTE WORDPRESS FILE MANAGER $77

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/pcre802/usr/share/man/man3/

HOME
Current File : /opt/alt/pcre802/usr/share/man/man3//pcresample.3
.TH PCRESAMPLE 3
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE SAMPLE PROGRAM"
.rs
.sp
A simple, complete demonstration program, to get you started with using PCRE,
is supplied in the file \fIpcredemo.c\fP in the PCRE distribution. A listing of
this program is given in the
.\" HREF
\fBpcredemo\fP
.\"
documentation. If you do not have a copy of the PCRE distribution, you can save
this listing to re-create \fIpcredemo.c\fP.
.P
The program compiles the regular expression that is its first argument, and
matches it against the subject string in its second argument. No PCRE options
are set, and default character tables are used. If matching succeeds, the
program outputs the portion of the subject that matched, together with the
contents of any captured substrings.
.P
If the -g option is given on the command line, the program then goes on to
check for further matches of the same regular expression in the same subject
string. The logic is a little bit tricky because of the possibility of matching
an empty string. Comments in the code explain what is going on.
.P
If PCRE is installed in the standard include and library directories for your
operating system, you should be able to compile the demonstration program using
this command:
.sp
  gcc -o pcredemo pcredemo.c -lpcre
.sp
If PCRE is installed elsewhere, you may need to add additional options to the
command line. For example, on a Unix-like system that has PCRE installed in
\fI/usr/local\fP, you can compile the demonstration program using a command
like this:
.sp
.\" JOINSH
  gcc -o pcredemo -I/usr/local/include pcredemo.c \e
      -L/usr/local/lib -lpcre
.sp
Once you have compiled the demonstration program, you can run simple tests like
this:
.sp
  ./pcredemo 'cat|dog' 'the cat sat on the mat'
  ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
.sp
Note that there is a much more comprehensive test program, called
.\" HREF
\fBpcretest\fP,
.\"
which supports many more facilities for testing regular expressions and the
PCRE library. The
.\" HREF
\fBpcredemo\fP
.\"
program is provided as a simple coding example.
.P
When you try to run
.\" HREF
\fBpcredemo\fP
.\"
when PCRE is not installed in the standard library directory, you may get an
error like this on some operating systems (e.g. Solaris):
.sp
  ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
.sp
This is caused by the way shared library support works on those systems. You
need to add
.sp
  -R/usr/local/lib
.sp
(for example) to the compile command to get round this problem.
.
.
.SH AUTHOR
.rs
.sp
.nf
Philip Hazel
University Computing Service
Cambridge CB2 3QH, England.
.fi
.
.
.SH REVISION
.rs
.sp
.nf
Last updated: 30 September 2009
Copyright (c) 1997-2009 University of Cambridge.
.fi


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 8.39 PM
root / root
0755
pcre.3
12.353 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_compile.3
2.911 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_compile2.3
2.997 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_config.3
1.979 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_copy_named_substring.3
1.21 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_copy_substring.3
1.08 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_dfa_exec.3
3.853 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_exec.3
3.209 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_free_substring.3
0.566 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_free_substring_list.3
0.563 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_fullinfo.3
2.185 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_get_named_substring.3
1.339 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_get_stringnumber.3
0.964 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_get_stringtable_entries.3
1.117 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_get_substring.3
1.235 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_get_substring_list.3
1.255 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_info.3
0.474 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_maketables.3
0.706 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_refcount.3
0.729 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_study.3
1.105 KB
4 Dec 2019 9.00 PM
root / root
0644
pcre_version.3
0.459 KB
4 Dec 2019 9.00 PM
root / root
0644
pcreapi.3
87.88 KB
4 Dec 2019 9.00 PM
root / root
0644
pcrebuild.3
12.574 KB
4 Dec 2019 9.00 PM
root / root
0644
pcrecallout.3
7.478 KB
4 Dec 2019 9.00 PM
root / root
0644
pcrecompat.3
6.796 KB
4 Dec 2019 9.00 PM
root / root
0644
pcrecpp.3
12.258 KB
4 Dec 2019 9.00 PM
root / root
0644
pcrematching.3
8.139 KB
4 Dec 2019 9.00 PM
root / root
0644
pcrepartial.3
15.904 KB
4 Dec 2019 9.00 PM
root / root
0644
pcrepattern.3
97.666 KB
4 Dec 2019 9.00 PM
root / root
0644
pcreperform.3
6.539 KB
4 Dec 2019 9.00 PM
root / root
0644
pcreposix.3
10.063 KB
4 Dec 2019 9.00 PM
root / root
0644
pcreprecompile.3
5.33 KB
4 Dec 2019 9.00 PM
root / root
0644
pcresample.3
2.706 KB
4 Dec 2019 9.00 PM
root / root
0644
pcrestack.3
6.881 KB
4 Dec 2019 9.00 PM
root / root
0644
pcresyntax.3
10.688 KB
4 Dec 2019 9.00 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF