esruby 0.0.0 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +6 -6
- data/bin/esruby +9 -0
- data/lib/esruby.rb +8 -0
- data/resources/mruby/build_config.rb +0 -1
- data/resources/mruby/mrbgems/mruby-print/mrblib/print.rb +1 -1
- data/resources/project_template/app/app.rb +2 -0
- data/resources/project_template/config.rb +35 -0
- data/resources/project_template/www/index.html +17 -0
- metadata +6 -377
- data/resources/mruby/bin/mirb +0 -0
- data/resources/mruby/bin/mrbc +0 -0
- data/resources/mruby/bin/mruby +0 -0
- data/resources/mruby/bin/mruby-strip +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/README.md +0 -82
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/mrbgem.rake +0 -63
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/mrblib/regexp_pcre.rb +0 -232
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/mrblib/string_pcre.rb +0 -333
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/132html +0 -313
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/AUTHORS +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/CMakeLists.txt +0 -959
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/COPYING +0 -5
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/ChangeLog +0 -4981
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/CheckMan +0 -67
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/CleanTxt +0 -113
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/Detrail +0 -35
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/HACKING +0 -473
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/INSTALL +0 -370
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/LICENCE +0 -92
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/Makefile.am +0 -877
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/Makefile.in +0 -2917
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/NEWS +0 -611
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/NON-AUTOTOOLS-BUILD +0 -639
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/NON-UNIX-USE +0 -7
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/PrepareRelease +0 -253
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/README +0 -935
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/RunGrepTest +0 -551
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/RunTest +0 -1015
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/RunTest.bat +0 -616
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/aclocal.m4 +0 -1230
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/output.0 +0 -21280
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/output.1 +0 -21280
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/requests +0 -273
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/traces.0 +0 -2421
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/traces.1 +0 -1144
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/cmake/FindEditline.cmake +0 -17
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/cmake/FindReadline.cmake +0 -29
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/compile +0 -343
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config-cmake.h.in +0 -54
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.guess +0 -1552
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.h +0 -392
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.h.generic +0 -392
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.h.in +0 -343
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.sub +0 -1804
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/configure +0 -21280
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/configure.ac +0 -1082
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/depcomp +0 -708
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/dftables.c +0 -212
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/index.html +0 -180
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre-config.html +0 -109
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre.html +0 -204
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre16.html +0 -383
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_assign_jit_stack.html +0 -76
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_compile.html +0 -108
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_compile2.html +0 -112
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_config.html +0 -91
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_copy_named_substring.html +0 -65
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_copy_substring.html +0 -61
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_dfa_exec.html +0 -128
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_exec.html +0 -110
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_free_study.html +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_free_substring.html +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_free_substring_list.html +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_fullinfo.html +0 -108
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_named_substring.html +0 -68
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_stringnumber.html +0 -57
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_stringtable_entries.html +0 -60
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_substring.html +0 -64
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_substring_list.html +0 -61
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_jit_exec.html +0 -108
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_jit_stack_alloc.html +0 -55
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_jit_stack_free.html +0 -48
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_maketables.html +0 -48
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_pattern_to_host_byte_order.html +0 -58
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_refcount.html +0 -51
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_study.html +0 -68
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_utf16_to_host_byte_order.html +0 -57
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_version.html +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreapi.html +0 -2786
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrebuild.html +0 -517
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrecallout.html +0 -243
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrecompat.html +0 -216
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrecpp.html +0 -368
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcredemo.html +0 -426
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcregrep.html +0 -757
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrejit.html +0 -458
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrelimits.html +0 -86
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrematching.html +0 -233
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrepartial.html +0 -474
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrepattern.html +0 -2953
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreperform.html +0 -195
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreposix.html +0 -292
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreprecompile.html +0 -158
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcresample.html +0 -110
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrestack.html +0 -225
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcresyntax.html +0 -521
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcretest.html +0 -1082
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreunicode.html +0 -270
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/index.html.src +0 -180
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre-config.1 +0 -92
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre-config.txt +0 -86
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre.3 +0 -202
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre.txt +0 -9909
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre16.3 +0 -390
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre32.3 +0 -389
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_assign_jit_stack.3 +0 -61
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_compile.3 +0 -98
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_compile2.3 +0 -106
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_config.3 +0 -76
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_copy_named_substring.3 +0 -59
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_copy_substring.3 +0 -52
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_dfa_exec.3 +0 -125
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_exec.3 +0 -103
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_free_study.3 +0 -31
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_free_substring.3 +0 -31
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_free_substring_list.3 +0 -31
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_fullinfo.3 +0 -95
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_named_substring.3 +0 -62
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_stringnumber.3 +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_stringtable_entries.3 +0 -48
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_substring.3 +0 -55
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_substring_list.3 +0 -49
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_jit_exec.3 +0 -104
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_jit_stack_alloc.3 +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_jit_stack_free.3 +0 -35
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_maketables.3 +0 -33
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_pattern_to_host_byte_order.3 +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_refcount.3 +0 -36
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_study.3 +0 -56
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_utf16_to_host_byte_order.3 +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_utf32_to_host_byte_order.3 +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_version.3 +0 -31
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreapi.3 +0 -2823
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrebuild.3 +0 -520
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrecallout.3 +0 -214
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrecompat.3 +0 -185
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrecpp.3 +0 -348
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcregrep.1 +0 -679
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcregrep.txt +0 -740
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrejit.3 +0 -437
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrelimits.3 +0 -67
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrematching.3 +0 -206
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrepartial.3 +0 -445
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrepattern.3 +0 -2983
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreperform.3 +0 -177
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreposix.3 +0 -270
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreprecompile.3 +0 -151
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcresample.3 +0 -99
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrestack.3 +0 -215
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcresyntax.3 +0 -496
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcretest.1 +0 -1079
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcretest.txt +0 -1012
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreunicode.3 +0 -255
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/perltest.txt +0 -42
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/install-sh +0 -527
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcre.pc.in +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcre16.pc.in +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcre32.pc.in +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcrecpp.pc.in +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcreposix.pc.in +0 -13
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/ltmain.sh +0 -9636
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/ax_pthread.m4 +0 -309
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/libtool.m4 +0 -7844
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/ltoptions.m4 +0 -369
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/ltsugar.m4 +0 -123
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/ltversion.m4 +0 -23
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/lt~obsolete.m4 +0 -98
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/pcre_visibility.m4 +0 -89
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/makevp.bat +0 -66
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/makevp_c.txt +0 -20
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/makevp_l.txt +0 -20
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/missing +0 -331
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre-config.in +0 -133
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre.h +0 -653
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre.h.generic +0 -653
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre.h.in +0 -653
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_byte_order.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_chartables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_compile.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_config.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_dfa_exec.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_exec.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_fullinfo.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_get.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_globals.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_jit_compile.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_maketables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_newline.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_ord2utf16.c +0 -90
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_printint.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_refcount.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_string_utils.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_study.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_tables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_ucd.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_utf16_utils.c +0 -130
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_valid_utf16.c +0 -156
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_version.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_xclass.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_byte_order.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_chartables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_compile.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_config.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_dfa_exec.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_exec.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_fullinfo.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_get.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_globals.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_jit_compile.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_maketables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_newline.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_ord2utf32.c +0 -82
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_printint.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_refcount.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_string_utils.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_study.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_tables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_ucd.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_utf32_utils.c +0 -141
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_valid_utf32.c +0 -131
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_version.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_xclass.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_byte_order.c +0 -318
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_chartables.c +0 -198
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_chartables.c.dist +0 -198
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_compile.c +0 -8386
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_config.c +0 -186
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_dfa_exec.c +0 -3582
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_exec.c +0 -7049
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_fullinfo.c +0 -231
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_get.c +0 -662
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_globals.c +0 -84
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_internal.h +0 -2744
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_jit_compile.c +0 -8560
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_jit_test.c +0 -1614
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_maketables.c +0 -151
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_newline.c +0 -210
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_ord2utf8.c +0 -94
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_printint.c +0 -766
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_refcount.c +0 -92
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_scanner.cc +0 -199
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_scanner.h +0 -172
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_scanner_unittest.cc +0 -159
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_string_utils.c +0 -211
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_stringpiece.cc +0 -43
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_stringpiece.h.in +0 -179
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_stringpiece_unittest.cc +0 -150
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_study.c +0 -1562
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_tables.c +0 -655
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_ucd.c +0 -3298
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_valid_utf8.c +0 -312
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_version.c +0 -98
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_xclass.c +0 -198
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpp.cc +0 -922
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpp.h +0 -710
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpp_internal.h +0 -71
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpp_unittest.cc +0 -1291
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpparg.h.in +0 -174
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcredemo.c +0 -406
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcregexp.pas +0 -845
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcregrep.c +0 -3180
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcreposix.c +0 -419
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcreposix.h +0 -146
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcretest.c +0 -5488
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/perltest.pl +0 -237
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitConfig.h +0 -110
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitConfigInternal.h +0 -484
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitExecAllocator.c +0 -289
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitLir.c +0 -1766
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitLir.h +0 -985
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeARM_Thumb2.c +0 -2008
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeARM_v5.c +0 -2515
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeMIPS_32.c +0 -404
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeMIPS_common.c +0 -1881
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativePPC_32.c +0 -269
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativePPC_64.c +0 -421
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativePPC_common.c +0 -2014
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeSPARC_32.c +0 -164
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeSPARC_common.c +0 -1348
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeX86_32.c +0 -547
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeX86_64.c +0 -810
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeX86_common.c +0 -2836
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitUtils.c +0 -332
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepbinary +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepfilelist +0 -3
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinput +0 -611
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinput3 +0 -15
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinput8 +0 -11
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinputv +0 -4
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinputx +0 -43
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/greplist +0 -7
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepoutput +0 -707
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepoutput8 +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepoutputN +0 -17
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/greppatN4 +0 -2
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16BE-1 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16BE-2 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16LE-1 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16LE-2 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32BE-1 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32BE-2 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32LE-1 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32LE-2 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved8 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput1 +0 -5306
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput10 +0 -1337
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput11 +0 -135
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput12 +0 -89
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput13 +0 -9
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput14 +0 -329
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput15 +0 -430
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput16 +0 -35
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput17 +0 -296
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput18 +0 -296
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput19 +0 -22
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput2 +0 -3813
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput20 +0 -19
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput21 +0 -16
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput22 +0 -13
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput23 +0 -16
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput24 +0 -77
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput25 +0 -32
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput26 +0 -80
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput3 +0 -95
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput4 +0 -624
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput5 +0 -772
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput6 +0 -1319
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput7 +0 -672
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput8 +0 -4801
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput9 +0 -717
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinputEBC +0 -121
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput1 +0 -8798
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput10 +0 -2726
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput11-16 +0 -713
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput11-32 +0 -713
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput11-8 +0 -713
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput12 +0 -181
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput13 +0 -21
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput14 +0 -476
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput15 +0 -1269
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput16 +0 -121
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput17 +0 -505
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput18-16 +0 -1022
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput18-32 +0 -1019
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput19 +0 -88
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput2 +0 -12484
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput20 +0 -27
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput21-16 +0 -90
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput21-32 +0 -90
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput22-16 +0 -71
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput22-32 +0 -71
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput23 +0 -42
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput24 +0 -145
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput25 +0 -79
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput26 +0 -148
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput3 +0 -169
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput4 +0 -1094
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput5 +0 -1849
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput6 +0 -2137
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput7 +0 -1473
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput8 +0 -8019
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput9 +0 -1371
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutputEBC +0 -182
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/wintestinput3 +0 -91
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/wintestoutput3 +0 -166
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/ucp.h +0 -197
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/run_test.rb +0 -23
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/src/mruby_regexp_pcre.c +0 -364
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/test/matchdata.rb +0 -94
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/test/regexp.rb +0 -264
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/test/string.rb +0 -201
@@ -1,1012 +0,0 @@
|
|
1
|
-
PCRETEST(1) PCRETEST(1)
|
2
|
-
|
3
|
-
|
4
|
-
NAME
|
5
|
-
pcretest - a program for testing Perl-compatible regular expressions.
|
6
|
-
|
7
|
-
|
8
|
-
SYNOPSIS
|
9
|
-
|
10
|
-
pcretest [options] [input file [output file]]
|
11
|
-
|
12
|
-
pcretest was written as a test program for the PCRE regular expression
|
13
|
-
library itself, but it can also be used for experimenting with regular
|
14
|
-
expressions. This document describes the features of the test program;
|
15
|
-
for details of the regular expressions themselves, see the pcrepattern
|
16
|
-
documentation. For details of the PCRE library function calls and their
|
17
|
-
options, see the pcreapi , pcre16 and pcre32 documentation.
|
18
|
-
|
19
|
-
The input for pcretest is a sequence of regular expression patterns and
|
20
|
-
strings to be matched, as described below. The output shows the result
|
21
|
-
of each match. Options on the command line and the patterns control
|
22
|
-
PCRE options and exactly what is output.
|
23
|
-
|
24
|
-
As PCRE has evolved, it has acquired many different features, and as a
|
25
|
-
result, pcretest now has rather a lot of obscure options for testing
|
26
|
-
every possible feature. Some of these options are specifically designed
|
27
|
-
for use in conjunction with the test script and data files that are
|
28
|
-
distributed as part of PCRE, and are unlikely to be of use otherwise.
|
29
|
-
They are all documented here, but without much justification.
|
30
|
-
|
31
|
-
|
32
|
-
PCRE's 8-BIT, 16-BIT AND 32-BIT LIBRARIES
|
33
|
-
|
34
|
-
From release 8.30, two separate PCRE libraries can be built. The origi-
|
35
|
-
nal one supports 8-bit character strings, whereas the newer 16-bit
|
36
|
-
library supports character strings encoded in 16-bit units. From
|
37
|
-
release 8.32, a third library can be built, supporting character
|
38
|
-
strings encoded in 32-bit units. The pcretest program can be used to
|
39
|
-
test all three libraries. However, it is itself still an 8-bit program,
|
40
|
-
reading 8-bit input and writing 8-bit output. When testing the 16-bit
|
41
|
-
or 32-bit library, the patterns and data strings are converted to 16-
|
42
|
-
or 32-bit format before being passed to the PCRE library functions.
|
43
|
-
Results are converted to 8-bit for output.
|
44
|
-
|
45
|
-
References to functions and structures of the form pcre[16|32]_xx below
|
46
|
-
mean "pcre_xx when using the 8-bit library or pcre16_xx when using the
|
47
|
-
16-bit library".
|
48
|
-
|
49
|
-
|
50
|
-
COMMAND LINE OPTIONS
|
51
|
-
|
52
|
-
-8 If both the 8-bit library has been built, this option causes
|
53
|
-
the 8-bit library to be used (which is the default); if the
|
54
|
-
8-bit library has not been built, this option causes an
|
55
|
-
error.
|
56
|
-
|
57
|
-
-16 If both the 8-bit or the 32-bit, and the 16-bit libraries
|
58
|
-
have been built, this option causes the 16-bit library to be
|
59
|
-
used. If only the 16-bit library has been built, this is the
|
60
|
-
default (so has no effect). If only the 8-bit or the 32-bit
|
61
|
-
library has been built, this option causes an error.
|
62
|
-
|
63
|
-
-32 If both the 8-bit or the 16-bit, and the 32-bit libraries
|
64
|
-
have been built, this option causes the 32-bit library to be
|
65
|
-
used. If only the 32-bit library has been built, this is the
|
66
|
-
default (so has no effect). If only the 8-bit or the 16-bit
|
67
|
-
library has been built, this option causes an error.
|
68
|
-
|
69
|
-
-b Behave as if each pattern has the /B (show byte code) modi-
|
70
|
-
fier; the internal form is output after compilation.
|
71
|
-
|
72
|
-
-C Output the version number of the PCRE library, and all avail-
|
73
|
-
able information about the optional features that are
|
74
|
-
included, and then exit. All other options are ignored.
|
75
|
-
|
76
|
-
-C option Output information about a specific build-time option, then
|
77
|
-
exit. This functionality is intended for use in scripts such
|
78
|
-
as RunTest. The following options output the value indicated:
|
79
|
-
|
80
|
-
ebcdic-nl the code for LF (= NL) in an EBCDIC environment:
|
81
|
-
0x15 or 0x25
|
82
|
-
0 if used in an ASCII environment
|
83
|
-
linksize the internal link size (2, 3, or 4)
|
84
|
-
newline the default newline setting:
|
85
|
-
CR, LF, CRLF, ANYCRLF, or ANY
|
86
|
-
|
87
|
-
The following options output 1 for true or zero for false:
|
88
|
-
|
89
|
-
ebcdic compiled for an EBCDIC environment
|
90
|
-
jit just-in-time support is available
|
91
|
-
pcre16 the 16-bit library was built
|
92
|
-
pcre32 the 32-bit library was built
|
93
|
-
pcre8 the 8-bit library was built
|
94
|
-
ucp Unicode property support is available
|
95
|
-
utf UTF-8 and/or UTF-16 and/or UTF-32 support is
|
96
|
-
available
|
97
|
-
|
98
|
-
-d Behave as if each pattern has the /D (debug) modifier; the
|
99
|
-
internal form and information about the compiled pattern is
|
100
|
-
output after compilation; -d is equivalent to -b -i.
|
101
|
-
|
102
|
-
-dfa Behave as if each data line contains the \D escape sequence;
|
103
|
-
this causes the alternative matching function,
|
104
|
-
pcre[16|32]_dfa_exec(), to be used instead of the standard
|
105
|
-
pcre[16|32]_exec() function (more detail is given below).
|
106
|
-
|
107
|
-
-help Output a brief summary these options and then exit.
|
108
|
-
|
109
|
-
-i Behave as if each pattern has the /I modifier; information
|
110
|
-
about the compiled pattern is given after compilation.
|
111
|
-
|
112
|
-
-M Behave as if each data line contains the \M escape sequence;
|
113
|
-
this causes PCRE to discover the minimum MATCH_LIMIT and
|
114
|
-
MATCH_LIMIT_RECURSION settings by calling pcre[16|32]_exec()
|
115
|
-
repeatedly with different limits.
|
116
|
-
|
117
|
-
-m Output the size of each compiled pattern after it has been
|
118
|
-
compiled. This is equivalent to adding /M to each regular
|
119
|
-
expression. The size is given in bytes for both libraries.
|
120
|
-
|
121
|
-
-o osize Set the number of elements in the output vector that is used
|
122
|
-
when calling pcre[16|32]_exec() or pcre[16|32]_dfa_exec() to
|
123
|
-
be osize. The default value is 45, which is enough for 14
|
124
|
-
capturing subexpressions for pcre[16|32]_exec() or 22 differ-
|
125
|
-
ent matches for pcre[16|32]_dfa_exec(). The vector size can
|
126
|
-
be changed for individual matching calls by including \O in
|
127
|
-
the data line (see below).
|
128
|
-
|
129
|
-
-p Behave as if each pattern has the /P modifier; the POSIX
|
130
|
-
wrapper API is used to call PCRE. None of the other options
|
131
|
-
has any effect when -p is set. This option can be used only
|
132
|
-
with the 8-bit library.
|
133
|
-
|
134
|
-
-q Do not output the version number of pcretest at the start of
|
135
|
-
execution.
|
136
|
-
|
137
|
-
-S size On Unix-like systems, set the size of the run-time stack to
|
138
|
-
size megabytes.
|
139
|
-
|
140
|
-
-s or -s+ Behave as if each pattern has the /S modifier; in other
|
141
|
-
words, force each pattern to be studied. If -s+ is used, all
|
142
|
-
the JIT compile options are passed to pcre[16|32]_study(),
|
143
|
-
causing just-in-time optimization to be set up if it is
|
144
|
-
available, for both full and partial matching. Specific JIT
|
145
|
-
compile options can be selected by following -s+ with a digit
|
146
|
-
in the range 1 to 7, which selects the JIT compile modes as
|
147
|
-
follows:
|
148
|
-
|
149
|
-
1 normal match only
|
150
|
-
2 soft partial match only
|
151
|
-
3 normal match and soft partial match
|
152
|
-
4 hard partial match only
|
153
|
-
6 soft and hard partial match
|
154
|
-
7 all three modes (default)
|
155
|
-
|
156
|
-
If -s++ is used instead of -s+ (with or without a following
|
157
|
-
digit), the text "(JIT)" is added to the first output line
|
158
|
-
after a match or no match when JIT-compiled code was actually
|
159
|
-
used.
|
160
|
-
|
161
|
-
Note that there are pattern options that can override -s,
|
162
|
-
either specifying no studying at all, or suppressing JIT com-
|
163
|
-
pilation.
|
164
|
-
|
165
|
-
If the /I or /D option is present on a pattern (requesting
|
166
|
-
output about the compiled pattern), information about the
|
167
|
-
result of studying is not included when studying is caused
|
168
|
-
only by -s and neither -i nor -d is present on the command
|
169
|
-
line. This behaviour means that the output from tests that
|
170
|
-
are run with and without -s should be identical, except when
|
171
|
-
options that output information about the actual running of a
|
172
|
-
match are set.
|
173
|
-
|
174
|
-
The -M, -t, and -tm options, which give information about
|
175
|
-
resources used, are likely to produce different output with
|
176
|
-
and without -s. Output may also differ if the /C option is
|
177
|
-
present on an individual pattern. This uses callouts to trace
|
178
|
-
the the matching process, and this may be different between
|
179
|
-
studied and non-studied patterns. If the pattern contains
|
180
|
-
(*MARK) items there may also be differences, for the same
|
181
|
-
reason. The -s command line option can be overridden for spe-
|
182
|
-
cific patterns that should never be studied (see the /S pat-
|
183
|
-
tern modifier below).
|
184
|
-
|
185
|
-
-t Run each compile, study, and match many times with a timer,
|
186
|
-
and output resulting time per compile or match (in millisec-
|
187
|
-
onds). Do not set -m with -t, because you will then get the
|
188
|
-
size output a zillion times, and the timing will be dis-
|
189
|
-
torted. You can control the number of iterations that are
|
190
|
-
used for timing by following -t with a number (as a separate
|
191
|
-
item on the command line). For example, "-t 1000" would iter-
|
192
|
-
ate 1000 times. The default is to iterate 500000 times.
|
193
|
-
|
194
|
-
-tm This is like -t except that it times only the matching phase,
|
195
|
-
not the compile or study phases.
|
196
|
-
|
197
|
-
|
198
|
-
DESCRIPTION
|
199
|
-
|
200
|
-
If pcretest is given two filename arguments, it reads from the first
|
201
|
-
and writes to the second. If it is given only one filename argument, it
|
202
|
-
reads from that file and writes to stdout. Otherwise, it reads from
|
203
|
-
stdin and writes to stdout, and prompts for each line of input, using
|
204
|
-
"re>" to prompt for regular expressions, and "data>" to prompt for data
|
205
|
-
lines.
|
206
|
-
|
207
|
-
When pcretest is built, a configuration option can specify that it
|
208
|
-
should be linked with the libreadline library. When this is done, if
|
209
|
-
the input is from a terminal, it is read using the readline() function.
|
210
|
-
This provides line-editing and history facilities. The output from the
|
211
|
-
-help option states whether or not readline() will be used.
|
212
|
-
|
213
|
-
The program handles any number of sets of input on a single input file.
|
214
|
-
Each set starts with a regular expression, and continues with any num-
|
215
|
-
ber of data lines to be matched against the pattern.
|
216
|
-
|
217
|
-
Each data line is matched separately and independently. If you want to
|
218
|
-
do multi-line matches, you have to use the \n escape sequence (or \r or
|
219
|
-
\r\n, etc., depending on the newline setting) in a single line of input
|
220
|
-
to encode the newline sequences. There is no limit on the length of
|
221
|
-
data lines; the input buffer is automatically extended if it is too
|
222
|
-
small.
|
223
|
-
|
224
|
-
An empty line signals the end of the data lines, at which point a new
|
225
|
-
regular expression is read. The regular expressions are given enclosed
|
226
|
-
in any non-alphanumeric delimiters other than backslash, for example:
|
227
|
-
|
228
|
-
/(a|bc)x+yz/
|
229
|
-
|
230
|
-
White space before the initial delimiter is ignored. A regular expres-
|
231
|
-
sion may be continued over several input lines, in which case the new-
|
232
|
-
line characters are included within it. It is possible to include the
|
233
|
-
delimiter within the pattern by escaping it, for example
|
234
|
-
|
235
|
-
/abc\/def/
|
236
|
-
|
237
|
-
If you do so, the escape and the delimiter form part of the pattern,
|
238
|
-
but since delimiters are always non-alphanumeric, this does not affect
|
239
|
-
its interpretation. If the terminating delimiter is immediately fol-
|
240
|
-
lowed by a backslash, for example,
|
241
|
-
|
242
|
-
/abc/\
|
243
|
-
|
244
|
-
then a backslash is added to the end of the pattern. This is done to
|
245
|
-
provide a way of testing the error condition that arises if a pattern
|
246
|
-
finishes with a backslash, because
|
247
|
-
|
248
|
-
/abc\/
|
249
|
-
|
250
|
-
is interpreted as the first line of a pattern that starts with "abc/",
|
251
|
-
causing pcretest to read the next line as a continuation of the regular
|
252
|
-
expression.
|
253
|
-
|
254
|
-
|
255
|
-
PATTERN MODIFIERS
|
256
|
-
|
257
|
-
A pattern may be followed by any number of modifiers, which are mostly
|
258
|
-
single characters, though some of these can be qualified by further
|
259
|
-
characters. Following Perl usage, these are referred to below as, for
|
260
|
-
example, "the /i modifier", even though the delimiter of the pattern
|
261
|
-
need not always be a slash, and no slash is used when writing modi-
|
262
|
-
fiers. White space may appear between the final pattern delimiter and
|
263
|
-
the first modifier, and between the modifiers themselves. For refer-
|
264
|
-
ence, here is a complete list of modifiers. They fall into several
|
265
|
-
groups that are described in detail in the following sections.
|
266
|
-
|
267
|
-
/8 set UTF mode
|
268
|
-
/? disable UTF validity check
|
269
|
-
/+ show remainder of subject after match
|
270
|
-
/= show all captures (not just those that are set)
|
271
|
-
|
272
|
-
/A set PCRE_ANCHORED
|
273
|
-
/B show compiled code
|
274
|
-
/C set PCRE_AUTO_CALLOUT
|
275
|
-
/D same as /B plus /I
|
276
|
-
/E set PCRE_DOLLAR_ENDONLY
|
277
|
-
/F flip byte order in compiled pattern
|
278
|
-
/f set PCRE_FIRSTLINE
|
279
|
-
/G find all matches (shorten string)
|
280
|
-
/g find all matches (use startoffset)
|
281
|
-
/I show information about pattern
|
282
|
-
/i set PCRE_CASELESS
|
283
|
-
/J set PCRE_DUPNAMES
|
284
|
-
/K show backtracking control names
|
285
|
-
/L set locale
|
286
|
-
/M show compiled memory size
|
287
|
-
/m set PCRE_MULTILINE
|
288
|
-
/N set PCRE_NO_AUTO_CAPTURE
|
289
|
-
/P use the POSIX wrapper
|
290
|
-
/S study the pattern after compilation
|
291
|
-
/s set PCRE_DOTALL
|
292
|
-
/T select character tables
|
293
|
-
/U set PCRE_UNGREEDY
|
294
|
-
/W set PCRE_UCP
|
295
|
-
/X set PCRE_EXTRA
|
296
|
-
/x set PCRE_EXTENDED
|
297
|
-
/Y set PCRE_NO_START_OPTIMIZE
|
298
|
-
/Z don't show lengths in /B output
|
299
|
-
|
300
|
-
/<any> set PCRE_NEWLINE_ANY
|
301
|
-
/<anycrlf> set PCRE_NEWLINE_ANYCRLF
|
302
|
-
/<cr> set PCRE_NEWLINE_CR
|
303
|
-
/<crlf> set PCRE_NEWLINE_CRLF
|
304
|
-
/<lf> set PCRE_NEWLINE_LF
|
305
|
-
/<bsr_anycrlf> set PCRE_BSR_ANYCRLF
|
306
|
-
/<bsr_unicode> set PCRE_BSR_UNICODE
|
307
|
-
/<JS> set PCRE_JAVASCRIPT_COMPAT
|
308
|
-
|
309
|
-
|
310
|
-
Perl-compatible modifiers
|
311
|
-
|
312
|
-
The /i, /m, /s, and /x modifiers set the PCRE_CASELESS, PCRE_MULTILINE,
|
313
|
-
PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when
|
314
|
-
pcre[16|32]_compile() is called. These four modifier letters have the
|
315
|
-
same effect as they do in Perl. For example:
|
316
|
-
|
317
|
-
/caseless/i
|
318
|
-
|
319
|
-
|
320
|
-
Modifiers for other PCRE options
|
321
|
-
|
322
|
-
The following table shows additional modifiers for setting PCRE com-
|
323
|
-
pile-time options that do not correspond to anything in Perl:
|
324
|
-
|
325
|
-
/8 PCRE_UTF8 ) when using the 8-bit
|
326
|
-
/? PCRE_NO_UTF8_CHECK ) library
|
327
|
-
|
328
|
-
/8 PCRE_UTF16 ) when using the 16-bit
|
329
|
-
/? PCRE_NO_UTF16_CHECK ) library
|
330
|
-
|
331
|
-
/8 PCRE_UTF32 ) when using the 32-bit
|
332
|
-
/? PCRE_NO_UTF32_CHECK ) library
|
333
|
-
|
334
|
-
/A PCRE_ANCHORED
|
335
|
-
/C PCRE_AUTO_CALLOUT
|
336
|
-
/E PCRE_DOLLAR_ENDONLY
|
337
|
-
/f PCRE_FIRSTLINE
|
338
|
-
/J PCRE_DUPNAMES
|
339
|
-
/N PCRE_NO_AUTO_CAPTURE
|
340
|
-
/U PCRE_UNGREEDY
|
341
|
-
/W PCRE_UCP
|
342
|
-
/X PCRE_EXTRA
|
343
|
-
/Y PCRE_NO_START_OPTIMIZE
|
344
|
-
/<any> PCRE_NEWLINE_ANY
|
345
|
-
/<anycrlf> PCRE_NEWLINE_ANYCRLF
|
346
|
-
/<cr> PCRE_NEWLINE_CR
|
347
|
-
/<crlf> PCRE_NEWLINE_CRLF
|
348
|
-
/<lf> PCRE_NEWLINE_LF
|
349
|
-
/<bsr_anycrlf> PCRE_BSR_ANYCRLF
|
350
|
-
/<bsr_unicode> PCRE_BSR_UNICODE
|
351
|
-
/<JS> PCRE_JAVASCRIPT_COMPAT
|
352
|
-
|
353
|
-
The modifiers that are enclosed in angle brackets are literal strings
|
354
|
-
as shown, including the angle brackets, but the letters within can be
|
355
|
-
in either case. This example sets multiline matching with CRLF as the
|
356
|
-
line ending sequence:
|
357
|
-
|
358
|
-
/^abc/m<CRLF>
|
359
|
-
|
360
|
-
As well as turning on the PCRE_UTF8/16/32 option, the /8 modifier
|
361
|
-
causes all non-printing characters in output strings to be printed
|
362
|
-
using the \x{hh...} notation. Otherwise, those less than 0x100 are out-
|
363
|
-
put in hex without the curly brackets.
|
364
|
-
|
365
|
-
Full details of the PCRE options are given in the pcreapi documenta-
|
366
|
-
tion.
|
367
|
-
|
368
|
-
Finding all matches in a string
|
369
|
-
|
370
|
-
Searching for all possible matches within each subject string can be
|
371
|
-
requested by the /g or /G modifier. After finding a match, PCRE is
|
372
|
-
called again to search the remainder of the subject string. The differ-
|
373
|
-
ence between /g and /G is that the former uses the startoffset argument
|
374
|
-
to pcre[16|32]_exec() to start searching at a new point within the
|
375
|
-
entire string (which is in effect what Perl does), whereas the latter
|
376
|
-
passes over a shortened substring. This makes a difference to the
|
377
|
-
matching process if the pattern begins with a lookbehind assertion
|
378
|
-
(including \b or \B).
|
379
|
-
|
380
|
-
If any call to pcre[16|32]_exec() in a /g or /G sequence matches an
|
381
|
-
empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and
|
382
|
-
PCRE_ANCHORED flags set in order to search for another, non-empty,
|
383
|
-
match at the same point. If this second match fails, the start offset
|
384
|
-
is advanced, and the normal match is retried. This imitates the way
|
385
|
-
Perl handles such cases when using the /g modifier or the split() func-
|
386
|
-
tion. Normally, the start offset is advanced by one character, but if
|
387
|
-
the newline convention recognizes CRLF as a newline, and the current
|
388
|
-
character is CR followed by LF, an advance of two is used.
|
389
|
-
|
390
|
-
Other modifiers
|
391
|
-
|
392
|
-
There are yet more modifiers for controlling the way pcretest operates.
|
393
|
-
|
394
|
-
The /+ modifier requests that as well as outputting the substring that
|
395
|
-
matched the entire pattern, pcretest should in addition output the
|
396
|
-
remainder of the subject string. This is useful for tests where the
|
397
|
-
subject contains multiple copies of the same substring. If the + modi-
|
398
|
-
fier appears twice, the same action is taken for captured substrings.
|
399
|
-
In each case the remainder is output on the following line with a plus
|
400
|
-
character following the capture number. Note that this modifier must
|
401
|
-
not immediately follow the /S modifier because /S+ and /S++ have other
|
402
|
-
meanings.
|
403
|
-
|
404
|
-
The /= modifier requests that the values of all potential captured
|
405
|
-
parentheses be output after a match. By default, only those up to the
|
406
|
-
highest one actually used in the match are output (corresponding to the
|
407
|
-
return code from pcre[16|32]_exec()). Values in the offsets vector cor-
|
408
|
-
responding to higher numbers should be set to -1, and these are output
|
409
|
-
as "<unset>". This modifier gives a way of checking that this is hap-
|
410
|
-
pening.
|
411
|
-
|
412
|
-
The /B modifier is a debugging feature. It requests that pcretest out-
|
413
|
-
put a representation of the compiled code after compilation. Normally
|
414
|
-
this information contains length and offset values; however, if /Z is
|
415
|
-
also present, this data is replaced by spaces. This is a special fea-
|
416
|
-
ture for use in the automatic test scripts; it ensures that the same
|
417
|
-
output is generated for different internal link sizes.
|
418
|
-
|
419
|
-
The /D modifier is a PCRE debugging feature, and is equivalent to /BI,
|
420
|
-
that is, both the /B and the /I modifiers.
|
421
|
-
|
422
|
-
The /F modifier causes pcretest to flip the byte order of the 2-byte
|
423
|
-
and 4-byte fields in the compiled pattern. This facility is for testing
|
424
|
-
the feature in PCRE that allows it to execute patterns that were com-
|
425
|
-
piled on a host with a different endianness. This feature is not avail-
|
426
|
-
able when the POSIX interface to PCRE is being used, that is, when the
|
427
|
-
/P pattern modifier is specified. See also the section about saving and
|
428
|
-
reloading compiled patterns below.
|
429
|
-
|
430
|
-
The /I modifier requests that pcretest output information about the
|
431
|
-
compiled pattern (whether it is anchored, has a fixed first character,
|
432
|
-
and so on). It does this by calling pcre[16|32]_fullinfo() after com-
|
433
|
-
piling a pattern. If the pattern is studied, the results of that are
|
434
|
-
also output.
|
435
|
-
|
436
|
-
The /K modifier requests pcretest to show names from backtracking con-
|
437
|
-
trol verbs that are returned from calls to pcre[16|32]_exec(). It
|
438
|
-
causes pcretest to create a pcre[16|32]_extra block if one has not
|
439
|
-
already been created by a call to pcre[16|32]_study(), and to set the
|
440
|
-
PCRE_EXTRA_MARK flag and the mark field within it, every time that
|
441
|
-
pcre[16|32]_exec() is called. If the variable that the mark field
|
442
|
-
points to is non-NULL for a match, non-match, or partial match,
|
443
|
-
pcretest prints the string to which it points. For a match, this is
|
444
|
-
shown on a line by itself, tagged with "MK:". For a non-match it is
|
445
|
-
added to the message.
|
446
|
-
|
447
|
-
The /L modifier must be followed directly by the name of a locale, for
|
448
|
-
example,
|
449
|
-
|
450
|
-
/pattern/Lfr_FR
|
451
|
-
|
452
|
-
For this reason, it must be the last modifier. The given locale is set,
|
453
|
-
pcre[16|32]_maketables() is called to build a set of character tables
|
454
|
-
for the locale, and this is then passed to pcre[16|32]_compile() when
|
455
|
-
compiling the regular expression. Without an /L (or /T) modifier, NULL
|
456
|
-
is passed as the tables pointer; that is, /L applies only to the
|
457
|
-
expression on which it appears.
|
458
|
-
|
459
|
-
The /M modifier causes the size in bytes of the memory block used to
|
460
|
-
hold the compiled pattern to be output. This does not include the size
|
461
|
-
of the pcre[16|32] block; it is just the actual compiled data. If the
|
462
|
-
pattern is successfully studied with the PCRE_STUDY_JIT_COMPILE option,
|
463
|
-
the size of the JIT compiled code is also output.
|
464
|
-
|
465
|
-
The /S modifier causes pcre[16|32]_study() to be called after the
|
466
|
-
expression has been compiled, and the results used when the expression
|
467
|
-
is matched. There are a number of qualifying characters that may follow
|
468
|
-
/S. They may appear in any order.
|
469
|
-
|
470
|
-
If S is followed by an exclamation mark, pcre[16|32]_study() is called
|
471
|
-
with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a
|
472
|
-
pcre_extra block, even when studying discovers no useful information.
|
473
|
-
|
474
|
-
If /S is followed by a second S character, it suppresses studying, even
|
475
|
-
if it was requested externally by the -s command line option. This
|
476
|
-
makes it possible to specify that certain patterns are always studied,
|
477
|
-
and others are never studied, independently of -s. This feature is used
|
478
|
-
in the test files in a few cases where the output is different when the
|
479
|
-
pattern is studied.
|
480
|
-
|
481
|
-
If the /S modifier is followed by a + character, the call to
|
482
|
-
pcre[16|32]_study() is made with all the JIT study options, requesting
|
483
|
-
just-in-time optimization support if it is available, for both normal
|
484
|
-
and partial matching. If you want to restrict the JIT compiling modes,
|
485
|
-
you can follow /S+ with a digit in the range 1 to 7:
|
486
|
-
|
487
|
-
1 normal match only
|
488
|
-
2 soft partial match only
|
489
|
-
3 normal match and soft partial match
|
490
|
-
4 hard partial match only
|
491
|
-
6 soft and hard partial match
|
492
|
-
7 all three modes (default)
|
493
|
-
|
494
|
-
If /S++ is used instead of /S+ (with or without a following digit), the
|
495
|
-
text "(JIT)" is added to the first output line after a match or no
|
496
|
-
match when JIT-compiled code was actually used.
|
497
|
-
|
498
|
-
Note that there is also an independent /+ modifier; it must not be
|
499
|
-
given immediately after /S or /S+ because this will be misinterpreted.
|
500
|
-
|
501
|
-
If JIT studying is successful, the compiled JIT code will automatically
|
502
|
-
be used when pcre[16|32]_exec() is run, except when incompatible run-
|
503
|
-
time options are specified. For more details, see the pcrejit documen-
|
504
|
-
tation. See also the \J escape sequence below for a way of setting the
|
505
|
-
size of the JIT stack.
|
506
|
-
|
507
|
-
Finally, if /S is followed by a minus character, JIT compilation is
|
508
|
-
suppressed, even if it was requested externally by the -s command line
|
509
|
-
option. This makes it possible to specify that JIT is never to be used
|
510
|
-
for certain patterns.
|
511
|
-
|
512
|
-
The /T modifier must be followed by a single digit. It causes a spe-
|
513
|
-
cific set of built-in character tables to be passed to pcre[16|32]_com-
|
514
|
-
pile(). It is used in the standard PCRE tests to check behaviour with
|
515
|
-
different character tables. The digit specifies the tables as follows:
|
516
|
-
|
517
|
-
0 the default ASCII tables, as distributed in
|
518
|
-
pcre_chartables.c.dist
|
519
|
-
1 a set of tables defining ISO 8859 characters
|
520
|
-
|
521
|
-
In table 1, some characters whose codes are greater than 128 are iden-
|
522
|
-
tified as letters, digits, spaces, etc.
|
523
|
-
|
524
|
-
Using the POSIX wrapper API
|
525
|
-
|
526
|
-
The /P modifier causes pcretest to call PCRE via the POSIX wrapper API
|
527
|
-
rather than its native API. This supports only the 8-bit library. When
|
528
|
-
/P is set, the following modifiers set options for the regcomp() func-
|
529
|
-
tion:
|
530
|
-
|
531
|
-
/i REG_ICASE
|
532
|
-
/m REG_NEWLINE
|
533
|
-
/N REG_NOSUB
|
534
|
-
/s REG_DOTALL )
|
535
|
-
/U REG_UNGREEDY ) These options are not part of
|
536
|
-
/W REG_UCP ) the POSIX standard
|
537
|
-
/8 REG_UTF8 )
|
538
|
-
|
539
|
-
The /+ modifier works as described above. All other modifiers are
|
540
|
-
ignored.
|
541
|
-
|
542
|
-
|
543
|
-
DATA LINES
|
544
|
-
|
545
|
-
Before each data line is passed to pcre[16|32]_exec(), leading and
|
546
|
-
trailing white space is removed, and it is then scanned for \ escapes.
|
547
|
-
Some of these are pretty esoteric features, intended for checking out
|
548
|
-
some of the more complicated features of PCRE. If you are just testing
|
549
|
-
"ordinary" regular expressions, you probably don't need any of these.
|
550
|
-
The following escapes are recognized:
|
551
|
-
|
552
|
-
\a alarm (BEL, \x07)
|
553
|
-
\b backspace (\x08)
|
554
|
-
\e escape (\x27)
|
555
|
-
\f form feed (\x0c)
|
556
|
-
\n newline (\x0a)
|
557
|
-
\qdd set the PCRE_MATCH_LIMIT limit to dd
|
558
|
-
(any number of digits)
|
559
|
-
\r carriage return (\x0d)
|
560
|
-
\t tab (\x09)
|
561
|
-
\v vertical tab (\x0b)
|
562
|
-
\nnn octal character (up to 3 octal digits); always
|
563
|
-
a byte unless > 255 in UTF-8 or 16-bit or 32-bit mode
|
564
|
-
\xhh hexadecimal byte (up to 2 hex digits)
|
565
|
-
\x{hh...} hexadecimal character (any number of hex digits)
|
566
|
-
\A pass the PCRE_ANCHORED option to pcre[16|32]_exec()
|
567
|
-
or pcre[16|32]_dfa_exec()
|
568
|
-
\B pass the PCRE_NOTBOL option to pcre[16|32]_exec()
|
569
|
-
or pcre[16|32]_dfa_exec()
|
570
|
-
\Cdd call pcre[16|32]_copy_substring() for substring dd
|
571
|
-
after a successful match (number less than 32)
|
572
|
-
\Cname call pcre[16|32]_copy_named_substring() for substring
|
573
|
-
"name" after a successful match (name termin-
|
574
|
-
ated by next non alphanumeric character)
|
575
|
-
\C+ show the current captured substrings at callout
|
576
|
-
time
|
577
|
-
\C- do not supply a callout function
|
578
|
-
\C!n return 1 instead of 0 when callout number n is
|
579
|
-
reached
|
580
|
-
\C!n!m return 1 instead of 0 when callout number n is
|
581
|
-
reached for the nth time
|
582
|
-
\C*n pass the number n (may be negative) as callout
|
583
|
-
data; this is used as the callout return value
|
584
|
-
\D use the pcre[16|32]_dfa_exec() match function
|
585
|
-
\F only shortest match for pcre[16|32]_dfa_exec()
|
586
|
-
\Gdd call pcre[16|32]_get_substring() for substring dd
|
587
|
-
after a successful match (number less than 32)
|
588
|
-
\Gname call pcre[16|32]_get_named_substring() for substring
|
589
|
-
"name" after a successful match (name termin-
|
590
|
-
ated by next non-alphanumeric character)
|
591
|
-
\Jdd set up a JIT stack of dd kilobytes maximum (any
|
592
|
-
number of digits)
|
593
|
-
\L call pcre[16|32]_get_substringlist() after a
|
594
|
-
successful match
|
595
|
-
\M discover the minimum MATCH_LIMIT and
|
596
|
-
MATCH_LIMIT_RECURSION settings
|
597
|
-
\N pass the PCRE_NOTEMPTY option to pcre[16|32]_exec()
|
598
|
-
or pcre[16|32]_dfa_exec(); if used twice, pass the
|
599
|
-
PCRE_NOTEMPTY_ATSTART option
|
600
|
-
\Odd set the size of the output vector passed to
|
601
|
-
pcre[16|32]_exec() to dd (any number of digits)
|
602
|
-
\P pass the PCRE_PARTIAL_SOFT option to pcre[16|32]_exec()
|
603
|
-
or pcre[16|32]_dfa_exec(); if used twice, pass the
|
604
|
-
PCRE_PARTIAL_HARD option
|
605
|
-
\Qdd set the PCRE_MATCH_LIMIT_RECURSION limit to dd
|
606
|
-
(any number of digits)
|
607
|
-
\R pass the PCRE_DFA_RESTART option to pcre[16|32]_dfa_exec()
|
608
|
-
\S output details of memory get/free calls during matching
|
609
|
-
\Y pass the PCRE_NO_START_OPTIMIZE option to
|
610
|
-
pcre[16|32]_exec()
|
611
|
-
or pcre[16|32]_dfa_exec()
|
612
|
-
\Z pass the PCRE_NOTEOL option to pcre[16|32]_exec()
|
613
|
-
or pcre[16|32]_dfa_exec()
|
614
|
-
\? pass the PCRE_NO_UTF[8|16|32]_CHECK option to
|
615
|
-
pcre[16|32]_exec() or pcre[16|32]_dfa_exec()
|
616
|
-
\>dd start the match at offset dd (optional "-"; then
|
617
|
-
any number of digits); this sets the startoffset
|
618
|
-
argument for pcre[16|32]_exec() or
|
619
|
-
pcre[16|32]_dfa_exec()
|
620
|
-
\<cr> pass the PCRE_NEWLINE_CR option to pcre[16|32]_exec()
|
621
|
-
or pcre[16|32]_dfa_exec()
|
622
|
-
\<lf> pass the PCRE_NEWLINE_LF option to pcre[16|32]_exec()
|
623
|
-
or pcre[16|32]_dfa_exec()
|
624
|
-
\<crlf> pass the PCRE_NEWLINE_CRLF option to pcre[16|32]_exec()
|
625
|
-
or pcre[16|32]_dfa_exec()
|
626
|
-
\<anycrlf> pass the PCRE_NEWLINE_ANYCRLF option to pcre[16|32]_exec()
|
627
|
-
or pcre[16|32]_dfa_exec()
|
628
|
-
\<any> pass the PCRE_NEWLINE_ANY option to pcre[16|32]_exec()
|
629
|
-
or pcre[16|32]_dfa_exec()
|
630
|
-
|
631
|
-
The use of \x{hh...} is not dependent on the use of the /8 modifier on
|
632
|
-
the pattern. It is recognized always. There may be any number of hexa-
|
633
|
-
decimal digits inside the braces; invalid values provoke error mes-
|
634
|
-
sages.
|
635
|
-
|
636
|
-
Note that \xhh specifies one byte rather than one character in UTF-8
|
637
|
-
mode; this makes it possible to construct invalid UTF-8 sequences for
|
638
|
-
testing purposes. On the other hand, \x{hh} is interpreted as a UTF-8
|
639
|
-
character in UTF-8 mode, generating more than one byte if the value is
|
640
|
-
greater than 127. When testing the 8-bit library not in UTF-8 mode,
|
641
|
-
\x{hh} generates one byte for values less than 256, and causes an error
|
642
|
-
for greater values.
|
643
|
-
|
644
|
-
In UTF-16 mode, all 4-digit \x{hhhh} values are accepted. This makes it
|
645
|
-
possible to construct invalid UTF-16 sequences for testing purposes.
|
646
|
-
|
647
|
-
In UTF-32 mode, all 4- to 8-digit \x{...} values are accepted. This
|
648
|
-
makes it possible to construct invalid UTF-32 sequences for testing
|
649
|
-
purposes.
|
650
|
-
|
651
|
-
The escapes that specify line ending sequences are literal strings,
|
652
|
-
exactly as shown. No more than one newline setting should be present in
|
653
|
-
any data line.
|
654
|
-
|
655
|
-
A backslash followed by anything else just escapes the anything else.
|
656
|
-
If the very last character is a backslash, it is ignored. This gives a
|
657
|
-
way of passing an empty line as data, since a real empty line termi-
|
658
|
-
nates the data input.
|
659
|
-
|
660
|
-
The \J escape provides a way of setting the maximum stack size that is
|
661
|
-
used by the just-in-time optimization code. It is ignored if JIT opti-
|
662
|
-
mization is not being used. Providing a stack that is larger than the
|
663
|
-
default 32K is necessary only for very complicated patterns.
|
664
|
-
|
665
|
-
If \M is present, pcretest calls pcre[16|32]_exec() several times, with
|
666
|
-
different values in the match_limit and match_limit_recursion fields of
|
667
|
-
the pcre[16|32]_extra data structure, until it finds the minimum num-
|
668
|
-
bers for each parameter that allow pcre[16|32]_exec() to complete with-
|
669
|
-
out error. Because this is testing a specific feature of the normal
|
670
|
-
interpretive pcre[16|32]_exec() execution, the use of any JIT optimiza-
|
671
|
-
tion that might have been set up by the /S+ qualifier of -s+ option is
|
672
|
-
disabled.
|
673
|
-
|
674
|
-
The match_limit number is a measure of the amount of backtracking that
|
675
|
-
takes place, and checking it out can be instructive. For most simple
|
676
|
-
matches, the number is quite small, but for patterns with very large
|
677
|
-
numbers of matching possibilities, it can become large very quickly
|
678
|
-
with increasing length of subject string. The match_limit_recursion
|
679
|
-
number is a measure of how much stack (or, if PCRE is compiled with
|
680
|
-
NO_RECURSE, how much heap) memory is needed to complete the match
|
681
|
-
attempt.
|
682
|
-
|
683
|
-
When \O is used, the value specified may be higher or lower than the
|
684
|
-
size set by the -O command line option (or defaulted to 45); \O applies
|
685
|
-
only to the call of pcre[16|32]_exec() for the line in which it
|
686
|
-
appears.
|
687
|
-
|
688
|
-
If the /P modifier was present on the pattern, causing the POSIX wrap-
|
689
|
-
per API to be used, the only option-setting sequences that have any
|
690
|
-
effect are \B, \N, and \Z, causing REG_NOTBOL, REG_NOTEMPTY, and
|
691
|
-
REG_NOTEOL, respectively, to be passed to regexec().
|
692
|
-
|
693
|
-
|
694
|
-
THE ALTERNATIVE MATCHING FUNCTION
|
695
|
-
|
696
|
-
By default, pcretest uses the standard PCRE matching function,
|
697
|
-
pcre[16|32]_exec() to match each data line. PCRE also supports an
|
698
|
-
alternative matching function, pcre[16|32]_dfa_test(), which operates
|
699
|
-
in a different way, and has some restrictions. The differences between
|
700
|
-
the two functions are described in the pcrematching documentation.
|
701
|
-
|
702
|
-
If a data line contains the \D escape sequence, or if the command line
|
703
|
-
contains the -dfa option, the alternative matching function is used.
|
704
|
-
This function finds all possible matches at a given point. If, however,
|
705
|
-
the \F escape sequence is present in the data line, it stops after the
|
706
|
-
first match is found. This is always the shortest possible match.
|
707
|
-
|
708
|
-
|
709
|
-
DEFAULT OUTPUT FROM PCRETEST
|
710
|
-
|
711
|
-
This section describes the output when the normal matching function,
|
712
|
-
pcre[16|32]_exec(), is being used.
|
713
|
-
|
714
|
-
When a match succeeds, pcretest outputs the list of captured substrings
|
715
|
-
that pcre[16|32]_exec() returns, starting with number 0 for the string
|
716
|
-
that matched the whole pattern. Otherwise, it outputs "No match" when
|
717
|
-
the return is PCRE_ERROR_NOMATCH, and "Partial match:" followed by the
|
718
|
-
partially matching substring when pcre[16|32]_exec() returns
|
719
|
-
PCRE_ERROR_PARTIAL. (Note that this is the entire substring that was
|
720
|
-
inspected during the partial match; it may include characters before
|
721
|
-
the actual match start if a lookbehind assertion, \K, \b, or \B was
|
722
|
-
involved.) For any other return, pcretest outputs the PCRE negative
|
723
|
-
error number and a short descriptive phrase. If the error is a failed
|
724
|
-
UTF string check, the offset of the start of the failing character and
|
725
|
-
the reason code are also output, provided that the size of the output
|
726
|
-
vector is at least two. Here is an example of an interactive pcretest
|
727
|
-
run.
|
728
|
-
|
729
|
-
$ pcretest
|
730
|
-
PCRE version 8.13 2011-04-30
|
731
|
-
|
732
|
-
re> /^abc(\d+)/
|
733
|
-
data> abc123
|
734
|
-
0: abc123
|
735
|
-
1: 123
|
736
|
-
data> xyz
|
737
|
-
No match
|
738
|
-
|
739
|
-
Unset capturing substrings that are not followed by one that is set are
|
740
|
-
not returned by pcre[16|32]_exec(), and are not shown by pcretest. In
|
741
|
-
the following example, there are two capturing substrings, but when the
|
742
|
-
first data line is matched, the second, unset substring is not shown.
|
743
|
-
An "internal" unset substring is shown as "<unset>", as for the second
|
744
|
-
data line.
|
745
|
-
|
746
|
-
re> /(a)|(b)/
|
747
|
-
data> a
|
748
|
-
0: a
|
749
|
-
1: a
|
750
|
-
data> b
|
751
|
-
0: b
|
752
|
-
1: <unset>
|
753
|
-
2: b
|
754
|
-
|
755
|
-
If the strings contain any non-printing characters, they are output as
|
756
|
-
\xhh escapes if the value is less than 256 and UTF mode is not set.
|
757
|
-
Otherwise they are output as \x{hh...} escapes. See below for the defi-
|
758
|
-
nition of non-printing characters. If the pattern has the /+ modifier,
|
759
|
-
the output for substring 0 is followed by the the rest of the subject
|
760
|
-
string, identified by "0+" like this:
|
761
|
-
|
762
|
-
re> /cat/+
|
763
|
-
data> cataract
|
764
|
-
0: cat
|
765
|
-
0+ aract
|
766
|
-
|
767
|
-
If the pattern has the /g or /G modifier, the results of successive
|
768
|
-
matching attempts are output in sequence, like this:
|
769
|
-
|
770
|
-
re> /\Bi(\w\w)/g
|
771
|
-
data> Mississippi
|
772
|
-
0: iss
|
773
|
-
1: ss
|
774
|
-
0: iss
|
775
|
-
1: ss
|
776
|
-
0: ipp
|
777
|
-
1: pp
|
778
|
-
|
779
|
-
"No match" is output only if the first match attempt fails. Here is an
|
780
|
-
example of a failure message (the offset 4 that is specified by \>4 is
|
781
|
-
past the end of the subject string):
|
782
|
-
|
783
|
-
re> /xyz/
|
784
|
-
data> xyz\>4
|
785
|
-
Error -24 (bad offset value)
|
786
|
-
|
787
|
-
If any of the sequences \C, \G, or \L are present in a data line that
|
788
|
-
is successfully matched, the substrings extracted by the convenience
|
789
|
-
functions are output with C, G, or L after the string number instead of
|
790
|
-
a colon. This is in addition to the normal full list. The string length
|
791
|
-
(that is, the return from the extraction function) is given in paren-
|
792
|
-
theses after each string for \C and \G.
|
793
|
-
|
794
|
-
Note that whereas patterns can be continued over several lines (a plain
|
795
|
-
">" prompt is used for continuations), data lines may not. However new-
|
796
|
-
lines can be included in data by means of the \n escape (or \r, \r\n,
|
797
|
-
etc., depending on the newline sequence setting).
|
798
|
-
|
799
|
-
|
800
|
-
OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION
|
801
|
-
|
802
|
-
When the alternative matching function, pcre[16|32]_dfa_exec(), is used
|
803
|
-
(by means of the \D escape sequence or the -dfa command line option),
|
804
|
-
the output consists of a list of all the matches that start at the
|
805
|
-
first point in the subject where there is at least one match. For exam-
|
806
|
-
ple:
|
807
|
-
|
808
|
-
re> /(tang|tangerine|tan)/
|
809
|
-
data> yellow tangerine\D
|
810
|
-
0: tangerine
|
811
|
-
1: tang
|
812
|
-
2: tan
|
813
|
-
|
814
|
-
(Using the normal matching function on this data finds only "tang".)
|
815
|
-
The longest matching string is always given first (and numbered zero).
|
816
|
-
After a PCRE_ERROR_PARTIAL return, the output is "Partial match:", fol-
|
817
|
-
lowed by the partially matching substring. (Note that this is the
|
818
|
-
entire substring that was inspected during the partial match; it may
|
819
|
-
include characters before the actual match start if a lookbehind asser-
|
820
|
-
tion, \K, \b, or \B was involved.)
|
821
|
-
|
822
|
-
If /g is present on the pattern, the search for further matches resumes
|
823
|
-
at the end of the longest match. For example:
|
824
|
-
|
825
|
-
re> /(tang|tangerine|tan)/g
|
826
|
-
data> yellow tangerine and tangy sultana\D
|
827
|
-
0: tangerine
|
828
|
-
1: tang
|
829
|
-
2: tan
|
830
|
-
0: tang
|
831
|
-
1: tan
|
832
|
-
0: tan
|
833
|
-
|
834
|
-
Since the matching function does not support substring capture, the
|
835
|
-
escape sequences that are concerned with captured substrings are not
|
836
|
-
relevant.
|
837
|
-
|
838
|
-
|
839
|
-
RESTARTING AFTER A PARTIAL MATCH
|
840
|
-
|
841
|
-
When the alternative matching function has given the PCRE_ERROR_PARTIAL
|
842
|
-
return, indicating that the subject partially matched the pattern, you
|
843
|
-
can restart the match with additional subject data by means of the \R
|
844
|
-
escape sequence. For example:
|
845
|
-
|
846
|
-
re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
|
847
|
-
data> 23ja\P\D
|
848
|
-
Partial match: 23ja
|
849
|
-
data> n05\R\D
|
850
|
-
0: n05
|
851
|
-
|
852
|
-
For further information about partial matching, see the pcrepartial
|
853
|
-
documentation.
|
854
|
-
|
855
|
-
|
856
|
-
CALLOUTS
|
857
|
-
|
858
|
-
If the pattern contains any callout requests, pcretest's callout func-
|
859
|
-
tion is called during matching. This works with both matching func-
|
860
|
-
tions. By default, the called function displays the callout number, the
|
861
|
-
start and current positions in the text at the callout time, and the
|
862
|
-
next pattern item to be tested. For example:
|
863
|
-
|
864
|
-
--->pqrabcdef
|
865
|
-
0 ^ ^ \d
|
866
|
-
|
867
|
-
This output indicates that callout number 0 occurred for a match
|
868
|
-
attempt starting at the fourth character of the subject string, when
|
869
|
-
the pointer was at the seventh character of the data, and when the next
|
870
|
-
pattern item was \d. Just one circumflex is output if the start and
|
871
|
-
current positions are the same.
|
872
|
-
|
873
|
-
Callouts numbered 255 are assumed to be automatic callouts, inserted as
|
874
|
-
a result of the /C pattern modifier. In this case, instead of showing
|
875
|
-
the callout number, the offset in the pattern, preceded by a plus, is
|
876
|
-
output. For example:
|
877
|
-
|
878
|
-
re> /\d?[A-E]\*/C
|
879
|
-
data> E*
|
880
|
-
--->E*
|
881
|
-
+0 ^ \d?
|
882
|
-
+3 ^ [A-E]
|
883
|
-
+8 ^^ \*
|
884
|
-
+10 ^ ^
|
885
|
-
0: E*
|
886
|
-
|
887
|
-
If a pattern contains (*MARK) items, an additional line is output when-
|
888
|
-
ever a change of latest mark is passed to the callout function. For
|
889
|
-
example:
|
890
|
-
|
891
|
-
re> /a(*MARK:X)bc/C
|
892
|
-
data> abc
|
893
|
-
--->abc
|
894
|
-
+0 ^ a
|
895
|
-
+1 ^^ (*MARK:X)
|
896
|
-
+10 ^^ b
|
897
|
-
Latest Mark: X
|
898
|
-
+11 ^ ^ c
|
899
|
-
+12 ^ ^
|
900
|
-
0: abc
|
901
|
-
|
902
|
-
The mark changes between matching "a" and "b", but stays the same for
|
903
|
-
the rest of the match, so nothing more is output. If, as a result of
|
904
|
-
backtracking, the mark reverts to being unset, the text "<unset>" is
|
905
|
-
output.
|
906
|
-
|
907
|
-
The callout function in pcretest returns zero (carry on matching) by
|
908
|
-
default, but you can use a \C item in a data line (as described above)
|
909
|
-
to change this and other parameters of the callout.
|
910
|
-
|
911
|
-
Inserting callouts can be helpful when using pcretest to check compli-
|
912
|
-
cated regular expressions. For further information about callouts, see
|
913
|
-
the pcrecallout documentation.
|
914
|
-
|
915
|
-
|
916
|
-
NON-PRINTING CHARACTERS
|
917
|
-
|
918
|
-
When pcretest is outputting text in the compiled version of a pattern,
|
919
|
-
bytes other than 32-126 are always treated as non-printing characters
|
920
|
-
are are therefore shown as hex escapes.
|
921
|
-
|
922
|
-
When pcretest is outputting text that is a matched part of a subject
|
923
|
-
string, it behaves in the same way, unless a different locale has been
|
924
|
-
set for the pattern (using the /L modifier). In this case, the
|
925
|
-
isprint() function to distinguish printing and non-printing characters.
|
926
|
-
|
927
|
-
|
928
|
-
SAVING AND RELOADING COMPILED PATTERNS
|
929
|
-
|
930
|
-
The facilities described in this section are not available when the
|
931
|
-
POSIX interface to PCRE is being used, that is, when the /P pattern
|
932
|
-
modifier is specified.
|
933
|
-
|
934
|
-
When the POSIX interface is not in use, you can cause pcretest to write
|
935
|
-
a compiled pattern to a file, by following the modifiers with > and a
|
936
|
-
file name. For example:
|
937
|
-
|
938
|
-
/pattern/im >/some/file
|
939
|
-
|
940
|
-
See the pcreprecompile documentation for a discussion about saving and
|
941
|
-
re-using compiled patterns. Note that if the pattern was successfully
|
942
|
-
studied with JIT optimization, the JIT data cannot be saved.
|
943
|
-
|
944
|
-
The data that is written is binary. The first eight bytes are the
|
945
|
-
length of the compiled pattern data followed by the length of the
|
946
|
-
optional study data, each written as four bytes in big-endian order
|
947
|
-
(most significant byte first). If there is no study data (either the
|
948
|
-
pattern was not studied, or studying did not return any data), the sec-
|
949
|
-
ond length is zero. The lengths are followed by an exact copy of the
|
950
|
-
compiled pattern. If there is additional study data, this (excluding
|
951
|
-
any JIT data) follows immediately after the compiled pattern. After
|
952
|
-
writing the file, pcretest expects to read a new pattern.
|
953
|
-
|
954
|
-
A saved pattern can be reloaded into pcretest by specifying < and a
|
955
|
-
file name instead of a pattern. The name of the file must not contain a
|
956
|
-
< character, as otherwise pcretest will interpret the line as a pattern
|
957
|
-
delimited by < characters. For example:
|
958
|
-
|
959
|
-
re> </some/file
|
960
|
-
Compiled pattern loaded from /some/file
|
961
|
-
No study data
|
962
|
-
|
963
|
-
If the pattern was previously studied with the JIT optimization, the
|
964
|
-
JIT information cannot be saved and restored, and so is lost. When the
|
965
|
-
pattern has been loaded, pcretest proceeds to read data lines in the
|
966
|
-
usual way.
|
967
|
-
|
968
|
-
You can copy a file written by pcretest to a different host and reload
|
969
|
-
it there, even if the new host has opposite endianness to the one on
|
970
|
-
which the pattern was compiled. For example, you can compile on an i86
|
971
|
-
machine and run on a SPARC machine. When a pattern is reloaded on a
|
972
|
-
host with different endianness, the confirmation message is changed to:
|
973
|
-
|
974
|
-
Compiled pattern (byte-inverted) loaded from /some/file
|
975
|
-
|
976
|
-
The test suite contains some saved pre-compiled patterns with different
|
977
|
-
endianness. These are reloaded using "<!" instead of just "<". This
|
978
|
-
suppresses the "(byte-inverted)" text so that the output is the same on
|
979
|
-
all hosts. It also forces debugging output once the pattern has been
|
980
|
-
reloaded.
|
981
|
-
|
982
|
-
File names for saving and reloading can be absolute or relative, but
|
983
|
-
note that the shell facility of expanding a file name that starts with
|
984
|
-
a tilde (~) is not available.
|
985
|
-
|
986
|
-
The ability to save and reload files in pcretest is intended for test-
|
987
|
-
ing and experimentation. It is not intended for production use because
|
988
|
-
only a single pattern can be written to a file. Furthermore, there is
|
989
|
-
no facility for supplying custom character tables for use with a
|
990
|
-
reloaded pattern. If the original pattern was compiled with custom
|
991
|
-
tables, an attempt to match a subject string using a reloaded pattern
|
992
|
-
is likely to cause pcretest to crash. Finally, if you attempt to load
|
993
|
-
a file that is not in the correct format, the result is undefined.
|
994
|
-
|
995
|
-
|
996
|
-
SEE ALSO
|
997
|
-
|
998
|
-
pcre(3), pcre16(3), pcre32(3), pcreapi(3), pcrecallout(3), pcrejit,
|
999
|
-
pcrematching(3), pcrepartial(d), pcrepattern(3), pcreprecompile(3).
|
1000
|
-
|
1001
|
-
|
1002
|
-
AUTHOR
|
1003
|
-
|
1004
|
-
Philip Hazel
|
1005
|
-
University Computing Service
|
1006
|
-
Cambridge CB2 3QH, England.
|
1007
|
-
|
1008
|
-
|
1009
|
-
REVISION
|
1010
|
-
|
1011
|
-
Last updated: 10 September 2012
|
1012
|
-
Copyright (c) 1997-2012 University of Cambridge.
|