/[pcre]/code/trunk/doc/pcretest.txt
ViewVC logotype

Diff of /code/trunk/doc/pcretest.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 877 by ph10, Sat Jan 14 11:16:23 2012 UTC revision 878 by ph10, Sun Jan 15 15:44:47 2012 UTC
# Line 500  DATA LINES Line 500  DATA LINES
500         decimal digits inside the braces; invalid  values  provoke  error  mes-         decimal digits inside the braces; invalid  values  provoke  error  mes-
501         sages.         sages.
502    
503         Note that \xhh specifies one byte in UTF-8 mode; this makes it possible         Note  that  \xhh  specifies one byte rather than one character in UTF-8
504         to construct invalid UTF-8 sequences for testing purposes. On the other         mode; this makes it possible to construct invalid UTF-8  sequences  for
505         hand,  \x{hh} is interpreted as a UTF-8 character in UTF-8 mode, gener-         testing  purposes.  On the other hand, \x{hh} is interpreted as a UTF-8
506         ating more than one byte if the value is greater than 127. When testing         character in UTF-8 mode, generating more than one byte if the value  is
507         the 8-bit library not in UTF-8 mode, \x{hh} generates one byte for val-         greater  than  127.   When testing the 8-bit library not in UTF-8 mode,
508         ues less than 256, and causes an error for greater values.         \x{hh} generates one byte for values less than 256, and causes an error
509           for greater values.
510    
511         In UTF-16 mode, all 4-digit \x{hhhh} values are accepted. This makes it         In UTF-16 mode, all 4-digit \x{hhhh} values are accepted. This makes it
512         possible to construct invalid UTF-16 sequences for testing purposes.         possible to construct invalid UTF-16 sequences for testing purposes.
513    
514         The  escapes  that  specify  line ending sequences are literal strings,         The escapes that specify line ending  sequences  are  literal  strings,
515         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
516         any data line.         any data line.
517    
518         A  backslash  followed by anything else just escapes the anything else.         A backslash followed by anything else just escapes the  anything  else.
519         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
520         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-
521         nates the data input.         nates the data input.
522    
523         The \J escape provides a way of setting the maximum stack size that  is         The  \J escape provides a way of setting the maximum stack size that is
524         used  by the just-in-time optimization code. It is ignored if JIT opti-         used by the just-in-time optimization code. It is ignored if JIT  opti-
525         mization is not being used. Providing a stack that is larger  than  the         mization  is  not being used. Providing a stack that is larger than the
526         default 32K is necessary only for very complicated patterns.         default 32K is necessary only for very complicated patterns.
527    
528         If  \M  is  present, pcretest calls pcre[16]_exec() several times, with         If \M is present, pcretest calls pcre[16]_exec()  several  times,  with
529         different values in the match_limit and match_limit_recursion fields of         different values in the match_limit and match_limit_recursion fields of
530         the  pcre[16]_extra  data structure, until it finds the minimum numbers         the pcre[16]_extra data structure, until it finds the  minimum  numbers
531         for each parameter  that  allow  pcre[16]_exec()  to  complete  without         for  each  parameter  that  allow  pcre[16]_exec()  to complete without
532         error.  Because this is testing a specific feature of the normal inter-         error. Because this is testing a specific feature of the normal  inter-
533         pretive pcre[16]_exec() execution, the use of any JIT optimization that         pretive pcre[16]_exec() execution, the use of any JIT optimization that
534         might have been set up by the /S+ qualifier of -s+ option is disabled.         might have been set up by the /S+ qualifier of -s+ option is disabled.
535    
536         The  match_limit number is a measure of the amount of backtracking that         The match_limit number is a measure of the amount of backtracking  that
537         takes place, and checking it out can be instructive.  For  most  simple         takes  place,  and  checking it out can be instructive. For most simple
538         matches,  the  number  is quite small, but for patterns with very large         matches, the number is quite small, but for patterns  with  very  large
539         numbers of matching possibilities, it can  become  large  very  quickly         numbers  of  matching  possibilities,  it can become large very quickly
540         with  increasing  length  of  subject string. The match_limit_recursion         with increasing length of  subject  string.  The  match_limit_recursion
541         number is a measure of how much stack (or, if  PCRE  is  compiled  with         number  is  a  measure  of how much stack (or, if PCRE is compiled with
542         NO_RECURSE,  how  much  heap)  memory  is  needed to complete the match         NO_RECURSE, how much heap) memory  is  needed  to  complete  the  match
543         attempt.         attempt.
544    
545         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
546         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
547         only to the call of pcre[16]_exec() for the line in which it appears.         only to the call of pcre[16]_exec() for the line in which it appears.
548    
549         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-
550         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
551         effect are \B,  \N,  and  \Z,  causing  REG_NOTBOL,  REG_NOTEMPTY,  and         effect  are  \B,  \N,  and  \Z,  causing  REG_NOTBOL, REG_NOTEMPTY, and
552         REG_NOTEOL, respectively, to be passed to regexec().         REG_NOTEOL, respectively, to be passed to regexec().
553    
554    
555  THE ALTERNATIVE MATCHING FUNCTION  THE ALTERNATIVE MATCHING FUNCTION
556    
557         By   default,  pcretest  uses  the  standard  PCRE  matching  function,         By  default,  pcretest  uses  the  standard  PCRE  matching   function,
558         pcre[16]_exec() to match each data line. PCRE also supports an alterna-         pcre[16]_exec() to match each data line. PCRE also supports an alterna-
559         tive  matching  function, pcre[16]_dfa_test(), which operates in a dif-         tive matching function, pcre[16]_dfa_test(), which operates in  a  dif-
560         ferent way, and has some restrictions. The differences between the  two         ferent  way, and has some restrictions. The differences between the two
561         functions are described in the pcrematching documentation.         functions are described in the pcrematching documentation.
562    
563         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
564         contains the -dfa option, the alternative matching  function  is  used.         contains  the  -dfa  option, the alternative matching function is used.
565         This function finds all possible matches at a given point. If, however,         This function finds all possible matches at a given point. If, however,
566         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
567         first match is found. This is always the shortest possible match.         first match is found. This is always the shortest possible match.
568    
569    
570  DEFAULT OUTPUT FROM PCRETEST  DEFAULT OUTPUT FROM PCRETEST
571    
572         This  section  describes  the output when the normal matching function,         This section describes the output when the  normal  matching  function,
573         pcre[16]_exec(), is being used.         pcre[16]_exec(), is being used.
574    
575         When a match succeeds, pcretest outputs the list of captured substrings         When a match succeeds, pcretest outputs the list of captured substrings
576         that  pcre[16]_exec()  returns,  starting  with number 0 for the string         that pcre[16]_exec() returns, starting with number  0  for  the  string
577         that matched the whole pattern. Otherwise, it outputs "No  match"  when         that  matched  the whole pattern. Otherwise, it outputs "No match" when
578         the  return is PCRE_ERROR_NOMATCH, and "Partial match:" followed by the         the return is PCRE_ERROR_NOMATCH, and "Partial match:" followed by  the
579         partially   matching    substring    when    pcre[16]_exec()    returns         partially    matching    substring    when    pcre[16]_exec()   returns
580         PCRE_ERROR_PARTIAL.  (Note  that  this is the entire substring that was         PCRE_ERROR_PARTIAL. (Note that this is the entire  substring  that  was
581         inspected during the partial match; it may  include  characters  before         inspected  during  the  partial match; it may include characters before
582         the  actual  match  start  if a lookbehind assertion, \K, \b, or \B was         the actual match start if a lookbehind assertion, \K,  \b,  or  \B  was
583         involved.) For any other return, pcretest  outputs  the  PCRE  negative         involved.)  For  any  other  return, pcretest outputs the PCRE negative
584         error  number  and a short descriptive phrase. If the error is a failed         error number and a short descriptive phrase. If the error is  a  failed
585         UTF string check, the offset of the start of the failing character  and         UTF  string check, the offset of the start of the failing character and
586         the  reason  code are also output, provided that the size of the output         the reason code are also output, provided that the size of  the  output
587         vector is at least two. Here is an example of an  interactive  pcretest         vector  is  at least two. Here is an example of an interactive pcretest
588         run.         run.
589    
590           $ pcretest           $ pcretest
# Line 597  DEFAULT OUTPUT FROM PCRETEST Line 598  DEFAULT OUTPUT FROM PCRETEST
598           No match           No match
599    
600         Unset capturing substrings that are not followed by one that is set are         Unset capturing substrings that are not followed by one that is set are
601         not returned by pcre[16]_exec(), and are not shown by pcretest. In  the         not  returned by pcre[16]_exec(), and are not shown by pcretest. In the
602         following  example,  there  are  two capturing substrings, but when the         following example, there are two capturing  substrings,  but  when  the
603         first data line is matched, the second, unset substring is  not  shown.         first  data  line is matched, the second, unset substring is not shown.
604         An  "internal" unset substring is shown as "<unset>", as for the second         An "internal" unset substring is shown as "<unset>", as for the  second
605         data line.         data line.
606    
607             re> /(a)|(b)/             re> /(a)|(b)/
# Line 612  DEFAULT OUTPUT FROM PCRETEST Line 613  DEFAULT OUTPUT FROM PCRETEST
613            1: <unset>            1: <unset>
614            2: b            2: b
615    
616         If the strings contain any non-printing characters, they are output  as         If  the strings contain any non-printing characters, they are output as
617         \xhh  escapes  if  the  value is less than 256 and UTF mode is not set.         \xhh escapes if the value is less than 256 and UTF  mode  is  not  set.
618         Otherwise they are output as \x{hh...} escapes. See below for the defi-         Otherwise they are output as \x{hh...} escapes. See below for the defi-
619         nition  of non-printing characters. If the pattern has the /+ modifier,         nition of non-printing characters. If the pattern has the /+  modifier,
620         the output for substring 0 is followed by the the rest of  the  subject         the  output  for substring 0 is followed by the the rest of the subject
621         string, identified by "0+" like this:         string, identified by "0+" like this:
622    
623             re> /cat/+             re> /cat/+
# Line 624  DEFAULT OUTPUT FROM PCRETEST Line 625  DEFAULT OUTPUT FROM PCRETEST
625            0: cat            0: cat
626            0+ aract            0+ aract
627    
628         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
629         matching attempts are output in sequence, like this:         matching attempts are output in sequence, like this:
630    
631             re> /\Bi(\w\w)/g             re> /\Bi(\w\w)/g
# Line 636  DEFAULT OUTPUT FROM PCRETEST Line 637  DEFAULT OUTPUT FROM PCRETEST
637            0: ipp            0: ipp
638            1: pp            1: pp
639    
640         "No match" is output only if the first match attempt fails. Here is  an         "No  match" is output only if the first match attempt fails. Here is an
641         example  of a failure message (the offset 4 that is specified by \>4 is         example of a failure message (the offset 4 that is specified by \>4  is
642         past the end of the subject string):         past the end of the subject string):
643    
644             re> /xyz/             re> /xyz/
645           data> xyz\>4           data> xyz\>4
646           Error -24 (bad offset value)           Error -24 (bad offset value)
647    
648         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
649         is  successfully  matched,  the substrings extracted by the convenience         is successfully matched, the substrings extracted  by  the  convenience
650         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
651         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
652         (that is, the return from the extraction function) is given  in  paren-         (that  is,  the return from the extraction function) is given in paren-
653         theses after each string for \C and \G.         theses after each string for \C and \G.
654    
655         Note that whereas patterns can be continued over several lines (a plain         Note that whereas patterns can be continued over several lines (a plain
656         ">" prompt is used for continuations), data lines may not. However new-         ">" prompt is used for continuations), data lines may not. However new-
657         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,
658         etc., depending on the newline sequence setting).         etc., depending on the newline sequence setting).
659    
660    
661  OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION  OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION
662    
663         When the alternative matching function,  pcre[16]_dfa_exec(),  is  used         When  the  alternative  matching function, pcre[16]_dfa_exec(), is used
664         (by  means  of the \D escape sequence or the -dfa command line option),         (by means of the \D escape sequence or the -dfa command  line  option),
665         the output consists of a list of all the  matches  that  start  at  the         the  output  consists  of  a  list of all the matches that start at the
666         first point in the subject where there is at least one match. For exam-         first point in the subject where there is at least one match. For exam-
667         ple:         ple:
668    
# Line 671  OUTPUT FROM THE ALTERNATIVE MATCHING FUN Line 672  OUTPUT FROM THE ALTERNATIVE MATCHING FUN
672            1: tang            1: tang
673            2: tan            2: tan
674    
675         (Using the normal matching function on this data  finds  only  "tang".)         (Using  the  normal  matching function on this data finds only "tang".)
676         The  longest matching string is always given first (and numbered zero).         The longest matching string is always given first (and numbered  zero).
677         After a PCRE_ERROR_PARTIAL return, the output is "Partial match:", fol-         After a PCRE_ERROR_PARTIAL return, the output is "Partial match:", fol-
678         lowed  by  the  partially  matching  substring.  (Note that this is the         lowed by the partially matching  substring.  (Note  that  this  is  the
679         entire substring that was inspected during the partial  match;  it  may         entire  substring  that  was inspected during the partial match; it may
680         include characters before the actual match start if a lookbehind asser-         include characters before the actual match start if a lookbehind asser-
681         tion, \K, \b, or \B was involved.)         tion, \K, \b, or \B was involved.)
682    
# Line 691  OUTPUT FROM THE ALTERNATIVE MATCHING FUN Line 692  OUTPUT FROM THE ALTERNATIVE MATCHING FUN
692            1: tan            1: tan
693            0: tan            0: tan
694    
695         Since  the  matching  function  does not support substring capture, the         Since the matching function does not  support  substring  capture,  the
696         escape sequences that are concerned with captured  substrings  are  not         escape  sequences  that  are concerned with captured substrings are not
697         relevant.         relevant.
698    
699    
700  RESTARTING AFTER A PARTIAL MATCH  RESTARTING AFTER A PARTIAL MATCH
701    
702         When the alternative matching function has given the PCRE_ERROR_PARTIAL         When the alternative matching function has given the PCRE_ERROR_PARTIAL
703         return, indicating that the subject partially matched the pattern,  you         return,  indicating that the subject partially matched the pattern, you
704         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
705         escape sequence. For example:         escape sequence. For example:
706    
707             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$/
# Line 709  RESTARTING AFTER A PARTIAL MATCH Line 710  RESTARTING AFTER A PARTIAL MATCH
710           data> n05\R\D           data> n05\R\D
711            0: n05            0: n05
712    
713         For further information about partial  matching,  see  the  pcrepartial         For  further  information  about  partial matching, see the pcrepartial
714         documentation.         documentation.
715    
716    
717  CALLOUTS  CALLOUTS
718    
719         If  the pattern contains any callout requests, pcretest's callout func-         If the pattern contains any callout requests, pcretest's callout  func-
720         tion is called during matching. This works  with  both  matching  func-         tion  is  called  during  matching. This works with both matching func-
721         tions. By default, the called function displays the callout number, the         tions. By default, the called function displays the callout number, the
722         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
723         next pattern item to be tested. For example:         next pattern item to be tested. For example:
724    
725           --->pqrabcdef           --->pqrabcdef
726             0    ^  ^     \d             0    ^  ^     \d
727    
728         This  output  indicates  that  callout  number  0  occurred for a match         This output indicates that  callout  number  0  occurred  for  a  match
729         attempt starting at the fourth character of the  subject  string,  when         attempt  starting  at  the fourth character of the subject string, when
730         the pointer was at the seventh character of the data, and when the next         the pointer was at the seventh character of the data, and when the next
731         pattern item was \d. Just one circumflex is output  if  the  start  and         pattern  item  was  \d.  Just one circumflex is output if the start and
732         current positions are the same.         current positions are the same.
733    
734         Callouts numbered 255 are assumed to be automatic callouts, inserted as         Callouts numbered 255 are assumed to be automatic callouts, inserted as
735         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
736         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
737         output. For example:         output. For example:
738    
739             re> /\d?[A-E]\*/C             re> /\d?[A-E]\*/C
# Line 745  CALLOUTS Line 746  CALLOUTS
746            0: E*            0: E*
747    
748         If a pattern contains (*MARK) items, an additional line is output when-         If a pattern contains (*MARK) items, an additional line is output when-
749         ever  a  change  of  latest mark is passed to the callout function. For         ever a change of latest mark is passed to  the  callout  function.  For
750         example:         example:
751    
752             re> /a(*MARK:X)bc/C             re> /a(*MARK:X)bc/C
# Line 759  CALLOUTS Line 760  CALLOUTS
760           +12 ^  ^           +12 ^  ^
761            0: abc            0: abc
762    
763         The mark changes between matching "a" and "b", but stays the  same  for         The  mark  changes between matching "a" and "b", but stays the same for
764         the  rest  of  the match, so nothing more is output. If, as a result of         the rest of the match, so nothing more is output. If, as  a  result  of
765         backtracking, the mark reverts to being unset, the  text  "<unset>"  is         backtracking,  the  mark  reverts to being unset, the text "<unset>" is
766         output.         output.
767    
768         The  callout  function  in pcretest returns zero (carry on matching) by         The callout function in pcretest returns zero (carry  on  matching)  by
769         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)
770         to change this and other parameters of the callout.         to change this and other parameters of the callout.
771    
772         Inserting  callouts can be helpful when using pcretest to check compli-         Inserting callouts can be helpful when using pcretest to check  compli-
773         cated regular expressions. For further information about callouts,  see         cated  regular expressions. For further information about callouts, see
774         the pcrecallout documentation.         the pcrecallout documentation.
775    
776    
777  NON-PRINTING CHARACTERS  NON-PRINTING CHARACTERS
778    
779         When  pcretest is outputting text in the compiled version of a pattern,         When pcretest is outputting text in the compiled version of a  pattern,
780         bytes other than 32-126 are always treated as  non-printing  characters         bytes  other  than 32-126 are always treated as non-printing characters
781         are are therefore shown as hex escapes.         are are therefore shown as hex escapes.
782    
783         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
784         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
785         set  for  the  pattern  (using  the  /L  modifier).  In  this case, the         set for the  pattern  (using  the  /L  modifier).  In  this  case,  the
786         isprint() function to distinguish printing and non-printing characters.         isprint() function to distinguish printing and non-printing characters.
787    
788    
789  SAVING AND RELOADING COMPILED PATTERNS  SAVING AND RELOADING COMPILED PATTERNS
790    
791         The facilities described in this section are  not  available  when  the         The  facilities  described  in  this section are not available when the
792         POSIX  interface  to  PCRE  is being used, that is, when the /P pattern         POSIX interface to PCRE is being used, that is,  when  the  /P  pattern
793         modifier is specified.         modifier is specified.
794    
795         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
796         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
797         file name.  For example:         file name.  For example:
798    
799           /pattern/im >/some/file           /pattern/im >/some/file
800    
801         See the pcreprecompile documentation for a discussion about saving  and         See  the pcreprecompile documentation for a discussion about saving and
802         re-using  compiled patterns.  Note that if the pattern was successfully         re-using compiled patterns.  Note that if the pattern was  successfully
803         studied with JIT optimization, the JIT data cannot be saved.         studied with JIT optimization, the JIT data cannot be saved.
804    
805         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
806         length  of  the  compiled  pattern  data  followed by the length of the         length of the compiled pattern data  followed  by  the  length  of  the
807         optional study data, each written as four  bytes  in  big-endian  order         optional  study  data,  each  written as four bytes in big-endian order
808         (most  significant  byte  first). If there is no study data (either the         (most significant byte first). If there is no study  data  (either  the
809         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-
810         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
811         compiled pattern. If there is additional study  data,  this  (excluding         compiled  pattern.  If  there is additional study data, this (excluding
812         any  JIT  data)  follows  immediately after the compiled pattern. After         any JIT data) follows immediately after  the  compiled  pattern.  After
813         writing the file, pcretest expects to read a new pattern.         writing the file, pcretest expects to read a new pattern.
814    
815         A saved pattern can be reloaded into pcretest by  specifying  <  and  a         A  saved  pattern  can  be reloaded into pcretest by specifying < and a
816         file name instead of a pattern. The name of the file must not contain a         file name instead of a pattern. The name of the file must not contain a
817         < character, as otherwise pcretest will interpret the line as a pattern         < character, as otherwise pcretest will interpret the line as a pattern
818         delimited by < characters.  For example:         delimited by < characters.  For example:
# Line 820  SAVING AND RELOADING COMPILED PATTERNS Line 821  SAVING AND RELOADING COMPILED PATTERNS
821           Compiled pattern loaded from /some/file           Compiled pattern loaded from /some/file
822           No study data           No study data
823    
824         If  the  pattern  was previously studied with the JIT optimization, the         If the pattern was previously studied with the  JIT  optimization,  the
825         JIT information cannot be saved and restored, and so is lost. When  the         JIT  information cannot be saved and restored, and so is lost. When the
826         pattern  has  been  loaded, pcretest proceeds to read data lines in the         pattern has been loaded, pcretest proceeds to read data  lines  in  the
827         usual way.         usual way.
828    
829         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
830         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
831         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
832         machine  and  run  on  a SPARC machine. When a pattern is reloaded on a         machine and run on a SPARC machine. When a pattern  is  reloaded  on  a
833         host with different endianness, the confirmation message is changed to:         host with different endianness, the confirmation message is changed to:
834    
835           Compiled pattern (byte-inverted) loaded from /some/file           Compiled pattern (byte-inverted) loaded from /some/file
836    
837         The test suite contains some saved pre-compiled patterns with different         The test suite contains some saved pre-compiled patterns with different
838         endianness.  These  are  reloaded  using "<!" instead of just "<". This         endianness. These are reloaded using "<!" instead  of  just  "<".  This
839         suppresses the "(byte-inverted)" text so that the output is the same on         suppresses the "(byte-inverted)" text so that the output is the same on
840         all  hosts.  It  also forces debugging output once the pattern has been         all hosts. It also forces debugging output once the  pattern  has  been
841         reloaded.         reloaded.
842    
843         File names for saving and reloading can be absolute  or  relative,  but         File  names  for  saving and reloading can be absolute or relative, but
844         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
845         a tilde (~) is not available.         a tilde (~) is not available.
846    
847         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-
848         ing  and experimentation. It is not intended for production use because         ing and experimentation. It is not intended for production use  because
849         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
850         no  facility  for  supplying  custom  character  tables  for use with a         no facility for supplying  custom  character  tables  for  use  with  a
851         reloaded pattern. If the original  pattern  was  compiled  with  custom         reloaded  pattern.  If  the  original  pattern was compiled with custom
852         tables,  an  attempt to match a subject string using a reloaded pattern         tables, an attempt to match a subject string using a  reloaded  pattern
853         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
854         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.
855    
856    
857  SEE ALSO  SEE ALSO
858    
859         pcre(3),  pcre16(3),  pcreapi(3),  pcrecallout(3),  pcrejit, pcrematch-         pcre(3), pcre16(3),  pcreapi(3),  pcrecallout(3),  pcrejit,  pcrematch-
860         ing(3), pcrepartial(d), pcrepattern(3), pcreprecompile(3).         ing(3), pcrepartial(d), pcrepattern(3), pcreprecompile(3).
861    
862    
# Line 868  AUTHOR Line 869  AUTHOR
869    
870  REVISION  REVISION
871    
872         Last updated: 13 January 2012         Last updated: 14 January 2012
873         Copyright (c) 1997-2012 University of Cambridge.         Copyright (c) 1997-2012 University of Cambridge.

Legend:
Removed from v.877  
changed lines
  Added in v.878

  ViewVC Help
Powered by ViewVC 1.1.5