├── .editorconfig ├── .gitattributes ├── .github ├── codecov.yml ├── dependabot.yml └── workflows │ ├── build.yml │ ├── cifuzz.yml │ ├── clang-analyzer.yml │ ├── codeql.yml │ ├── dev.yml │ ├── pages.yml │ ├── scorecards.yml │ └── sync.yml ├── .gitignore ├── .gitmodules ├── AUTHORS.md ├── BUILD.bazel ├── CMakeLists.txt ├── COPYING ├── ChangeLog ├── HACKING ├── INSTALL ├── LICENCE.md ├── MODULE.bazel ├── Makefile.am ├── NEWS ├── NON-AUTOTOOLS-BUILD ├── README ├── README.md ├── RunGrepTest ├── RunGrepTest.bat ├── RunTest ├── RunTest.bat ├── SECURITY.md ├── autogen.sh ├── build.zig ├── cmake ├── COPYING-CMAKE-SCRIPTS ├── FindEditline.cmake ├── FindReadline.cmake ├── PCRE2CheckLinkerFlag.cmake └── pcre2-config.cmake.in ├── configure.ac ├── doc ├── html │ ├── NON-AUTOTOOLS-BUILD.txt │ ├── README.txt │ ├── index.html │ ├── pcre2-config.html │ ├── pcre2.html │ ├── pcre2_callout_enumerate.html │ ├── pcre2_code_copy.html │ ├── pcre2_code_copy_with_tables.html │ ├── pcre2_code_free.html │ ├── pcre2_compile.html │ ├── pcre2_compile_context_copy.html │ ├── pcre2_compile_context_create.html │ ├── pcre2_compile_context_free.html │ ├── pcre2_config.html │ ├── pcre2_convert_context_copy.html │ ├── pcre2_convert_context_create.html │ ├── pcre2_convert_context_free.html │ ├── pcre2_converted_pattern_free.html │ ├── pcre2_dfa_match.html │ ├── pcre2_general_context_copy.html │ ├── pcre2_general_context_create.html │ ├── pcre2_general_context_free.html │ ├── pcre2_get_error_message.html │ ├── pcre2_get_mark.html │ ├── pcre2_get_match_data_heapframes_size.html │ ├── pcre2_get_match_data_size.html │ ├── pcre2_get_ovector_count.html │ ├── pcre2_get_ovector_pointer.html │ ├── pcre2_get_startchar.html │ ├── pcre2_jit_compile.html │ ├── pcre2_jit_free_unused_memory.html │ ├── pcre2_jit_match.html │ ├── pcre2_jit_stack_assign.html │ ├── pcre2_jit_stack_create.html │ ├── pcre2_jit_stack_free.html │ ├── pcre2_maketables.html │ ├── pcre2_maketables_free.html │ ├── pcre2_match.html │ ├── pcre2_match_context_copy.html │ ├── pcre2_match_context_create.html │ ├── pcre2_match_context_free.html │ ├── pcre2_match_data_create.html │ ├── pcre2_match_data_create_from_pattern.html │ ├── pcre2_match_data_free.html │ ├── pcre2_next_match.html │ ├── pcre2_pattern_convert.html │ ├── pcre2_pattern_info.html │ ├── pcre2_serialize_decode.html │ ├── pcre2_serialize_encode.html │ ├── pcre2_serialize_free.html │ ├── pcre2_serialize_get_number_of_codes.html │ ├── pcre2_set_bsr.html │ ├── pcre2_set_callout.html │ ├── pcre2_set_character_tables.html │ ├── pcre2_set_compile_extra_options.html │ ├── pcre2_set_compile_recursion_guard.html │ ├── pcre2_set_depth_limit.html │ ├── pcre2_set_glob_escape.html │ ├── pcre2_set_glob_separator.html │ ├── pcre2_set_heap_limit.html │ ├── pcre2_set_match_limit.html │ ├── pcre2_set_max_pattern_compiled_length.html │ ├── pcre2_set_max_pattern_length.html │ ├── pcre2_set_max_varlookbehind.html │ ├── pcre2_set_newline.html │ ├── pcre2_set_offset_limit.html │ ├── pcre2_set_optimize.html │ ├── pcre2_set_parens_nest_limit.html │ ├── pcre2_set_recursion_limit.html │ ├── pcre2_set_recursion_memory_management.html │ ├── pcre2_set_substitute_callout.html │ ├── pcre2_set_substitute_case_callout.html │ ├── pcre2_substitute.html │ ├── pcre2_substring_copy_byname.html │ ├── pcre2_substring_copy_bynumber.html │ ├── pcre2_substring_free.html │ ├── pcre2_substring_get_byname.html │ ├── pcre2_substring_get_bynumber.html │ ├── pcre2_substring_length_byname.html │ ├── pcre2_substring_length_bynumber.html │ ├── pcre2_substring_list_free.html │ ├── pcre2_substring_list_get.html │ ├── pcre2_substring_nametable_scan.html │ ├── pcre2_substring_number_from_name.html │ ├── pcre2api.html │ ├── pcre2build.html │ ├── pcre2callout.html │ ├── pcre2compat.html │ ├── pcre2convert.html │ ├── pcre2demo.html │ ├── pcre2grep.html │ ├── pcre2jit.html │ ├── pcre2limits.html │ ├── pcre2matching.html │ ├── pcre2partial.html │ ├── pcre2pattern.html │ ├── pcre2perform.html │ ├── pcre2posix.html │ ├── pcre2sample.html │ ├── pcre2serialize.html │ ├── pcre2syntax.html │ ├── pcre2test.html │ └── pcre2unicode.html ├── index.html.src ├── pcre2-config.1 ├── pcre2-config.txt ├── pcre2.3 ├── pcre2.txt ├── pcre2_callout_enumerate.3 ├── pcre2_code_copy.3 ├── pcre2_code_copy_with_tables.3 ├── pcre2_code_free.3 ├── pcre2_compile.3 ├── pcre2_compile_context_copy.3 ├── pcre2_compile_context_create.3 ├── pcre2_compile_context_free.3 ├── pcre2_config.3 ├── pcre2_convert_context_copy.3 ├── pcre2_convert_context_create.3 ├── pcre2_convert_context_free.3 ├── pcre2_converted_pattern_free.3 ├── pcre2_dfa_match.3 ├── pcre2_general_context_copy.3 ├── pcre2_general_context_create.3 ├── pcre2_general_context_free.3 ├── pcre2_get_error_message.3 ├── pcre2_get_mark.3 ├── pcre2_get_match_data_heapframes_size.3 ├── pcre2_get_match_data_size.3 ├── pcre2_get_ovector_count.3 ├── pcre2_get_ovector_pointer.3 ├── pcre2_get_startchar.3 ├── pcre2_jit_compile.3 ├── pcre2_jit_free_unused_memory.3 ├── pcre2_jit_match.3 ├── pcre2_jit_stack_assign.3 ├── pcre2_jit_stack_create.3 ├── pcre2_jit_stack_free.3 ├── pcre2_maketables.3 ├── pcre2_maketables_free.3 ├── pcre2_match.3 ├── pcre2_match_context_copy.3 ├── pcre2_match_context_create.3 ├── pcre2_match_context_free.3 ├── pcre2_match_data_create.3 ├── pcre2_match_data_create_from_pattern.3 ├── pcre2_match_data_free.3 ├── pcre2_next_match.3 ├── pcre2_pattern_convert.3 ├── pcre2_pattern_info.3 ├── pcre2_serialize_decode.3 ├── pcre2_serialize_encode.3 ├── pcre2_serialize_free.3 ├── pcre2_serialize_get_number_of_codes.3 ├── pcre2_set_bsr.3 ├── pcre2_set_callout.3 ├── pcre2_set_character_tables.3 ├── pcre2_set_compile_extra_options.3 ├── pcre2_set_compile_recursion_guard.3 ├── pcre2_set_depth_limit.3 ├── pcre2_set_glob_escape.3 ├── pcre2_set_glob_separator.3 ├── pcre2_set_heap_limit.3 ├── pcre2_set_match_limit.3 ├── pcre2_set_max_pattern_compiled_length.3 ├── pcre2_set_max_pattern_length.3 ├── pcre2_set_max_varlookbehind.3 ├── pcre2_set_newline.3 ├── pcre2_set_offset_limit.3 ├── pcre2_set_optimize.3 ├── pcre2_set_parens_nest_limit.3 ├── pcre2_set_recursion_limit.3 ├── pcre2_set_recursion_memory_management.3 ├── pcre2_set_substitute_callout.3 ├── pcre2_set_substitute_case_callout.3 ├── pcre2_substitute.3 ├── pcre2_substring_copy_byname.3 ├── pcre2_substring_copy_bynumber.3 ├── pcre2_substring_free.3 ├── pcre2_substring_get_byname.3 ├── pcre2_substring_get_bynumber.3 ├── pcre2_substring_length_byname.3 ├── pcre2_substring_length_bynumber.3 ├── pcre2_substring_list_free.3 ├── pcre2_substring_list_get.3 ├── pcre2_substring_nametable_scan.3 ├── pcre2_substring_number_from_name.3 ├── pcre2api.3 ├── pcre2build.3 ├── pcre2callout.3 ├── pcre2compat.3 ├── pcre2convert.3 ├── pcre2demo.3 ├── pcre2grep.1 ├── pcre2grep.txt ├── pcre2jit.3 ├── pcre2limits.3 ├── pcre2matching.3 ├── pcre2partial.3 ├── pcre2pattern.3 ├── pcre2perform.3 ├── pcre2posix.3 ├── pcre2sample.3 ├── pcre2serialize.3 ├── pcre2syntax.3 ├── pcre2test.1 ├── pcre2test.txt └── pcre2unicode.3 ├── libpcre2-16.pc.in ├── libpcre2-32.pc.in ├── libpcre2-8.pc.in ├── libpcre2-posix.pc.in ├── m4 ├── ax_check_vscript.m4 ├── ax_pthread.m4 ├── pcre2_visibility.m4 └── pcre2_zos.m4 ├── maint ├── .gitignore ├── 132html ├── CheckMan ├── CheckTxt ├── CleanTxt ├── Detrail ├── GenerateCommon.py ├── GenerateTest.py ├── GenerateUcd.py ├── GenerateUcpHeader.py ├── GenerateUcpTables.py ├── ManyConfigTests ├── README ├── RunManifestTest ├── RunManifestTest.ps1 ├── RunPerlTest ├── RunSymbolTest ├── RunSymbolTest.ps1 ├── Unicode.tables │ ├── BidiMirroring.txt │ ├── CaseFolding.txt │ ├── DerivedBidiClass.txt │ ├── DerivedCoreProperties.txt │ ├── DerivedGeneralCategory.txt │ ├── GraphemeBreakProperty.txt │ ├── PropList.txt │ ├── PropertyAliases.txt │ ├── PropertyValueAliases.txt │ ├── ScriptExtensions.txt │ ├── Scripts.txt │ ├── UnicodeData.txt │ └── emoji-data.txt ├── UpdateAlways ├── UpdateCommon.py ├── UpdateDates.py ├── UpdateRelease.py ├── cmake-tests │ ├── build-interface │ │ ├── CMakeLists.txt │ │ └── main.c │ └── install-interface │ │ ├── CMakeLists.txt │ │ └── main.c ├── manifest-cmakeinstall-freebsd ├── manifest-cmakeinstall-linux ├── manifest-cmakeinstall-macos ├── manifest-cmakeinstall-solaris ├── manifest-cmakeinstall-windows ├── manifest-libpcre2-16.so ├── manifest-libpcre2-32.so ├── manifest-libpcre2-8.so ├── manifest-libpcre2-posix.so ├── manifest-makeinstall-freebsd ├── manifest-makeinstall-linux ├── manifest-makeinstall-solaris ├── manifest-tarball ├── pcre2_chartables.c.non-standard ├── ucptest.c ├── ucptestdata │ ├── testinput1 │ ├── testinput2 │ ├── testoutput1 │ └── testoutput2 └── utf8.c ├── pcre2-config.in ├── perltest.sh ├── src ├── config-cmake.h.in ├── config.h.generic ├── libpcre2-16.sym ├── libpcre2-32.sym ├── libpcre2-8.sym ├── libpcre2-posix.sym ├── pcre2.h.generic ├── pcre2.h.in ├── pcre2_auto_possess.c ├── pcre2_chartables.c.dist ├── pcre2_chartables.c.ebcdic-1047-nl15 ├── pcre2_chartables.c.ebcdic-1047-nl25 ├── pcre2_chkdint.c ├── pcre2_compile.c ├── pcre2_compile.h ├── pcre2_compile_cgroup.c ├── pcre2_compile_class.c ├── pcre2_config.c ├── pcre2_context.c ├── pcre2_convert.c ├── pcre2_dfa_match.c ├── pcre2_dftables.c ├── pcre2_error.c ├── pcre2_extuni.c ├── pcre2_find_bracket.c ├── pcre2_fuzzsupport.c ├── pcre2_internal.h ├── pcre2_intmodedep.h ├── pcre2_jit_char_inc.h ├── pcre2_jit_compile.c ├── pcre2_jit_match_inc.h ├── pcre2_jit_misc_inc.h ├── pcre2_jit_neon_inc.h ├── pcre2_jit_simd_inc.h ├── pcre2_jit_test.c ├── pcre2_maketables.c ├── pcre2_match.c ├── pcre2_match_data.c ├── pcre2_match_next.c ├── pcre2_newline.c ├── pcre2_ord2utf.c ├── pcre2_pattern_info.c ├── pcre2_printint_inc.h ├── pcre2_script_run.c ├── pcre2_serialize.c ├── pcre2_string_utils.c ├── pcre2_study.c ├── pcre2_substitute.c ├── pcre2_substring.c ├── pcre2_tables.c ├── pcre2_ucd.c ├── pcre2_ucp.h ├── pcre2_ucptables_inc.h ├── pcre2_util.h ├── pcre2_valid_utf.c ├── pcre2_xclass.c ├── pcre2demo.c ├── pcre2grep.c ├── pcre2posix.c ├── pcre2posix.h ├── pcre2posix_test.c └── pcre2test.c ├── testdata ├── fuzzing │ ├── pcre2_fuzzer.dict │ ├── pcre2_fuzzer.options │ ├── pcre2_fuzzer_16.dict │ ├── pcre2_fuzzer_16.options │ ├── pcre2_fuzzer_32.dict │ └── pcre2_fuzzer_32.options ├── grepbinary ├── grepfilelist ├── grepinput ├── grepinput3 ├── grepinput8 ├── grepinputBad8 ├── grepinputBad8_Trail ├── grepinputC.bz2 ├── grepinputC.gz ├── grepinputM ├── grepinputUN ├── grepinputv ├── grepinputx ├── greplist ├── grepnot.bz2 ├── grepoutput ├── grepoutput8 ├── grepoutputC ├── grepoutputCN ├── grepoutputCNU ├── grepoutputCU ├── grepoutputCbz2 ├── grepoutputCgz ├── grepoutputN ├── grepoutputUN ├── greppatN4 ├── testbtables ├── testinput1 ├── testinput10 ├── testinput11 ├── testinput12 ├── testinput13 ├── testinput14 ├── testinput15 ├── testinput16 ├── testinput17 ├── testinput18 ├── testinput19 ├── testinput2 ├── testinput20 ├── testinput21 ├── testinput22 ├── testinput23 ├── testinput24 ├── testinput25 ├── testinput26 ├── testinput27 ├── testinput28 ├── testinput29 ├── testinput3 ├── testinput4 ├── testinput5 ├── testinput6 ├── testinput7 ├── testinput8 ├── testinput9 ├── testinputheap ├── testoutput1 ├── testoutput10 ├── testoutput11-16 ├── testoutput11-32 ├── testoutput12-16 ├── testoutput12-32 ├── testoutput13 ├── testoutput14-16 ├── testoutput14-32 ├── testoutput14-8 ├── testoutput15 ├── testoutput16 ├── testoutput17 ├── testoutput18 ├── testoutput19 ├── testoutput2 ├── testoutput20 ├── testoutput21 ├── testoutput22-16 ├── testoutput22-32 ├── testoutput22-8 ├── testoutput23 ├── testoutput24 ├── testoutput25 ├── testoutput26 ├── testoutput27 ├── testoutput28 ├── testoutput29 ├── testoutput3 ├── testoutput3A ├── testoutput3B ├── testoutput3C ├── testoutput4 ├── testoutput5 ├── testoutput6 ├── testoutput7 ├── testoutput8-16-2 ├── testoutput8-16-4 ├── testoutput8-32-4 ├── testoutput8-8-2 ├── testoutput8-8-3 ├── testoutput8-8-4 ├── testoutput9 ├── testoutputheap-16 ├── testoutputheap-32 ├── testoutputheap-8 ├── valgrind-jit.supp ├── wintestinput3 └── wintestoutput3 └── vms ├── configure.com ├── openvms_readme.txt ├── pcre2.h_patch └── stdint.h /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps ensure that files are opened in editors with the correct 2 | # settings, regardless of the editor or platform. See http://editorconfig.org. 3 | 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | indent_style = space 9 | indent_size = 2 10 | end_of_line = lf 11 | 12 | [Makefile.am] 13 | indent_style = tab 14 | 15 | [*.bat] 16 | end_of_line = crlf 17 | 18 | [testdata/*] 19 | insert_final_newline = false 20 | trim_trailing_whitespace = false 21 | 22 | [testdata/test{input,output}{1,2,3,3A,3B,3C,6,28,29}] 23 | charset = latin1 24 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | testdata/* -text 2 | maint/manifest-* -text 3 | -------------------------------------------------------------------------------- /.github/codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | strict_yaml_branch: default 3 | require_ci_to_pass: false 4 | notify: 5 | wait_for_ci: false 6 | notify_error: true 7 | 8 | coverage: 9 | range: 75..90 10 | round: nearest 11 | precision: 2 12 | 13 | status: 14 | project: false 15 | 16 | patch: 17 | default: 18 | target: 0% 19 | 20 | github_checks: 21 | annotations: false 22 | 23 | comment: false 24 | # layout: "condensed_header, condensed_files, condensed_footer" 25 | # hide_project_coverage: true 26 | # require_head: true 27 | # require_base: true 28 | # require_changes: "coverage_drop OR uncovered_patch" 29 | 30 | component_management: 31 | individual_components: 32 | - component_id: library 33 | name: "Core library" 34 | paths: 35 | - '!src/(pcre2test|pcre2grep|pcre2_jit_test|pcre2posix_test|pcre2_printint)\.c' 36 | statuses: 37 | - type: project 38 | target: auto 39 | threshold: 0.5% 40 | 41 | - component_id: test_binaries 42 | name: "Test binaries" 43 | paths: 44 | - 'src/(pcre2test|pcre2grep|pcre2_jit_test|pcre2posix_test|pcre2_printint)\.c' 45 | statuses: 46 | - type: project 47 | target: auto 48 | threshold: 2% 49 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / 5 | schedule: 6 | interval: monthly 7 | groups: 8 | minor-and-patch: 9 | update-types: 10 | - "minor" 11 | - "patch" 12 | -------------------------------------------------------------------------------- /.github/workflows/cifuzz.yml: -------------------------------------------------------------------------------- 1 | name: CIFuzz 2 | on: 3 | workflow_dispatch: 4 | pull_request: 5 | branches: [ master ] 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | Fuzzing: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Build Fuzzers 15 | id: build 16 | uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@3d38acd485bc848e33396e7523b9a4f2aff9027e # master 17 | with: 18 | oss-fuzz-project-name: 'pcre2' 19 | dry-run: false 20 | - name: Run Fuzzers 21 | uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@3d38acd485bc848e33396e7523b9a4f2aff9027e # master 22 | with: 23 | oss-fuzz-project-name: 'pcre2' 24 | fuzz-seconds: 300 25 | dry-run: false 26 | - name: Upload Crash 27 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 28 | if: failure() && steps.build.outcome == 'success' 29 | with: 30 | name: artifacts 31 | path: ./out/artifacts 32 | -------------------------------------------------------------------------------- /.github/workflows/pages.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Pages 2 | on: 3 | workflow_dispatch: 4 | workflow_run: 5 | workflows: [ 'Sync' ] 6 | types: 7 | - completed 8 | branches: [ master ] 9 | push: 10 | branches: [ pages ] 11 | pull_request: 12 | branches: [ pages ] 13 | 14 | permissions: 15 | contents: read 16 | 17 | concurrency: 18 | group: "pages" 19 | cancel-in-progress: false 20 | 21 | jobs: 22 | Build: 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: Setup 26 | run: | 27 | sudo apt-get -qq update 28 | sudo apt-get -qq install hugo 29 | 30 | - name: Checkout 31 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 32 | with: 33 | ref: pages 34 | 35 | - name: Setup Pages 36 | id: pages 37 | uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 38 | 39 | - name: Build with Hugo 40 | env: 41 | HUGO_BASE_URL: ${{ steps.pages.outputs.base_url }} 42 | run: pages/maint/Build.py 43 | 44 | - name: Upload artifact 45 | uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 46 | with: 47 | path: ./pages/public 48 | 49 | Deploy: 50 | needs: Build 51 | 52 | if: github.event_name != 'pull_request' && github.ref == 'refs/heads/pages' 53 | 54 | permissions: 55 | pages: write # to deploy to Pages 56 | id-token: write # to verify the deployment originates from an appropriate source 57 | 58 | environment: 59 | name: github-pages 60 | url: ${{ steps.deployment.outputs.page_url }} 61 | 62 | runs-on: ubuntu-latest 63 | steps: 64 | - name: Deploy to GitHub Pages 65 | id: deployment 66 | uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 67 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Public .gitignore file for PCRE2 2 | 3 | build/ 4 | build-*/ 5 | 6 | *.a 7 | *.gcda 8 | *.gcno 9 | *.lo 10 | *.la 11 | *.pc 12 | *.o 13 | *~ 14 | 15 | *-coverage* 16 | 17 | __pycache__ 18 | .deps 19 | .libs 20 | 21 | Makefile 22 | Makefile.in 23 | RunGrepTest.log 24 | RunGrepTest.trs 25 | RunTest.log 26 | RunTest.trs 27 | 28 | aclocal.m4 29 | ar-lib 30 | autom4te.cache 31 | compile 32 | config.guess 33 | config.log 34 | config.status 35 | config.sub 36 | configure 37 | depcomp 38 | install-sh 39 | libtool 40 | ltmain.sh 41 | missing 42 | pcre2-config 43 | pcre2_dftables 44 | pcre2_jit_test 45 | pcre2_jit_test.exe 46 | pcre2_jit_test.log 47 | pcre2_jit_test.trs 48 | pcre2posix_test 49 | pcre2posix_test.exe 50 | pcre2posix_test.log 51 | pcre2posix_test.trs 52 | pcre2demo 53 | pcre2fuzzcheck-* 54 | pcre2fuzzer-* 55 | pcre2grep 56 | pcre2grep.exe 57 | pcre2test 58 | pcre2test.exe 59 | test-driver 60 | test-suite.log 61 | test3input 62 | test3output 63 | test3outputA 64 | test3outputB 65 | testNinput 66 | testNinputgrep 67 | teststderr 68 | teststderrM 69 | teststderrgrep 70 | teststdout 71 | teststdoutM 72 | testtemp1 73 | testtemp1grep 74 | testtemp2 75 | testtemp2grep 76 | testtry 77 | testtry2 78 | testtrygrep 79 | testSinput 80 | testSoutput 81 | testbtables 82 | testsaved1 83 | testsaved2 84 | testoutput8 85 | testoutput8-jit 86 | testoutput8-dfa 87 | testoutput16 88 | testoutput16-jit 89 | testoutput16-dfa 90 | testoutput32 91 | testoutput32-jit 92 | testoutput32-dfa 93 | 94 | m4/libtool.m4 95 | m4/ltoptions.m4 96 | m4/ltsugar.m4 97 | m4/ltversion.m4 98 | m4/lt~obsolete.m4 99 | 100 | src/.deps 101 | src/.dirstamp 102 | src/config.h 103 | src/config.h.in 104 | src/pcre2.h 105 | src/pcre2_chartables.c 106 | src/stamp-h1 107 | 108 | /bazel-* 109 | *.bazel.lock 110 | 111 | zig-out/ 112 | zig-cache/ 113 | .zig-cache/ 114 | 115 | # End 116 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/sljit"] 2 | path = deps/sljit 3 | url = https://github.com/zherczeg/sljit.git 4 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | PCRE2 LICENCE 2 | 3 | Please see the file LICENCE in the PCRE2 distribution for licensing details. 4 | 5 | End 6 | -------------------------------------------------------------------------------- /MODULE.bazel: -------------------------------------------------------------------------------- 1 | module( 2 | name = "pcre2", 3 | version = "10.46-DEV", 4 | compatibility_level = 1, 5 | ) 6 | 7 | bazel_dep(name = "rules_cc", version = "0.0.1") 8 | bazel_dep(name = "bazel_skylib", version = "1.2.1") 9 | bazel_dep(name = "platforms", version = "0.0.4") 10 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | Security policies 2 | ================= 3 | 4 | Release security 5 | ---------------- 6 | 7 | The PCRE2 project provides source-only releases, with no binaries. 8 | 9 | These source releases can be downloaded from the 10 | [GitHub Releases](https://github.com/PCRE2Project/pcre2/releases) page. Each 11 | release file is GPG-signed. 12 | 13 | * Releases up to and including 10.44 are signed by Philip Hazel (GPG key: 14 | 45F68D54BBE23FB3039B46E59766E084FB0F43D8) 15 | * Releases from 10.45 onwards will be signed by Nicholas Wilson (GPG key: 16 | A95536204A3BB489715231282A98E77EB6F24CA8, cross-signed by Philip 17 | Hazel's key for release continuity) 18 | 19 | From releases 10.45 onwards, the source code will additionally be provided via 20 | Git checkout of the (GPG-signed) release tag. 21 | 22 | Please contact the maintainers for any queries about release integrity or the 23 | project's supply-chain. 24 | 25 | Reporting vulnerabilities 26 | ------------------------- 27 | 28 | The PCRE2 project prioritises security. We appreciate third-party testing and 29 | security research, and would be grateful if you could responsibly disclose your 30 | findings to us. We will make every effort to acknowledge your contributions. 31 | 32 | To report a security issue, please use the GitHub Security Advisory 33 | ["Report a Vulnerability"](https://github.com/PCRE2Project/pcre2/security/advisories/new) 34 | tab. (Alternatively, if you prefer you may send a GPG-encrypted email to one of 35 | the maintainers.) 36 | 37 | ### Timeline 38 | 39 | As a very small volunteer team, we cannot guarantee rapid response, but would 40 | aim to respond within 1 week, or perhaps 2 during holidays. 41 | 42 | ### Response procedure 43 | 44 | PCRE2 has never previously made a rapid or embargoed release in response to a 45 | security incident. We would work with security managers from trusted downstream 46 | distributors, such as major Linux distributions, before disclosing the 47 | vulnerability publicly. 48 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Running aclocal here first (as happened for a while) caused the macros that 4 | # libtoolize puts in the m4 directory to be newer than the aclocal.m4 file that 5 | # aclocal creates. This meant that the next "make" cause aclocal to be run 6 | # again. Moving aclocal to after libtoolize does not seem to cause any 7 | # problems, and it fixes this issue. 8 | 9 | # GNU libtool is named differently on some systems. This code tries several 10 | # variants like glibtoolize (MacOSX) and libtoolize1x (FreeBSD) 11 | 12 | set +ex 13 | echo "Looking for a version of libtoolize (which can have different names)..." 14 | libtoolize="" 15 | for l in glibtoolize libtoolize15 libtoolize14 libtoolize ; do 16 | $l --version > /dev/null 2>&1 17 | if [ $? = 0 ]; then 18 | libtoolize=$l 19 | echo "Found $l" 20 | break 21 | fi 22 | echo "Did not find $l" 23 | done 24 | 25 | if [ "x$libtoolize" = "x" ]; then 26 | echo "Can't find libtoolize on your system" 27 | exit 1 28 | fi 29 | 30 | set -ex 31 | $libtoolize -c -f 32 | rm -rf autom4te.cache Makefile.in aclocal.m4 33 | aclocal --force -I m4 34 | autoconf -f -W all,no-obsolete 35 | autoheader -f -W all 36 | 37 | # Added no-portability to suppress automake 1.12's warning about the use 38 | # of recursive variables. 39 | 40 | automake -a -c -f -W all,no-portability 41 | 42 | rm -rf autom4te.cache 43 | exit 0 44 | 45 | # end autogen.sh 46 | -------------------------------------------------------------------------------- /cmake/COPYING-CMAKE-SCRIPTS: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions 3 | are met: 4 | 5 | 1. Redistributions of source code must retain the copyright 6 | notice, this list of conditions and the following disclaimer. 7 | 2. Redistributions in binary form must reproduce the copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | 3. The name of the author may not be used to endorse or promote products 11 | derived from this software without specific prior written permission. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /cmake/FindEditline.cmake: -------------------------------------------------------------------------------- 1 | # Modified from FindReadline.cmake (PH Feb 2012) 2 | 3 | if(EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY) 4 | set(EDITLINE_FOUND TRUE) 5 | else() 6 | find_path(EDITLINE_INCLUDE_DIR readline.h PATH_SUFFIXES editline edit/readline) 7 | 8 | find_library(EDITLINE_LIBRARY NAMES edit) 9 | include(FindPackageHandleStandardArgs) 10 | find_package_handle_standard_args(Editline DEFAULT_MSG EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY) 11 | 12 | mark_as_advanced(EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY) 13 | endif() 14 | -------------------------------------------------------------------------------- /cmake/FindReadline.cmake: -------------------------------------------------------------------------------- 1 | # from http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/FindReadline.cmake 2 | # http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/COPYING-CMAKE-SCRIPTS 3 | # --> BSD licensed 4 | # 5 | # GNU Readline library finder 6 | if(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY) 7 | set(READLINE_FOUND TRUE) 8 | else() 9 | find_path(READLINE_INCLUDE_DIR readline/readline.h /usr/include/readline) 10 | 11 | # 2008-04-22 The next clause used to read like this: 12 | # 13 | # FIND_LIBRARY(READLINE_LIBRARY NAMES readline) 14 | # FIND_LIBRARY(NCURSES_LIBRARY NAMES ncurses ) 15 | # include(FindPackageHandleStandardArgs) 16 | # FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG NCURSES_LIBRARY READLINE_INCLUDE_DIR READLINE_LIBRARY ) 17 | # 18 | # I was advised to modify it such that it will find an ncurses library if 19 | # required, but not if one was explicitly given, that is, it allows the 20 | # default to be overridden. PH 21 | 22 | find_library(READLINE_LIBRARY NAMES readline) 23 | include(FindPackageHandleStandardArgs) 24 | find_package_handle_standard_args(Readline DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARY) 25 | 26 | mark_as_advanced(READLINE_INCLUDE_DIR READLINE_LIBRARY) 27 | endif() 28 | -------------------------------------------------------------------------------- /cmake/PCRE2CheckLinkerFlag.cmake: -------------------------------------------------------------------------------- 1 | include(CheckLinkerFlag OPTIONAL) 2 | 3 | # This file can be removed once the minimum CMake version is increased to 3.18 4 | # or higher. Calls to pcre2_check_linker_flag can be changed to the built in 5 | # check_linker_flag. 6 | 7 | if(COMMAND check_linker_flag) 8 | macro(pcre2_check_linker_flag) 9 | check_linker_flag(${ARGN}) 10 | endmacro() 11 | else() 12 | # Fallback for versions of CMake older than 3.18. 13 | 14 | include(CheckCCompilerFlag) 15 | 16 | function(pcre2_check_linker_flag lang flag out_var) 17 | cmake_policy(PUSH) 18 | cmake_policy(SET CMP0056 NEW) 19 | set(_CMAKE_EXE_LINKER_FLAGS_SAVE ${CMAKE_EXE_LINKER_FLAGS}) 20 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}") 21 | check_c_compiler_flag("" ${out_var}) 22 | set(CMAKE_EXE_LINKER_FLAGS ${_CMAKE_EXE_LINKER_FLAGS_SAVE}) 23 | cmake_policy(POP) 24 | endfunction() 25 | endif() 26 | -------------------------------------------------------------------------------- /doc/html/pcre2_code_copy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_code_copy specification 4 | 5 | 6 |

