| 154 |
|
|
| 155 |
/caseless/i |
/caseless/i |
| 156 |
|
|
| 157 |
The following table shows additional modifiers for setting PCRE options |
The following table shows additional modifiers for setting PCRE com- |
| 158 |
that do not correspond to anything in Perl: |
pile-time options that do not correspond to anything in Perl: |
| 159 |
|
|
| 160 |
/8 PCRE_UTF8 |
/8 PCRE_UTF8 |
| 161 |
/? PCRE_NO_UTF8_CHECK |
/? PCRE_NO_UTF8_CHECK |
| 267 |
The /M modifier causes the size of memory block used to hold the com- |
The /M modifier causes the size of memory block used to hold the com- |
| 268 |
piled pattern to be output. |
piled pattern to be output. |
| 269 |
|
|
|
The /P modifier causes pcretest to call PCRE via the POSIX wrapper API |
|
|
rather than its native API. When this is done, all other modifiers |
|
|
except /i, /m, and /+ are ignored. REG_ICASE is set if /i is present, |
|
|
and REG_NEWLINE is set if /m is present. The wrapper functions force |
|
|
PCRE_DOLLAR_ENDONLY always, and PCRE_DOTALL unless REG_NEWLINE is set. |
|
|
|
|
| 270 |
The /S modifier causes pcre_study() to be called after the expression |
The /S modifier causes pcre_study() to be called after the expression |
| 271 |
has been compiled, and the results used when the expression is matched. |
has been compiled, and the results used when the expression is matched. |
| 272 |
|
|
| 273 |
|
Using the POSIX wrapper API |
| 274 |
|
|
| 275 |
|
The /P modifier causes pcretest to call PCRE via the POSIX wrapper API |
| 276 |
|
rather than its native API. When /P is set, the following modifiers set |
| 277 |
|
options for the regcomp() function: |
| 278 |
|
|
| 279 |
|
/i REG_ICASE |
| 280 |
|
/m REG_NEWLINE |
| 281 |
|
/N REG_NOSUB |
| 282 |
|
/s REG_DOTALL ) |
| 283 |
|
/U REG_UNGREEDY ) These options are not part of |
| 284 |
|
/W REG_UCP ) the POSIX standard |
| 285 |
|
/8 REG_UTF8 ) |
| 286 |
|
|
| 287 |
|
The /+ modifier works as described above. All other modifiers are |
| 288 |
|
ignored. |
| 289 |
|
|
| 290 |
|
|
| 291 |
DATA LINES |
DATA LINES |
| 292 |
|
|
| 293 |
Before each data line is passed to pcre_exec(), leading and trailing |
Before each data line is passed to pcre_exec(), leading and trailing |
| 294 |
whitespace is removed, and it is then scanned for \ escapes. Some of |
whitespace is removed, and it is then scanned for \ escapes. Some of |
| 295 |
these are pretty esoteric features, intended for checking out some of |
these are pretty esoteric features, intended for checking out some of |
| 296 |
the more complicated features of PCRE. If you are just testing "ordi- |
the more complicated features of PCRE. If you are just testing "ordi- |
| 297 |
nary" regular expressions, you probably don't need any of these. The |
nary" regular expressions, you probably don't need any of these. The |
| 298 |
following escapes are recognized: |
following escapes are recognized: |
| 299 |
|
|
| 300 |
\a alarm (BEL, \x07) |
\a alarm (BEL, \x07) |
| 372 |
\<any> pass the PCRE_NEWLINE_ANY option to pcre_exec() |
\<any> pass the PCRE_NEWLINE_ANY option to pcre_exec() |
| 373 |
or pcre_dfa_exec() |
or pcre_dfa_exec() |
| 374 |
|
|
| 375 |
The escapes that specify line ending sequences are literal strings, |
The escapes that specify line ending sequences are literal strings, |
| 376 |
exactly as shown. No more than one newline setting should be present in |
exactly as shown. No more than one newline setting should be present in |
| 377 |
any data line. |
any data line. |
| 378 |
|
|
| 379 |
A backslash followed by anything else just escapes the anything else. |
A backslash followed by anything else just escapes the anything else. |
| 380 |
If the very last character is a backslash, it is ignored. This gives a |
If the very last character is a backslash, it is ignored. This gives a |
| 381 |
way of passing an empty line as data, since a real empty line termi- |
way of passing an empty line as data, since a real empty line termi- |
| 382 |
nates the data input. |
nates the data input. |
| 383 |
|
|
| 384 |
If \M is present, pcretest calls pcre_exec() several times, with dif- |
If \M is present, pcretest calls pcre_exec() several times, with dif- |
| 385 |
ferent values in the match_limit and match_limit_recursion fields of |
ferent values in the match_limit and match_limit_recursion fields of |
| 386 |
the pcre_extra data structure, until it finds the minimum numbers for |
the pcre_extra data structure, until it finds the minimum numbers for |
| 387 |
each parameter that allow pcre_exec() to complete. The match_limit num- |
each parameter that allow pcre_exec() to complete. The match_limit num- |
| 388 |
ber is a measure of the amount of backtracking that takes place, and |
ber is a measure of the amount of backtracking that takes place, and |
| 389 |
checking it out can be instructive. For most simple matches, the number |
checking it out can be instructive. For most simple matches, the number |
| 390 |
is quite small, but for patterns with very large numbers of matching |
is quite small, but for patterns with very large numbers of matching |
| 391 |
possibilities, it can become large very quickly with increasing length |
possibilities, it can become large very quickly with increasing length |
| 392 |
of subject string. The match_limit_recursion number is a measure of how |
of subject string. The match_limit_recursion number is a measure of how |
| 393 |
much stack (or, if PCRE is compiled with NO_RECURSE, how much heap) |
much stack (or, if PCRE is compiled with NO_RECURSE, how much heap) |
| 394 |
memory is needed to complete the match attempt. |
memory is needed to complete the match attempt. |
| 395 |
|
|
| 396 |
When \O is used, the value specified may be higher or lower than the |
When \O is used, the value specified may be higher or lower than the |
| 397 |
size set by the -O command line option (or defaulted to 45); \O applies |
size set by the -O command line option (or defaulted to 45); \O applies |
| 398 |
only to the call of pcre_exec() for the line in which it appears. |
only to the call of pcre_exec() for the line in which it appears. |
| 399 |
|
|
| 400 |
If the /P modifier was present on the pattern, causing the POSIX wrap- |
If the /P modifier was present on the pattern, causing the POSIX wrap- |
| 401 |
per API to be used, the only option-setting sequences that have any |
per API to be used, the only option-setting sequences that have any |
| 402 |
effect are \B and \Z, causing REG_NOTBOL and REG_NOTEOL, respectively, |
effect are \B, \N, and \Z, causing REG_NOTBOL, REG_NOTEMPTY, and |
| 403 |
to be passed to regexec(). |
REG_NOTEOL, respectively, to be passed to regexec(). |
| 404 |
|
|
| 405 |
The use of \x{hh...} to represent UTF-8 characters is not dependent on |
The use of \x{hh...} to represent UTF-8 characters is not dependent on |
| 406 |
the use of the /8 modifier on the pattern. It is recognized always. |
the use of the /8 modifier on the pattern. It is recognized always. |
| 407 |
There may be any number of hexadecimal digits inside the braces. The |
There may be any number of hexadecimal digits inside the braces. The |
| 408 |
result is from one to six bytes, encoded according to the original |
result is from one to six bytes, encoded according to the original |
| 409 |
UTF-8 rules of RFC 2279. This allows for values in the range 0 to |
UTF-8 rules of RFC 2279. This allows for values in the range 0 to |
| 410 |
0x7FFFFFFF. Note that not all of those are valid Unicode code points, |
0x7FFFFFFF. Note that not all of those are valid Unicode code points, |
| 411 |
or indeed valid UTF-8 characters according to the later rules in RFC |
or indeed valid UTF-8 characters according to the later rules in RFC |
| 412 |
3629. |
3629. |
| 413 |
|
|
| 414 |
|
|
| 415 |
THE ALTERNATIVE MATCHING FUNCTION |
THE ALTERNATIVE MATCHING FUNCTION |
| 416 |
|
|
| 417 |
By default, pcretest uses the standard PCRE matching function, |
By default, pcretest uses the standard PCRE matching function, |
| 418 |
pcre_exec() to match each data line. From release 6.0, PCRE supports an |
pcre_exec() to match each data line. From release 6.0, PCRE supports an |
| 419 |
alternative matching function, pcre_dfa_test(), which operates in a |
alternative matching function, pcre_dfa_test(), which operates in a |
| 420 |
different way, and has some restrictions. The differences between the |
different way, and has some restrictions. The differences between the |
| 421 |
two functions are described in the pcrematching documentation. |
two functions are described in the pcrematching documentation. |
| 422 |
|
|
| 423 |
If a data line contains the \D escape sequence, or if the command line |
If a data line contains the \D escape sequence, or if the command line |
| 424 |
contains the -dfa option, the alternative matching function is called. |
contains the -dfa option, the alternative matching function is called. |
| 425 |
This function finds all possible matches at a given point. If, however, |
This function finds all possible matches at a given point. If, however, |
| 426 |
the \F escape sequence is present in the data line, it stops after the |
the \F escape sequence is present in the data line, it stops after the |
| 427 |
first match is found. This is always the shortest possible match. |
first match is found. This is always the shortest possible match. |
| 428 |
|
|
| 429 |
|
|
| 430 |
DEFAULT OUTPUT FROM PCRETEST |
DEFAULT OUTPUT FROM PCRETEST |
| 431 |
|
|
| 432 |
This section describes the output when the normal matching function, |
This section describes the output when the normal matching function, |
| 433 |
pcre_exec(), is being used. |
pcre_exec(), is being used. |
| 434 |
|
|
| 435 |
When a match succeeds, pcretest outputs the list of captured substrings |
When a match succeeds, pcretest outputs the list of captured substrings |
| 436 |
that pcre_exec() returns, starting with number 0 for the string that |
that pcre_exec() returns, starting with number 0 for the string that |
| 437 |
matched the whole pattern. Otherwise, it outputs "No match" when the |
matched the whole pattern. Otherwise, it outputs "No match" when the |
| 438 |
return is PCRE_ERROR_NOMATCH, and "Partial match:" followed by the par- |
return is PCRE_ERROR_NOMATCH, and "Partial match:" followed by the par- |
| 439 |
tially matching substring when pcre_exec() returns PCRE_ERROR_PARTIAL. |
tially matching substring when pcre_exec() returns PCRE_ERROR_PARTIAL. |
| 440 |
For any other returns, it outputs the PCRE negative error number. Here |
For any other returns, it outputs the PCRE negative error number. Here |
| 441 |
is an example of an interactive pcretest run. |
is an example of an interactive pcretest run. |
| 442 |
|
|
| 443 |
$ pcretest |
$ pcretest |
| 450 |
data> xyz |
data> xyz |
| 451 |
No match |
No match |
| 452 |
|
|
| 453 |
Note that unset capturing substrings that are not followed by one that |
Note that unset capturing substrings that are not followed by one that |
| 454 |
is set are not returned by pcre_exec(), and are not shown by pcretest. |
is set are not returned by pcre_exec(), and are not shown by pcretest. |
| 455 |
In the following example, there are two capturing substrings, but when |
In the following example, there are two capturing substrings, but when |
| 456 |
the first data line is matched, the second, unset substring is not |
the first data line is matched, the second, unset substring is not |
| 457 |
shown. An "internal" unset substring is shown as "<unset>", as for the |
shown. An "internal" unset substring is shown as "<unset>", as for the |
| 458 |
second data line. |
second data line. |
| 459 |
|
|
| 460 |
re> /(a)|(b)/ |
re> /(a)|(b)/ |
| 466 |
1: <unset> |
1: <unset> |
| 467 |
2: b |
2: b |
| 468 |
|
|
| 469 |
If the strings contain any non-printing characters, they are output as |
If the strings contain any non-printing characters, they are output as |
| 470 |
\0x escapes, or as \x{...} escapes if the /8 modifier was present on |
\0x escapes, or as \x{...} escapes if the /8 modifier was present on |
| 471 |
the pattern. See below for the definition of non-printing characters. |
the pattern. See below for the definition of non-printing characters. |
| 472 |
If the pattern has the /+ modifier, the output for substring 0 is fol- |
If the pattern has the /+ modifier, the output for substring 0 is fol- |
| 473 |
lowed by the the rest of the subject string, identified by "0+" like |
lowed by the the rest of the subject string, identified by "0+" like |
| 474 |
this: |
this: |
| 475 |
|
|
| 476 |
re> /cat/+ |
re> /cat/+ |
| 478 |
0: cat |
0: cat |
| 479 |
0+ aract |
0+ aract |
| 480 |
|
|
| 481 |
If the pattern has the /g or /G modifier, the results of successive |
If the pattern has the /g or /G modifier, the results of successive |
| 482 |
matching attempts are output in sequence, like this: |
matching attempts are output in sequence, like this: |
| 483 |
|
|
| 484 |
re> /\Bi(\w\w)/g |
re> /\Bi(\w\w)/g |
| 492 |
|
|
| 493 |
"No match" is output only if the first match attempt fails. |
"No match" is output only if the first match attempt fails. |
| 494 |
|
|
| 495 |
If any of the sequences \C, \G, or \L are present in a data line that |
If any of the sequences \C, \G, or \L are present in a data line that |
| 496 |
is successfully matched, the substrings extracted by the convenience |
is successfully matched, the substrings extracted by the convenience |
| 497 |
functions are output with C, G, or L after the string number instead of |
functions are output with C, G, or L after the string number instead of |
| 498 |
a colon. This is in addition to the normal full list. The string length |
a colon. This is in addition to the normal full list. The string length |
| 499 |
(that is, the return from the extraction function) is given in paren- |
(that is, the return from the extraction function) is given in paren- |
| 500 |
theses after each string for \C and \G. |
theses after each string for \C and \G. |
| 501 |
|
|
| 502 |
Note that whereas patterns can be continued over several lines (a plain |
Note that whereas patterns can be continued over several lines (a plain |
| 503 |
">" prompt is used for continuations), data lines may not. However new- |
">" prompt is used for continuations), data lines may not. However new- |
| 504 |
lines can be included in data by means of the \n escape (or \r, \r\n, |
lines can be included in data by means of the \n escape (or \r, \r\n, |
| 505 |
etc., depending on the newline sequence setting). |
etc., depending on the newline sequence setting). |
| 506 |
|
|
| 507 |
|
|
| 508 |
OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION |
OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION |
| 509 |
|
|
| 510 |
When the alternative matching function, pcre_dfa_exec(), is used (by |
When the alternative matching function, pcre_dfa_exec(), is used (by |
| 511 |
means of the \D escape sequence or the -dfa command line option), the |
means of the \D escape sequence or the -dfa command line option), the |
| 512 |
output consists of a list of all the matches that start at the first |
output consists of a list of all the matches that start at the first |
| 513 |
point in the subject where there is at least one match. For example: |
point in the subject where there is at least one match. For example: |
| 514 |
|
|
| 515 |
re> /(tang|tangerine|tan)/ |
re> /(tang|tangerine|tan)/ |
| 518 |
1: tang |
1: tang |
| 519 |
2: tan |
2: tan |
| 520 |
|
|
| 521 |
(Using the normal matching function on this data finds only "tang".) |
(Using the normal matching function on this data finds only "tang".) |
| 522 |
The longest matching string is always given first (and numbered zero). |
The longest matching string is always given first (and numbered zero). |
| 523 |
After a PCRE_ERROR_PARTIAL return, the output is "Partial match:", fol- |
After a PCRE_ERROR_PARTIAL return, the output is "Partial match:", fol- |
| 524 |
lowed by the partially matching substring. |
lowed by the partially matching substring. |
| 525 |
|
|
| 535 |
1: tan |
1: tan |
| 536 |
0: tan |
0: tan |
| 537 |
|
|
| 538 |
Since the matching function does not support substring capture, the |
Since the matching function does not support substring capture, the |
| 539 |
escape sequences that are concerned with captured substrings are not |
escape sequences that are concerned with captured substrings are not |
| 540 |
relevant. |
relevant. |
| 541 |
|
|
| 542 |
|
|
| 543 |
RESTARTING AFTER A PARTIAL MATCH |
RESTARTING AFTER A PARTIAL MATCH |
| 544 |
|
|
| 545 |
When the alternative matching function has given the PCRE_ERROR_PARTIAL |
When the alternative matching function has given the PCRE_ERROR_PARTIAL |
| 546 |
return, indicating that the subject partially matched the pattern, you |
return, indicating that the subject partially matched the pattern, you |
| 547 |
can restart the match with additional subject data by means of the \R |
can restart the match with additional subject data by means of the \R |
| 548 |
escape sequence. For example: |
escape sequence. For example: |
| 549 |
|
|
| 550 |
re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/ |
re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/ |
| 553 |
data> n05\R\D |
data> n05\R\D |
| 554 |
0: n05 |
0: n05 |
| 555 |
|
|
| 556 |
For further information about partial matching, see the pcrepartial |
For further information about partial matching, see the pcrepartial |
| 557 |
documentation. |
documentation. |
| 558 |
|
|
| 559 |
|
|
| 560 |
CALLOUTS |
CALLOUTS |
| 561 |
|
|
| 562 |
If the pattern contains any callout requests, pcretest's callout func- |
If the pattern contains any callout requests, pcretest's callout func- |
| 563 |
tion is called during matching. This works with both matching func- |
tion is called during matching. This works with both matching func- |
| 564 |
tions. By default, the called function displays the callout number, the |
tions. By default, the called function displays the callout number, the |
| 565 |
start and current positions in the text at the callout time, and the |
start and current positions in the text at the callout time, and the |
| 566 |
next pattern item to be tested. For example, the output |
next pattern item to be tested. For example, the output |
| 567 |
|
|
| 568 |
--->pqrabcdef |
--->pqrabcdef |
| 569 |
0 ^ ^ \d |
0 ^ ^ \d |
| 570 |
|
|
| 571 |
indicates that callout number 0 occurred for a match attempt starting |
indicates that callout number 0 occurred for a match attempt starting |
| 572 |
at the fourth character of the subject string, when the pointer was at |
at the fourth character of the subject string, when the pointer was at |
| 573 |
the seventh character of the data, and when the next pattern item was |
the seventh character of the data, and when the next pattern item was |
| 574 |
\d. Just one circumflex is output if the start and current positions |
\d. Just one circumflex is output if the start and current positions |
| 575 |
are the same. |
are the same. |
| 576 |
|
|
| 577 |
Callouts numbered 255 are assumed to be automatic callouts, inserted as |
Callouts numbered 255 are assumed to be automatic callouts, inserted as |
| 578 |
a result of the /C pattern modifier. In this case, instead of showing |
a result of the /C pattern modifier. In this case, instead of showing |
| 579 |
the callout number, the offset in the pattern, preceded by a plus, is |
the callout number, the offset in the pattern, preceded by a plus, is |
| 580 |
output. For example: |
output. For example: |
| 581 |
|
|
| 582 |
re> /\d?[A-E]\*/C |
re> /\d?[A-E]\*/C |
| 588 |
+10 ^ ^ |
+10 ^ ^ |
| 589 |
0: E* |
0: E* |
| 590 |
|
|
| 591 |
The callout function in pcretest returns zero (carry on matching) by |
The callout function in pcretest returns zero (carry on matching) by |
| 592 |
default, but you can use a \C item in a data line (as described above) |
default, but you can use a \C item in a data line (as described above) |
| 593 |
to change this. |
to change this. |
| 594 |
|
|
| 595 |
Inserting callouts can be helpful when using pcretest to check compli- |
Inserting callouts can be helpful when using pcretest to check compli- |
| 596 |
cated regular expressions. For further information about callouts, see |
cated regular expressions. For further information about callouts, see |
| 597 |
the pcrecallout documentation. |
the pcrecallout documentation. |
| 598 |
|
|
| 599 |
|
|
| 600 |
NON-PRINTING CHARACTERS |
NON-PRINTING CHARACTERS |
| 601 |
|
|
| 602 |
When pcretest is outputting text in the compiled version of a pattern, |
When pcretest is outputting text in the compiled version of a pattern, |
| 603 |
bytes other than 32-126 are always treated as non-printing characters |
bytes other than 32-126 are always treated as non-printing characters |
| 604 |
are are therefore shown as hex escapes. |
are are therefore shown as hex escapes. |
| 605 |
|
|
| 606 |
When pcretest is outputting text that is a matched part of a subject |
When pcretest is outputting text that is a matched part of a subject |
| 607 |
string, it behaves in the same way, unless a different locale has been |
string, it behaves in the same way, unless a different locale has been |
| 608 |
set for the pattern (using the /L modifier). In this case, the |
set for the pattern (using the /L modifier). In this case, the |
| 609 |
isprint() function to distinguish printing and non-printing characters. |
isprint() function to distinguish printing and non-printing characters. |
| 610 |
|
|
| 611 |
|
|
| 612 |
SAVING AND RELOADING COMPILED PATTERNS |
SAVING AND RELOADING COMPILED PATTERNS |
| 613 |
|
|
| 614 |
The facilities described in this section are not available when the |
The facilities described in this section are not available when the |
| 615 |
POSIX inteface to PCRE is being used, that is, when the /P pattern mod- |
POSIX inteface to PCRE is being used, that is, when the /P pattern mod- |
| 616 |
ifier is specified. |
ifier is specified. |
| 617 |
|
|
| 618 |
When the POSIX interface is not in use, you can cause pcretest to write |
When the POSIX interface is not in use, you can cause pcretest to write |
| 619 |
a compiled pattern to a file, by following the modifiers with > and a |
a compiled pattern to a file, by following the modifiers with > and a |
| 620 |
file name. For example: |
file name. For example: |
| 621 |
|
|
| 622 |
/pattern/im >/some/file |
/pattern/im >/some/file |
| 623 |
|
|
| 624 |
See the pcreprecompile documentation for a discussion about saving and |
See the pcreprecompile documentation for a discussion about saving and |
| 625 |
re-using compiled patterns. |
re-using compiled patterns. |
| 626 |
|
|
| 627 |
The data that is written is binary. The first eight bytes are the |
The data that is written is binary. The first eight bytes are the |
| 628 |
length of the compiled pattern data followed by the length of the |
length of the compiled pattern data followed by the length of the |
| 629 |
optional study data, each written as four bytes in big-endian order |
optional study data, each written as four bytes in big-endian order |
| 630 |
(most significant byte first). If there is no study data (either the |
(most significant byte first). If there is no study data (either the |
| 631 |
pattern was not studied, or studying did not return any data), the sec- |
pattern was not studied, or studying did not return any data), the sec- |
| 632 |
ond length is zero. The lengths are followed by an exact copy of the |
ond length is zero. The lengths are followed by an exact copy of the |
| 633 |
compiled pattern. If there is additional study data, this follows imme- |
compiled pattern. If there is additional study data, this follows imme- |
| 634 |
diately after the compiled pattern. After writing the file, pcretest |
diately after the compiled pattern. After writing the file, pcretest |
| 635 |
expects to read a new pattern. |
expects to read a new pattern. |
| 636 |
|
|
| 637 |
A saved pattern can be reloaded into pcretest by specifing < and a file |
A saved pattern can be reloaded into pcretest by specifing < and a file |
| 638 |
name instead of a pattern. The name of the file must not contain a < |
name instead of a pattern. The name of the file must not contain a < |
| 639 |
character, as otherwise pcretest will interpret the line as a pattern |
character, as otherwise pcretest will interpret the line as a pattern |
| 640 |
delimited by < characters. For example: |
delimited by < characters. For example: |
| 641 |
|
|
| 642 |
re> </some/file |
re> </some/file |
| 643 |
Compiled regex loaded from /some/file |
Compiled regex loaded from /some/file |
| 644 |
No study data |
No study data |
| 645 |
|
|
| 646 |
When the pattern has been loaded, pcretest proceeds to read data lines |
When the pattern has been loaded, pcretest proceeds to read data lines |
| 647 |
in the usual way. |
in the usual way. |
| 648 |
|
|
| 649 |
You can copy a file written by pcretest to a different host and reload |
You can copy a file written by pcretest to a different host and reload |
| 650 |
it there, even if the new host has opposite endianness to the one on |
it there, even if the new host has opposite endianness to the one on |
| 651 |
which the pattern was compiled. For example, you can compile on an i86 |
which the pattern was compiled. For example, you can compile on an i86 |
| 652 |
machine and run on a SPARC machine. |
machine and run on a SPARC machine. |
| 653 |
|
|
| 654 |
File names for saving and reloading can be absolute or relative, but |
File names for saving and reloading can be absolute or relative, but |
| 655 |
note that the shell facility of expanding a file name that starts with |
note that the shell facility of expanding a file name that starts with |
| 656 |
a tilde (~) is not available. |
a tilde (~) is not available. |
| 657 |
|
|
| 658 |
The ability to save and reload files in pcretest is intended for test- |
The ability to save and reload files in pcretest is intended for test- |
| 659 |
ing and experimentation. It is not intended for production use because |
ing and experimentation. It is not intended for production use because |
| 660 |
only a single pattern can be written to a file. Furthermore, there is |
only a single pattern can be written to a file. Furthermore, there is |
| 661 |
no facility for supplying custom character tables for use with a |
no facility for supplying custom character tables for use with a |
| 662 |
reloaded pattern. If the original pattern was compiled with custom |
reloaded pattern. If the original pattern was compiled with custom |
| 663 |
tables, an attempt to match a subject string using a reloaded pattern |
tables, an attempt to match a subject string using a reloaded pattern |
| 664 |
is likely to cause pcretest to crash. Finally, if you attempt to load |
is likely to cause pcretest to crash. Finally, if you attempt to load |
| 665 |
a file that is not in the correct format, the result is undefined. |
a file that is not in the correct format, the result is undefined. |
| 666 |
|
|
| 667 |
|
|
| 668 |
SEE ALSO |
SEE ALSO |
| 669 |
|
|
| 670 |
pcre(3), pcreapi(3), pcrecallout(3), pcrematching(3), pcrepartial(d), |
pcre(3), pcreapi(3), pcrecallout(3), pcrematching(3), pcrepartial(d), |
| 671 |
pcrepattern(3), pcreprecompile(3). |
pcrepattern(3), pcreprecompile(3). |
| 672 |
|
|
| 673 |
|
|
| 680 |
|
|
| 681 |
REVISION |
REVISION |
| 682 |
|
|
| 683 |
Last updated: 12 May 2010 |
Last updated: 16 May 2010 |
| 684 |
Copyright (c) 1997-2010 University of Cambridge. |
Copyright (c) 1997-2010 University of Cambridge. |