pcre2_code_copy man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_code *pcre2_code_copy(const pcre2_code *code); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function makes a copy of the memory used for a compiled pattern, excluding 29 | any memory used by the JIT compiler. Without a subsequent call to 30 | pcre2_jit_compile(), the copy can be used only for non-JIT matching. The 31 | pointer to the character tables is copied, not the tables themselves (see 32 | pcre2_code_copy_with_tables()). The yield of the function is NULL if 33 | code is NULL or if sufficient memory cannot be obtained. 34 |

35 |

36 | There is a complete description of the PCRE2 native API in the 37 | pcre2api 38 | page and a description of the POSIX API in the 39 | pcre2posix 40 | page. 41 |

42 | Return to the PCRE2 index page. 43 |

44 | -------------------------------------------------------------------------------- /doc/html/pcre2_code_copy_with_tables.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_code_copy_with_tables specification 4 | 5 | 6 |

pcre2_code_copy_with_tables man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_code *pcre2_code_copy_with_tables(const pcre2_code *code); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function makes a copy of the memory used for a compiled pattern, excluding 29 | any memory used by the JIT compiler. Without a subsequent call to 30 | pcre2_jit_compile(), the copy can be used only for non-JIT matching. 31 | Unlike pcre2_code_copy(), a separate copy of the character tables is also 32 | made, with the new code pointing to it. This memory will be automatically freed 33 | when pcre2_code_free() is called. The yield of the function is NULL if 34 | code is NULL or if sufficient memory cannot be obtained. 35 |

36 |

37 | There is a complete description of the PCRE2 native API in the 38 | pcre2api 39 | page and a description of the POSIX API in the 40 | pcre2posix 41 | page. 42 |

43 | Return to the PCRE2 index page. 44 |

45 | -------------------------------------------------------------------------------- /doc/html/pcre2_code_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_code_free specification 4 | 5 | 6 |

pcre2_code_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_code_free(pcre2_code *code); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | If code is NULL, this function does nothing. Otherwise, code must 29 | point to a compiled pattern. This function frees its memory, including any 30 | memory used by the JIT compiler. If the compiled pattern was created by a call 31 | to pcre2_code_copy_with_tables(), the memory for the character tables is 32 | also freed. 33 |

34 |

35 | There is a complete description of the PCRE2 native API in the 36 | pcre2api 37 | page and a description of the POSIX API in the 38 | pcre2posix 39 | page. 40 |

41 | Return to the PCRE2 index page. 42 |

43 | -------------------------------------------------------------------------------- /doc/html/pcre2_compile_context_copy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_compile_context_copy specification 4 | 5 | 6 |

pcre2_compile_context_copy man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_compile_context *pcre2_compile_context_copy( 23 | pcre2_compile_context *ccontext); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function makes a new copy of a compile context, using the memory 30 | allocation function that was used for the original context. The result is NULL 31 | if the memory cannot be obtained. 32 |

33 |

34 | There is a complete description of the PCRE2 native API in the 35 | pcre2api 36 | page and a description of the POSIX API in the 37 | pcre2posix 38 | page. 39 |

40 | Return to the PCRE2 index page. 41 |

42 | -------------------------------------------------------------------------------- /doc/html/pcre2_compile_context_create.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_compile_context_create specification 4 | 5 | 6 |

pcre2_compile_context_create man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_compile_context *pcre2_compile_context_create( 23 | pcre2_general_context *gcontext); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function creates and initializes a new compile context. If its argument is 30 | NULL, malloc() is used to get the necessary memory; otherwise the memory 31 | allocation function within the general context is used. The result is NULL if 32 | the memory could not be obtained. 33 |

34 |

35 | There is a complete description of the PCRE2 native API in the 36 | pcre2api 37 | page and a description of the POSIX API in the 38 | pcre2posix 39 | page. 40 |

41 | Return to the PCRE2 index page. 42 |

43 | -------------------------------------------------------------------------------- /doc/html/pcre2_compile_context_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_compile_context_free specification 4 | 5 | 6 |

pcre2_compile_context_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_compile_context_free(pcre2_compile_context *ccontext); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function frees the memory occupied by a compile context, using the memory 29 | freeing function from the general context with which it was created, or 30 | free() if that was not set. If the argument is NULL, the function returns 31 | immediately without doing anything. 32 |

33 |

34 | There is a complete description of the PCRE2 native API in the 35 | pcre2api 36 | page and a description of the POSIX API in the 37 | pcre2posix 38 | page. 39 |

40 | Return to the PCRE2 index page. 41 |

42 | -------------------------------------------------------------------------------- /doc/html/pcre2_convert_context_copy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_convert_context_copy specification 4 | 5 | 6 |

pcre2_convert_context_copy man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_convert_context *pcre2_convert_context_copy( 23 | pcre2_convert_context *cvcontext); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function is part of an experimental set of pattern conversion functions. 30 | It makes a new copy of a convert context, using the memory allocation function 31 | that was used for the original context. The result is NULL if the memory cannot 32 | be obtained. 33 |

34 |

35 | The pattern conversion functions are described in the 36 | pcre2convert 37 | documentation. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_convert_context_create.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_convert_context_create specification 4 | 5 | 6 |

pcre2_convert_context_create man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_convert_context *pcre2_convert_context_create( 23 | pcre2_general_context *gcontext); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function is part of an experimental set of pattern conversion functions. 30 | It creates and initializes a new convert context. If its argument is 31 | NULL, malloc() is used to get the necessary memory; otherwise the memory 32 | allocation function within the general context is used. The result is NULL if 33 | the memory could not be obtained. 34 |

35 |

36 | The pattern conversion functions are described in the 37 | pcre2convert 38 | documentation. 39 |

40 | Return to the PCRE2 index page. 41 |

42 | -------------------------------------------------------------------------------- /doc/html/pcre2_convert_context_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_convert_context_free specification 4 | 5 | 6 |

pcre2_convert_context_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_convert_context_free(pcre2_convert_context *cvcontext); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function is part of an experimental set of pattern conversion functions. 29 | It frees the memory occupied by a convert context, using the memory 30 | freeing function from the general context with which it was created, or 31 | free() if that was not set. If the argument is NULL, the function returns 32 | immediately without doing anything. 33 |

34 |

35 | The pattern conversion functions are described in the 36 | pcre2convert 37 | documentation. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_converted_pattern_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_converted_pattern_free specification 4 | 5 | 6 |

pcre2_converted_pattern_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_converted_pattern_free(PCRE2_UCHAR *converted_pattern); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function is part of an experimental set of pattern conversion functions. 29 | It frees the memory occupied by a converted pattern that was obtained by 30 | calling pcre2_pattern_convert() with arguments that caused it to place 31 | the converted pattern into newly obtained heap memory. If the argument is NULL, 32 | the function returns immediately without doing anything. 33 |

34 |

35 | The pattern conversion functions are described in the 36 | pcre2convert 37 | documentation. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_general_context_copy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_general_context_copy specification 4 | 5 | 6 |

pcre2_general_context_copy man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_general_context *pcre2_general_context_copy( 23 | pcre2_general_context *gcontext); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function makes a new copy of a general context, using the memory 30 | allocation functions in the context, if set, to get the necessary memory. 31 | Otherwise malloc() is used. The result is NULL if the memory cannot be 32 | obtained. 33 |

34 |

35 | There is a complete description of the PCRE2 native API in the 36 | pcre2api 37 | page and a description of the POSIX API in the 38 | pcre2posix 39 | page. 40 |

41 | Return to the PCRE2 index page. 42 |

43 | -------------------------------------------------------------------------------- /doc/html/pcre2_general_context_create.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_general_context_create specification 4 | 5 | 6 |

pcre2_general_context_create man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_general_context *pcre2_general_context_create( 23 | void *(*private_malloc)(size_t, void *), 24 | void (*private_free)(void *, void *), void *memory_data); 25 |

26 |

27 | DESCRIPTION 28 |

29 |

30 | This function creates and initializes a general context. The arguments define 31 | custom memory management functions and a data value that is passed to them when 32 | they are called. The private_malloc() function is used to get memory for 33 | the context. If either of the first two arguments is NULL, the system memory 34 | management function is used. The result is NULL if no memory could be obtained. 35 |

36 |

37 | There is a complete description of the PCRE2 native API in the 38 | pcre2api 39 | page and a description of the POSIX API in the 40 | pcre2posix 41 | page. 42 |

43 | Return to the PCRE2 index page. 44 |

45 | -------------------------------------------------------------------------------- /doc/html/pcre2_general_context_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_general_context_free specification 4 | 5 | 6 |

pcre2_general_context_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_general_context_free(pcre2_general_context *gcontext); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function frees the memory occupied by a general context, using the memory 29 | freeing function within the context, if set. If the argument is NULL, the 30 | function returns immediately without doing anything. 31 |

32 |

33 | There is a complete description of the PCRE2 native API in the 34 | pcre2api 35 | page and a description of the POSIX API in the 36 | pcre2posix 37 | page. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_get_error_message.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_get_error_message specification 4 | 5 | 6 |

pcre2_get_error_message man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_get_error_message(int errorcode, PCRE2_UCHAR *buffer, 23 | PCRE2_SIZE bufflen); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function provides a textual error message for each PCRE2 error code. 30 | Compilation errors are positive numbers; UTF formatting errors and matching 31 | errors are negative numbers. The arguments are: 32 |

33 |   errorcode   an error code (positive or negative)
34 |   buffer      where to put the message
35 |   bufflen     the length of the buffer (code units)
36 | 
37 | The function returns the length of the message in code units, excluding the 38 | trailing zero, or the negative error code PCRE2_ERROR_NOMEMORY if the buffer is 39 | too small. In this case, the returned message is truncated (but still with a 40 | trailing zero). If errorcode does not contain a recognized error code 41 | number, the negative value PCRE2_ERROR_BADDATA is returned. 42 |

43 |

44 | There is a complete description of the PCRE2 native API in the 45 | pcre2api 46 | page and a description of the POSIX API in the 47 | pcre2posix 48 | page. 49 |

50 | Return to the PCRE2 index page. 51 |

52 | -------------------------------------------------------------------------------- /doc/html/pcre2_get_mark.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_get_mark specification 4 | 5 | 6 |

pcre2_get_mark man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | PCRE2_SPTR pcre2_get_mark(pcre2_match_data *match_data); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | After a call of pcre2_match() that was passed the match block that is 29 | this function's argument, this function returns a pointer to the last (*MARK), 30 | (*PRUNE), or (*THEN) name that was encountered during the matching process. The 31 | name is zero-terminated, and is within the compiled pattern. The length of the 32 | name is in the preceding code unit. If no name is available, NULL is returned. 33 |

34 |

35 | After a successful match, the name that is returned is the last one on the 36 | matching path. After a failed match or a partial match, the last encountered 37 | name is returned. 38 |

39 |

40 | There is a complete description of the PCRE2 native API in the 41 | pcre2api 42 | page and a description of the POSIX API in the 43 | pcre2posix 44 | page. 45 |

46 | Return to the PCRE2 index page. 47 |

48 | -------------------------------------------------------------------------------- /doc/html/pcre2_get_match_data_heapframes_size.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_get_match_data_heapframes_size specification 4 | 5 | 6 |

pcre2_get_match_data_heapframes_size man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | PCRE2_SIZE pcre2_get_match_data_heapframes_size( 23 | pcre2_match_data *match_data); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function returns the size, in bytes, of the heapframes data block that is 30 | owned by its argument. 31 |

32 |

33 | There is a complete description of the PCRE2 native API in the 34 | pcre2api 35 | page and a description of the POSIX API in the 36 | pcre2posix 37 | page. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_get_match_data_size.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_get_match_data_size specification 4 | 5 | 6 |

pcre2_get_match_data_size man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | PCRE2_SIZE pcre2_get_match_data_size(pcre2_match_data *match_data); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function returns the size, in bytes, of the match data block that is its 29 | argument. 30 |

31 |

32 | There is a complete description of the PCRE2 native API in the 33 | pcre2api 34 | page and a description of the POSIX API in the 35 | pcre2posix 36 | page. 37 |

38 | Return to the PCRE2 index page. 39 |

40 | -------------------------------------------------------------------------------- /doc/html/pcre2_get_ovector_count.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_get_ovector_count specification 4 | 5 | 6 |

pcre2_get_ovector_count man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | uint32_t pcre2_get_ovector_count(pcre2_match_data *match_data); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function returns the number of pairs of offsets in the ovector that forms 29 | part of the given match data block. 30 |

31 |

32 | There is a complete description of the PCRE2 native API in the 33 | pcre2api 34 | page and a description of the POSIX API in the 35 | pcre2posix 36 | page. 37 |

38 | Return to the PCRE2 index page. 39 |

40 | -------------------------------------------------------------------------------- /doc/html/pcre2_get_ovector_pointer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_get_ovector_pointer specification 4 | 5 | 6 |

pcre2_get_ovector_pointer man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | PCRE2_SIZE *pcre2_get_ovector_pointer(pcre2_match_data *match_data); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function returns a pointer to the vector of offsets that forms part of the 29 | given match data block. The number of pairs can be found by calling 30 | pcre2_get_ovector_count(). 31 |

32 |

33 | There is a complete description of the PCRE2 native API in the 34 | pcre2api 35 | page and a description of the POSIX API in the 36 | pcre2posix 37 | page. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_get_startchar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_get_startchar specification 4 | 5 | 6 |

pcre2_get_startchar man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | PCRE2_SIZE pcre2_get_startchar(pcre2_match_data *match_data); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | After a successful call of pcre2_match() that was passed the match block 29 | that is this function's argument, this function returns the code unit offset of 30 | the character at which the successful match started. For a non-partial match, 31 | this can be different to the value of ovector[0] if the pattern contains 32 | the \K escape sequence. After a partial match, however, this value is always 33 | the same as ovector[0] because \K does not affect the result of a 34 | partial match. 35 |

36 |

37 | There is a complete description of the PCRE2 native API in the 38 | pcre2api 39 | page and a description of the POSIX API in the 40 | pcre2posix 41 | page. 42 |

43 | Return to the PCRE2 index page. 44 |

45 | -------------------------------------------------------------------------------- /doc/html/pcre2_jit_free_unused_memory.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_jit_free_unused_memory specification 4 | 5 | 6 |

pcre2_jit_free_unused_memory man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_jit_free_unused_memory(pcre2_general_context *gcontext); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function frees unused JIT executable memory. The argument is a general 29 | context, for custom memory management, or NULL for standard memory management. 30 | JIT memory allocation retains some memory in order to improve future JIT 31 | compilation speed. In low memory conditions, 32 | pcre2_jit_free_unused_memory() can be used to cause this memory to be 33 | freed. 34 |

35 |

36 | There is a complete description of the PCRE2 native API in the 37 | pcre2api 38 | page and a description of the POSIX API in the 39 | pcre2posix 40 | page. 41 |

42 | Return to the PCRE2 index page. 43 |

44 | -------------------------------------------------------------------------------- /doc/html/pcre2_jit_stack_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_jit_stack_free specification 4 | 5 | 6 |

pcre2_jit_stack_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_jit_stack_free(pcre2_jit_stack *jit_stack); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function is used to free a JIT stack that was created by 29 | pcre2_jit_stack_create() when it is no longer needed. If the argument is 30 | NULL, the function returns immediately without doing anything. For more 31 | details, see the 32 | pcre2jit 33 | page. 34 |

35 |

36 | There is a complete description of the PCRE2 native API in the 37 | pcre2api 38 | page and a description of the POSIX API in the 39 | pcre2posix 40 | page. 41 |

42 | Return to the PCRE2 index page. 43 |

44 | -------------------------------------------------------------------------------- /doc/html/pcre2_maketables.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_maketables specification 4 | 5 | 6 |

pcre2_maketables man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | const uint8_t *pcre2_maketables(pcre2_general_context *gcontext); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function builds a set of character tables for character code points that 29 | are less than 256. These can be passed to pcre2_compile() in a compile 30 | context in order to override the internal, built-in tables (which were either 31 | defaulted or made by pcre2_maketables() when PCRE2 was compiled). See the 32 | pcre2_set_character_tables() 33 | page. You might want to do this if you are using a non-standard locale. 34 |

35 |

36 | If the argument is NULL, malloc() is used to get memory for the tables. 37 | Otherwise it must point to a general context, which can supply pointers to a 38 | custom memory manager. The function yields a pointer to the tables. 39 |

40 |

41 | There is a complete description of the PCRE2 native API in the 42 | pcre2api 43 | page and a description of the POSIX API in the 44 | pcre2posix 45 | page. 46 |

47 | Return to the PCRE2 index page. 48 |

49 | -------------------------------------------------------------------------------- /doc/html/pcre2_maketables_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_maketables_free specification 4 | 5 | 6 |

pcre2_maketables_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_maketables_free(pcre2_general_context *gcontext, 23 | const uint8_t *tables); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function discards a set of character tables that were created by a call 30 | to 31 | pcre2_maketables(). 32 |

33 |

34 | The gcontext parameter should match what was used in that call to 35 | account for any custom allocators that might be in use; if it is NULL 36 | the system free() is used. 37 |

38 |

39 | There is a complete description of the PCRE2 native API in the 40 | pcre2api 41 | page. 42 |

43 | Return to the PCRE2 index page. 44 |

45 | -------------------------------------------------------------------------------- /doc/html/pcre2_match_context_copy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_match_context_copy specification 4 | 5 | 6 |

pcre2_match_context_copy man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_match_context *pcre2_match_context_copy( 23 | pcre2_match_context *mcontext); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function makes a new copy of a match context, using the memory 30 | allocation function that was used for the original context. The result is NULL 31 | if the memory cannot be obtained. 32 |

33 |

34 | There is a complete description of the PCRE2 native API in the 35 | pcre2api 36 | page and a description of the POSIX API in the 37 | pcre2posix 38 | page. 39 |

40 | Return to the PCRE2 index page. 41 |

42 | -------------------------------------------------------------------------------- /doc/html/pcre2_match_context_create.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_match_context_create specification 4 | 5 | 6 |

pcre2_match_context_create man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_match_context *pcre2_match_context_create( 23 | pcre2_general_context *gcontext); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function creates and initializes a new match context. If its argument is 30 | NULL, malloc() is used to get the necessary memory; otherwise the memory 31 | allocation function within the general context is used. The result is NULL if 32 | the memory could not be obtained. 33 |

34 |

35 | There is a complete description of the PCRE2 native API in the 36 | pcre2api 37 | page and a description of the POSIX API in the 38 | pcre2posix 39 | page. 40 |

41 | Return to the PCRE2 index page. 42 |

43 | -------------------------------------------------------------------------------- /doc/html/pcre2_match_context_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_match_context_free specification 4 | 5 | 6 |

pcre2_match_context_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_match_context_free(pcre2_match_context *mcontext); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function frees the memory occupied by a match context, using the memory 29 | freeing function from the general context with which it was created, or 30 | free() if that was not set. If the argument is NULL, the function returns 31 | immediately without doing anything. 32 |

33 |

34 | There is a complete description of the PCRE2 native API in the 35 | pcre2api 36 | page and a description of the POSIX API in the 37 | pcre2posix 38 | page. 39 |

40 | Return to the PCRE2 index page. 41 |

42 | -------------------------------------------------------------------------------- /doc/html/pcre2_match_data_create.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_match_data_create specification 4 | 5 | 6 |

pcre2_match_data_create man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | pcre2_match_data *pcre2_match_data_create(uint32_t ovecsize, 23 | pcre2_general_context *gcontext); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function creates a new match data block, which is used for holding the 30 | result of a match. The first argument specifies the number of pairs of offsets 31 | that are required. These form the "output vector" (ovector) within the match 32 | data block, and are used to identify the matched string and any captured 33 | substrings when matching with pcre2_match(), or a number of different 34 | matches at the same point when used with pcre2_dfa_match(). There is 35 | always one pair of offsets; if ovecsize is zero, it is treated as one. 36 |

37 |

38 | The second argument points to a general context, for custom memory management, 39 | or is NULL for system memory management. The result of the function is NULL if 40 | the memory for the block could not be obtained. 41 |

42 |

43 | There is a complete description of the PCRE2 native API in the 44 | pcre2api 45 | page and a description of the POSIX API in the 46 | pcre2posix 47 | page. 48 |

49 | Return to the PCRE2 index page. 50 |

51 | -------------------------------------------------------------------------------- /doc/html/pcre2_match_data_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_match_data_free specification 4 | 5 | 6 |

pcre2_match_data_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_match_data_free(pcre2_match_data *match_data); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | If match_data is NULL, this function does nothing. Otherwise, 29 | match_data must point to a match data block, which this function frees, 30 | using the memory freeing function from the general context or compiled pattern 31 | with which it was created, or free() if that was not set. If the match 32 | data block was previously passed to pcre2_match(), it will have an 33 | attached heapframe vector; this is also freed. 34 |

35 |

36 | If the PCRE2_COPY_MATCHED_SUBJECT was used for a successful match using this 37 | match data block, the copy of the subject that was referenced within the block 38 | is also freed. 39 |

40 |

41 | There is a complete description of the PCRE2 native API in the 42 | pcre2api 43 | page and a description of the POSIX API in the 44 | pcre2posix 45 | page. 46 |

47 | Return to the PCRE2 index page. 48 |

49 | -------------------------------------------------------------------------------- /doc/html/pcre2_serialize_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_serialize_free specification 4 | 5 | 6 |

pcre2_serialize_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_serialize_free(uint8_t *bytes); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This function frees the memory that was obtained by 29 | pcre2_serialize_encode() to hold a serialized byte stream. The argument 30 | must point to such a byte stream or be NULL, in which case the function returns 31 | without doing anything. 32 |

33 |

34 | There is a complete description of the PCRE2 native API in the 35 | pcre2api 36 | page and a description of the serialization functions in the 37 | pcre2serialize 38 | page. 39 |

40 | Return to the PCRE2 index page. 41 |

42 | -------------------------------------------------------------------------------- /doc/html/pcre2_serialize_get_number_of_codes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_serialize_get_number_of_codes specification 4 | 5 | 6 |

pcre2_serialize_get_number_of_codes man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int32_t pcre2_serialize_get_number_of_codes(const uint8_t *bytes); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | The bytes argument must point to a serialized byte stream that was 29 | originally created by pcre2_serialize_encode() (though it may have been 30 | saved on disc or elsewhere in the meantime). The function returns the number of 31 | serialized patterns in the byte stream, or one of the following negative error 32 | codes: 33 |

34 |   PCRE2_ERROR_BADMAGIC  mismatch of id bytes in bytes
35 |   PCRE2_ERROR_BADMODE   mismatch of variable unit size or PCRE version
36 |   PCRE2_ERROR_NULL      the argument is NULL
37 | 
38 | PCRE2_ERROR_BADMAGIC may mean that the data is corrupt, or that it was compiled 39 | on a system with different endianness. 40 |

41 |

42 | There is a complete description of the PCRE2 native API in the 43 | pcre2api 44 | page and a description of the serialization functions in the 45 | pcre2serialize 46 | page. 47 |

48 | Return to the PCRE2 index page. 49 |

50 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_bsr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_bsr specification 4 | 5 | 6 |

pcre2_set_bsr man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_bsr(pcre2_compile_context *ccontext, 23 | uint32_t value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets the convention for processing \R within a compile context. 30 | The second argument must be one of PCRE2_BSR_ANYCRLF or PCRE2_BSR_UNICODE. The 31 | result is zero for success or PCRE2_ERROR_BADDATA if the second argument is 32 | invalid. 33 |

34 |

35 | There is a complete description of the PCRE2 native API in the 36 | pcre2api 37 | page and a description of the POSIX API in the 38 | pcre2posix 39 | page. 40 |

41 | Return to the PCRE2 index page. 42 |

43 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_callout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_callout specification 4 | 5 | 6 |

pcre2_set_callout man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_callout(pcre2_match_context *mcontext, 23 | int (*callout_function)(pcre2_callout_block *), 24 | void *callout_data); 25 |

26 |

27 | DESCRIPTION 28 |

29 |

30 | This function sets the callout fields in a match context (the first argument). 31 | The second argument specifies a callout function, and the third argument is an 32 | opaque data item that is passed to it. The result of this function is always 33 | zero. 34 |

35 |

36 | There is a complete description of the PCRE2 native API in the 37 | pcre2api 38 | page and a description of the POSIX API in the 39 | pcre2posix 40 | page. 41 |

42 | Return to the PCRE2 index page. 43 |

44 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_character_tables.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_character_tables specification 4 | 5 | 6 |

pcre2_set_character_tables man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_character_tables(pcre2_compile_context *ccontext, 23 | const uint8_t *tables); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets a pointer to custom character tables within a compile 30 | context. The second argument must point to a set of PCRE2 character tables or 31 | be NULL to request the default tables. The result is always zero. Character 32 | tables can be created by calling pcre2_maketables() or by running the 33 | pcre2_dftables maintenance command in binary mode (see the 34 | pcre2build 35 | documentation). 36 |

37 |

38 | There is a complete description of the PCRE2 native API in the 39 | pcre2api 40 | page and a description of the POSIX API in the 41 | pcre2posix 42 | page. 43 |

44 | Return to the PCRE2 index page. 45 |

46 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_compile_recursion_guard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_compile_recursion_guard specification 4 | 5 | 6 |

pcre2_set_compile_recursion_guard man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_compile_recursion_guard(pcre2_compile_context *ccontext, 23 | int (*guard_function)(uint32_t, void *), void *user_data); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function defines, within a compile context, a function that is called 30 | whenever pcre2_compile() starts to compile a parenthesized part of a 31 | pattern. The first argument to the function gives the current depth of 32 | parenthesis nesting, and the second is user data that is supplied when the 33 | function is set up. The callout function should return zero if all is well, or 34 | non-zero to force an error. This feature is provided so that applications can 35 | check the available system stack space, in order to avoid running out. The 36 | result of pcre2_set_compile_recursion_guard() is always zero. 37 |

38 |

39 | There is a complete description of the PCRE2 native API in the 40 | pcre2api 41 | page and a description of the POSIX API in the 42 | pcre2posix 43 | page. 44 |

45 | Return to the PCRE2 index page. 46 |

47 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_depth_limit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_depth_limit specification 4 | 5 | 6 |

pcre2_set_depth_limit man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_depth_limit(pcre2_match_context *mcontext, 23 | uint32_t value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets the backtracking depth limit field in a match context. The 30 | result is always zero. 31 |

32 |

33 | There is a complete description of the PCRE2 native API in the 34 | pcre2api 35 | page and a description of the POSIX API in the 36 | pcre2posix 37 | page. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_glob_escape.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_glob_escape specification 4 | 5 | 6 |

pcre2_set_glob_escape man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_glob_escape(pcre2_convert_context *cvcontext, 23 | uint32_t escape_char); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function is part of an experimental set of pattern conversion functions. 30 | It sets the escape character that is used when converting globs. The second 31 | argument must either be zero (meaning there is no escape character) or a 32 | punctuation character whose code point is less than 256. The default is grave 33 | accent if running under Windows, otherwise backslash. The result of the 34 | function is zero for success or PCRE2_ERROR_BADDATA if the second argument is 35 | invalid. 36 |

37 |

38 | The pattern conversion functions are described in the 39 | pcre2convert 40 | documentation. 41 |

42 | Return to the PCRE2 index page. 43 |

44 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_glob_separator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_glob_separator specification 4 | 5 | 6 |

pcre2_set_glob_separator man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_glob_separator(pcre2_convert_context *cvcontext, 23 | uint32_t separator_char); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function is part of an experimental set of pattern conversion functions. 30 | It sets the component separator character that is used when converting globs. 31 | The second argument must be one of the characters forward slash, backslash, or 32 | dot. The default is backslash when running under Windows, otherwise forward 33 | slash. The result of the function is zero for success or PCRE2_ERROR_BADDATA if 34 | the second argument is invalid. 35 |

36 |

37 | The pattern conversion functions are described in the 38 | pcre2convert 39 | documentation. 40 |

41 | Return to the PCRE2 index page. 42 |

43 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_heap_limit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_heap_limit specification 4 | 5 | 6 |

pcre2_set_heap_limit man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_heap_limit(pcre2_match_context *mcontext, 23 | uint32_t value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets the backtracking heap limit field in a match context. The 30 | result is always zero. 31 |

32 |

33 | There is a complete description of the PCRE2 native API in the 34 | pcre2api 35 | page and a description of the POSIX API in the 36 | pcre2posix 37 | page. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_match_limit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_match_limit specification 4 | 5 | 6 |

pcre2_set_match_limit man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_match_limit(pcre2_match_context *mcontext, 23 | uint32_t value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets the match limit field in a match context. The result is 30 | always zero. 31 |

32 |

33 | There is a complete description of the PCRE2 native API in the 34 | pcre2api 35 | page and a description of the POSIX API in the 36 | pcre2posix 37 | page. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_max_pattern_compiled_length.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_max_pattern_compiled_length specification 4 | 5 | 6 |

pcre2_set_max_pattern_compiled_length man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_max_pattern_compiled_length( 23 | pcre2_compile_context *ccontext, PCRE2_SIZE value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets, in a compile context, the maximum size (in bytes) for the 30 | memory needed to hold the compiled version of a pattern that is using this 31 | context. The result is always zero. If a pattern that is passed to 32 | pcre2_compile() referencing this context needs more memory, an error is 33 | generated. The default is the largest number that a PCRE2_SIZE variable can 34 | hold, which is effectively unlimited. 35 |

36 |

37 | There is a complete description of the PCRE2 native API in the 38 | pcre2api 39 | page and a description of the POSIX API in the 40 | pcre2posix 41 | page. 42 |

43 | Return to the PCRE2 index page. 44 |

45 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_max_pattern_length.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_max_pattern_length specification 4 | 5 | 6 |

pcre2_set_max_pattern_length man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_max_pattern_length(pcre2_compile_context *ccontext, 23 | PCRE2_SIZE value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets, in a compile context, the maximum text length (in code 30 | units) of the pattern that can be compiled. The result is always zero. If a 31 | longer pattern is passed to pcre2_compile() there is an immediate error 32 | return. The default is effectively unlimited, being the largest value a 33 | PCRE2_SIZE variable can hold. 34 |

35 |

36 | There is a complete description of the PCRE2 native API in the 37 | pcre2api 38 | page and a description of the POSIX API in the 39 | pcre2posix 40 | page. 41 |

42 | Return to the PCRE2 index page. 43 |

44 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_max_varlookbehind.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_max_varlookbehind specification 4 | 5 | 6 |

pcre2_set_max_varlookbehind man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_max_varlookbehind(pcre2_compile_context *ccontext, 23 | uint32_t value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This sets a maximum length for the number of characters matched by a 30 | variable-length lookbehind assertion. The default is set when PCRE2 is built, 31 | with the ultimate default being 255, the same as Perl. Lookbehind assertions 32 | without a bounding length are not supported. The result is always zero. 33 |

34 |

35 | There is a complete description of the PCRE2 native API in the 36 | pcre2api 37 | page and a description of the POSIX API in the 38 | pcre2posix 39 | page. 40 |

41 | Return to the PCRE2 index page. 42 |

43 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_newline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_newline specification 4 | 5 | 6 |

pcre2_set_newline man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_newline(pcre2_compile_context *ccontext, 23 | uint32_t value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets the newline convention within a compile context. This 30 | specifies which character(s) are recognized as newlines when compiling and 31 | matching patterns. The second argument must be one of: 32 |

33 |   PCRE2_NEWLINE_CR        Carriage return only
34 |   PCRE2_NEWLINE_LF        Linefeed only
35 |   PCRE2_NEWLINE_CRLF      CR followed by LF only
36 |   PCRE2_NEWLINE_ANYCRLF   Any of the above
37 |   PCRE2_NEWLINE_ANY       Any Unicode newline sequence
38 |   PCRE2_NEWLINE_NUL       The NUL character (binary zero)
39 | 
40 | The result is zero for success or PCRE2_ERROR_BADDATA if the second argument is 41 | invalid. 42 |

43 |

44 | There is a complete description of the PCRE2 native API in the 45 | pcre2api 46 | page and a description of the POSIX API in the 47 | pcre2posix 48 | page. 49 |

50 | Return to the PCRE2 index page. 51 |

52 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_offset_limit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_offset_limit specification 4 | 5 | 6 |

pcre2_set_offset_limit man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_offset_limit(pcre2_match_context *mcontext, 23 | PCRE2_SIZE value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets the offset limit field in a match context. The result is 30 | always zero. 31 |

32 |

33 | There is a complete description of the PCRE2 native API in the 34 | pcre2api 35 | page and a description of the POSIX API in the 36 | pcre2posix 37 | page. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_parens_nest_limit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_parens_nest_limit specification 4 | 5 | 6 |

pcre2_set_parens_nest_limit man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_parens_nest_limit(pcre2_compile_context *ccontext, 23 | uint32_t value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function sets, in a compile context, the maximum depth of nested 30 | parentheses in a pattern. The result is always zero. 31 |

32 |

33 | There is a complete description of the PCRE2 native API in the 34 | pcre2api 35 | page and a description of the POSIX API in the 36 | pcre2posix 37 | page. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_recursion_limit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_recursion_limit specification 4 | 5 | 6 |

pcre2_set_recursion_limit man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_recursion_limit(pcre2_match_context *mcontext, 23 | uint32_t value); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function is obsolete and should not be used in new code. Use 30 | pcre2_set_depth_limit() instead. 31 |

32 |

33 | There is a complete description of the PCRE2 native API in the 34 | pcre2api 35 | page and a description of the POSIX API in the 36 | pcre2posix 37 | page. 38 |

39 | Return to the PCRE2 index page. 40 |

41 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_recursion_memory_management.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_recursion_memory_management specification 4 | 5 | 6 |

pcre2_set_recursion_memory_management man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_recursion_memory_management( 23 | pcre2_match_context *mcontext, 24 | void *(*private_malloc)(size_t, void *), 25 | void (*private_free)(void *, void *), void *memory_data); 26 |

27 |

28 | DESCRIPTION 29 |

30 |

31 | From release 10.30 onwards, this function is obsolete and does nothing. The 32 | result is always zero. 33 |

34 |

35 | There is a complete description of the PCRE2 native API in the 36 | pcre2api 37 | page and a description of the POSIX API in the 38 | pcre2posix 39 | page. 40 |

41 | Return to the PCRE2 index page. 42 |

43 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_substitute_callout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_substitute_callout specification 4 | 5 | 6 |

pcre2_set_substitute_callout man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_substitute_callout(pcre2_match_context *mcontext, 23 | int (*callout_function)(pcre2_substitute_callout_block *, void *), 24 | void *callout_data); 25 |

26 |

27 | DESCRIPTION 28 |

29 |

30 | This function sets the substitute callout fields in a match context (the first 31 | argument). The second argument specifies a callout function, and the third 32 | argument is an opaque data item that is passed to it. The result of this 33 | function is always zero. 34 |

35 |

36 | There is a complete description of the PCRE2 native API in the 37 | pcre2api 38 | page and a description of the POSIX API in the 39 | pcre2posix 40 | page. 41 |

42 | Return to the PCRE2 index page. 43 |

44 | -------------------------------------------------------------------------------- /doc/html/pcre2_set_substitute_case_callout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_set_substitute_case_callout specification 4 | 5 | 6 |

pcre2_set_substitute_case_callout man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_set_substitute_case_callout(pcre2_match_context *mcontext, 23 | PCRE2_SIZE (*callout_function)(PCRE2_SPTR, PCRE2_SIZE, 24 | PCRE2_UCHAR *, PCRE2_SIZE, 25 | int, void *), 26 | void *callout_data); 27 |

28 |

29 | DESCRIPTION 30 |

31 |

32 | This function sets the substitute case callout fields in a match context (the 33 | first argument). The second argument specifies a callout function, and the third 34 | argument is an opaque data item that is passed to it. The result of this 35 | function is always zero. 36 |

37 |

38 | There is a complete description of the PCRE2 native API in the 39 | pcre2api 40 | page and a description of the POSIX API in the 41 | pcre2posix 42 | page. 43 |

44 | Return to the PCRE2 index page. 45 |

46 | -------------------------------------------------------------------------------- /doc/html/pcre2_substring_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_substring_free specification 4 | 5 | 6 |

pcre2_substring_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_substring_free(PCRE2_UCHAR *buffer); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This is a convenience function for freeing the memory obtained by a previous 29 | call to pcre2_substring_get_byname() or 30 | pcre2_substring_get_bynumber(). Its only argument is a pointer to the 31 | string. If the argument is NULL, the function does nothing. 32 |

33 |

34 | There is a complete description of the PCRE2 native API in the 35 | pcre2api 36 | page and a description of the POSIX API in the 37 | pcre2posix 38 | page. 39 |

40 | Return to the PCRE2 index page. 41 |

42 | -------------------------------------------------------------------------------- /doc/html/pcre2_substring_length_byname.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_substring_length_byname specification 4 | 5 | 6 |

pcre2_substring_length_byname man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_substring_length_byname(pcre2_match_data *match_data, 23 | PCRE2_SPTR name, PCRE2_SIZE *length); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function returns the length of a matched substring, identified by name. 30 | The arguments are: 31 |

32 |   match_data   The match data block for the match
33 |   name         The substring name
34 |   length       Where to return the length
35 | 
36 | The yield is zero on success, or an error code if the substring is not found. 37 |

38 |

39 | There is a complete description of the PCRE2 native API in the 40 | pcre2api 41 | page and a description of the POSIX API in the 42 | pcre2posix 43 | page. 44 |

45 | Return to the PCRE2 index page. 46 |

47 | -------------------------------------------------------------------------------- /doc/html/pcre2_substring_length_bynumber.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_substring_length_bynumber specification 4 | 5 | 6 |

pcre2_substring_length_bynumber man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_substring_length_bynumber(pcre2_match_data *match_data, 23 | uint32_t number, PCRE2_SIZE *length); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This function returns the length of a matched substring, identified by number. 30 | The arguments are: 31 |

32 |   match_data   The match data block for the match
33 |   number       The substring number
34 |   length       Where to return the length, or NULL
35 | 
36 | The third argument may be NULL if all you want to know is whether or not a 37 | substring is set. The yield is zero on success, or a negative error code 38 | otherwise. After a partial match, only substring 0 is available. 39 |

40 |

41 | There is a complete description of the PCRE2 native API in the 42 | pcre2api 43 | page and a description of the POSIX API in the 44 | pcre2posix 45 | page. 46 |

47 | Return to the PCRE2 index page. 48 |

49 | -------------------------------------------------------------------------------- /doc/html/pcre2_substring_list_free.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_substring_list_free specification 4 | 5 | 6 |

pcre2_substring_list_free man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | void pcre2_substring_list_free(PCRE2_UCHAR **list); 23 |

24 |

25 | DESCRIPTION 26 |

27 |

28 | This is a convenience function for freeing the store obtained by a previous 29 | call to pcre2substring_list_get(). Its only argument is a pointer to 30 | the list of string pointers. If the argument is NULL, the function returns 31 | immediately, without doing anything. 32 |

33 |

34 | There is a complete description of the PCRE2 native API in the 35 | pcre2api 36 | page and a description of the POSIX API in the 37 | pcre2posix 38 | page. 39 |

40 | Return to the PCRE2 index page. 41 |

42 | -------------------------------------------------------------------------------- /doc/html/pcre2_substring_number_from_name.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | pcre2_substring_number_from_name specification 4 | 5 | 6 |

pcre2_substring_number_from_name man page

7 |

8 | Return to the PCRE2 index page. 9 |

10 |

11 | This page is part of the PCRE2 HTML documentation. It was generated 12 | automatically from the original man page. If there is any nonsense in it, 13 | please consult the man page, in case the conversion went wrong. 14 |
15 |

16 | SYNOPSIS 17 |

18 |

19 | #include <pcre2.h> 20 |

21 |

22 | int pcre2_substring_number_from_name(const pcre2_code *code, 23 | PCRE2_SPTR name); 24 |

25 |

26 | DESCRIPTION 27 |

28 |

29 | This convenience function finds the number of a named substring capturing 30 | parenthesis in a compiled pattern, provided that it is a unique name. The 31 | function arguments are: 32 |

33 |   code    Compiled regular expression
34 |   name    Name whose number is required
35 | 
36 | The yield of the function is the number of the parenthesis if the name is 37 | found, or PCRE2_ERROR_NOSUBSTRING if it is not found. When duplicate names are 38 | allowed (PCRE2_DUPNAMES is set), if the name is not unique, 39 | PCRE2_ERROR_NOUNIQUESUBSTRING is returned. You can obtain the list of numbers 40 | with the same name by calling pcre2_substring_nametable_scan(). 41 |

42 |

43 | There is a complete description of the PCRE2 native API in the 44 | pcre2api 45 | page and a description of the POSIX API in the 46 | pcre2posix 47 | page. 48 |

49 | Return to the PCRE2 index page. 50 |

51 | -------------------------------------------------------------------------------- /doc/pcre2_code_copy.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_CODE_COPY 3 "22 November 2016" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_code *pcre2_code_copy(const pcre2_code *\fIcode\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function makes a copy of the memory used for a compiled pattern, excluding 17 | any memory used by the JIT compiler. Without a subsequent call to 18 | \fBpcre2_jit_compile()\fP, the copy can be used only for non-JIT matching. The 19 | pointer to the character tables is copied, not the tables themselves (see 20 | \fBpcre2_code_copy_with_tables()\fP). The yield of the function is NULL if 21 | \fIcode\fP is NULL or if sufficient memory cannot be obtained. 22 | .P 23 | There is a complete description of the PCRE2 native API in the 24 | .\" HREF 25 | \fBpcre2api\fP 26 | .\" 27 | page and a description of the POSIX API in the 28 | .\" HREF 29 | \fBpcre2posix\fP 30 | .\" 31 | page. 32 | -------------------------------------------------------------------------------- /doc/pcre2_code_copy_with_tables.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_CODE_COPY 3 "16 January 2017" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_code *pcre2_code_copy_with_tables(const pcre2_code *\fIcode\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function makes a copy of the memory used for a compiled pattern, excluding 17 | any memory used by the JIT compiler. Without a subsequent call to 18 | \fBpcre2_jit_compile()\fP, the copy can be used only for non-JIT matching. 19 | Unlike \fBpcre2_code_copy()\fP, a separate copy of the character tables is also 20 | made, with the new code pointing to it. This memory will be automatically freed 21 | when \fBpcre2_code_free()\fP is called. The yield of the function is NULL if 22 | \fIcode\fP is NULL or if sufficient memory cannot be obtained. 23 | .P 24 | There is a complete description of the PCRE2 native API in the 25 | .\" HREF 26 | \fBpcre2api\fP 27 | .\" 28 | page and a description of the POSIX API in the 29 | .\" HREF 30 | \fBpcre2posix\fP 31 | .\" 32 | page. 33 | -------------------------------------------------------------------------------- /doc/pcre2_code_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_CODE_FREE 3 "28 June 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_code_free(pcre2_code *\fIcode\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | If \fIcode\fP is NULL, this function does nothing. Otherwise, \fIcode\fP must 17 | point to a compiled pattern. This function frees its memory, including any 18 | memory used by the JIT compiler. If the compiled pattern was created by a call 19 | to \fBpcre2_code_copy_with_tables()\fP, the memory for the character tables is 20 | also freed. 21 | .P 22 | There is a complete description of the PCRE2 native API in the 23 | .\" HREF 24 | \fBpcre2api\fP 25 | .\" 26 | page and a description of the POSIX API in the 27 | .\" HREF 28 | \fBpcre2posix\fP 29 | .\" 30 | page. 31 | -------------------------------------------------------------------------------- /doc/pcre2_compile_context_copy.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_COMPILE_CONTEXT_COPY 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_compile_context *pcre2_compile_context_copy( 11 | .B " pcre2_compile_context *\fIccontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function makes a new copy of a compile context, using the memory 18 | allocation function that was used for the original context. The result is NULL 19 | if the memory cannot be obtained. 20 | .P 21 | There is a complete description of the PCRE2 native API in the 22 | .\" HREF 23 | \fBpcre2api\fP 24 | .\" 25 | page and a description of the POSIX API in the 26 | .\" HREF 27 | \fBpcre2posix\fP 28 | .\" 29 | page. 30 | -------------------------------------------------------------------------------- /doc/pcre2_compile_context_create.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_COMPILE_CONTEXT_CREATE 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_compile_context *pcre2_compile_context_create( 11 | .B " pcre2_general_context *\fIgcontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function creates and initializes a new compile context. If its argument is 18 | NULL, \fBmalloc()\fP is used to get the necessary memory; otherwise the memory 19 | allocation function within the general context is used. The result is NULL if 20 | the memory could not be obtained. 21 | .P 22 | There is a complete description of the PCRE2 native API in the 23 | .\" HREF 24 | \fBpcre2api\fP 25 | .\" 26 | page and a description of the POSIX API in the 27 | .\" HREF 28 | \fBpcre2posix\fP 29 | .\" 30 | page. 31 | -------------------------------------------------------------------------------- /doc/pcre2_compile_context_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_COMPILE_CONTEXT_FREE 3 "28 June 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_compile_context_free(pcre2_compile_context *\fIccontext\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function frees the memory occupied by a compile context, using the memory 17 | freeing function from the general context with which it was created, or 18 | \fBfree()\fP if that was not set. If the argument is NULL, the function returns 19 | immediately without doing anything. 20 | .P 21 | There is a complete description of the PCRE2 native API in the 22 | .\" HREF 23 | \fBpcre2api\fP 24 | .\" 25 | page and a description of the POSIX API in the 26 | .\" HREF 27 | \fBpcre2posix\fP 28 | .\" 29 | page. 30 | -------------------------------------------------------------------------------- /doc/pcre2_convert_context_copy.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_CONVERT_CONTEXT_COPY 3 "12 July 2017" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_convert_context *pcre2_convert_context_copy( 11 | .B " pcre2_convert_context *\fIcvcontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function is part of an experimental set of pattern conversion functions. 18 | It makes a new copy of a convert context, using the memory allocation function 19 | that was used for the original context. The result is NULL if the memory cannot 20 | be obtained. 21 | .P 22 | The pattern conversion functions are described in the 23 | .\" HREF 24 | \fBpcre2convert\fP 25 | .\" 26 | documentation. 27 | -------------------------------------------------------------------------------- /doc/pcre2_convert_context_create.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_CONVERT_CONTEXT_CREATE 3 "12 July 2017" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_convert_context *pcre2_convert_context_create( 11 | .B " pcre2_general_context *\fIgcontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function is part of an experimental set of pattern conversion functions. 18 | It creates and initializes a new convert context. If its argument is 19 | NULL, \fBmalloc()\fP is used to get the necessary memory; otherwise the memory 20 | allocation function within the general context is used. The result is NULL if 21 | the memory could not be obtained. 22 | .P 23 | The pattern conversion functions are described in the 24 | .\" HREF 25 | \fBpcre2convert\fP 26 | .\" 27 | documentation. 28 | -------------------------------------------------------------------------------- /doc/pcre2_convert_context_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_CONVERT_CONTEXT_FREE 3 "13 August 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_convert_context_free(pcre2_convert_context *\fIcvcontext\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function is part of an experimental set of pattern conversion functions. 17 | It frees the memory occupied by a convert context, using the memory 18 | freeing function from the general context with which it was created, or 19 | \fBfree()\fP if that was not set. If the argument is NULL, the function returns 20 | immediately without doing anything. 21 | .P 22 | The pattern conversion functions are described in the 23 | .\" HREF 24 | \fBpcre2convert\fP 25 | .\" 26 | documentation. 27 | -------------------------------------------------------------------------------- /doc/pcre2_converted_pattern_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_CONVERTED_PATTERN_FREE 3 "13 August 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_converted_pattern_free(PCRE2_UCHAR *\fIconverted_pattern\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function is part of an experimental set of pattern conversion functions. 17 | It frees the memory occupied by a converted pattern that was obtained by 18 | calling \fBpcre2_pattern_convert()\fP with arguments that caused it to place 19 | the converted pattern into newly obtained heap memory. If the argument is NULL, 20 | the function returns immediately without doing anything. 21 | .P 22 | The pattern conversion functions are described in the 23 | .\" HREF 24 | \fBpcre2convert\fP 25 | .\" 26 | documentation. 27 | -------------------------------------------------------------------------------- /doc/pcre2_general_context_copy.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GENERAL_CONTEXT_COPY 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_general_context *pcre2_general_context_copy( 11 | .B " pcre2_general_context *\fIgcontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function makes a new copy of a general context, using the memory 18 | allocation functions in the context, if set, to get the necessary memory. 19 | Otherwise \fBmalloc()\fP is used. The result is NULL if the memory cannot be 20 | obtained. 21 | .P 22 | There is a complete description of the PCRE2 native API in the 23 | .\" HREF 24 | \fBpcre2api\fP 25 | .\" 26 | page and a description of the POSIX API in the 27 | .\" HREF 28 | \fBpcre2posix\fP 29 | .\" 30 | page. 31 | -------------------------------------------------------------------------------- /doc/pcre2_general_context_create.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GENERAL_CONTEXT_CREATE 3 "23 January 2023" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_general_context *pcre2_general_context_create( 11 | .B " void *(*\fIprivate_malloc\fP)(size_t, void *)," 12 | .B " void (*\fIprivate_free\fP)(void *, void *), void *\fImemory_data\fP);" 13 | .fi 14 | . 15 | .SH DESCRIPTION 16 | .rs 17 | .sp 18 | This function creates and initializes a general context. The arguments define 19 | custom memory management functions and a data value that is passed to them when 20 | they are called. The \fBprivate_malloc()\fP function is used to get memory for 21 | the context. If either of the first two arguments is NULL, the system memory 22 | management function is used. The result is NULL if no memory could be obtained. 23 | .P 24 | There is a complete description of the PCRE2 native API in the 25 | .\" HREF 26 | \fBpcre2api\fP 27 | .\" 28 | page and a description of the POSIX API in the 29 | .\" HREF 30 | \fBpcre2posix\fP 31 | .\" 32 | page. 33 | -------------------------------------------------------------------------------- /doc/pcre2_general_context_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GENERAL_CONTEXT_FREE 3 "28 June 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_general_context_free(pcre2_general_context *\fIgcontext\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function frees the memory occupied by a general context, using the memory 17 | freeing function within the context, if set. If the argument is NULL, the 18 | function returns immediately without doing anything. 19 | .P 20 | There is a complete description of the PCRE2 native API in the 21 | .\" HREF 22 | \fBpcre2api\fP 23 | .\" 24 | page and a description of the POSIX API in the 25 | .\" HREF 26 | \fBpcre2posix\fP 27 | .\" 28 | page. 29 | -------------------------------------------------------------------------------- /doc/pcre2_get_error_message.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GET_ERROR_MESSAGE 3 "24 March 2017" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_get_error_message(int \fIerrorcode\fP, PCRE2_UCHAR *\fIbuffer\fP, 11 | .B " PCRE2_SIZE \fIbufflen\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function provides a textual error message for each PCRE2 error code. 18 | Compilation errors are positive numbers; UTF formatting errors and matching 19 | errors are negative numbers. The arguments are: 20 | .sp 21 | \fIerrorcode\fP an error code (positive or negative) 22 | \fIbuffer\fP where to put the message 23 | \fIbufflen\fP the length of the buffer (code units) 24 | .sp 25 | The function returns the length of the message in code units, excluding the 26 | trailing zero, or the negative error code PCRE2_ERROR_NOMEMORY if the buffer is 27 | too small. In this case, the returned message is truncated (but still with a 28 | trailing zero). If \fIerrorcode\fP does not contain a recognized error code 29 | number, the negative value PCRE2_ERROR_BADDATA is returned. 30 | .P 31 | There is a complete description of the PCRE2 native API in the 32 | .\" HREF 33 | \fBpcre2api\fP 34 | .\" 35 | page and a description of the POSIX API in the 36 | .\" HREF 37 | \fBpcre2posix\fP 38 | .\" 39 | page. 40 | -------------------------------------------------------------------------------- /doc/pcre2_get_mark.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GET_MARK 3 "13 January 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B PCRE2_SPTR pcre2_get_mark(pcre2_match_data *\fImatch_data\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | After a call of \fBpcre2_match()\fP that was passed the match block that is 17 | this function's argument, this function returns a pointer to the last (*MARK), 18 | (*PRUNE), or (*THEN) name that was encountered during the matching process. The 19 | name is zero-terminated, and is within the compiled pattern. The length of the 20 | name is in the preceding code unit. If no name is available, NULL is returned. 21 | .P 22 | After a successful match, the name that is returned is the last one on the 23 | matching path. After a failed match or a partial match, the last encountered 24 | name is returned. 25 | .P 26 | There is a complete description of the PCRE2 native API in the 27 | .\" HREF 28 | \fBpcre2api\fP 29 | .\" 30 | page and a description of the POSIX API in the 31 | .\" HREF 32 | \fBpcre2posix\fP 33 | .\" 34 | page. 35 | -------------------------------------------------------------------------------- /doc/pcre2_get_match_data_heapframes_size.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GET_MATCH_DATA_HEAPFRAMES_SIZE 3 "18 January 2023" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B PCRE2_SIZE pcre2_get_match_data_heapframes_size( 11 | .B " pcre2_match_data *\fImatch_data\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function returns the size, in bytes, of the heapframes data block that is 18 | owned by its argument. 19 | .P 20 | There is a complete description of the PCRE2 native API in the 21 | .\" HREF 22 | \fBpcre2api\fP 23 | .\" 24 | page and a description of the POSIX API in the 25 | .\" HREF 26 | \fBpcre2posix\fP 27 | .\" 28 | page. 29 | -------------------------------------------------------------------------------- /doc/pcre2_get_match_data_size.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GET_MATCH_DATA_SIZE 3 "17 October 2019" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B PCRE2_SIZE pcre2_get_match_data_size(pcre2_match_data *\fImatch_data\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function returns the size, in bytes, of the match data block that is its 17 | argument. 18 | .P 19 | There is a complete description of the PCRE2 native API in the 20 | .\" HREF 21 | \fBpcre2api\fP 22 | .\" 23 | page and a description of the POSIX API in the 24 | .\" HREF 25 | \fBpcre2posix\fP 26 | .\" 27 | page. 28 | -------------------------------------------------------------------------------- /doc/pcre2_get_ovector_count.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GET_OVECTOR_COUNT 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B uint32_t pcre2_get_ovector_count(pcre2_match_data *\fImatch_data\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function returns the number of pairs of offsets in the ovector that forms 17 | part of the given match data block. 18 | .P 19 | There is a complete description of the PCRE2 native API in the 20 | .\" HREF 21 | \fBpcre2api\fP 22 | .\" 23 | page and a description of the POSIX API in the 24 | .\" HREF 25 | \fBpcre2posix\fP 26 | .\" 27 | page. 28 | -------------------------------------------------------------------------------- /doc/pcre2_get_ovector_pointer.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GET_OVECTOR_POINTER 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B PCRE2_SIZE *pcre2_get_ovector_pointer(pcre2_match_data *\fImatch_data\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function returns a pointer to the vector of offsets that forms part of the 17 | given match data block. The number of pairs can be found by calling 18 | \fBpcre2_get_ovector_count()\fP. 19 | .P 20 | There is a complete description of the PCRE2 native API in the 21 | .\" HREF 22 | \fBpcre2api\fP 23 | .\" 24 | page and a description of the POSIX API in the 25 | .\" HREF 26 | \fBpcre2posix\fP 27 | .\" 28 | page. 29 | -------------------------------------------------------------------------------- /doc/pcre2_get_startchar.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_GET_STARTCHAR 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B PCRE2_SIZE pcre2_get_startchar(pcre2_match_data *\fImatch_data\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | After a successful call of \fBpcre2_match()\fP that was passed the match block 17 | that is this function's argument, this function returns the code unit offset of 18 | the character at which the successful match started. For a non-partial match, 19 | this can be different to the value of \fIovector[0]\fP if the pattern contains 20 | the \eK escape sequence. After a partial match, however, this value is always 21 | the same as \fIovector[0]\fP because \eK does not affect the result of a 22 | partial match. 23 | .P 24 | There is a complete description of the PCRE2 native API in the 25 | .\" HREF 26 | \fBpcre2api\fP 27 | .\" 28 | page and a description of the POSIX API in the 29 | .\" HREF 30 | \fBpcre2posix\fP 31 | .\" 32 | page. 33 | -------------------------------------------------------------------------------- /doc/pcre2_jit_free_unused_memory.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_JIT_FREE_UNUSED_MEMORY 3 "24 April 2020" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_jit_free_unused_memory(pcre2_general_context *\fIgcontext\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function frees unused JIT executable memory. The argument is a general 17 | context, for custom memory management, or NULL for standard memory management. 18 | JIT memory allocation retains some memory in order to improve future JIT 19 | compilation speed. In low memory conditions, 20 | \fBpcre2_jit_free_unused_memory()\fP can be used to cause this memory to be 21 | freed. 22 | .P 23 | There is a complete description of the PCRE2 native API in the 24 | .\" HREF 25 | \fBpcre2api\fP 26 | .\" 27 | page and a description of the POSIX API in the 28 | .\" HREF 29 | \fBpcre2posix\fP 30 | .\" 31 | page. 32 | -------------------------------------------------------------------------------- /doc/pcre2_jit_stack_create.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_JIT_STACK_CREATE 3 "23 January 2023" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_jit_stack *pcre2_jit_stack_create(size_t \fIstartsize\fP, 11 | .B " size_t \fImaxsize\fP, pcre2_general_context *\fIgcontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function is used to create a stack for use by the code compiled by the JIT 18 | compiler. The first two arguments are a starting size for the stack, and a 19 | maximum size to which it is allowed to grow. The final argument is a general 20 | context, for memory allocation functions, or NULL for standard memory 21 | allocation. The result can be passed to the JIT run-time code by calling 22 | \fBpcre2_jit_stack_assign()\fP to associate the stack with a compiled pattern, 23 | which can then be processed by \fBpcre2_match()\fP or \fBpcre2_jit_match()\fP. 24 | A maximum stack size of 512KiB to 1MiB should be more than enough for any 25 | pattern. If the stack couldn't be allocated or the values passed were not 26 | reasonable, NULL will be returned. For more details, see the 27 | .\" HREF 28 | \fBpcre2jit\fP 29 | .\" 30 | page. 31 | .P 32 | There is a complete description of the PCRE2 native API in the 33 | .\" HREF 34 | \fBpcre2api\fP 35 | .\" 36 | page and a description of the POSIX API in the 37 | .\" HREF 38 | \fBpcre2posix\fP 39 | .\" 40 | page. 41 | -------------------------------------------------------------------------------- /doc/pcre2_jit_stack_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_JIT_STACK_FREE 3 "13 August 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_jit_stack_free(pcre2_jit_stack *\fIjit_stack\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function is used to free a JIT stack that was created by 17 | \fBpcre2_jit_stack_create()\fP when it is no longer needed. If the argument is 18 | NULL, the function returns immediately without doing anything. For more 19 | details, see the 20 | .\" HREF 21 | \fBpcre2jit\fP 22 | .\" 23 | page. 24 | .P 25 | There is a complete description of the PCRE2 native API in the 26 | .\" HREF 27 | \fBpcre2api\fP 28 | .\" 29 | page and a description of the POSIX API in the 30 | .\" HREF 31 | \fBpcre2posix\fP 32 | .\" 33 | page. 34 | -------------------------------------------------------------------------------- /doc/pcre2_maketables.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_MAKETABLES 3 "28 July 2019" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B const uint8_t *pcre2_maketables(pcre2_general_context *\fIgcontext\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function builds a set of character tables for character code points that 17 | are less than 256. These can be passed to \fBpcre2_compile()\fP in a compile 18 | context in order to override the internal, built-in tables (which were either 19 | defaulted or made by \fBpcre2_maketables()\fP when PCRE2 was compiled). See the 20 | .\" HREF 21 | \fBpcre2_set_character_tables()\fP 22 | .\" 23 | page. You might want to do this if you are using a non-standard locale. 24 | .P 25 | If the argument is NULL, \fBmalloc()\fP is used to get memory for the tables. 26 | Otherwise it must point to a general context, which can supply pointers to a 27 | custom memory manager. The function yields a pointer to the tables. 28 | .P 29 | There is a complete description of the PCRE2 native API in the 30 | .\" HREF 31 | \fBpcre2api\fP 32 | .\" 33 | page and a description of the POSIX API in the 34 | .\" HREF 35 | \fBpcre2posix\fP 36 | .\" 37 | page. 38 | -------------------------------------------------------------------------------- /doc/pcre2_maketables_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_MAKETABLES_FREE 3 "03 September 2019" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_maketables_free(pcre2_general_context *\fIgcontext\fP, 11 | .B " const uint8_t *\fItables\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function discards a set of character tables that were created by a call 18 | to 19 | .\" HREF 20 | \fBpcre2_maketables()\fP. 21 | .\" 22 | .P 23 | The \fIgcontext\fP parameter should match what was used in that call to 24 | account for any custom allocators that might be in use; if it is NULL 25 | the system \fBfree()\fP is used. 26 | .P 27 | There is a complete description of the PCRE2 native API in the 28 | .\" HREF 29 | \fBpcre2api\fP 30 | .\" 31 | page. 32 | -------------------------------------------------------------------------------- /doc/pcre2_match_context_copy.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_MATCH_CONTEXT_COPY 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_match_context *pcre2_match_context_copy( 11 | .B " pcre2_match_context *\fImcontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function makes a new copy of a match context, using the memory 18 | allocation function that was used for the original context. The result is NULL 19 | if the memory cannot be obtained. 20 | .P 21 | There is a complete description of the PCRE2 native API in the 22 | .\" HREF 23 | \fBpcre2api\fP 24 | .\" 25 | page and a description of the POSIX API in the 26 | .\" HREF 27 | \fBpcre2posix\fP 28 | .\" 29 | page. 30 | -------------------------------------------------------------------------------- /doc/pcre2_match_context_create.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_MATCH_CONTEXT_CREATE 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_match_context *pcre2_match_context_create( 11 | .B " pcre2_general_context *\fIgcontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function creates and initializes a new match context. If its argument is 18 | NULL, \fBmalloc()\fP is used to get the necessary memory; otherwise the memory 19 | allocation function within the general context is used. The result is NULL if 20 | the memory could not be obtained. 21 | .P 22 | There is a complete description of the PCRE2 native API in the 23 | .\" HREF 24 | \fBpcre2api\fP 25 | .\" 26 | page and a description of the POSIX API in the 27 | .\" HREF 28 | \fBpcre2posix\fP 29 | .\" 30 | page. 31 | -------------------------------------------------------------------------------- /doc/pcre2_match_context_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_MATCH_CONTEXT_FREE 3 "28 June 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_match_context_free(pcre2_match_context *\fImcontext\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function frees the memory occupied by a match context, using the memory 17 | freeing function from the general context with which it was created, or 18 | \fBfree()\fP if that was not set. If the argument is NULL, the function returns 19 | immediately without doing anything. 20 | .P 21 | There is a complete description of the PCRE2 native API in the 22 | .\" HREF 23 | \fBpcre2api\fP 24 | .\" 25 | page and a description of the POSIX API in the 26 | .\" HREF 27 | \fBpcre2posix\fP 28 | .\" 29 | page. 30 | -------------------------------------------------------------------------------- /doc/pcre2_match_data_create.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_MATCH_DATA_CREATE 3 "28 August 2021" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_match_data *pcre2_match_data_create(uint32_t \fIovecsize\fP, 11 | .B " pcre2_general_context *\fIgcontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function creates a new match data block, which is used for holding the 18 | result of a match. The first argument specifies the number of pairs of offsets 19 | that are required. These form the "output vector" (ovector) within the match 20 | data block, and are used to identify the matched string and any captured 21 | substrings when matching with \fBpcre2_match()\fP, or a number of different 22 | matches at the same point when used with \fBpcre2_dfa_match()\fP. There is 23 | always one pair of offsets; if \fBovecsize\fP is zero, it is treated as one. 24 | .P 25 | The second argument points to a general context, for custom memory management, 26 | or is NULL for system memory management. The result of the function is NULL if 27 | the memory for the block could not be obtained. 28 | .P 29 | There is a complete description of the PCRE2 native API in the 30 | .\" HREF 31 | \fBpcre2api\fP 32 | .\" 33 | page and a description of the POSIX API in the 34 | .\" HREF 35 | \fBpcre2posix\fP 36 | .\" 37 | page. 38 | -------------------------------------------------------------------------------- /doc/pcre2_match_data_create_from_pattern.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_MATCH_DATA_CREATE_FROM_PATTERN 3 "19 August 2022" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B pcre2_match_data *pcre2_match_data_create_from_pattern( 11 | .B " const pcre2_code *\fIcode\fP, pcre2_general_context *\fIgcontext\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function creates a new match data block for holding the result of a match. 18 | The first argument points to a compiled pattern. The number of capturing 19 | parentheses within the pattern is used to compute the number of pairs of 20 | offsets that are required in the match data block. These form the "output 21 | vector" (ovector) within the match data block, and are used to identify the 22 | matched string and any captured substrings when matching with 23 | \fBpcre2_match()\fP. If you are using \fBpcre2_dfa_match()\fP, which uses the 24 | output vector in a different way, you should use \fBpcre2_match_data_create()\fP 25 | instead of this function. 26 | .P 27 | The second argument points to a general context, for custom memory management, 28 | or is NULL to use the same memory allocator as was used for the compiled 29 | pattern. The result of the function is NULL if the memory for the block could 30 | not be obtained. 31 | .P 32 | There is a complete description of the PCRE2 native API in the 33 | .\" HREF 34 | \fBpcre2api\fP 35 | .\" 36 | page and a description of the POSIX API in the 37 | .\" HREF 38 | \fBpcre2posix\fP 39 | .\" 40 | page. 41 | -------------------------------------------------------------------------------- /doc/pcre2_match_data_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_MATCH_DATA_FREE 3 "16 August 2023" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_match_data_free(pcre2_match_data *\fImatch_data\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | If \fImatch_data\fP is NULL, this function does nothing. Otherwise, 17 | \fImatch_data\fP must point to a match data block, which this function frees, 18 | using the memory freeing function from the general context or compiled pattern 19 | with which it was created, or \fBfree()\fP if that was not set. If the match 20 | data block was previously passed to \fBpcre2_match()\fP, it will have an 21 | attached heapframe vector; this is also freed. 22 | .P 23 | If the PCRE2_COPY_MATCHED_SUBJECT was used for a successful match using this 24 | match data block, the copy of the subject that was referenced within the block 25 | is also freed. 26 | .P 27 | There is a complete description of the PCRE2 native API in the 28 | .\" HREF 29 | \fBpcre2api\fP 30 | .\" 31 | page and a description of the POSIX API in the 32 | .\" HREF 33 | \fBpcre2posix\fP 34 | .\" 35 | page. 36 | -------------------------------------------------------------------------------- /doc/pcre2_next_match.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_NEXT_MATCH 3 "01 March 2025" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_next_match(pcre2_match_data *\fImatch_data\fP, 11 | .B " PCRE2_SIZE *\fIpstart_offset\fP, uint32_t *\fIpoptions\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function can be called after one of the match functions 18 | (\fBpcre2_match()\fP, \fBpcre2_dfa_match()\fP, or \fBpcre2_jit_match()\fP), and 19 | must be provided with the same \fImatch_data\fP parameter. It outputs the 20 | appropriate parameters for searching for the next match in the same subject 21 | string, and is suitable for applications providing "global" matching behaviour 22 | (for example, replacing all matches in the subject, or splitting the subject on 23 | all matches, or simply counting the number of matches). 24 | .P 25 | It returns 0 ("false") if there is no need to make any further match attempts, 26 | or 1 ("true") if another match should be attempted. 27 | .P 28 | The *\fIpstart_offset\fP and *\fIpoptions\fP are set if the function returns 1. 29 | The *\fIpstart_offset\fP should be passed to the next match attempt directly, 30 | and the *\fIpoptions\fP should be passed to the next match attempt by combining 31 | with the application's match options using OR. 32 | .P 33 | There is a complete description of the PCRE2 native API in the 34 | .\" HREF 35 | \fBpcre2api\fP 36 | .\" 37 | page and a description of the POSIX API in the 38 | .\" HREF 39 | \fBpcre2posix\fP 40 | .\" 41 | page. 42 | -------------------------------------------------------------------------------- /doc/pcre2_serialize_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SERIALIZE_FREE 3 "13 August 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_serialize_free(uint8_t *\fIbytes\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This function frees the memory that was obtained by 17 | \fBpcre2_serialize_encode()\fP to hold a serialized byte stream. The argument 18 | must point to such a byte stream or be NULL, in which case the function returns 19 | without doing anything. 20 | .P 21 | There is a complete description of the PCRE2 native API in the 22 | .\" HREF 23 | \fBpcre2api\fP 24 | .\" 25 | page and a description of the serialization functions in the 26 | .\" HREF 27 | \fBpcre2serialize\fP 28 | .\" 29 | page. 30 | -------------------------------------------------------------------------------- /doc/pcre2_serialize_get_number_of_codes.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SERIALIZE_GET_NUMBER_OF_CODES 3 "13 August 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int32_t pcre2_serialize_get_number_of_codes(const uint8_t *\fIbytes\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | The \fIbytes\fP argument must point to a serialized byte stream that was 17 | originally created by \fBpcre2_serialize_encode()\fP (though it may have been 18 | saved on disc or elsewhere in the meantime). The function returns the number of 19 | serialized patterns in the byte stream, or one of the following negative error 20 | codes: 21 | .sp 22 | PCRE2_ERROR_BADMAGIC mismatch of id bytes in \fIbytes\fP 23 | PCRE2_ERROR_BADMODE mismatch of variable unit size or PCRE version 24 | PCRE2_ERROR_NULL the argument is NULL 25 | .sp 26 | PCRE2_ERROR_BADMAGIC may mean that the data is corrupt, or that it was compiled 27 | on a system with different endianness. 28 | .P 29 | There is a complete description of the PCRE2 native API in the 30 | .\" HREF 31 | \fBpcre2api\fP 32 | .\" 33 | page and a description of the serialization functions in the 34 | .\" HREF 35 | \fBpcre2serialize\fP 36 | .\" 37 | page. 38 | -------------------------------------------------------------------------------- /doc/pcre2_set_bsr.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_BSR 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_bsr(pcre2_compile_context *\fIccontext\fP, 11 | .B " uint32_t \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets the convention for processing \eR within a compile context. 18 | The second argument must be one of PCRE2_BSR_ANYCRLF or PCRE2_BSR_UNICODE. The 19 | result is zero for success or PCRE2_ERROR_BADDATA if the second argument is 20 | invalid. 21 | .P 22 | There is a complete description of the PCRE2 native API in the 23 | .\" HREF 24 | \fBpcre2api\fP 25 | .\" 26 | page and a description of the POSIX API in the 27 | .\" HREF 28 | \fBpcre2posix\fP 29 | .\" 30 | page. 31 | -------------------------------------------------------------------------------- /doc/pcre2_set_callout.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_CALLOUT 3 "25 March 2017" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_callout(pcre2_match_context *\fImcontext\fP, 11 | .B " int (*\fIcallout_function\fP)(pcre2_callout_block *)," 12 | .B " void *\fIcallout_data\fP);" 13 | .fi 14 | . 15 | .SH DESCRIPTION 16 | .rs 17 | .sp 18 | This function sets the callout fields in a match context (the first argument). 19 | The second argument specifies a callout function, and the third argument is an 20 | opaque data item that is passed to it. The result of this function is always 21 | zero. 22 | .P 23 | There is a complete description of the PCRE2 native API in the 24 | .\" HREF 25 | \fBpcre2api\fP 26 | .\" 27 | page and a description of the POSIX API in the 28 | .\" HREF 29 | \fBpcre2posix\fP 30 | .\" 31 | page. 32 | -------------------------------------------------------------------------------- /doc/pcre2_set_character_tables.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_CHARACTER_TABLES 3 "15 April 2020" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_character_tables(pcre2_compile_context *\fIccontext\fP, 11 | .B " const uint8_t *\fItables\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets a pointer to custom character tables within a compile 18 | context. The second argument must point to a set of PCRE2 character tables or 19 | be NULL to request the default tables. The result is always zero. Character 20 | tables can be created by calling \fBpcre2_maketables()\fP or by running the 21 | \fBpcre2_dftables\fP maintenance command in binary mode (see the 22 | .\" HREF 23 | \fBpcre2build\fP 24 | .\" 25 | documentation). 26 | .P 27 | There is a complete description of the PCRE2 native API in the 28 | .\" HREF 29 | \fBpcre2api\fP 30 | .\" 31 | page and a description of the POSIX API in the 32 | .\" HREF 33 | \fBpcre2posix\fP 34 | .\" 35 | page. 36 | -------------------------------------------------------------------------------- /doc/pcre2_set_compile_recursion_guard.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_COMPILE_RECURSION_GUARD 3 "26 November 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_compile_recursion_guard(pcre2_compile_context *\fIccontext\fP, 11 | .B " int (*\fIguard_function\fP)(uint32_t, void *), void *\fIuser_data\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function defines, within a compile context, a function that is called 18 | whenever \fBpcre2_compile()\fP starts to compile a parenthesized part of a 19 | pattern. The first argument to the function gives the current depth of 20 | parenthesis nesting, and the second is user data that is supplied when the 21 | function is set up. The callout function should return zero if all is well, or 22 | non-zero to force an error. This feature is provided so that applications can 23 | check the available system stack space, in order to avoid running out. The 24 | result of \fBpcre2_set_compile_recursion_guard()\fP is always zero. 25 | .P 26 | There is a complete description of the PCRE2 native API in the 27 | .\" HREF 28 | \fBpcre2api\fP 29 | .\" 30 | page and a description of the POSIX API in the 31 | .\" HREF 32 | \fBpcre2posix\fP 33 | .\" 34 | page. 35 | -------------------------------------------------------------------------------- /doc/pcre2_set_depth_limit.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_DEPTH_LIMIT 3 "25 March 2017" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_depth_limit(pcre2_match_context *\fImcontext\fP, 11 | .B " uint32_t \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets the backtracking depth limit field in a match context. The 18 | result is always zero. 19 | .P 20 | There is a complete description of the PCRE2 native API in the 21 | .\" HREF 22 | \fBpcre2api\fP 23 | .\" 24 | page and a description of the POSIX API in the 25 | .\" HREF 26 | \fBpcre2posix\fP 27 | .\" 28 | page. 29 | -------------------------------------------------------------------------------- /doc/pcre2_set_glob_escape.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_GLOB_ESCAPE 3 "12 July 2017" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_glob_escape(pcre2_convert_context *\fIcvcontext\fP, 11 | .B " uint32_t \fIescape_char\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function is part of an experimental set of pattern conversion functions. 18 | It sets the escape character that is used when converting globs. The second 19 | argument must either be zero (meaning there is no escape character) or a 20 | punctuation character whose code point is less than 256. The default is grave 21 | accent if running under Windows, otherwise backslash. The result of the 22 | function is zero for success or PCRE2_ERROR_BADDATA if the second argument is 23 | invalid. 24 | .P 25 | The pattern conversion functions are described in the 26 | .\" HREF 27 | \fBpcre2convert\fP 28 | .\" 29 | documentation. 30 | -------------------------------------------------------------------------------- /doc/pcre2_set_glob_separator.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_GLOB_SEPARATOR 3 "17 June 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_glob_separator(pcre2_convert_context *\fIcvcontext\fP, 11 | .B " uint32_t \fIseparator_char\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function is part of an experimental set of pattern conversion functions. 18 | It sets the component separator character that is used when converting globs. 19 | The second argument must be one of the characters forward slash, backslash, or 20 | dot. The default is backslash when running under Windows, otherwise forward 21 | slash. The result of the function is zero for success or PCRE2_ERROR_BADDATA if 22 | the second argument is invalid. 23 | .P 24 | The pattern conversion functions are described in the 25 | .\" HREF 26 | \fBpcre2convert\fP 27 | .\" 28 | documentation. 29 | -------------------------------------------------------------------------------- /doc/pcre2_set_heap_limit.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_HEAP_LIMIT 3 "17 June 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_heap_limit(pcre2_match_context *\fImcontext\fP, 11 | .B " uint32_t \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets the backtracking heap limit field in a match context. The 18 | result is always zero. 19 | .P 20 | There is a complete description of the PCRE2 native API in the 21 | .\" HREF 22 | \fBpcre2api\fP 23 | .\" 24 | page and a description of the POSIX API in the 25 | .\" HREF 26 | \fBpcre2posix\fP 27 | .\" 28 | page. 29 | -------------------------------------------------------------------------------- /doc/pcre2_set_match_limit.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_MATCH_LIMIT 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_match_limit(pcre2_match_context *\fImcontext\fP, 11 | .B " uint32_t \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets the match limit field in a match context. The result is 18 | always zero. 19 | .P 20 | There is a complete description of the PCRE2 native API in the 21 | .\" HREF 22 | \fBpcre2api\fP 23 | .\" 24 | page and a description of the POSIX API in the 25 | .\" HREF 26 | \fBpcre2posix\fP 27 | .\" 28 | page. 29 | -------------------------------------------------------------------------------- /doc/pcre2_set_max_pattern_compiled_length.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_MAX_PATTERN_COMPILED_LENGTH 3 "09 June 2024" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_max_pattern_compiled_length( 11 | .B " pcre2_compile_context *\fIccontext\fP, PCRE2_SIZE \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets, in a compile context, the maximum size (in bytes) for the 18 | memory needed to hold the compiled version of a pattern that is using this 19 | context. The result is always zero. If a pattern that is passed to 20 | \fBpcre2_compile()\fP referencing this context needs more memory, an error is 21 | generated. The default is the largest number that a PCRE2_SIZE variable can 22 | hold, which is effectively unlimited. 23 | .P 24 | There is a complete description of the PCRE2 native API in the 25 | .\" HREF 26 | \fBpcre2api\fP 27 | .\" 28 | page and a description of the POSIX API in the 29 | .\" HREF 30 | \fBpcre2posix\fP 31 | .\" 32 | page. 33 | -------------------------------------------------------------------------------- /doc/pcre2_set_max_pattern_length.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_MAX_PATTERN_LENGTH 3 "05 October 2016" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_max_pattern_length(pcre2_compile_context *\fIccontext\fP, 11 | .B " PCRE2_SIZE \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets, in a compile context, the maximum text length (in code 18 | units) of the pattern that can be compiled. The result is always zero. If a 19 | longer pattern is passed to \fBpcre2_compile()\fP there is an immediate error 20 | return. The default is effectively unlimited, being the largest value a 21 | PCRE2_SIZE variable can hold. 22 | .P 23 | There is a complete description of the PCRE2 native API in the 24 | .\" HREF 25 | \fBpcre2api\fP 26 | .\" 27 | page and a description of the POSIX API in the 28 | .\" HREF 29 | \fBpcre2posix\fP 30 | .\" 31 | page. 32 | -------------------------------------------------------------------------------- /doc/pcre2_set_max_varlookbehind.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_NEWLINE 3 "11 August 2023" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_max_varlookbehind(pcre2_compile_context *\fIccontext\fP, 11 | .B " uint32_t \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This sets a maximum length for the number of characters matched by a 18 | variable-length lookbehind assertion. The default is set when PCRE2 is built, 19 | with the ultimate default being 255, the same as Perl. Lookbehind assertions 20 | without a bounding length are not supported. The result is always zero. 21 | .P 22 | There is a complete description of the PCRE2 native API in the 23 | .\" HREF 24 | \fBpcre2api\fP 25 | .\" 26 | page and a description of the POSIX API in the 27 | .\" HREF 28 | \fBpcre2posix\fP 29 | .\" 30 | page. 31 | -------------------------------------------------------------------------------- /doc/pcre2_set_newline.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_NEWLINE 3 "19 July 2017" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_newline(pcre2_compile_context *\fIccontext\fP, 11 | .B " uint32_t \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets the newline convention within a compile context. This 18 | specifies which character(s) are recognized as newlines when compiling and 19 | matching patterns. The second argument must be one of: 20 | .sp 21 | PCRE2_NEWLINE_CR Carriage return only 22 | PCRE2_NEWLINE_LF Linefeed only 23 | PCRE2_NEWLINE_CRLF CR followed by LF only 24 | PCRE2_NEWLINE_ANYCRLF Any of the above 25 | PCRE2_NEWLINE_ANY Any Unicode newline sequence 26 | PCRE2_NEWLINE_NUL The NUL character (binary zero) 27 | .sp 28 | The result is zero for success or PCRE2_ERROR_BADDATA if the second argument is 29 | invalid. 30 | .P 31 | There is a complete description of the PCRE2 native API in the 32 | .\" HREF 33 | \fBpcre2api\fP 34 | .\" 35 | page and a description of the POSIX API in the 36 | .\" HREF 37 | \fBpcre2posix\fP 38 | .\" 39 | page. 40 | -------------------------------------------------------------------------------- /doc/pcre2_set_offset_limit.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_OFFSET_LIMIT 3 "22 September 2015" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_offset_limit(pcre2_match_context *\fImcontext\fP, 11 | .B " PCRE2_SIZE \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets the offset limit field in a match context. The result is 18 | always zero. 19 | .P 20 | There is a complete description of the PCRE2 native API in the 21 | .\" HREF 22 | \fBpcre2api\fP 23 | .\" 24 | page and a description of the POSIX API in the 25 | .\" HREF 26 | \fBpcre2posix\fP 27 | .\" 28 | page. 29 | -------------------------------------------------------------------------------- /doc/pcre2_set_optimize.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_OPTIMIZE 3 "22 September 2024" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_optimize(pcre2_compile_context *\fIccontext\fP, 11 | .B " uint32_t \fIdirective\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function controls which performance optimizations will be applied 18 | by \fBpcre2_compile()\fP. It can be called multiple times with the same compile 19 | context; the effects are cumulative, with the effects of later calls taking 20 | precedence over earlier ones. 21 | .P 22 | The result is zero for success, PCRE2_ERROR_NULL if \fIccontext\fP is NULL, 23 | or PCRE2_ERROR_BADOPTION if \fIdirective\fP is unknown. The latter could be 24 | useful to detect if a certain optimization is available. 25 | .P 26 | The list of possible values for the \fIdirective\fP parameter are: 27 | .sp 28 | PCRE2_OPTIMIZATION_FULL Enable all optimizations (default) 29 | PCRE2_OPTIMIZATION_NONE Disable all optimizations 30 | PCRE2_AUTO_POSSESS Enable auto-possessification 31 | PCRE2_AUTO_POSSESS_OFF Disable auto-possessification 32 | PCRE2_DOTSTAR_ANCHOR Enable implicit dotstar anchoring 33 | PCRE2_DOTSTAR_ANCHOR_OFF Disable implicit dotstar anchoring 34 | PCRE2_START_OPTIMIZE Enable start-up optimizations at match time 35 | PCRE2_START_OPTIMIZE_OFF Disable start-up optimizations at match time 36 | .sp 37 | There is a complete description of the PCRE2 native API, including detailed 38 | descriptions \fIdirective\fP parameter values in the 39 | .\" HREF 40 | \fBpcre2api\fP 41 | .\" 42 | page. 43 | -------------------------------------------------------------------------------- /doc/pcre2_set_parens_nest_limit.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_PARENS_NEST_LIMIT 3 "25 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_parens_nest_limit(pcre2_compile_context *\fIccontext\fP, 11 | .B " uint32_t \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function sets, in a compile context, the maximum depth of nested 18 | parentheses in a pattern. The result is always zero. 19 | .P 20 | There is a complete description of the PCRE2 native API in the 21 | .\" HREF 22 | \fBpcre2api\fP 23 | .\" 24 | page and a description of the POSIX API in the 25 | .\" HREF 26 | \fBpcre2posix\fP 27 | .\" 28 | page. 29 | -------------------------------------------------------------------------------- /doc/pcre2_set_recursion_limit.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_RECURSION_LIMIT 3 "19 July 2017" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_recursion_limit(pcre2_match_context *\fImcontext\fP, 11 | .B " uint32_t \fIvalue\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function is obsolete and should not be used in new code. Use 18 | \fBpcre2_set_depth_limit()\fP instead. 19 | .P 20 | There is a complete description of the PCRE2 native API in the 21 | .\" HREF 22 | \fBpcre2api\fP 23 | .\" 24 | page and a description of the POSIX API in the 25 | .\" HREF 26 | \fBpcre2posix\fP 27 | .\" 28 | page. 29 | -------------------------------------------------------------------------------- /doc/pcre2_set_recursion_memory_management.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_RECURSION_MEMORY_MANAGEMENT 3 "23 January 2023" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_recursion_memory_management( 11 | .B " pcre2_match_context *\fImcontext\fP," 12 | .B " void *(*\fIprivate_malloc\fP)(size_t, void *)," 13 | .B " void (*\fIprivate_free\fP)(void *, void *), void *\fImemory_data\fP);" 14 | .fi 15 | . 16 | .SH DESCRIPTION 17 | .rs 18 | .sp 19 | From release 10.30 onwards, this function is obsolete and does nothing. The 20 | result is always zero. 21 | .P 22 | There is a complete description of the PCRE2 native API in the 23 | .\" HREF 24 | \fBpcre2api\fP 25 | .\" 26 | page and a description of the POSIX API in the 27 | .\" HREF 28 | \fBpcre2posix\fP 29 | .\" 30 | page. 31 | -------------------------------------------------------------------------------- /doc/pcre2_set_substitute_callout.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_SUBSTITUTE_CALLOUT 3 "04 October 2024" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_substitute_callout(pcre2_match_context *\fImcontext\fP, 11 | .B " int (*\fIcallout_function\fP)(pcre2_substitute_callout_block *, void *)," 12 | .B " void *\fIcallout_data\fP);" 13 | .fi 14 | . 15 | .SH DESCRIPTION 16 | .rs 17 | .sp 18 | This function sets the substitute callout fields in a match context (the first 19 | argument). The second argument specifies a callout function, and the third 20 | argument is an opaque data item that is passed to it. The result of this 21 | function is always zero. 22 | .P 23 | There is a complete description of the PCRE2 native API in the 24 | .\" HREF 25 | \fBpcre2api\fP 26 | .\" 27 | page and a description of the POSIX API in the 28 | .\" HREF 29 | \fBpcre2posix\fP 30 | .\" 31 | page. 32 | -------------------------------------------------------------------------------- /doc/pcre2_set_substitute_case_callout.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SET_SUBSTITUTE_CASE_CALLOUT 3 "26 December 2024" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_set_substitute_case_callout(pcre2_match_context *\fImcontext\fP, 11 | .B " PCRE2_SIZE (*\fIcallout_function\fP)(PCRE2_SPTR, PCRE2_SIZE," 12 | .B " PCRE2_UCHAR *, PCRE2_SIZE," 13 | .B " int, void *)," 14 | .B " void *\fIcallout_data\fP);" 15 | .fi 16 | . 17 | .SH DESCRIPTION 18 | .rs 19 | .sp 20 | This function sets the substitute case callout fields in a match context (the 21 | first argument). The second argument specifies a callout function, and the third 22 | argument is an opaque data item that is passed to it. The result of this 23 | function is always zero. 24 | .P 25 | There is a complete description of the PCRE2 native API in the 26 | .\" HREF 27 | \fBpcre2api\fP 28 | .\" 29 | page and a description of the POSIX API in the 30 | .\" HREF 31 | \fBpcre2posix\fP 32 | .\" 33 | page. 34 | -------------------------------------------------------------------------------- /doc/pcre2_substring_copy_byname.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_COPY_BYNAME 3 "19 December 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_substring_copy_byname(pcre2_match_data *\fImatch_data\fP, 11 | .B " PCRE2_SPTR \fIname\fP, PCRE2_UCHAR *\fIbuffer\fP, PCRE2_SIZE *\fIbufflen\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This is a convenience function for extracting a captured substring, identified 18 | by name, into a given buffer. The arguments are: 19 | .sp 20 | \fImatch_data\fP The match data block for the match 21 | \fIname\fP Name of the required substring 22 | \fIbuffer\fP Buffer to receive the string 23 | \fIbufflen\fP Length of buffer (code units) 24 | .sp 25 | The \fIbufflen\fP variable is updated to contain the length of the extracted 26 | string, excluding the trailing zero. The yield of the function is zero for 27 | success or one of the following error numbers: 28 | .sp 29 | PCRE2_ERROR_NOSUBSTRING there are no groups of that name 30 | PCRE2_ERROR_UNAVAILBLE the ovector was too small for that group 31 | PCRE2_ERROR_UNSET the group did not participate in the match 32 | PCRE2_ERROR_NOMEMORY the buffer is not big enough 33 | .sp 34 | If there is more than one group with the given name, the first one that is set 35 | is returned. In this situation PCRE2_ERROR_UNSET means that no group with the 36 | given name was set. 37 | .P 38 | There is a complete description of the PCRE2 native API in the 39 | .\" HREF 40 | \fBpcre2api\fP 41 | .\" 42 | page and a description of the POSIX API in the 43 | .\" HREF 44 | \fBpcre2posix\fP 45 | .\" 46 | page. 47 | -------------------------------------------------------------------------------- /doc/pcre2_substring_copy_bynumber.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_COPY_BYNUMBER 3 "13 December 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_substring_copy_bynumber(pcre2_match_data *\fImatch_data\fP, 11 | .B " uint32_t \fInumber\fP, PCRE2_UCHAR *\fIbuffer\fP," 12 | .B " PCRE2_SIZE *\fIbufflen\fP);" 13 | .fi 14 | . 15 | .SH DESCRIPTION 16 | .rs 17 | .sp 18 | This is a convenience function for extracting a captured substring into a given 19 | buffer. The arguments are: 20 | .sp 21 | \fImatch_data\fP The match data block for the match 22 | \fInumber\fP Number of the required substring 23 | \fIbuffer\fP Buffer to receive the string 24 | \fIbufflen\fP Length of buffer 25 | .sp 26 | The \fIbufflen\fP variable is updated with the length of the extracted string, 27 | excluding the terminating zero. The yield of the function is zero for success 28 | or one of the following error numbers: 29 | .sp 30 | PCRE2_ERROR_NOSUBSTRING there are no groups of that number 31 | PCRE2_ERROR_UNAVAILBLE the ovector was too small for that group 32 | PCRE2_ERROR_UNSET the group did not participate in the match 33 | PCRE2_ERROR_NOMEMORY the buffer is too small 34 | .sp 35 | .P 36 | There is a complete description of the PCRE2 native API in the 37 | .\" HREF 38 | \fBpcre2api\fP 39 | .\" 40 | page and a description of the POSIX API in the 41 | .\" HREF 42 | \fBpcre2posix\fP 43 | .\" 44 | page. 45 | -------------------------------------------------------------------------------- /doc/pcre2_substring_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_FREE 3 "28 June 2018" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_substring_free(PCRE2_UCHAR *\fIbuffer\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This is a convenience function for freeing the memory obtained by a previous 17 | call to \fBpcre2_substring_get_byname()\fP or 18 | \fBpcre2_substring_get_bynumber()\fP. Its only argument is a pointer to the 19 | string. If the argument is NULL, the function does nothing. 20 | .P 21 | There is a complete description of the PCRE2 native API in the 22 | .\" HREF 23 | \fBpcre2api\fP 24 | .\" 25 | page and a description of the POSIX API in the 26 | .\" HREF 27 | \fBpcre2posix\fP 28 | .\" 29 | page. 30 | -------------------------------------------------------------------------------- /doc/pcre2_substring_get_byname.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_GET_BYNAME 3 "19 December 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_substring_get_byname(pcre2_match_data *\fImatch_data\fP, 11 | .B " PCRE2_SPTR \fIname\fP, PCRE2_UCHAR **\fIbufferptr\fP, PCRE2_SIZE *\fIbufflen\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This is a convenience function for extracting a captured substring by name into 18 | newly acquired memory. The arguments are: 19 | .sp 20 | \fImatch_data\fP The match data for the match 21 | \fIname\fP Name of the required substring 22 | \fIbufferptr\fP Where to put the string pointer 23 | \fIbufflen\fP Where to put the string length 24 | .sp 25 | The memory in which the substring is placed is obtained by calling the same 26 | memory allocation function that was used for the match data block. The 27 | convenience function \fBpcre2_substring_free()\fP can be used to free it when 28 | it is no longer needed. The yield of the function is zero for success or one of 29 | the following error numbers: 30 | .sp 31 | PCRE2_ERROR_NOSUBSTRING there are no groups of that name 32 | PCRE2_ERROR_UNAVAILBLE the ovector was too small for that group 33 | PCRE2_ERROR_UNSET the group did not participate in the match 34 | PCRE2_ERROR_NOMEMORY memory could not be obtained 35 | .sp 36 | If there is more than one group with the given name, the first one that is set 37 | is returned. In this situation PCRE2_ERROR_UNSET means that no group with the 38 | given name was set. 39 | .P 40 | There is a complete description of the PCRE2 native API in the 41 | .\" HREF 42 | \fBpcre2api\fP 43 | .\" 44 | page and a description of the POSIX API in the 45 | .\" HREF 46 | \fBpcre2posix\fP 47 | .\" 48 | page. 49 | -------------------------------------------------------------------------------- /doc/pcre2_substring_get_bynumber.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_GET_BYNUMBER 3 "13 December 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_substring_get_bynumber(pcre2_match_data *\fImatch_data\fP, 11 | .B " uint32_t \fInumber\fP, PCRE2_UCHAR **\fIbufferptr\fP, PCRE2_SIZE *\fIbufflen\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This is a convenience function for extracting a captured substring by number 18 | into newly acquired memory. The arguments are: 19 | .sp 20 | \fImatch_data\fP The match data for the match 21 | \fInumber\fP Number of the required substring 22 | \fIbufferptr\fP Where to put the string pointer 23 | \fIbufflen\fP Where to put the string length 24 | .sp 25 | The memory in which the substring is placed is obtained by calling the same 26 | memory allocation function that was used for the match data block. The 27 | convenience function \fBpcre2_substring_free()\fP can be used to free it when 28 | it is no longer needed. The yield of the function is zero for success or one of 29 | the following error numbers: 30 | .sp 31 | PCRE2_ERROR_NOSUBSTRING there are no groups of that number 32 | PCRE2_ERROR_UNAVAILBLE the ovector was too small for that group 33 | PCRE2_ERROR_UNSET the group did not participate in the match 34 | PCRE2_ERROR_NOMEMORY memory could not be obtained 35 | .sp 36 | .P 37 | There is a complete description of the PCRE2 native API in the 38 | .\" HREF 39 | \fBpcre2api\fP 40 | .\" 41 | page and a description of the POSIX API in the 42 | .\" HREF 43 | \fBpcre2posix\fP 44 | .\" 45 | page. 46 | -------------------------------------------------------------------------------- /doc/pcre2_substring_length_byname.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_LENGTH_BYNAME 3 "21 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_substring_length_byname(pcre2_match_data *\fImatch_data\fP, 11 | .B " PCRE2_SPTR \fIname\fP, PCRE2_SIZE *\fIlength\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function returns the length of a matched substring, identified by name. 18 | The arguments are: 19 | .sp 20 | \fImatch_data\fP The match data block for the match 21 | \fIname\fP The substring name 22 | \fIlength\fP Where to return the length 23 | .sp 24 | The yield is zero on success, or an error code if the substring is not found. 25 | .P 26 | There is a complete description of the PCRE2 native API in the 27 | .\" HREF 28 | \fBpcre2api\fP 29 | .\" 30 | page and a description of the POSIX API in the 31 | .\" HREF 32 | \fBpcre2posix\fP 33 | .\" 34 | page. 35 | -------------------------------------------------------------------------------- /doc/pcre2_substring_length_bynumber.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_LENGTH_BYNUMBER 3 "22 December 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_substring_length_bynumber(pcre2_match_data *\fImatch_data\fP, 11 | .B " uint32_t \fInumber\fP, PCRE2_SIZE *\fIlength\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This function returns the length of a matched substring, identified by number. 18 | The arguments are: 19 | .sp 20 | \fImatch_data\fP The match data block for the match 21 | \fInumber\fP The substring number 22 | \fIlength\fP Where to return the length, or NULL 23 | .sp 24 | The third argument may be NULL if all you want to know is whether or not a 25 | substring is set. The yield is zero on success, or a negative error code 26 | otherwise. After a partial match, only substring 0 is available. 27 | .P 28 | There is a complete description of the PCRE2 native API in the 29 | .\" HREF 30 | \fBpcre2api\fP 31 | .\" 32 | page and a description of the POSIX API in the 33 | .\" HREF 34 | \fBpcre2posix\fP 35 | .\" 36 | page. 37 | -------------------------------------------------------------------------------- /doc/pcre2_substring_list_free.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_LIST_FREE 3 "02 December 2023" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B void pcre2_substring_list_free(PCRE2_UCHAR **\fIlist\fP); 11 | .fi 12 | . 13 | .SH DESCRIPTION 14 | .rs 15 | .sp 16 | This is a convenience function for freeing the store obtained by a previous 17 | call to \fBpcre2substring_list_get()\fP. Its only argument is a pointer to 18 | the list of string pointers. If the argument is NULL, the function returns 19 | immediately, without doing anything. 20 | .P 21 | There is a complete description of the PCRE2 native API in the 22 | .\" HREF 23 | \fBpcre2api\fP 24 | .\" 25 | page and a description of the POSIX API in the 26 | .\" HREF 27 | \fBpcre2posix\fP 28 | .\" 29 | page. 30 | -------------------------------------------------------------------------------- /doc/pcre2_substring_list_get.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_LIST_GET 3 "21 October 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_substring_list_get(pcre2_match_data *\fImatch_data\fP, 11 | .B " PCRE2_UCHAR ***\fIlistptr\fP, PCRE2_SIZE **\fIlengthsptr\fP); 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This is a convenience function for extracting all the captured substrings after 18 | a pattern match. It builds a list of pointers to the strings, and (optionally) 19 | a second list that contains their lengths (in code units), excluding a 20 | terminating zero that is added to each of them. All this is done in a single 21 | block of memory that is obtained using the same memory allocation function that 22 | was used to get the match data block. The convenience function 23 | \fBpcre2_substring_list_free()\fP can be used to free it when it is no longer 24 | needed. The arguments are: 25 | .sp 26 | \fImatch_data\fP The match data block 27 | \fIlistptr\fP Where to put a pointer to the list 28 | \fIlengthsptr\fP Where to put a pointer to the lengths, or NULL 29 | .sp 30 | A pointer to a list of pointers is put in the variable whose address is in 31 | \fIlistptr\fP. The list is terminated by a NULL pointer. If \fIlengthsptr\fP is 32 | not NULL, a matching list of lengths is created, and its address is placed in 33 | \fIlengthsptr\fP. The yield of the function is zero on success or 34 | PCRE2_ERROR_NOMEMORY if sufficient memory could not be obtained. 35 | .P 36 | There is a complete description of the PCRE2 native API in the 37 | .\" HREF 38 | \fBpcre2api\fP 39 | .\" 40 | page and a description of the POSIX API in the 41 | .\" HREF 42 | \fBpcre2posix\fP 43 | .\" 44 | page. 45 | -------------------------------------------------------------------------------- /doc/pcre2_substring_nametable_scan.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_NAMETABLE_SCAN 3 "06 February 2019" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_substring_nametable_scan(const pcre2_code *\fIcode\fP, 11 | .B " PCRE2_SPTR \fIname\fP, PCRE2_SPTR *\fIfirst\fP, PCRE2_SPTR *\fIlast\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This convenience function finds, for a compiled pattern, the first and last 18 | entries for a given name in the table that translates capture group names into 19 | numbers. 20 | .sp 21 | \fIcode\fP Compiled regular expression 22 | \fIname\fP Name whose entries required 23 | \fIfirst\fP Where to return a pointer to the first entry 24 | \fIlast\fP Where to return a pointer to the last entry 25 | .sp 26 | When the name is found in the table, if \fIfirst\fP is NULL, the function 27 | returns a group number, but if there is more than one matching entry, it is not 28 | defined which one. Otherwise, when both pointers have been set, the yield of 29 | the function is the length of each entry in code units. If the name is not 30 | found, PCRE2_ERROR_NOSUBSTRING is returned. 31 | .P 32 | There is a complete description of the PCRE2 native API, including the format of 33 | the table entries, in the 34 | .\" HREF 35 | \fBpcre2api\fP 36 | .\" 37 | page, and a description of the POSIX API in the 38 | .\" HREF 39 | \fBpcre2posix\fP 40 | .\" 41 | page. 42 | -------------------------------------------------------------------------------- /doc/pcre2_substring_number_from_name.3: -------------------------------------------------------------------------------- 1 | .TH PCRE2_SUBSTRING_NUMBER_FROM_NAME 3 "03 November 2014" "PCRE2 10.46-DEV" 2 | .SH NAME 3 | PCRE2 - Perl-compatible regular expressions (revised API) 4 | .SH SYNOPSIS 5 | .rs 6 | .sp 7 | .B #include 8 | .PP 9 | .nf 10 | .B int pcre2_substring_number_from_name(const pcre2_code *\fIcode\fP, 11 | .B " PCRE2_SPTR \fIname\fP);" 12 | .fi 13 | . 14 | .SH DESCRIPTION 15 | .rs 16 | .sp 17 | This convenience function finds the number of a named substring capturing 18 | parenthesis in a compiled pattern, provided that it is a unique name. The 19 | function arguments are: 20 | .sp 21 | \fIcode\fP Compiled regular expression 22 | \fIname\fP Name whose number is required 23 | .sp 24 | The yield of the function is the number of the parenthesis if the name is 25 | found, or PCRE2_ERROR_NOSUBSTRING if it is not found. When duplicate names are 26 | allowed (PCRE2_DUPNAMES is set), if the name is not unique, 27 | PCRE2_ERROR_NOUNIQUESUBSTRING is returned. You can obtain the list of numbers 28 | with the same name by calling \fBpcre2_substring_nametable_scan()\fP. 29 | .P 30 | There is a complete description of the PCRE2 native API in the 31 | .\" HREF 32 | \fBpcre2api\fP 33 | .\" 34 | page and a description of the POSIX API in the 35 | .\" HREF 36 | \fBpcre2posix\fP 37 | .\" 38 | page. 39 | -------------------------------------------------------------------------------- /libpcre2-16.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre2-16 9 | Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 16 bit character support 10 | Version: @PACKAGE_VERSION@ 11 | License: BSD-3-Clause WITH PCRE2-exception 12 | Libs: -L${libdir} -lpcre2-16@LIB_POSTFIX@ 13 | Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ 14 | Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@ 15 | -------------------------------------------------------------------------------- /libpcre2-32.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre2-32 9 | Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 32 bit character support 10 | Version: @PACKAGE_VERSION@ 11 | License: BSD-3-Clause WITH PCRE2-exception 12 | Libs: -L${libdir} -lpcre2-32@LIB_POSTFIX@ 13 | Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ 14 | Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@ 15 | -------------------------------------------------------------------------------- /libpcre2-8.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre2-8 9 | Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 8 bit character support 10 | Version: @PACKAGE_VERSION@ 11 | License: BSD-3-Clause WITH PCRE2-exception 12 | Libs: -L${libdir} -lpcre2-8@LIB_POSTFIX@ 13 | Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ 14 | Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@ 15 | -------------------------------------------------------------------------------- /libpcre2-posix.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre2-posix 9 | Description: Posix compatible interface to libpcre2-8 10 | Version: @PACKAGE_VERSION@ 11 | License: BSD-3-Clause WITH PCRE2-exception 12 | Libs: -L${libdir} -lpcre2-posix@LIB_POSTFIX@ 13 | Cflags: -I${includedir} @PCRE2POSIX_CFLAG@ 14 | Requires.private: libpcre2-8 15 | -------------------------------------------------------------------------------- /maint/.gitignore: -------------------------------------------------------------------------------- 1 | ucptest 2 | utf8 3 | 4 | pcre2_ucp.h 5 | pcre2_ucptables_inc.h 6 | pcre2_ucd.c 7 | 8 | testinput 9 | testoutput 10 | 11 | !build-interface 12 | -------------------------------------------------------------------------------- /maint/CheckTxt: -------------------------------------------------------------------------------- 1 | #! /usr/bin/perl 2 | 3 | # This is a script for checking whether a file contains any carriage return 4 | # characters, and whether it is valid UTF-8. 5 | 6 | use Encode; 7 | 8 | # This subroutine does the work for one file. 9 | 10 | $yield = 0; 11 | $ascii = 0; # bool 12 | $crlf = 0; # bool 13 | 14 | sub checktxt { 15 | my($file) = $_[0]; 16 | open(IN, "<:raw", "$file") || die "Can't open $file for input"; 17 | $bin = do { local $/ = undef; }; 18 | close(IN); 19 | my $data; 20 | eval 21 | { 22 | $data = Encode::decode("UTF-8", $bin, Encode::FB_CROAK); 23 | 1; # return true 24 | } 25 | or do 26 | { 27 | printf "Bad UTF-8 in $file\n"; 28 | $yield = 1; 29 | return; 30 | }; 31 | if (!$crlf && index($data, "\r") != -1) 32 | { 33 | printf "CR in $file\n"; 34 | $yield = 1; 35 | } 36 | if ($ascii && $data =~ /[^\x01-\x7e]/) 37 | { 38 | printf "Non-ASCII in $file\n"; 39 | $yield = 1; 40 | } 41 | } 42 | 43 | # This is the main program 44 | 45 | $, = ""; # Output field separator 46 | for ($i = 0; $i < @ARGV; $i++) 47 | { 48 | if ($ARGV[$i] eq "-ascii") 49 | { 50 | $ascii = 1; 51 | } 52 | elsif ($ARGV[$i] eq "-crlf") 53 | { 54 | $crlf = 1; 55 | } 56 | else 57 | { 58 | checktxt($ARGV[$i]); 59 | } 60 | } 61 | 62 | exit $yield; 63 | 64 | # End 65 | -------------------------------------------------------------------------------- /maint/Detrail: -------------------------------------------------------------------------------- 1 | #! /usr/bin/perl 2 | 3 | # This is a script for removing trailing whitespace from lines in files that 4 | # are listed on the command line. 5 | 6 | # This subroutine does the work for one file. 7 | 8 | sub detrail { 9 | my($file) = $_[0]; 10 | my($changed) = 0; 11 | open(IN, "<", "$file") || die "Can't open $file for input"; 12 | @lines = ; 13 | close(IN); 14 | foreach (@lines) 15 | { 16 | if (/\s+\n$/) 17 | { 18 | s/\s+\n$/\n/; 19 | $changed = 1; 20 | } 21 | } 22 | if ($changed) 23 | { 24 | open(OUT, ">", "$file") || die "Can't open $file for output"; 25 | print OUT @lines; 26 | close(OUT); 27 | } 28 | } 29 | 30 | # This is the main program 31 | 32 | $, = ""; # Output field separator 33 | for ($i = 0; $i < @ARGV; $i++) { &detrail($ARGV[$i]); } 34 | 35 | # End 36 | -------------------------------------------------------------------------------- /maint/RunManifestTest: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Script to test a directory listing. We use this to verify that the list of 4 | # files installed by "make install" or "cmake --install" matches what we expect. 5 | 6 | set -e 7 | 8 | LANG=C # Ensure stable ordering of `sort` output 9 | export LANG 10 | 11 | if [ "$1" = "" -o "$2" = "" ] ; then 12 | echo "Usage: $0 []" >&2 13 | exit 1 14 | fi 15 | 16 | input_dir="$1" 17 | expected_manifest="$2" 18 | build_type="${3:-release}" 19 | 20 | actual_file=`basename $expected_manifest`.actual 21 | expected_file=`basename $expected_manifest`.expected 22 | 23 | sed=sed 24 | # Helper for Solaris 25 | if [ -f /usr/bin/gsed ] ; then 26 | sed=/usr/bin/gsed 27 | fi 28 | 29 | find "$input_dir" -print | \ 30 | sort | \ 31 | xargs -n1 -- ls -l -d -n | \ 32 | $sed -E -e 's/ {2,}/ /g' | \ 33 | cut -d' ' -f '1,9-' \ 34 | > "$actual_file" 35 | 36 | # The CMake install is a bit annoying now. Its installed files are actually 37 | # dependent on the build type. So, if the build type is not "release", we need 38 | # to modify the expected manifest to match the actual one. 39 | cat "$expected_manifest" | \ 40 | $sed -E -e "s/pcre2-targets-release.cmake/pcre2-targets-$build_type.cmake/" \ 41 | > "$expected_file" 42 | 43 | if ! diff -u "$expected_file" "$actual_file"; then 44 | echo "Installed files differ from expected" 45 | 46 | echo "===Actual===" 47 | cat "$actual_file" 48 | echo "===End===" 49 | 50 | exit 1 51 | fi 52 | 53 | echo "Installed files match expected" 54 | rm -f "$actual_file" "$expected_file" 55 | -------------------------------------------------------------------------------- /maint/RunManifestTest.ps1: -------------------------------------------------------------------------------- 1 | # Script to test a directory listing. We use this to verify that the list of 2 | # files installed by "make install" or "cmake --install" matches what we expect. 3 | 4 | param ( 5 | [Parameter(Mandatory=$true)] 6 | [string]$inputDir, 7 | 8 | [Parameter(Mandatory=$true)] 9 | [string]$manifestName 10 | ) 11 | 12 | if ((-not $inputDir) -or (-not $manifestName)) { 13 | throw "Usage: .\RunManifestTest.ps1 " 14 | } 15 | 16 | $base = [System.IO.Path]::GetFileName($manifestName) 17 | 18 | $installedFiles = Get-ChildItem -Recurse -Force -Path $inputDir | 19 | Sort-Object {[System.BitConverter]::ToString([system.Text.Encoding]::UTF8.GetBytes($_.FullName))} | 20 | ForEach-Object { $_.Mode.Substring(0,5) + " " + ($_.FullName | Resolve-Path -Relative) } 21 | 22 | $null = New-Item -Force $base -Value (($installedFiles | Out-String) -replace "`r`n", "`n") 23 | 24 | $expectedFiles = Get-Content -Path $manifestName -Raw 25 | $actualFiles = Get-Content -Path $base -Raw 26 | 27 | if ($expectedFiles -ne $actualFiles) { 28 | Write-Host "===Actual===" 29 | Write-Host $actualFiles 30 | Write-Host "===End===" 31 | 32 | throw "Installed files differ from expected" 33 | } 34 | 35 | Write-Host "Installed files match expected" 36 | Remove-Item -Path $base -Force 37 | -------------------------------------------------------------------------------- /maint/UpdateCommon.py: -------------------------------------------------------------------------------- 1 | # Common helpers for UpdateRelease.py and UpdateDates.py. 2 | 3 | import re 4 | import os 5 | 6 | script_dir = os.path.dirname(os.path.abspath(__file__)) 7 | 8 | def get_current_release(): 9 | with open(f"{script_dir}/../configure.ac", 'r') as file: 10 | content = file.read() 11 | 12 | matches = [match[1] for match in re.findall(r"m4_define\(pcre2_(major|minor|prerelease), \[(.*?)\]\)", content)] 13 | current_release = '%s.%s%s' % tuple(matches) 14 | 15 | return current_release 16 | 17 | CURRENT_RELEASE = get_current_release() 18 | 19 | # Update a file, using a pattern. Verify that it matches the file, and perform 20 | # the replacement. 21 | def update_file(filename, pattern, replacement): 22 | with open(filename, 'r') as file: 23 | content = file.read() 24 | 25 | if not re.search(pattern, content): 26 | raise Exception('Pattern not found in %s' % filename) 27 | 28 | content = re.sub(pattern, replacement, content) 29 | 30 | with open(filename, 'w') as file: 31 | file.write(content) 32 | -------------------------------------------------------------------------------- /maint/UpdateRelease.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | 3 | # Script to update all the hardcoded release numbers in the source tree. 4 | # - Documentation manpages. 5 | # - Bazel MODULE file. 6 | 7 | # This script should be run in the main PCRE2 directory. 8 | 9 | import glob 10 | 11 | from UpdateCommon import update_file, CURRENT_RELEASE 12 | 13 | def update_man_version(filename): 14 | print(' Updating %s' % filename) 15 | update_file(filename, r'(.TH.*? )"PCRE2 .*?"', '\\1"PCRE2 %s"' % CURRENT_RELEASE) 16 | 17 | print('Updating man pages') 18 | 19 | # doc/*.1 20 | for filename in glob.glob('doc/*.1'): 21 | update_man_version(filename) 22 | 23 | # doc/*.3 24 | for filename in glob.glob('doc/*.3'): 25 | update_man_version(filename) 26 | 27 | # MODULE.bazel 28 | print('Updating MODULE.bazel') 29 | update_file('MODULE.bazel', r'(?m)^ version = ".*?"', ' version = "%s"' % CURRENT_RELEASE) 30 | -------------------------------------------------------------------------------- /maint/cmake-tests/build-interface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(TestBuildInterface C) 3 | set(CMAKE_C_STANDARD 99) 4 | set(CMAKE_C_STANDARD_REQUIRED TRUE) 5 | 6 | # To test the static vs dynamic interface, uncomment one of the following lines: 7 | # set(BUILD_STATIC_LIBS OFF) 8 | # set(BUILD_SHARED_LIBS ON) 9 | add_subdirectory(pcre2) 10 | 11 | add_executable(test_executable main.c) 12 | target_link_libraries(test_executable PRIVATE pcre2-8) 13 | -------------------------------------------------------------------------------- /maint/cmake-tests/build-interface/main.c: -------------------------------------------------------------------------------- 1 | #define PCRE2_CODE_UNIT_WIDTH 8 2 | #include 3 | #include 4 | 5 | int main(void) 6 | { 7 | char version_str[32]; 8 | pcre2_config(PCRE2_CONFIG_VERSION, version_str); 9 | printf("Using PCRE2 version: %s\n", version_str); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /maint/cmake-tests/install-interface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(TestInstallInterface C) 3 | set(CMAKE_C_STANDARD 99) 4 | set(CMAKE_C_STANDARD_REQUIRED TRUE) 5 | 6 | # To test the static interface, uncomment the following line: 7 | # set(PCRE2_USE_STATIC_LIBS ON) 8 | find_package(PCRE2 REQUIRED CONFIG) 9 | 10 | add_executable(test_executable main.c) 11 | target_link_libraries(test_executable PRIVATE PCRE2::8BIT) 12 | 13 | if(WIN32 AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.21 AND NOT PCRE2_USE_STATIC_LIBS) 14 | # Ensure that the DLLs are available for the executable to run. Only needed 15 | # on Windows. 16 | add_custom_command(TARGET test_executable POST_BUILD 17 | COMMAND ${CMAKE_COMMAND} -E copy $ $ 18 | COMMAND_EXPAND_LISTS 19 | ) 20 | endif() 21 | -------------------------------------------------------------------------------- /maint/cmake-tests/install-interface/main.c: -------------------------------------------------------------------------------- 1 | #define PCRE2_CODE_UNIT_WIDTH 8 2 | #include 3 | #include 4 | 5 | int main(void) 6 | { 7 | char version_str[32]; 8 | pcre2_config(PCRE2_CONFIG_VERSION, version_str); 9 | printf("Using PCRE2 version: %s\n", version_str); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /maint/manifest-libpcre2-posix.so: -------------------------------------------------------------------------------- 1 | T pcre2_regcomp@@PCRE2_10.46 2 | T pcre2_regerror@@PCRE2_10.46 3 | T pcre2_regexec@@PCRE2_10.46 4 | T pcre2_regfree@@PCRE2_10.46 5 | -------------------------------------------------------------------------------- /maint/ucptestdata/testinput2: -------------------------------------------------------------------------------- 1 | find script Han 2 | find type Pe script Common scriptx Hangul 3 | find script !latin scriptx sundanese 4 | find type Sk 5 | find type Pd 6 | find gbreak LVT 7 | find script Old_Uyghur 8 | find bidi PDF 9 | find bidi CS 10 | find bidi CS type Sm 11 | find bidi B 12 | find bidi FSI 13 | find bidi PDI 14 | find bidi RLI 15 | find bidi RLO 16 | find bidi S 17 | find bidi WS 18 | find bidi white_space bool ascii 19 | find script bopo 20 | find bool prependedconcatenationmark 21 | find bool pcm 22 | find script Todhri 23 | find script Sunuwar 24 | -------------------------------------------------------------------------------- /src/libpcre2-posix.sym: -------------------------------------------------------------------------------- 1 | # First version of PCRE2 in which symbols were assigned versions. 2 | PCRE2_10.46 { 3 | global: 4 | pcre2_regcomp; 5 | pcre2_regerror; 6 | pcre2_regexec; 7 | pcre2_regfree; 8 | local: 9 | _fini; 10 | _init; 11 | }; 12 | 13 | # PCRE2_10.47 {} PCRE2_10.46; 14 | -------------------------------------------------------------------------------- /testdata/fuzzing/pcre2_fuzzer.dict: -------------------------------------------------------------------------------- 1 | # This is attempt at a fuzzer dictionary for PCRE2. 2 | 3 | "\\A" 4 | "\\b" 5 | "\\B" 6 | "\\d" 7 | "\\D" 8 | "\\h" 9 | "\\H" 10 | "\\n" 11 | "\\N" 12 | "\\s" 13 | "\\S" 14 | "\\w" 15 | "\\W" 16 | "\\z" 17 | "\\Z" 18 | 19 | "(?" 20 | "(?:" 21 | "(?>" 22 | "(?=" 23 | "(?!" 24 | "(?<=" 25 | "(?\x00" 22 | "(\x00?\x00=\x00" 23 | "(\x00?\x00!\x00" 24 | "(\x00?\x00<\x00=\x00" 25 | "(\x00?\x00<\x00!\x00" 26 | "(\x00?\x00|\x00" 27 | 28 | "[\x00:\x00a\x00l\x00n\x00u\x00m\x00:\x00]\x00" 29 | "[\x00:\x00a\x00l\x00p\x00h\x00a\x00:\x00]\x00" 30 | "[\x00:\x00a\x00s\x00c\x00i\x00i\x00:\x00]\x00" 31 | "[\x00:\x00b\x00l\x00a\x00n\x00k\x00:\x00]\x00" 32 | "[\x00:\x00c\x00n\x00t\x00r\x00l\x00:\x00]\x00" 33 | "[\x00:\x00d\x00i\x00g\x00i\x00t\x00:\x00]\x00" 34 | "[\x00:\x00g\x00r\x00a\x00p\x00h\x00:\x00]\x00" 35 | "[\x00:\x00l\x00o\x00w\x00e\x00r\x00:\x00]\x00" 36 | "[\x00:\x00p\x00r\x00i\x00n\x00t\x00:\x00]\x00" 37 | "[\x00:\x00p\x00u\x00n\x00c\x00t\x00:\x00]\x00" 38 | "[\x00:\x00s\x00p\x00a\x00c\x00e\x00:\x00]\x00" 39 | "[\x00:\x00u\x00p\x00p\x00e\x00r\x00:\x00]\x00" 40 | "[\x00:\x00w\x00o\x00r\x00d\x00:\x00]\x00" 41 | "[\x00:\x00x\x00d\x00i\x00g\x00i\x00t\x00:\x00]\x00" 42 | 43 | "(\x00*\x00A\x00C\x00C\x00E\x00P\x00T\x00)\x00" 44 | "(\x00*\x00F\x00A\x00I\x00L\x00)\x00" 45 | "(\x00*\x00C\x00O\x00M\x00M\x00I\x00T\x00)\x00" 46 | "(\x00*\x00P\x00R\x00U\x00N\x00E\x00)\x00" 47 | "(\x00*\x00S\x00K\x00I\x00P\x00)\x00" 48 | "(\x00*\x00T\x00H\x00E\x00N\x00)\x00" 49 | 50 | # End 51 | -------------------------------------------------------------------------------- /testdata/fuzzing/pcre2_fuzzer_16.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = pcre2_fuzzer_16.dict 3 | max_len = 50000 4 | -------------------------------------------------------------------------------- /testdata/fuzzing/pcre2_fuzzer_32.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | dict = pcre2_fuzzer_32.dict 3 | max_len = 50000 4 | -------------------------------------------------------------------------------- /testdata/grepbinary: -------------------------------------------------------------------------------- 1 | The quick brown fx jumps over the lazy dog. 2 | -------------------------------------------------------------------------------- /testdata/grepfilelist: -------------------------------------------------------------------------------- 1 | testdata/grepinputv 2 | 3 | testdata/grepinputx 4 | -------------------------------------------------------------------------------- /testdata/grepinput3: -------------------------------------------------------------------------------- 1 | triple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt 2 | 3 | triple: t2_txt s1_tag s_txt p_tag p_txt o_tag 4 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 5 | 6 | triple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt 7 | 8 | triple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt 9 | 10 | triple: t5_txt s1_tag s_txt p_tag p_txt o_tag 11 | o_txt 12 | 13 | triple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt 14 | 15 | triple: t7_txt s1_tag s_txt p_tag p_txt o_tag o_txt 16 | -------------------------------------------------------------------------------- /testdata/grepinput8: -------------------------------------------------------------------------------- 1 | X one 2 | X two X three X four X five 3 | X six 4 | X seven…X eight
X nine
X ten 5 | 6 | Before 111 7 | Before 222
Before 333…Match 8 | After 111 9 | After 222
After 333 10 | And so on and so on 11 | And so on and so on 12 | ſ 13 | ſſſſſ 14 | ÁabcÁ KkK 15 | 16 | A1 17 | A1 18 | -------------------------------------------------------------------------------- /testdata/grepinputBad8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/grepinputBad8 -------------------------------------------------------------------------------- /testdata/grepinputBad8_Trail: -------------------------------------------------------------------------------- 1 | abc� -------------------------------------------------------------------------------- /testdata/grepinputC.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/grepinputC.bz2 -------------------------------------------------------------------------------- /testdata/grepinputC.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/grepinputC.gz -------------------------------------------------------------------------------- /testdata/grepinputM: -------------------------------------------------------------------------------- 1 | Data file for multiline tests of multiple matches. 2 | 3 | start end in between start 4 | end and following 5 | Other stuff 6 | 7 | start end in between start 8 | end and following start 9 | end other stuff 10 | 11 | start end in between start 12 | 13 | end 14 | 15 | ** These two lines must be last. 16 | start end in between start 17 | end 18 | -------------------------------------------------------------------------------- /testdata/grepinputUN: -------------------------------------------------------------------------------- 1 | abcሴdef 2 | xyz -------------------------------------------------------------------------------- /testdata/grepinputv: -------------------------------------------------------------------------------- 1 | The quick brown 2 | fox jumps 3 | over the lazy dog. 4 | This time it jumps and jumps and jumps. 5 | This line contains \E and (regex) *meta* [characters]. 6 | The word is cat in this line 7 | The caterpillar sat on the mat 8 | The snowcat is not an animal 9 | A buried feline in the syndicate 10 | trailing spaces 11 | -------------------------------------------------------------------------------- /testdata/grepinputx: -------------------------------------------------------------------------------- 1 | This is a second file of input for the pcre2grep tests. 2 | 3 | Here is the pattern again. 4 | 5 | Pattern 6 | That time it was on a line by itself. 7 | 8 | To pat or not to pat, that is the question. 9 | 10 | complete pair 11 | of lines 12 | 13 | That was a complete pair 14 | of lines all by themselves. 15 | 16 | complete pair 17 | of lines 18 | 19 | And there they were again, to check line numbers. 20 | 21 | one 22 | two 23 | three 24 | four 25 | five 26 | six 27 | seven 28 | eight 29 | nine 30 | ten 31 | eleven 32 | twelve 33 | thirteen 34 | fourteen 35 | fifteen 36 | sixteen 37 | seventeen 38 | eighteen 39 | nineteen 40 | twenty 41 | 42 | This line contains pattern not on a line by itself. 43 | This is the last line of this file. 44 | -------------------------------------------------------------------------------- /testdata/greplist: -------------------------------------------------------------------------------- 1 | This is a file of patterns for testing the -f option. Don't include any blank 2 | lines because they will match everything! This is no longer true, so have one. 3 | 4 | pattern 5 | line by itself 6 | 7 | End of the list of patterns. 8 | -------------------------------------------------------------------------------- /testdata/grepnot.bz2: -------------------------------------------------------------------------------- 1 | This is a second file of input for the pcre2grep tests. 2 | 3 | Here is the pattern again. 4 | 5 | Pattern 6 | That time it was on a line by itself. 7 | 8 | To pat or not to pat, that is the question. 9 | 10 | complete pair 11 | of lines 12 | 13 | That was a complete pair 14 | of lines all by themselves. 15 | 16 | complete pair 17 | of lines 18 | 19 | And there they were again, to check line numbers. 20 | 21 | one 22 | two 23 | three 24 | four 25 | five 26 | six 27 | seven 28 | eight 29 | nine 30 | ten 31 | eleven 32 | twelve 33 | thirteen 34 | fourteen 35 | fifteen 36 | sixteen 37 | seventeen 38 | eighteen 39 | nineteen 40 | twenty 41 | 42 | This line contains pattern not on a line by itself. 43 | This is the last line of this file. 44 | -------------------------------------------------------------------------------- /testdata/grepoutput8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/grepoutput8 -------------------------------------------------------------------------------- /testdata/grepoutputC: -------------------------------------------------------------------------------- 1 | --- Test 1 --- 2 | Arg1: [T] [he ] [ ] Arg2: |T| () () (0) 3 | The quick brown 4 | Arg1: [T] [his] [s] Arg2: |T| () () (0) 5 | This time it jumps and jumps and jumps. 6 | Arg1: [T] [his] [s] Arg2: |T| () () (0) 7 | This line contains \E and (regex) *meta* [characters]. 8 | Arg1: [T] [he ] [ ] Arg2: |T| () () (0) 9 | The word is cat in this line 10 | Arg1: [T] [he ] [ ] Arg2: |T| () () (0) 11 | The caterpillar sat on the mat 12 | Arg1: [T] [he ] [ ] Arg2: |T| () () (0) 13 | The snowcat is not an animal 14 | RC=0 15 | --- Test 2 --- 16 | Arg1: [qu] [qu] 17 | The quick brown 18 | Arg1: [ t] [ t] 19 | This time it jumps and jumps and jumps. 20 | Arg1: [ l] [ l] 21 | This line contains \E and (regex) *meta* [characters]. 22 | Arg1: [wo] [wo] 23 | The word is cat in this line 24 | Arg1: [ca] [ca] 25 | The caterpillar sat on the mat 26 | Arg1: [sn] [sn] 27 | The snowcat is not an animal 28 | RC=0 29 | --- Test 3 --- 30 | 0:T 31 | The quick brown 32 | 0:T 33 | This time it jumps and jumps and jumps. 34 | 0:T 35 | This line contains \E and (regex) *meta* [characters]. 36 | 0:T 37 | The word is cat in this line 38 | 0:T 39 | The caterpillar sat on the mat 40 | 0:T 41 | The snowcat is not an animal 42 | RC=0 43 | --- Test 4 --- 44 | 0:T 45 | 46 | The quick brown 47 | 0:T 48 | 49 | This time it jumps and jumps and jumps. 50 | 0:T 51 | 52 | This line contains \E and (regex) *meta* [characters]. 53 | 0:T 54 | 55 | The word is cat in this line 56 | 0:T 57 | 58 | The caterpillar sat on the mat 59 | 0:T 60 | 61 | The snowcat is not an animal 62 | RC=0 63 | --- Test 5 --- 64 | T 65 | T 66 | T 67 | T 68 | T 69 | T 70 | RC=1 71 | --- Test 6 --- 72 | 0:T:AA 73 | The quick brown 74 | RC=0 75 | -------------------------------------------------------------------------------- /testdata/grepoutputCN: -------------------------------------------------------------------------------- 1 | --- Test 1 --- 2 | The quick brown 3 | This time it jumps and jumps and jumps. 4 | This line contains \E and (regex) *meta* [characters]. 5 | The word is cat in this line 6 | The caterpillar sat on the mat 7 | The snowcat is not an animal 8 | RC=0 9 | --- Test 2 --- 10 | The quick brown 11 | This time it jumps and jumps and jumps. 12 | This line contains \E and (regex) *meta* [characters]. 13 | The word is cat in this line 14 | The caterpillar sat on the mat 15 | The snowcat is not an animal 16 | RC=0 17 | --- Test 3 --- 18 | 0:T 19 | The quick brown 20 | 0:T 21 | This time it jumps and jumps and jumps. 22 | 0:T 23 | This line contains \E and (regex) *meta* [characters]. 24 | 0:T 25 | The word is cat in this line 26 | 0:T 27 | The caterpillar sat on the mat 28 | 0:T 29 | The snowcat is not an animal 30 | RC=0 31 | --- Test 4 --- 32 | The quick brown 33 | This time it jumps and jumps and jumps. 34 | This line contains \E and (regex) *meta* [characters]. 35 | The word is cat in this line 36 | The caterpillar sat on the mat 37 | The snowcat is not an animal 38 | RC=0 39 | --- Test 5 --- 40 | T 41 | T 42 | T 43 | T 44 | T 45 | T 46 | RC=1 47 | --- Test 6 --- 48 | 0:T:AA 49 | The quick brown 50 | RC=0 51 | -------------------------------------------------------------------------------- /testdata/grepoutputCNU: -------------------------------------------------------------------------------- 1 | --- Test 1 --- 2 | 0:¦ 3 | The quick brown 4 | 0:¦ 5 | This time it jumps and jumps and jumps. 6 | 0:¦ 7 | This line contains \E and (regex) *meta* [characters]. 8 | 0:¦ 9 | The word is cat in this line 10 | 0:¦ 11 | The caterpillar sat on the mat 12 | 0:¦ 13 | The snowcat is not an animal 14 | RC=0 15 | --- Test 2 --- 16 | The quick brown 17 | This time it jumps and jumps and jumps. 18 | This line contains \E and (regex) *meta* [characters]. 19 | The word is cat in this line 20 | The caterpillar sat on the mat 21 | The snowcat is not an animal 22 | RC=0 23 | -------------------------------------------------------------------------------- /testdata/grepoutputCU: -------------------------------------------------------------------------------- 1 | --- Test 1 --- 2 | 0:¦ 3 | The quick brown 4 | 0:¦ 5 | This time it jumps and jumps and jumps. 6 | 0:¦ 7 | This line contains \E and (regex) *meta* [characters]. 8 | 0:¦ 9 | The word is cat in this line 10 | 0:¦ 11 | The caterpillar sat on the mat 12 | 0:¦ 13 | The snowcat is not an animal 14 | RC=0 15 | --- Test 2 --- 16 | 0:¦ 17 | 18 | The quick brown 19 | 0:¦ 20 | 21 | This time it jumps and jumps and jumps. 22 | 0:¦ 23 | 24 | This line contains \E and (regex) *meta* [characters]. 25 | 0:¦ 26 | 27 | The word is cat in this line 28 | 0:¦ 29 | 30 | The caterpillar sat on the mat 31 | 0:¦ 32 | 33 | The snowcat is not an animal 34 | RC=0 35 | -------------------------------------------------------------------------------- /testdata/grepoutputCbz2: -------------------------------------------------------------------------------- 1 | one 2 | two 3 | RC=0 4 | one 5 | two 6 | RC=0 7 | -------------------------------------------------------------------------------- /testdata/grepoutputCgz: -------------------------------------------------------------------------------- 1 | one 2 | two 3 | RC=0 4 | -------------------------------------------------------------------------------- /testdata/grepoutputN: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/grepoutputN -------------------------------------------------------------------------------- /testdata/grepoutputUN: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/grepoutputUN -------------------------------------------------------------------------------- /testdata/greppatN4: -------------------------------------------------------------------------------- 1 | xxx 2 | jkl -------------------------------------------------------------------------------- /testdata/testbtables: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testbtables -------------------------------------------------------------------------------- /testdata/testinput1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testinput1 -------------------------------------------------------------------------------- /testdata/testinput10: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testinput10 -------------------------------------------------------------------------------- /testdata/testinput11: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testinput11 -------------------------------------------------------------------------------- /testdata/testinput12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testinput12 -------------------------------------------------------------------------------- /testdata/testinput13: -------------------------------------------------------------------------------- 1 | # These DFA tests are for the handling of characters greater than 255 in 2 | # 16-bit or 32-bit, non-UTF mode. 3 | 4 | #forbid_utf 5 | #subject dfa 6 | 7 | /^\x{ffff}+/i 8 | \x{ffff} 9 | 10 | /^\x{ffff}?/i 11 | \x{ffff} 12 | 13 | /^\x{ffff}*/i 14 | \x{ffff} 15 | 16 | /^\x{ffff}{3}/i 17 | \x{ffff}\x{ffff}\x{ffff} 18 | 19 | /^\x{ffff}{0,3}/i 20 | \x{ffff} 21 | 22 | # End of testinput13 23 | -------------------------------------------------------------------------------- /testdata/testinput16: -------------------------------------------------------------------------------- 1 | # This test is run only when JIT support is not available. It checks that an 2 | # attempt to use it has the expected behaviour. It also tests things that 3 | # are different without JIT. 4 | 5 | /abc/I,jit,jitverify 6 | 7 | /a*/I 8 | 9 | # End of testinput16 10 | -------------------------------------------------------------------------------- /testdata/testinput19: -------------------------------------------------------------------------------- 1 | # This set of tests is run only with the 8-bit library. It tests the POSIX 2 | # interface with UTF/UCP support, which is supported only with the 8-bit 3 | # library. This test should not be run with JIT (which is not available for the 4 | # POSIX interface). 5 | 6 | #pattern posix 7 | 8 | /a\x{1234}b/utf 9 | a\x{1234}b 10 | 11 | /\w/ 12 | \= Expect no match 13 | +++\x{c2} 14 | 15 | /\w/ucp 16 | +++\x{c2} 17 | 18 | /"^AB" 00 "\x{1234}$"/hex,utf 19 | AB\x{00}\x{1234}\=posix_startend=0:6 20 | 21 | /\w/utf 22 | \= Expect UTF error 23 | A\xabB 24 | 25 | # End of testdata/testinput19 26 | -------------------------------------------------------------------------------- /testdata/testinput2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testinput2 -------------------------------------------------------------------------------- /testdata/testinput21: -------------------------------------------------------------------------------- 1 | # These are tests of \C that do not involve UTF. They are not run when \C is 2 | # disabled by compiling with --enable-never-backslash-C. 3 | 4 | /\C+\D \C+\d \C+\S \C+\s \C+\W \C+\w \C+. \C+\R \C+\H \C+\h \C+\V \C+\v \C+\Z \C+\z \C+$/Bx 5 | 6 | /\D+\C \d+\C \S+\C \s+\C \W+\C \w+\C .+\C \R+\C \H+\C \h+\C \V+\C \v+\C a+\C \n+\C \C+\C/Bx 7 | 8 | /ab\Cde/never_backslash_c 9 | 10 | /ab\Cde/info 11 | abXde 12 | 13 | /(?<=ab\Cde)X/ 14 | abZdeX 15 | 16 | /[\C]/ 17 | 18 | # End of testinput21 19 | -------------------------------------------------------------------------------- /testdata/testinput23: -------------------------------------------------------------------------------- 1 | # This test is run when PCRE2 has been built with --enable-never-backslash-C, 2 | # which disables the use of \C. All we can do is check that it gives the 3 | # correct error message. 4 | 5 | /a\Cb/ 6 | 7 | /a[\C]b/ 8 | 9 | # End of testinput23 10 | -------------------------------------------------------------------------------- /testdata/testinput25: -------------------------------------------------------------------------------- 1 | # This file tests the auxiliary pattern conversion features of the PCRE2 2 | # library, in UTF mode. 3 | 4 | #newline_default lf any anycrlf 5 | 6 | # -------- Tests of glob conversion -------- 7 | 8 | # Set the glob separator explicitly so that different OS defaults are not a 9 | # problem. Then test various errors. 10 | 11 | #pattern convert=glob,convert_glob_escape=\,convert_glob_separator=/ 12 | 13 | # The fact that this one works in 13 bytes in the 8-bit library shows that the 14 | # output is in UTF-8, though pcre2test shows the character as an escape. 15 | 16 | /'>' c4 a3 '<'/hex,utf,convert_length=13 17 | 18 | # This expansion creates a string that is too long for the input buffer. 19 | 20 | /\[()]{65535}()/expand 21 | 22 | # End of testinput25 23 | -------------------------------------------------------------------------------- /testdata/testinput29: -------------------------------------------------------------------------------- 1 | # This tests the EBCDIC support in PCRE2, specifically when NL has been 2 | # configured to be 0x25. 3 | 4 | /^\x25$/ 5 | \n 6 | 7 | /\cU/ 8 | \x0a 9 | \x85 10 | -------------------------------------------------------------------------------- /testdata/testinput3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testinput3 -------------------------------------------------------------------------------- /testdata/testinput5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testinput5 -------------------------------------------------------------------------------- /testdata/testinput6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testinput6 -------------------------------------------------------------------------------- /testdata/testinputheap: -------------------------------------------------------------------------------- 1 | #pattern framesize, memory 2 | 3 | /abcd/ 4 | abcd\=memory 5 | abcd\=find_limits 6 | 7 | /(((((((((((((((((((((((((((((( (^abc|xyz){1,20}$ ))))))))))))))))))))))))))))))/x 8 | abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcX\=memory 9 | abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcX\=find_limits 10 | 11 | /ab(cd)/ 12 | abcd\=memory 13 | abcd\=memory,ovector=0 14 | 15 | /\[(a)]{1000}/expand,framesize 16 | \[a]{1000}\=ovector=1 17 | 18 | # The heapframes_size option gets pcre2test to show the size of the heapframes 19 | # vector that after pcre2_match() has run. Running a match with ovector=0 20 | # causes the match data block to be freed, thus releasing that vector. 21 | 22 | /\[(a)]{1000}/expand,framesize 23 | \[a]{1000}\=ovector=1,heapframes_size 24 | 25 | /a/heapframes_size,framesize 26 | a\=ovector=0 27 | 28 | /a|(b){200}/g,expand,heapframes_size 29 | abacus z\[b]{200}z 30 | a\=ovector=0 31 | 32 | /(a)/replace=>$1< 33 | cat\=heapframes_size 34 | 35 | # End 36 | -------------------------------------------------------------------------------- /testdata/testoutput1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput1 -------------------------------------------------------------------------------- /testdata/testoutput10: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput10 -------------------------------------------------------------------------------- /testdata/testoutput11-16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput11-16 -------------------------------------------------------------------------------- /testdata/testoutput11-32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput11-32 -------------------------------------------------------------------------------- /testdata/testoutput12-16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput12-16 -------------------------------------------------------------------------------- /testdata/testoutput12-32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput12-32 -------------------------------------------------------------------------------- /testdata/testoutput13: -------------------------------------------------------------------------------- 1 | # These DFA tests are for the handling of characters greater than 255 in 2 | # 16-bit or 32-bit, non-UTF mode. 3 | 4 | #forbid_utf 5 | #subject dfa 6 | 7 | /^\x{ffff}+/i 8 | \x{ffff} 9 | 0: \x{ffff} 10 | 11 | /^\x{ffff}?/i 12 | \x{ffff} 13 | 0: \x{ffff} 14 | 15 | /^\x{ffff}*/i 16 | \x{ffff} 17 | 0: \x{ffff} 18 | 19 | /^\x{ffff}{3}/i 20 | \x{ffff}\x{ffff}\x{ffff} 21 | 0: \x{ffff}\x{ffff}\x{ffff} 22 | 23 | /^\x{ffff}{0,3}/i 24 | \x{ffff} 25 | 0: \x{ffff} 26 | 27 | # End of testinput13 28 | -------------------------------------------------------------------------------- /testdata/testoutput16: -------------------------------------------------------------------------------- 1 | # This test is run only when JIT support is not available. It checks that an 2 | # attempt to use it has the expected behaviour. It also tests things that 3 | # are different without JIT. 4 | 5 | /abc/I,jit,jitverify 6 | JIT compilation was not successful (bad JIT option) 7 | Capture group count = 0 8 | First code unit = 'a' 9 | Last code unit = 'c' 10 | Subject length lower bound = 3 11 | JIT support is not available in this version of PCRE2 12 | 13 | /a*/I 14 | Capture group count = 0 15 | May match empty string 16 | Subject length lower bound = 0 17 | 18 | # End of testinput16 19 | -------------------------------------------------------------------------------- /testdata/testoutput19: -------------------------------------------------------------------------------- 1 | # This set of tests is run only with the 8-bit library. It tests the POSIX 2 | # interface with UTF/UCP support, which is supported only with the 8-bit 3 | # library. This test should not be run with JIT (which is not available for the 4 | # POSIX interface). 5 | 6 | #pattern posix 7 | 8 | /a\x{1234}b/utf 9 | a\x{1234}b 10 | 0: a\x{1234}b 11 | 12 | /\w/ 13 | \= Expect no match 14 | +++\x{c2} 15 | No match: POSIX code 17: match failed 16 | 17 | /\w/ucp 18 | +++\x{c2} 19 | 0: \xc2 20 | 21 | /"^AB" 00 "\x{1234}$"/hex,utf 22 | AB\x{00}\x{1234}\=posix_startend=0:6 23 | 0: AB\x{00}\x{1234} 24 | 25 | /\w/utf 26 | \= Expect UTF error 27 | A\xabB 28 | No match: POSIX code 16: bad argument 29 | 30 | # End of testdata/testinput19 31 | -------------------------------------------------------------------------------- /testdata/testoutput2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput2 -------------------------------------------------------------------------------- /testdata/testoutput23: -------------------------------------------------------------------------------- 1 | # This test is run when PCRE2 has been built with --enable-never-backslash-C, 2 | # which disables the use of \C. All we can do is check that it gives the 3 | # correct error message. 4 | 5 | /a\Cb/ 6 | Failed: error 185 at offset 3: using \C is disabled in this PCRE2 library 7 | here: a\C |<--| b 8 | 9 | /a[\C]b/ 10 | Failed: error 107 at offset 3: escape sequence is invalid in character class 11 | here: a[\ |-->| C]b 12 | 13 | # End of testinput23 14 | -------------------------------------------------------------------------------- /testdata/testoutput29: -------------------------------------------------------------------------------- 1 | # This tests the EBCDIC support in PCRE2, specifically when NL has been 2 | # configured to be 0x25. 3 | 4 | /^\x25$/ 5 | \n 6 | 0: \x0a 7 | 8 | /\cU/ 9 | \x0a 10 | No match 11 | \x85 12 | 0: \x85 13 | -------------------------------------------------------------------------------- /testdata/testoutput3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput3 -------------------------------------------------------------------------------- /testdata/testoutput3A: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput3A -------------------------------------------------------------------------------- /testdata/testoutput3B: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput3B -------------------------------------------------------------------------------- /testdata/testoutput3C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput3C -------------------------------------------------------------------------------- /testdata/testoutput5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput5 -------------------------------------------------------------------------------- /testdata/testoutput6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/testoutput6 -------------------------------------------------------------------------------- /testdata/valgrind-jit.supp: -------------------------------------------------------------------------------- 1 | { 2 | name 3 | Memcheck:Addr16 4 | obj:??? 5 | obj:??? 6 | obj:??? 7 | } 8 | 9 | { 10 | name 11 | Memcheck:Cond 12 | obj:??? 13 | obj:??? 14 | obj:??? 15 | } 16 | -------------------------------------------------------------------------------- /testdata/wintestinput3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/wintestinput3 -------------------------------------------------------------------------------- /testdata/wintestoutput3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PCRE2Project/pcre2/ae1593f56bc1878955d2c5dbcb168f06b3b37248/testdata/wintestoutput3 -------------------------------------------------------------------------------- /vms/openvms_readme.txt: -------------------------------------------------------------------------------- 1 | This is directory for OpenVMS support, 2 | provided shared and static library, 3 | pcre2grep utility also. 4 | 5 | Requires: 6 | bzip2 library : http://vaxvms.org/clamav/ 7 | zlib library : http://vaxvms.org/libsdl/required.html 8 | 9 | 10 | To build the library please: 11 | 12 | @[.VMS]CONFIGURE.COM 13 | @BUILD 14 | 15 | After build, PCRE2$STARTUP.COM has been created 16 | it should be started before use (good place from LOGIN.COM) 17 | 18 | Feel free to contact: 19 | alexey@vaxman.de 20 | Alexey Chupahin 21 | -------------------------------------------------------------------------------- /vms/pcre2.h_patch: -------------------------------------------------------------------------------- 1 | #define _pcre2_default_compile_context_ vms_pcre2_def_cmpl_cntxt_ 2 | #define _pcre2_default_convert_context_ vms_pcre2_def_cnvrt_cntxt_ 3 | #define pcre2_set_compile_extra_options_8 vms_pcre2_set_cmpl_ext_opt_8 4 | #define pcre2_set_compile_recursion_guard_8 vms_pcre2_set_cmpl_rcrs_grd_8 5 | #define pcre2_set_recursion_memory_management_8 vms_pcre2_set_rcrs_mem_mng_8 6 | #define pcre2_match_data_create_from_pattern_8 vms_pcre2_m_d_crt_fr_patt_8 7 | #define pcre2_get_match_data_heapframes_size_8 vms_pcre2_get_m_d_hpfram_s_8 8 | #define pcre2_serialize_get_number_of_codes_8 vms_pcre2_ser_get_n_of_cod_8 9 | #define pcre2_substring_nametable_scan_8 vms_pcre2_substr_nmtab_scan_8 10 | #define pcre2_substring_length_bynumber_8 vms_pcre2_substr_len_bynum_8 11 | #define pcre2_substring_number_from_name_8 vms_pcre2_substr_num_f_nam_8 12 | #define pcre2_set_max_pattern_compiled_length vms_pcre2_set_max_pat_cmpl_len 13 | -------------------------------------------------------------------------------- /vms/stdint.h: -------------------------------------------------------------------------------- 1 | #ifndef MY_VMS_STDINT 2 | #define MY_VMS_STDINT 3 | #include 4 | #include 5 | #include 6 | #define SIZE_MAX UINT_MAX 7 | #define UINT32_MAX 4294967295u 8 | #define UINT16_MAX (65535) 9 | #endif 10 | --------------------------------------------------------------------------------