summaryrefslogtreecommitdiff
path: root/src/third_party/pcre-8.30
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2012-02-29 17:02:13 -0500
committerEric Milkie <milkie@10gen.com>2012-02-29 17:04:07 -0500
commit9fcca4f886ce7176178a3168ebd9c67422ad951e (patch)
tree20f0c13be7a5fd3f24a3d29adf520a209633ba5a /src/third_party/pcre-8.30
parent09edd8531bdcbb5581706c989ad192575e7efde4 (diff)
downloadmongo-9fcca4f886ce7176178a3168ebd9c67422ad951e.tar.gz
SERVER-3827 remove some unnecessary files
Diffstat (limited to 'src/third_party/pcre-8.30')
-rw-r--r--src/third_party/pcre-8.30/cmake/COPYING-CMAKE-SCRIPTS22
-rw-r--r--src/third_party/pcre-8.30/cmake/FindPackageHandleStandardArgs.cmake58
-rw-r--r--src/third_party/pcre-8.30/cmake/FindReadline.cmake29
-rw-r--r--src/third_party/pcre-8.30/doc/html/index.html173
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre-config.html103
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre.html160
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre16.html377
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_assign_jit_stack.html72
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_compile.html99
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_compile2.html102
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_config.html84
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_copy_named_substring.html59
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_copy_substring.html56
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_dfa_exec.html119
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_exec.html102
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_free_study.html43
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_free_substring.html43
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_free_substring_list.html43
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_fullinfo.html91
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_get_named_substring.html62
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_get_stringnumber.html53
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_get_stringtable_entries.html56
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_get_substring.html59
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_get_substring_list.html57
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_jit_stack_alloc.html51
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_jit_stack_free.html45
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_maketables.html45
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_pattern_to_host_byte_order.html54
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_refcount.html48
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_study.html64
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_utf16_to_host_byte_order.html57
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcre_version.html43
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcreapi.html2608
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrebuild.html420
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrecallout.html232
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrecompat.html212
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrecpp.html368
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcredemo.html426
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcregrep.html651
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrejit.html392
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrelimits.html81
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrematching.html232
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrepartial.html444
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrepattern.html2852
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcreperform.html196
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcreposix.html292
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcreprecompile.html158
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcresample.html110
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcrestack.html225
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcresyntax.html509
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcretest.html932
-rw-r--r--src/third_party/pcre-8.30/doc/html/pcreunicode.html237
-rw-r--r--src/third_party/pcre-8.30/doc/index.html.src173
-rw-r--r--src/third_party/pcre-8.30/doc/pcre-config.187
-rw-r--r--src/third_party/pcre-8.30/doc/pcre-config.txt81
-rw-r--r--src/third_party/pcre-8.30/doc/pcre.3158
-rw-r--r--src/third_party/pcre-8.30/doc/pcre.txt9048
-rw-r--r--src/third_party/pcre-8.30/doc/pcre16.3379
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_assign_jit_stack.357
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_compile.388
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_compile2.394
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_config.370
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_copy_named_substring.351
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_copy_substring.346
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_dfa_exec.3114
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_exec.394
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_free_study.329
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_free_substring.329
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_free_substring_list.329
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_fullinfo.378
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_get_named_substring.354
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_get_stringnumber.341
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_get_stringtable_entries.344
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_get_substring.349
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_get_substring_list.345
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_jit_stack_alloc.341
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_jit_stack_free.333
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_maketables.331
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_pattern_to_host_byte_order.343
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_refcount.334
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_study.352
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_utf16_to_host_byte_order.346
-rw-r--r--src/third_party/pcre-8.30/doc/pcre_version.329
-rw-r--r--src/third_party/pcre-8.30/doc/pcreapi.32649
-rw-r--r--src/third_party/pcre-8.30/doc/pcrebuild.3425
-rw-r--r--src/third_party/pcre-8.30/doc/pcrecallout.3203
-rw-r--r--src/third_party/pcre-8.30/doc/pcrecompat.3180
-rw-r--r--src/third_party/pcre-8.30/doc/pcrecpp.3348
-rw-r--r--src/third_party/pcre-8.30/doc/pcregrep.1582
-rw-r--r--src/third_party/pcre-8.30/doc/pcregrep.txt630
-rw-r--r--src/third_party/pcre-8.30/doc/pcrejit.3372
-rw-r--r--src/third_party/pcre-8.30/doc/pcrelimits.363
-rw-r--r--src/third_party/pcre-8.30/doc/pcrematching.3205
-rw-r--r--src/third_party/pcre-8.30/doc/pcrepartial.3417
-rw-r--r--src/third_party/pcre-8.30/doc/pcrepattern.32881
-rw-r--r--src/third_party/pcre-8.30/doc/pcreperform.3178
-rw-r--r--src/third_party/pcre-8.30/doc/pcreposix.3270
-rw-r--r--src/third_party/pcre-8.30/doc/pcreprecompile.3151
-rw-r--r--src/third_party/pcre-8.30/doc/pcresample.399
-rw-r--r--src/third_party/pcre-8.30/doc/pcrestack.3215
-rw-r--r--src/third_party/pcre-8.30/doc/pcresyntax.3484
-rw-r--r--src/third_party/pcre-8.30/doc/pcretest.1941
-rw-r--r--src/third_party/pcre-8.30/doc/pcretest.txt873
-rw-r--r--src/third_party/pcre-8.30/doc/pcreunicode.3222
-rw-r--r--src/third_party/pcre-8.30/doc/perltest.txt42
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitConfig.h96
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitConfigInternal.h424
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitExecAllocator.c277
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitLir.c1594
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitLir.h853
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativeARM_Thumb2.c1913
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativeARM_v5.c2424
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativeMIPS_32.c405
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativeMIPS_common.c1829
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativePPC_32.c262
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativePPC_64.c428
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativePPC_common.c1872
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativeX86_32.c517
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativeX86_64.c842
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitNativeX86_common.c2858
-rw-r--r--src/third_party/pcre-8.30/sljit/sljitUtils.c244
-rw-r--r--src/third_party/pcre-8.30/testdata/grepinput611
-rw-r--r--src/third_party/pcre-8.30/testdata/grepinput315
-rw-r--r--src/third_party/pcre-8.30/testdata/grepinput811
-rw-r--r--src/third_party/pcre-8.30/testdata/grepinputv4
-rw-r--r--src/third_party/pcre-8.30/testdata/grepinputx43
-rw-r--r--src/third_party/pcre-8.30/testdata/greplist7
-rw-r--r--src/third_party/pcre-8.30/testdata/grepoutput640
-rw-r--r--src/third_party/pcre-8.30/testdata/grepoutput812
-rw-r--r--src/third_party/pcre-8.30/testdata/grepoutputN16
-rw-r--r--src/third_party/pcre-8.30/testdata/greppatN42
-rw-r--r--src/third_party/pcre-8.30/testdata/saved16bin70 -> 0 bytes
-rw-r--r--src/third_party/pcre-8.30/testdata/saved16BE-1bin402 -> 0 bytes
-rw-r--r--src/third_party/pcre-8.30/testdata/saved16BE-2bin336 -> 0 bytes
-rw-r--r--src/third_party/pcre-8.30/testdata/saved16LE-1bin402 -> 0 bytes
-rw-r--r--src/third_party/pcre-8.30/testdata/saved16LE-2bin336 -> 0 bytes
-rw-r--r--src/third_party/pcre-8.30/testdata/saved8bin61 -> 0 bytes
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput15253
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput10989
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput11135
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput1219
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput139
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput14317
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput15280
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput1635
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput17275
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput18243
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput1922
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput23604
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput2019
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput2112
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput229
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput395
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput4624
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput5694
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput6819
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput7561
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput84712
-rw-r--r--src/third_party/pcre-8.30/testdata/testinput9691
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput18718
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput102037
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput11-16713
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput11-8713
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput1251
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput1321
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput14456
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput15913
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput16121
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput17451
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput18848
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput1988
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput212014
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput2024
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput2178
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput2259
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput3169
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput41094
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput51652
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput61378
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput71214
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput87869
-rw-r--r--src/third_party/pcre-8.30/testdata/testoutput91326
-rw-r--r--src/third_party/pcre-8.30/testdata/wintestinput391
-rw-r--r--src/third_party/pcre-8.30/testdata/wintestoutput3166
184 files changed, 0 insertions, 117663 deletions
diff --git a/src/third_party/pcre-8.30/cmake/COPYING-CMAKE-SCRIPTS b/src/third_party/pcre-8.30/cmake/COPYING-CMAKE-SCRIPTS
deleted file mode 100644
index 4b417765f3a..00000000000
--- a/src/third_party/pcre-8.30/cmake/COPYING-CMAKE-SCRIPTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/src/third_party/pcre-8.30/cmake/FindPackageHandleStandardArgs.cmake b/src/third_party/pcre-8.30/cmake/FindPackageHandleStandardArgs.cmake
deleted file mode 100644
index 151d8125031..00000000000
--- a/src/third_party/pcre-8.30/cmake/FindPackageHandleStandardArgs.cmake
+++ /dev/null
@@ -1,58 +0,0 @@
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
-# This macro is intended to be used in FindXXX.cmake modules files.
-# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
-# it also sets the <UPPERCASED_NAME>_FOUND variable.
-# The package is found if all variables listed are TRUE.
-# Example:
-#
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-#
-# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
-# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
-# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
-# independent whether QUIET was used or not.
-# If it is found, the location is reported using the VAR1 argument, so
-# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
-# If the second argument is DEFAULT_MSG, the message in the failure case will
-# be "Could NOT find LibXml2", if you don't like this message you can specify
-# your own custom failure message there.
-
-MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
-
- IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
- IF (${_NAME}_FIND_REQUIRED)
- SET(_FAIL_MESSAGE "Could not find REQUIRED package ${_NAME}")
- ELSE (${_NAME}_FIND_REQUIRED)
- SET(_FAIL_MESSAGE "Could not find OPTIONAL package ${_NAME}")
- ENDIF (${_NAME}_FIND_REQUIRED)
- ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
- SET(_FAIL_MESSAGE "${_FAIL_MSG}")
- ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
-
- STRING(TOUPPER ${_NAME} _NAME_UPPER)
-
- SET(${_NAME_UPPER}_FOUND TRUE)
- IF(NOT ${_VAR1})
- SET(${_NAME_UPPER}_FOUND FALSE)
- ENDIF(NOT ${_VAR1})
-
- FOREACH(_CURRENT_VAR ${ARGN})
- IF(NOT ${_CURRENT_VAR})
- SET(${_NAME_UPPER}_FOUND FALSE)
- ENDIF(NOT ${_CURRENT_VAR})
- ENDFOREACH(_CURRENT_VAR)
-
- IF (${_NAME_UPPER}_FOUND)
- IF (NOT ${_NAME}_FIND_QUIETLY)
- MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}")
- ENDIF (NOT ${_NAME}_FIND_QUIETLY)
- ELSE (${_NAME_UPPER}_FOUND)
- IF (${_NAME}_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}")
- ELSE (${_NAME}_FIND_REQUIRED)
- IF (NOT ${_NAME}_FIND_QUIETLY)
- MESSAGE(STATUS "${_FAIL_MESSAGE}")
- ENDIF (NOT ${_NAME}_FIND_QUIETLY)
- ENDIF (${_NAME}_FIND_REQUIRED)
- ENDIF (${_NAME_UPPER}_FOUND)
-ENDMACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
diff --git a/src/third_party/pcre-8.30/cmake/FindReadline.cmake b/src/third_party/pcre-8.30/cmake/FindReadline.cmake
deleted file mode 100644
index 1d4cc558431..00000000000
--- a/src/third_party/pcre-8.30/cmake/FindReadline.cmake
+++ /dev/null
@@ -1,29 +0,0 @@
-# from http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/FindReadline.cmake
-# http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/COPYING-CMAKE-SCRIPTS
-# --> BSD licensed
-#
-# GNU Readline library finder
-if(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
- set(READLINE_FOUND TRUE)
-else(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
- FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h
- /usr/include/readline
- )
-
-# 2008-04-22 The next clause used to read like this:
-#
-# FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
-# FIND_LIBRARY(NCURSES_LIBRARY NAMES ncurses )
-# include(FindPackageHandleStandardArgs)
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG NCURSES_LIBRARY READLINE_INCLUDE_DIR READLINE_LIBRARY )
-#
-# I was advised to modify it such that it will find an ncurses library if
-# required, but not if one was explicitly given, that is, it allows the
-# default to be overridden. PH
-
- FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
- include(FindPackageHandleStandardArgs)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARY )
-
- MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
-endif(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
diff --git a/src/third_party/pcre-8.30/doc/html/index.html b/src/third_party/pcre-8.30/doc/html/index.html
deleted file mode 100644
index b87c2a9009e..00000000000
--- a/src/third_party/pcre-8.30/doc/html/index.html
+++ /dev/null
@@ -1,173 +0,0 @@
-<html>
-<!-- This is a manually maintained file that is the root of the HTML version of
- the PCRE documentation. When the HTML documents are built from the man
- page versions, the entire doc/html directory is emptied, this file is then
- copied into doc/html/index.html, and the remaining files therein are
- created by the 132html script.
--->
-<head>
-<title>PCRE specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>Perl-compatible Regular Expressions (PCRE)</h1>
-<p>
-The HTML documentation for PCRE comprises the following pages:
-</p>
-
-<table>
-<tr><td><a href="pcre.html">pcre</a></td>
- <td>&nbsp;&nbsp;Introductory page</td></tr>
-
-<tr><td><a href="pcre16.html">pcre16</a></td>
- <td>&nbsp;&nbsp;Discussion of the 16-bit PCRE library</td></tr>
-
-<tr><td><a href="pcre-config.html">pcre-config</a></td>
- <td>&nbsp;&nbsp;Information about the installation configuration</td></tr>
-
-<tr><td><a href="pcreapi.html">pcreapi</a></td>
- <td>&nbsp;&nbsp;PCRE's native API</td></tr>
-
-<tr><td><a href="pcrebuild.html">pcrebuild</a></td>
- <td>&nbsp;&nbsp;Options for building PCRE</td></tr>
-
-<tr><td><a href="pcrecallout.html">pcrecallout</a></td>
- <td>&nbsp;&nbsp;The <i>callout</i> facility</td></tr>
-
-<tr><td><a href="pcrecompat.html">pcrecompat</a></td>
- <td>&nbsp;&nbsp;Compability with Perl</td></tr>
-
-<tr><td><a href="pcrecpp.html">pcrecpp</a></td>
- <td>&nbsp;&nbsp;The C++ wrapper for the PCRE library</td></tr>
-
-<tr><td><a href="pcredemo.html">pcredemo</a></td>
- <td>&nbsp;&nbsp;A demonstration C program that uses the PCRE library</td></tr>
-
-<tr><td><a href="pcregrep.html">pcregrep</a></td>
- <td>&nbsp;&nbsp;The <b>pcregrep</b> command</td></tr>
-
-<tr><td><a href="pcrejit.html">pcrejit</a></td>
- <td>&nbsp;&nbsp;Discussion of the just-in-time optimization support</td></tr>
-
-<tr><td><a href="pcrelimits.html">pcrelimits</a></td>
- <td>&nbsp;&nbsp;Details of size and other limits</td></tr>
-
-<tr><td><a href="pcrematching.html">pcrematching</a></td>
- <td>&nbsp;&nbsp;Discussion of the two matching algorithms</td></tr>
-
-<tr><td><a href="pcrepartial.html">pcrepartial</a></td>
- <td>&nbsp;&nbsp;Using PCRE for partial matching</td></tr>
-
-<tr><td><a href="pcrepattern.html">pcrepattern</a></td>
- <td>&nbsp;&nbsp;Specification of the regular expressions supported by PCRE</td></tr>
-
-<tr><td><a href="pcreperform.html">pcreperform</a></td>
- <td>&nbsp;&nbsp;Some comments on performance</td></tr>
-
-<tr><td><a href="pcreposix.html">pcreposix</a></td>
- <td>&nbsp;&nbsp;The POSIX API to the PCRE library</td></tr>
-
-<tr><td><a href="pcreprecompile.html">pcreprecompile</a></td>
- <td>&nbsp;&nbsp;How to save and re-use compiled patterns</td></tr>
-
-<tr><td><a href="pcresample.html">pcresample</a></td>
- <td>&nbsp;&nbsp;Discussion of the pcredemo program</td></tr>
-
-<tr><td><a href="pcrestack.html">pcrestack</a></td>
- <td>&nbsp;&nbsp;Discussion of PCRE's stack usage</td></tr>
-
-<tr><td><a href="pcresyntax.html">pcresyntax</a></td>
- <td>&nbsp;&nbsp;Syntax quick-reference summary</td></tr>
-
-<tr><td><a href="pcretest.html">pcretest</a></td>
- <td>&nbsp;&nbsp;The <b>pcretest</b> command for testing PCRE</td></tr>
-
-<tr><td><a href="pcreunicode.html">pcreunicode</a></td>
- <td>&nbsp;&nbsp;Discussion of Unicode and UTF-8 support</td></tr>
-</table>
-
-<p>
-There are also individual pages that summarize the interface for each function
-in the library. There is a single page for each pair of 8-bit/16-bit functions.
-</p>
-
-<table>
-
-<tr><td><a href="pcre_assign_jit_stack.html">pcre_assign_jit_stack</a></td>
- <td>&nbsp;&nbsp;Assign stack for JIT matching</td></tr>
-
-<tr><td><a href="pcre_compile.html">pcre_compile</a></td>
- <td>&nbsp;&nbsp;Compile a regular expression</td></tr>
-
-<tr><td><a href="pcre_compile2.html">pcre_compile2</a></td>
- <td>&nbsp;&nbsp;Compile a regular expression (alternate interface)</td></tr>
-
-<tr><td><a href="pcre_config.html">pcre_config</a></td>
- <td>&nbsp;&nbsp;Show build-time configuration options</td></tr>
-
-<tr><td><a href="pcre_copy_named_substring.html">pcre_copy_named_substring</a></td>
- <td>&nbsp;&nbsp;Extract named substring into given buffer</td></tr>
-
-<tr><td><a href="pcre_copy_substring.html">pcre_copy_substring</a></td>
- <td>&nbsp;&nbsp;Extract numbered substring into given buffer</td></tr>
-
-<tr><td><a href="pcre_dfa_exec.html">pcre_dfa_exec</a></td>
- <td>&nbsp;&nbsp;Match a compiled pattern to a subject string
- (DFA algorithm; <i>not</i> Perl compatible)</td></tr>
-
-<tr><td><a href="pcre_free_study.html">pcre_free_study</a></td>
- <td>&nbsp;&nbsp;Free study data</td></tr>
-
-<tr><td><a href="pcre_exec.html">pcre_exec</a></td>
- <td>&nbsp;&nbsp;Match a compiled pattern to a subject string
- (Perl compatible)</td></tr>
-
-<tr><td><a href="pcre_free_substring.html">pcre_free_substring</a></td>
- <td>&nbsp;&nbsp;Free extracted substring</td></tr>
-
-<tr><td><a href="pcre_free_substring_list.html">pcre_free_substring_list</a></td>
- <td>&nbsp;&nbsp;Free list of extracted substrings</td></tr>
-
-<tr><td><a href="pcre_fullinfo.html">pcre_fullinfo</a></td>
- <td>&nbsp;&nbsp;Extract information about a pattern</td></tr>
-
-<tr><td><a href="pcre_get_named_substring.html">pcre_get_named_substring</a></td>
- <td>&nbsp;&nbsp;Extract named substring into new memory</td></tr>
-
-<tr><td><a href="pcre_get_stringnumber.html">pcre_get_stringnumber</a></td>
- <td>&nbsp;&nbsp;Convert captured string name to number</td></tr>
-
-<tr><td><a href="pcre_get_substring.html">pcre_get_substring</a></td>
- <td>&nbsp;&nbsp;Extract numbered substring into new memory</td></tr>
-
-<tr><td><a href="pcre_get_substring_list.html">pcre_get_substring_list</a></td>
- <td>&nbsp;&nbsp;Extract all substrings into new memory</td></tr>
-
-<tr><td><a href="pcre_info.html">pcre_info</a></td>
- <td>&nbsp;&nbsp;Obsolete information extraction function</td></tr>
-
-<tr><td><a href="pcre_jit_stack_alloc.html">pcre_jit_stack_alloc</a></td>
- <td>&nbsp;&nbsp;Create a stack for JIT matching</td></tr>
-
-<tr><td><a href="pcre_jit_stack_free.html">pcre_jit_stack_free</a></td>
- <td>&nbsp;&nbsp;Free a JIT matching stack</td></tr>
-
-<tr><td><a href="pcre_maketables.html">pcre_maketables</a></td>
- <td>&nbsp;&nbsp;Build character tables in current locale</td></tr>
-
-<tr><td><a href="pcre_pattern_to_host_byte_order.html">pcre_pattern_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert compiled pattern to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_refcount.html">pcre_refcount</a></td>
- <td>&nbsp;&nbsp;Maintain reference count in compiled pattern</td></tr>
-
-<tr><td><a href="pcre_study.html">pcre_study</a></td>
- <td>&nbsp;&nbsp;Study a compiled pattern</td></tr>
-
-<tr><td><a href="pcre_utf16_to_host_byte_order.html">pcre_utf16_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert UTF-16 string to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_version.html">pcre_version</a></td>
- <td>&nbsp;&nbsp;Return PCRE version and release date</td></tr>
-</table>
-
-</html>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre-config.html b/src/third_party/pcre-8.30/doc/html/pcre-config.html
deleted file mode 100644
index 87c874d150b..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre-config.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<html>
-<head>
-<title>pcre-config specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre-config man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
-<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
-<li><a name="TOC3" href="#SEC3">OPTIONS</a>
-<li><a name="TOC4" href="#SEC4">SEE ALSO</a>
-<li><a name="TOC5" href="#SEC5">AUTHOR</a>
-<li><a name="TOC6" href="#SEC6">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
-<P>
-<b>pcre-config [--prefix] [--exec-prefix] [--version] [--libs]</b>
-<b>[--libs16] [--libs-cpp] [--libs-posix] [--cflags]</b>
-<b>[--cflags-posix]</b>
-</P>
-<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
-<P>
-<b>pcre-config</b> returns the configuration of the installed PCRE
-libraries and the options required to compile a program to use them. Some of
-the options apply only to the 8-bit or 16-bit libraries, respectively, and are
-not available if only one of those libraries has been built. If an unavailable
-option is encountered, the "usage" information is output.
-</P>
-<br><a name="SEC3" href="#TOC1">OPTIONS</a><br>
-<P>
-<b>--prefix</b>
-Writes the directory prefix used in the PCRE installation for architecture
-independent files (<i>/usr</i> on many systems, <i>/usr/local</i> on some
-systems) to the standard output.
-</P>
-<P>
-<b>--exec-prefix</b>
-Writes the directory prefix used in the PCRE installation for architecture
-dependent files (normally the same as <b>--prefix</b>) to the standard output.
-</P>
-<P>
-<b>--version</b>
-Writes the version number of the installed PCRE libraries to the standard
-output.
-</P>
-<P>
-<b>--libs</b>
-Writes to the standard output the command line options required to link
-with the 8-bit PCRE library (<b>-lpcre</b> on many systems).
-</P>
-<P>
-<b>--libs16</b>
-Writes to the standard output the command line options required to link
-with the 16-bit PCRE library (<b>-lpcre16</b> on many systems).
-</P>
-<P>
-<b>--libs-cpp</b>
-Writes to the standard output the command line options required to link with
-PCRE's C++ wrapper library (<b>-lpcrecpp</b> <b>-lpcre</b> on many
-systems).
-</P>
-<P>
-<b>--libs-posix</b>
-Writes to the standard output the command line options required to link with
-PCRE's POSIX API wrapper library (<b>-lpcreposix</b> <b>-lpcre</b> on many
-systems).
-</P>
-<P>
-<b>--cflags</b>
-Writes to the standard output the command line options required to compile
-files that use PCRE (this may include some <b>-I</b> options, but is blank on
-many systems).
-</P>
-<P>
-<b>--cflags-posix</b>
-Writes to the standard output the command line options required to compile
-files that use PCRE's POSIX API wrapper library (this may include some <b>-I</b>
-options, but is blank on many systems).
-</P>
-<br><a name="SEC4" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcre(3)</b>
-</P>
-<br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
-<P>
-This manual page was originally written by Mark Baker for the Debian GNU/Linux
-system. It has been subsequently revised as a generic PCRE man page.
-</P>
-<br><a name="SEC6" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 01 January 2012
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre.html b/src/third_party/pcre-8.30/doc/html/pcre.html
deleted file mode 100644
index ff5202fc1d9..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<html>
-<head>
-<title>pcre specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">INTRODUCTION</a>
-<li><a name="TOC2" href="#SEC2">USER DOCUMENTATION</a>
-<li><a name="TOC3" href="#SEC3">AUTHOR</a>
-<li><a name="TOC4" href="#SEC4">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">INTRODUCTION</a><br>
-<P>
-The PCRE library is a set of functions that implement regular expression
-pattern matching using the same syntax and semantics as Perl, with just a few
-differences. Some features that appeared in Python and PCRE before they
-appeared in Perl are also available using the Python syntax, there is some
-support for one or two .NET and Oniguruma syntax items, and there is an option
-for requesting some minor changes that give better JavaScript compatibility.
-</P>
-<P>
-Starting with release 8.30, it is possible to compile two separate PCRE
-libraries: the original, which supports 8-bit character strings (including
-UTF-8 strings), and a second library that supports 16-bit character strings
-(including UTF-16 strings). The build process allows either one or both to be
-built. The majority of the work to make this possible was done by Zoltan
-Herczeg.
-</P>
-<P>
-The two libraries contain identical sets of functions, except that the names in
-the 16-bit library start with <b>pcre16_</b> instead of <b>pcre_</b>. To avoid
-over-complication and reduce the documentation maintenance load, most of the
-documentation describes the 8-bit library, with the differences for the 16-bit
-library described separately in the
-<a href="pcre16.html"><b>pcre16</b></a>
-page. References to functions or structures of the form <i>pcre[16]_xxx</i>
-should be read as meaning "<i>pcre_xxx</i> when using the 8-bit library and
-<i>pcre16_xxx</i> when using the 16-bit library".
-</P>
-<P>
-The current implementation of PCRE corresponds approximately with Perl 5.12,
-including support for UTF-8/16 encoded strings and Unicode general category
-properties. However, UTF-8/16 and Unicode support has to be explicitly enabled;
-it is not the default. The Unicode tables correspond to Unicode release 6.0.0.
-</P>
-<P>
-In addition to the Perl-compatible matching function, PCRE contains an
-alternative function that matches the same compiled patterns in a different
-way. In certain circumstances, the alternative function has some advantages.
-For a discussion of the two matching algorithms, see the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-page.
-</P>
-<P>
-PCRE is written in C and released as a C library. A number of people have
-written wrappers and interfaces of various kinds. In particular, Google Inc.
-have provided a comprehensive C++ wrapper for the 8-bit library. This is now
-included as part of the PCRE distribution. The
-<a href="pcrecpp.html"><b>pcrecpp</b></a>
-page has details of this interface. Other people's contributions can be found
-in the <i>Contrib</i> directory at the primary FTP site, which is:
-<a href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre">ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre</a>
-</P>
-<P>
-Details of exactly which Perl regular expression features are and are not
-supported by PCRE are given in separate documents. See the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-and
-<a href="pcrecompat.html"><b>pcrecompat</b></a>
-pages. There is a syntax summary in the
-<a href="pcresyntax.html"><b>pcresyntax</b></a>
-page.
-</P>
-<P>
-Some features of PCRE can be included, excluded, or changed when the library is
-built. The
-<a href="pcre_config.html"><b>pcre_config()</b></a>
-function makes it possible for a client to discover which features are
-available. The features themselves are described in the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-page. Documentation about building PCRE for various operating systems can be
-found in the <b>README</b> and <b>NON-UNIX-USE</b> files in the source
-distribution.
-</P>
-<P>
-The libraries contains a number of undocumented internal functions and data
-tables that are used by more than one of the exported external functions, but
-which are not intended for use by external callers. Their names all begin with
-"_pcre_" or "_pcre16_", which hopefully will not provoke any name clashes. In
-some environments, it is possible to control which external symbols are
-exported when a shared library is built, and in these cases the undocumented
-symbols are not exported.
-</P>
-<br><a name="SEC2" href="#TOC1">USER DOCUMENTATION</a><br>
-<P>
-The user documentation for PCRE comprises a number of different sections. In
-the "man" format, each of these is a separate "man page". In the HTML format,
-each is a separate page, linked from the index page. In the plain text format,
-all the sections, except the <b>pcredemo</b> section, are concatenated, for ease
-of searching. The sections are as follows:
-<pre>
- pcre this document
- pcre16 details of the 16-bit library
- pcre-config show PCRE installation configuration information
- pcreapi details of PCRE's native C API
- pcrebuild options for building PCRE
- pcrecallout details of the callout feature
- pcrecompat discussion of Perl compatibility
- pcrecpp details of the C++ wrapper for the 8-bit library
- pcredemo a demonstration C program that uses PCRE
- pcregrep description of the <b>pcregrep</b> command (8-bit only)
- pcrejit discussion of the just-in-time optimization support
- pcrelimits details of size and other limits
- pcrematching discussion of the two matching algorithms
- pcrepartial details of the partial matching facility
- pcrepattern syntax and semantics of supported regular expressions
- pcreperform discussion of performance issues
- pcreposix the POSIX-compatible C API for the 8-bit library
- pcreprecompile details of saving and re-using precompiled patterns
- pcresample discussion of the pcredemo program
- pcrestack discussion of stack usage
- pcresyntax quick syntax reference
- pcretest description of the <b>pcretest</b> testing command
- pcreunicode discussion of Unicode and UTF-8/16 support
-</pre>
-In addition, in the "man" and HTML formats, there is a short page for each
-8-bit C library function, listing its arguments and results.
-</P>
-<br><a name="SEC3" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<P>
-Putting an actual email address here seems to have been a spam magnet, so I've
-taken it away. If you want to email me, use my two initials, followed by the
-two digits 10, at the domain cam.ac.uk.
-</P>
-<br><a name="SEC4" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 10 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre16.html b/src/third_party/pcre-8.30/doc/html/pcre16.html
deleted file mode 100644
index 126ff752fa5..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre16.html
+++ /dev/null
@@ -1,377 +0,0 @@
-<html>
-<head>
-<title>pcre16 specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre16 man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE 16-BIT API BASIC FUNCTIONS</a>
-<li><a name="TOC2" href="#SEC2">PCRE 16-BIT API STRING EXTRACTION FUNCTIONS</a>
-<li><a name="TOC3" href="#SEC3">PCRE 16-BIT API AUXILIARY FUNCTIONS</a>
-<li><a name="TOC4" href="#SEC4">PCRE 16-BIT API INDIRECTED FUNCTIONS</a>
-<li><a name="TOC5" href="#SEC5">PCRE 16-BIT API 16-BIT-ONLY FUNCTION</a>
-<li><a name="TOC6" href="#SEC6">THE PCRE 16-BIT LIBRARY</a>
-<li><a name="TOC7" href="#SEC7">THE HEADER FILE</a>
-<li><a name="TOC8" href="#SEC8">THE LIBRARY NAME</a>
-<li><a name="TOC9" href="#SEC9">STRING TYPES</a>
-<li><a name="TOC10" href="#SEC10">STRUCTURE TYPES</a>
-<li><a name="TOC11" href="#SEC11">16-BIT FUNCTIONS</a>
-<li><a name="TOC12" href="#SEC12">SUBJECT STRING OFFSETS</a>
-<li><a name="TOC13" href="#SEC13">NAMED SUBPATTERNS</a>
-<li><a name="TOC14" href="#SEC14">OPTION NAMES</a>
-<li><a name="TOC15" href="#SEC15">CHARACTER CODES</a>
-<li><a name="TOC16" href="#SEC16">ERROR NAMES</a>
-<li><a name="TOC17" href="#SEC17">ERROR TEXTS</a>
-<li><a name="TOC18" href="#SEC18">CALLOUTS</a>
-<li><a name="TOC19" href="#SEC19">TESTING</a>
-<li><a name="TOC20" href="#SEC20">NOT SUPPORTED IN 16-BIT MODE</a>
-<li><a name="TOC21" href="#SEC21">AUTHOR</a>
-<li><a name="TOC22" href="#SEC22">REVISION</a>
-</ul>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<br><a name="SEC1" href="#TOC1">PCRE 16-BIT API BASIC FUNCTIONS</a><br>
-<P>
-<b>pcre16 *pcre16_compile(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-</P>
-<P>
-<b>pcre16 *pcre16_compile2(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
-<b>int *<i>errorcodeptr</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-</P>
-<P>
-<b>pcre16_extra *pcre16_study(const pcre16 *<i>code</i>, int <i>options</i>,</b>
-<b>const char **<i>errptr</i>);</b>
-</P>
-<P>
-<b>void pcre16_free_study(pcre16_extra *<i>extra</i>);</b>
-</P>
-<P>
-<b>int pcre16_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-</P>
-<P>
-<b>int pcre16_dfa_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<br><a name="SEC2" href="#TOC1">PCRE 16-BIT API STRING EXTRACTION FUNCTIONS</a><br>
-<P>
-<b>int pcre16_copy_named_substring(const pcre16 *<i>code</i>,</b>
-<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
-<b>PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b>
-</P>
-<P>
-<b>int pcre16_copy_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b>
-<b>int <i>buffersize</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_named_substring(const pcre16 *<i>code</i>,</b>
-<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
-<b>PCRE_SPTR16 *<i>stringptr</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_stringnumber(const pcre16 *<i>code</i>,</b>
-<b>PCRE_SPTR16 <i>name</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_stringtable_entries(const pcre16 *<i>code</i>,</b>
-<b>PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b>PCRE_SPTR16 *<i>stringptr</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_substring_list(PCRE_SPTR16 <i>subject</i>,</b>
-<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b>
-</P>
-<P>
-<b>void pcre16_free_substring(PCRE_SPTR16 <i>stringptr</i>);</b>
-</P>
-<P>
-<b>void pcre16_free_substring_list(PCRE_SPTR16 *<i>stringptr</i>);</b>
-</P>
-<br><a name="SEC3" href="#TOC1">PCRE 16-BIT API AUXILIARY FUNCTIONS</a><br>
-<P>
-<b>pcre16_jit_stack *pcre16_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b>
-</P>
-<P>
-<b>void pcre16_jit_stack_free(pcre16_jit_stack *<i>stack</i>);</b>
-</P>
-<P>
-<b>void pcre16_assign_jit_stack(pcre16_extra *<i>extra</i>,</b>
-<b>pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-</P>
-<P>
-<b>const unsigned char *pcre16_maketables(void);</b>
-</P>
-<P>
-<b>int pcre16_fullinfo(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b>int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-<b>int pcre16_refcount(pcre16 *<i>code</i>, int <i>adjust</i>);</b>
-</P>
-<P>
-<b>int pcre16_config(int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-<b>const char *pcre16_version(void);</b>
-</P>
-<P>
-<b>int pcre16_pattern_to_host_byte_order(pcre16 *<i>code</i>,</b>
-<b>pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-</P>
-<br><a name="SEC4" href="#TOC1">PCRE 16-BIT API INDIRECTED FUNCTIONS</a><br>
-<P>
-<b>void *(*pcre16_malloc)(size_t);</b>
-</P>
-<P>
-<b>void (*pcre16_free)(void *);</b>
-</P>
-<P>
-<b>void *(*pcre16_stack_malloc)(size_t);</b>
-</P>
-<P>
-<b>void (*pcre16_stack_free)(void *);</b>
-</P>
-<P>
-<b>int (*pcre16_callout)(pcre16_callout_block *);</b>
-</P>
-<br><a name="SEC5" href="#TOC1">PCRE 16-BIT API 16-BIT-ONLY FUNCTION</a><br>
-<P>
-<b>int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *<i>output</i>,</b>
-<b>PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b>
-<b>int <i>keep_boms</i>);</b>
-</P>
-<br><a name="SEC6" href="#TOC1">THE PCRE 16-BIT LIBRARY</a><br>
-<P>
-Starting with release 8.30, it is possible to compile a PCRE library that
-supports 16-bit character strings, including UTF-16 strings, as well as or
-instead of the original 8-bit library. The majority of the work to make this
-possible was done by Zoltan Herczeg. The two libraries contain identical sets
-of functions, used in exactly the same way. Only the names of the functions and
-the data types of their arguments and results are different. To avoid
-over-complication and reduce the documentation maintenance load, most of the
-PCRE documentation describes the 8-bit library, with only occasional references
-to the 16-bit library. This page describes what is different when you use the
-16-bit library.
-</P>
-<P>
-WARNING: A single application can be linked with both libraries, but you must
-take care when processing any particular pattern to use functions from just one
-library. For example, if you want to study a pattern that was compiled with
-<b>pcre16_compile()</b>, you must do so with <b>pcre16_study()</b>, not
-<b>pcre_study()</b>, and you must free the study data with
-<b>pcre16_free_study()</b>.
-</P>
-<br><a name="SEC7" href="#TOC1">THE HEADER FILE</a><br>
-<P>
-There is only one header file, <b>pcre.h</b>. It contains prototypes for all the
-functions in both libraries, as well as definitions of flags, structures, error
-codes, etc.
-</P>
-<br><a name="SEC8" href="#TOC1">THE LIBRARY NAME</a><br>
-<P>
-In Unix-like systems, the 16-bit library is called <b>libpcre16</b>, and can
-normally be accesss by adding <b>-lpcre16</b> to the command for linking an
-application that uses PCRE.
-</P>
-<br><a name="SEC9" href="#TOC1">STRING TYPES</a><br>
-<P>
-In the 8-bit library, strings are passed to PCRE library functions as vectors
-of bytes with the C type "char *". In the 16-bit library, strings are passed as
-vectors of unsigned 16-bit quantities. The macro PCRE_UCHAR16 specifies an
-appropriate data type, and PCRE_SPTR16 is defined as "const PCRE_UCHAR16 *". In
-very many environments, "short int" is a 16-bit data type. When PCRE is built,
-it defines PCRE_UCHAR16 as "short int", but checks that it really is a 16-bit
-data type. If it is not, the build fails with an error message telling the
-maintainer to modify the definition appropriately.
-</P>
-<br><a name="SEC10" href="#TOC1">STRUCTURE TYPES</a><br>
-<P>
-The types of the opaque structures that are used for compiled 16-bit patterns
-and JIT stacks are <b>pcre16</b> and <b>pcre16_jit_stack</b> respectively. The
-type of the user-accessible structure that is returned by <b>pcre16_study()</b>
-is <b>pcre16_extra</b>, and the type of the structure that is used for passing
-data to a callout function is <b>pcre16_callout_block</b>. These structures
-contain the same fields, with the same names, as their 8-bit counterparts. The
-only difference is that pointers to character strings are 16-bit instead of
-8-bit types.
-</P>
-<br><a name="SEC11" href="#TOC1">16-BIT FUNCTIONS</a><br>
-<P>
-For every function in the 8-bit library there is a corresponding function in
-the 16-bit library with a name that starts with <b>pcre16_</b> instead of
-<b>pcre_</b>. The prototypes are listed above. In addition, there is one extra
-function, <b>pcre16_utf16_to_host_byte_order()</b>. This is a utility function
-that converts a UTF-16 character string to host byte order if necessary. The
-other 16-bit functions expect the strings they are passed to be in host byte
-order.
-</P>
-<P>
-The <i>input</i> and <i>output</i> arguments of
-<b>pcre16_utf16_to_host_byte_order()</b> may point to the same address, that is,
-conversion in place is supported. The output buffer must be at least as long as
-the input.
-</P>
-<P>
-The <i>length</i> argument specifies the number of 16-bit data units in the
-input string; a negative value specifies a zero-terminated string.
-</P>
-<P>
-If <i>byte_order</i> is NULL, it is assumed that the string starts off in host
-byte order. This may be changed by byte-order marks (BOMs) anywhere in the
-string (commonly as the first character).
-</P>
-<P>
-If <i>byte_order</i> is not NULL, a non-zero value of the integer to which it
-points means that the input starts off in host byte order, otherwise the
-opposite order is assumed. Again, BOMs in the string can change this. The final
-byte order is passed back at the end of processing.
-</P>
-<P>
-If <i>keep_boms</i> is not zero, byte-order mark characters (0xfeff) are copied
-into the output string. Otherwise they are discarded.
-</P>
-<P>
-The result of the function is the number of 16-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-</P>
-<br><a name="SEC12" href="#TOC1">SUBJECT STRING OFFSETS</a><br>
-<P>
-The offsets within subject strings that are returned by the matching functions
-are in 16-bit units rather than bytes.
-</P>
-<br><a name="SEC13" href="#TOC1">NAMED SUBPATTERNS</a><br>
-<P>
-The name-to-number translation table that is maintained for named subpatterns
-uses 16-bit characters. The <b>pcre16_get_stringtable_entries()</b> function
-returns the length of each entry in the table as the number of 16-bit data
-units.
-</P>
-<br><a name="SEC14" href="#TOC1">OPTION NAMES</a><br>
-<P>
-There are two new general option names, PCRE_UTF16 and PCRE_NO_UTF16_CHECK,
-which correspond to PCRE_UTF8 and PCRE_NO_UTF8_CHECK in the 8-bit library. In
-fact, these new options define the same bits in the options word.
-</P>
-<P>
-For the <b>pcre16_config()</b> function there is an option PCRE_CONFIG_UTF16
-that returns 1 if UTF-16 support is configured, otherwise 0. If this option is
-given to <b>pcre_config()</b>, or if the PCRE_CONFIG_UTF8 option is given to
-<b>pcre16_config()</b>, the result is the PCRE_ERROR_BADOPTION error.
-</P>
-<br><a name="SEC15" href="#TOC1">CHARACTER CODES</a><br>
-<P>
-In 16-bit mode, when PCRE_UTF16 is not set, character values are treated in the
-same way as in 8-bit, non UTF-8 mode, except, of course, that they can range
-from 0 to 0xffff instead of 0 to 0xff. Character types for characters less than
-0xff can therefore be influenced by the locale in the same way as before.
-Characters greater than 0xff have only one case, and no "type" (such as letter
-or digit).
-</P>
-<P>
-In UTF-16 mode, the character code is Unicode, in the range 0 to 0x10ffff, with
-the exception of values in the range 0xd800 to 0xdfff because those are
-"surrogate" values that are used in pairs to encode values greater than 0xffff.
-</P>
-<P>
-A UTF-16 string can indicate its endianness by special code knows as a
-byte-order mark (BOM). The PCRE functions do not handle this, expecting strings
-to be in host byte order. A utility function called
-<b>pcre16_utf16_to_host_byte_order()</b> is provided to help with this (see
-above).
-</P>
-<br><a name="SEC16" href="#TOC1">ERROR NAMES</a><br>
-<P>
-The errors PCRE_ERROR_BADUTF16_OFFSET and PCRE_ERROR_SHORTUTF16 correspond to
-their 8-bit counterparts. The error PCRE_ERROR_BADMODE is given when a compiled
-pattern is passed to a function that processes patterns in the other
-mode, for example, if a pattern compiled with <b>pcre_compile()</b> is passed to
-<b>pcre16_exec()</b>.
-</P>
-<P>
-There are new error codes whose names begin with PCRE_UTF16_ERR for invalid
-UTF-16 strings, corresponding to the PCRE_UTF8_ERR codes for UTF-8 strings that
-are described in the section entitled
-<a href="pcreapi.html#badutf8reasons">"Reason codes for invalid UTF-8 strings"</a>
-in the main
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page. The UTF-16 errors are:
-<pre>
- PCRE_UTF16_ERR1 Missing low surrogate at end of string
- PCRE_UTF16_ERR2 Invalid low surrogate follows high surrogate
- PCRE_UTF16_ERR3 Isolated low surrogate
- PCRE_UTF16_ERR4 Invalid character 0xfffe
-</PRE>
-</P>
-<br><a name="SEC17" href="#TOC1">ERROR TEXTS</a><br>
-<P>
-If there is an error while compiling a pattern, the error text that is passed
-back by <b>pcre16_compile()</b> or <b>pcre16_compile2()</b> is still an 8-bit
-character string, zero-terminated.
-</P>
-<br><a name="SEC18" href="#TOC1">CALLOUTS</a><br>
-<P>
-The <i>subject</i> and <i>mark</i> fields in the callout block that is passed to
-a callout function point to 16-bit vectors.
-</P>
-<br><a name="SEC19" href="#TOC1">TESTING</a><br>
-<P>
-The <b>pcretest</b> program continues to operate with 8-bit input and output
-files, but it can be used for testing the 16-bit library. If it is run with the
-command line option <b>-16</b>, patterns and subject strings are converted from
-8-bit to 16-bit before being passed to PCRE, and the 16-bit library functions
-are used instead of the 8-bit ones. Returned 16-bit strings are converted to
-8-bit for output. If the 8-bit library was not compiled, <b>pcretest</b>
-defaults to 16-bit and the <b>-16</b> option is ignored.
-</P>
-<P>
-When PCRE is being built, the <b>RunTest</b> script that is called by "make
-check" uses the <b>pcretest</b> <b>-C</b> option to discover which of the 8-bit
-and 16-bit libraries has been built, and runs the tests appropriately.
-</P>
-<br><a name="SEC20" href="#TOC1">NOT SUPPORTED IN 16-BIT MODE</a><br>
-<P>
-Not all the features of the 8-bit library are available with the 16-bit
-library. The C++ and POSIX wrapper functions support only the 8-bit library,
-and the <b>pcregrep</b> program is at present 8-bit only.
-</P>
-<br><a name="SEC21" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC22" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 08 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_assign_jit_stack.html b/src/third_party/pcre-8.30/doc/html/pcre_assign_jit_stack.html
deleted file mode 100644
index 8bdc3dd5f6e..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_assign_jit_stack.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<html>
-<head>
-<title>pcre_assign_jit_stack specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_assign_jit_stack man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_assign_jit_stack(pcre_extra *<i>extra</i>,</b>
-<b>pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-</P>
-<P>
-<b>void pcre16_assign_jit_stack(pcre16_extra *<i>extra</i>,</b>
-<b>pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function provides control over the memory used as a stack at runtime by a
-call to <b>pcre[16]_exec()</b> with a pattern that has been successfully
-compiled with JIT optimization. The arguments are:
-<pre>
- extra the data pointer returned by <b>pcre[16]_study()</b>
- callback a callback function
- data a JIT stack or a value to be passed to the callback
- function
-</PRE>
-</P>
-<P>
-If <i>callback</i> is NULL and <i>data</i> is NULL, an internal 32K block on
-the machine stack is used.
-</P>
-<P>
-If <i>callback</i> is NULL and <i>data</i> is not NULL, <i>data</i> must
-be a valid JIT stack, the result of calling <b>pcre[16]_jit_stack_alloc()</b>.
-</P>
-<P>
-If <i>callback</i> not NULL, it is called with <i>data</i> as an argument at
-the start of matching, in order to set up a JIT stack. If the result is NULL,
-the internal 32K stack is used; otherwise the return value must be a valid JIT
-stack, the result of calling <b>pcre[16]_jit_stack_alloc()</b>.
-</P>
-<P>
-You may safely assign the same JIT stack to multiple patterns, as long as they
-are all matched in the same thread. In a multithread application, each thread
-must use its own JIT stack. For more details, see the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-page.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_compile.html b/src/third_party/pcre-8.30/doc/html/pcre_compile.html
deleted file mode 100644
index 1ebdb68dec1..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_compile.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<html>
-<head>
-<title>pcre_compile specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_compile man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-</P>
-<P>
-<b>pcre16 *pcre16_compile(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function compiles a regular expression into an internal form. It is the
-same as <b>pcre[16]_compile2()</b>, except for the absence of the
-<i>errorcodeptr</i> argument. Its arguments are:
-<pre>
- <i>pattern</i> A zero-terminated string containing the
- regular expression to be compiled
- <i>options</i> Zero or more option bits
- <i>errptr</i> Where to put an error message
- <i>erroffset</i> Offset in pattern where error was found
- <i>tableptr</i> Pointer to character tables, or NULL to
- use the built-in default
-</pre>
-The option bits are:
-<pre>
- PCRE_ANCHORED Force pattern anchoring
- PCRE_AUTO_CALLOUT Compile automatic callouts
- PCRE_BSR_ANYCRLF \R matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \R matches all Unicode line endings
- PCRE_CASELESS Do caseless matching
- PCRE_DOLLAR_ENDONLY $ not to match newline at end
- PCRE_DOTALL . matches anything including NL
- PCRE_DUPNAMES Allow duplicate names for subpatterns
- PCRE_EXTENDED Ignore whitespace and # comments
- PCRE_EXTRA PCRE extra features
- (not much use currently)
- PCRE_FIRSTLINE Force matching to be before newline
- PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
- PCRE_MULTILINE ^ and $ match newlines within data
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
- sequences
- PCRE_NEWLINE_CR Set CR as the newline sequence
- PCRE_NEWLINE_CRLF Set CRLF as the newline sequence
- PCRE_NEWLINE_LF Set LF as the newline sequence
- PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
- theses (named ones available)
- PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
- validity (only relevant if
- PCRE_UTF16 is set)
- PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
- validity (only relevant if
- PCRE_UTF8 is set)
- PCRE_UCP Use Unicode properties for \d, \w, etc.
- PCRE_UNGREEDY Invert greediness of quantifiers
- PCRE_UTF16 Run in <b>pcre16_compile()</b> UTF-16 mode
- PCRE_UTF8 Run in <b>pcre_compile()</b> UTF-8 mode
-</pre>
-PCRE must be built with UTF support in order to use PCRE_UTF8/16 and
-PCRE_NO_UTF8/16_CHECK, and with UCP support if PCRE_UCP is used.
-</P>
-<P>
-The yield of the function is a pointer to a private data structure that
-contains the compiled pattern, or NULL if an error was detected. Note that
-compiling regular expressions with one version of PCRE for use with a different
-version is not guaranteed to work and may cause crashes.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_compile2.html b/src/third_party/pcre-8.30/doc/html/pcre_compile2.html
deleted file mode 100644
index c3f3ade2f66..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_compile2.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<html>
-<head>
-<title>pcre_compile2 specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_compile2 man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b>int *<i>errorcodeptr</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-</P>
-<P>
-<b>pcre16 *pcre16_compile2(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
-<b>int *<i>errorcodeptr</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function compiles a regular expression into an internal form. It is the
-same as <b>pcre[16]_compile()</b>, except for the addition of the
-<i>errorcodeptr</i> argument. The arguments are:
-<pre>
- <i>pattern</i> A zero-terminated string containing the
- regular expression to be compiled
- <i>options</i> Zero or more option bits
- <i>errorcodeptr</i> Where to put an error code
- <i>errptr</i> Where to put an error message
- <i>erroffset</i> Offset in pattern where error was found
- <i>tableptr</i> Pointer to character tables, or NULL to
- use the built-in default
-</pre>
-The option bits are:
-<pre>
- PCRE_ANCHORED Force pattern anchoring
- PCRE_AUTO_CALLOUT Compile automatic callouts
- PCRE_BSR_ANYCRLF \R matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \R matches all Unicode line endings
- PCRE_CASELESS Do caseless matching
- PCRE_DOLLAR_ENDONLY $ not to match newline at end
- PCRE_DOTALL . matches anything including NL
- PCRE_DUPNAMES Allow duplicate names for subpatterns
- PCRE_EXTENDED Ignore whitespace and # comments
- PCRE_EXTRA PCRE extra features
- (not much use currently)
- PCRE_FIRSTLINE Force matching to be before newline
- PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
- PCRE_MULTILINE ^ and $ match newlines within data
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
- sequences
- PCRE_NEWLINE_CR Set CR as the newline sequence
- PCRE_NEWLINE_CRLF Set CRLF as the newline sequence
- PCRE_NEWLINE_LF Set LF as the newline sequence
- PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
- theses (named ones available)
- PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
- validity (only relevant if
- PCRE_UTF16 is set)
- PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
- validity (only relevant if
- PCRE_UTF8 is set)
- PCRE_UCP Use Unicode properties for \d, \w, etc.
- PCRE_UNGREEDY Invert greediness of quantifiers
- PCRE_UTF16 Run <b>pcre16_compile()</b> in UTF-16 mode
- PCRE_UTF8 Run <b>pcre_compile()</b> in UTF-8 mode
-</pre>
-PCRE must be built with UTF support in order to use PCRE_UTF8/16 and
-PCRE_NO_UTF8/16_CHECK, and with UCP support if PCRE_UCP is used.
-</P>
-<P>
-The yield of the function is a pointer to a private data structure that
-contains the compiled pattern, or NULL if an error was detected. Note that
-compiling regular expressions with one version of PCRE for use with a different
-version is not guaranteed to work and may cause crashes.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_config.html b/src/third_party/pcre-8.30/doc/html/pcre_config.html
deleted file mode 100644
index dcfb8311256..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_config.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<html>
-<head>
-<title>pcre_config specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_config man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-<b>int pcre16_config(int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function makes it possible for a client program to find out which optional
-features are available in the version of the PCRE library it is using. The
-arguments are as follows:
-<pre>
- <i>what</i> A code specifying what information is required
- <i>where</i> Points to where to put the data
-</pre>
-The <i>where</i> argument must point to an integer variable, except for
-PCRE_CONFIG_MATCH_LIMIT and PCRE_CONFIG_MATCH_LIMIT_RECURSION, when it must
-point to an unsigned long integer. The available codes are:
-<pre>
- PCRE_CONFIG_JIT Availability of just-in-time compiler
- support (1=yes 0=no)
- PCRE_CONFIG_JITTARGET String containing information about the
- target architecture for the JIT compiler,
- or NULL if there is no JIT support
- PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4
- PCRE_CONFIG_MATCH_LIMIT Internal resource limit
- PCRE_CONFIG_MATCH_LIMIT_RECURSION
- Internal recursion depth limit
- PCRE_CONFIG_NEWLINE Value of the default newline sequence:
- 13 (0x000d) for CR
- 10 (0x000a) for LF
- 3338 (0x0d0a) for CRLF
- -2 for ANYCRLF
- -1 for ANY
- PCRE_CONFIG_BSR Indicates what \R matches by default:
- 0 all Unicode line endings
- 1 CR, LF, or CRLF only
- PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
- Threshold of return slots, above which
- <b>malloc()</b> is used by the POSIX API
- PCRE_CONFIG_STACKRECURSE Recursion implementation (1=stack 0=heap)
- PCRE_CONFIG_UTF16 Availability of UTF-16 support (1=yes
- 0=no); option for <b>pcre16_config()</b>
- PCRE_CONFIG_UTF8 Availability of UTF-8 support (1=yes 0=no);
- option for <b>pcre_config()</b>
- PCRE_CONFIG_UNICODE_PROPERTIES
- Availability of Unicode property support
- (1=yes 0=no)
-</pre>
-The function yields 0 on success or PCRE_ERROR_BADOPTION otherwise. That error
-is also given if PCRE_CONFIG_UTF16 is passed to <b>pcre_config()</b> or if
-PCRE_CONFIG_UTF8 is passed to <b>pcre16_config()</b>.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_copy_named_substring.html b/src/third_party/pcre-8.30/doc/html/pcre_copy_named_substring.html
deleted file mode 100644
index 40293e5b5a7..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_copy_named_substring.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html>
-<head>
-<title>pcre_copy_named_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_copy_named_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
-<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b>char *<i>buffer</i>, int <i>buffersize</i>);</b>
-</P>
-<P>
-<b>int pcre16_copy_named_substring(const pcre16 *<i>code</i>,</b>
-<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
-<b>PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a captured substring, identified
-by name, into a given buffer. The arguments are:
-<pre>
- <i>code</i> Pattern that was successfully matched
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16]_exec()</b> used
- <i>stringcount</i> Value returned by <b>pcre[16]_exec()</b>
- <i>stringname</i> Name of the required substring
- <i>buffer</i> Buffer to receive the string
- <i>buffersize</i> Size of buffer
-</pre>
-The yield is the length of the substring, PCRE_ERROR_NOMEMORY if the buffer was
-too small, or PCRE_ERROR_NOSUBSTRING if the string name is invalid.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_copy_substring.html b/src/third_party/pcre-8.30/doc/html/pcre_copy_substring.html
deleted file mode 100644
index 12a5db476dd..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_copy_substring.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<html>
-<head>
-<title>pcre_copy_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_copy_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
-<b>int <i>buffersize</i>);</b>
-</P>
-<P>
-<b>int pcre16_copy_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b>
-<b>int <i>buffersize</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a captured substring into a given
-buffer. The arguments are:
-<pre>
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16]_exec()</b> used
- <i>stringcount</i> Value returned by <b>pcre[16]_exec()</b>
- <i>stringnumber</i> Number of the required substring
- <i>buffer</i> Buffer to receive the string
- <i>buffersize</i> Size of buffer
-</pre>
-The yield is the length of the string, PCRE_ERROR_NOMEMORY if the buffer was
-too small, or PCRE_ERROR_NOSUBSTRING if the string number is invalid.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_dfa_exec.html b/src/third_party/pcre-8.30/doc/html/pcre_dfa_exec.html
deleted file mode 100644
index 76a1baaacf3..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_dfa_exec.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<html>
-<head>
-<title>pcre_dfa_exec specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_dfa_exec man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<P>
-<b>int pcre16_dfa_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function matches a compiled regular expression against a given subject
-string, using an alternative matching algorithm that scans the subject string
-just once (<i>not</i> Perl-compatible). Note that the main, Perl-compatible,
-matching function is <b>pcre[16]_exec()</b>. The arguments for this function
-are:
-<pre>
- <i>code</i> Points to the compiled pattern
- <i>extra</i> Points to an associated <b>pcre[16]_extra</b> structure,
- or is NULL
- <i>subject</i> Points to the subject string
- <i>length</i> Length of the subject string, in bytes
- <i>startoffset</i> Offset in bytes in the subject at which to
- start matching
- <i>options</i> Option bits
- <i>ovector</i> Points to a vector of ints for result offsets
- <i>ovecsize</i> Number of elements in the vector
- <i>workspace</i> Points to a vector of ints used as working space
- <i>wscount</i> Number of elements in the vector
-</pre>
-The options are:
-<pre>
- PCRE_ANCHORED Match only at the first position
- PCRE_BSR_ANYCRLF \R matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \R matches all Unicode line endings
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, & CRLF as newline sequences
- PCRE_NEWLINE_CR Recognize CR as the only newline sequence
- PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
- PCRE_NEWLINE_LF Recognize LF as the only newline sequence
- PCRE_NOTBOL Subject is not the beginning of a line
- PCRE_NOTEOL Subject is not the end of a line
- PCRE_NOTEMPTY An empty string is not a valid match
- PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
- validity (only relevant if PCRE_UTF8
- was set at compile time)
- PCRE_PARTIAL ) Return PCRE_ERROR_PARTIAL for a partial
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- even if there is a full match as well
- PCRE_DFA_SHORTEST Return only the shortest match
- PCRE_DFA_RESTART Restart after a partial match
-</pre>
-There are restrictions on what may appear in a pattern when using this matching
-function. Details are given in the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-documentation. For details of partial matching, see the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-page.
-</P>
-<P>
-A <b>pcre[16]_extra</b> structure contains the following fields:
-<pre>
- <i>flags</i> Bits indicating which fields are set
- <i>study_data</i> Opaque data from <b>pcre[16]_study()</b>
- <i>match_limit</i> Limit on internal resource use
- <i>match_limit_recursion</i> Limit on internal recursion depth
- <i>callout_data</i> Opaque data passed back to callouts
- <i>tables</i> Points to character tables or is NULL
- <i>mark</i> For passing back a *MARK pointer
- <i>executable_jit</i> Opaque data from JIT compilation
-</pre>
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT. For this
-matching function, the <i>match_limit</i> and <i>match_limit_recursion</i> fields
-are not used, and must not be set. The PCRE_EXTRA_EXECUTABLE_JIT flag and
-the corresponding variable are ignored.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_exec.html b/src/third_party/pcre-8.30/doc/html/pcre_exec.html
deleted file mode 100644
index 98f742ff086..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_exec.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<html>
-<head>
-<title>pcre_exec specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_exec man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-</P>
-<P>
-<b>int pcre16_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function matches a compiled regular expression against a given subject
-string, using a matching algorithm that is similar to Perl's. It returns
-offsets to captured substrings. Its arguments are:
-<pre>
- <i>code</i> Points to the compiled pattern
- <i>extra</i> Points to an associated <b>pcre[16]_extra</b> structure,
- or is NULL
- <i>subject</i> Points to the subject string
- <i>length</i> Length of the subject string, in bytes
- <i>startoffset</i> Offset in bytes in the subject at which to
- start matching
- <i>options</i> Option bits
- <i>ovector</i> Points to a vector of ints for result offsets
- <i>ovecsize</i> Number of elements in the vector (a multiple of 3)
-</pre>
-The options are:
-<pre>
- PCRE_ANCHORED Match only at the first position
- PCRE_BSR_ANYCRLF \R matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \R matches all Unicode line endings
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, & CRLF as newline sequences
- PCRE_NEWLINE_CR Recognize CR as the only newline sequence
- PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
- PCRE_NEWLINE_LF Recognize LF as the only newline sequence
- PCRE_NOTBOL Subject string is not the beginning of a line
- PCRE_NOTEOL Subject string is not the end of a line
- PCRE_NOTEMPTY An empty string is not a valid match
- PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
- validity (only relevant if PCRE_UTF8
- was set at compile time)
- PCRE_PARTIAL ) Return PCRE_ERROR_PARTIAL for a partial
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- if that is found before a full match
-</pre>
-For details of partial matching, see the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-page. A <b>pcre_extra</b> structure contains the following fields:
-<pre>
- <i>flags</i> Bits indicating which fields are set
- <i>study_data</i> Opaque data from <b>pcre[16]_study()</b>
- <i>match_limit</i> Limit on internal resource use
- <i>match_limit_recursion</i> Limit on internal recursion depth
- <i>callout_data</i> Opaque data passed back to callouts
- <i>tables</i> Points to character tables or is NULL
- <i>mark</i> For passing back a *MARK pointer
- <i>executable_jit</i> Opaque data from JIT compilation
-</pre>
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_free_study.html b/src/third_party/pcre-8.30/doc/html/pcre_free_study.html
deleted file mode 100644
index 1bbcffe46bf..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_free_study.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html>
-<head>
-<title>pcre_free_study specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_free_study man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_free_study(pcre_extra *<i>extra</i>);</b>
-</P>
-<P>
-<b>void pcre16_free_study(pcre16_extra *<i>extra</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function is used to free the memory used for the data generated by a call
-to <b>pcre[16]_study()</b> when it is no longer needed. The argument must be the
-result of such a call.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_free_substring.html b/src/third_party/pcre-8.30/doc/html/pcre_free_substring.html
deleted file mode 100644
index d8207450a2c..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_free_substring.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html>
-<head>
-<title>pcre_free_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_free_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_free_substring(const char *<i>stringptr</i>);</b>
-</P>
-<P>
-<b>void pcre16_free_substring(PCRE_SPTR16 <i>stringptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for freeing the store obtained by a previous
-call to <b>pcre[16]_get_substring()</b> or <b>pcre[16]_get_named_substring()</b>.
-Its only argument is a pointer to the string.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_free_substring_list.html b/src/third_party/pcre-8.30/doc/html/pcre_free_substring_list.html
deleted file mode 100644
index 26e2daf0345..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_free_substring_list.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html>
-<head>
-<title>pcre_free_substring_list specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_free_substring_list man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_free_substring_list(const char **<i>stringptr</i>);</b>
-</P>
-<P>
-<b>void pcre16_free_substring_list(PCRE_SPTR16 *<i>stringptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for freeing the store obtained by a previous
-call to <b>pcre[16]_get_substring_list()</b>. Its only argument is a pointer to
-the list of string pointers.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_fullinfo.html b/src/third_party/pcre-8.30/doc/html/pcre_fullinfo.html
deleted file mode 100644
index edb6eb7d626..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_fullinfo.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<html>
-<head>
-<title>pcre_fullinfo specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_fullinfo man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b>int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-<b>int pcre16_fullinfo(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
-<b>int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function returns information about a compiled pattern. Its arguments are:
-<pre>
- <i>code</i> Compiled regular expression
- <i>extra</i> Result of <b>pcre[16]_study()</b> or NULL
- <i>what</i> What information is required
- <i>where</i> Where to put the information
-</pre>
-The following information is available:
-<pre>
- PCRE_INFO_BACKREFMAX Number of highest back reference
- PCRE_INFO_CAPTURECOUNT Number of capturing subpatterns
- PCRE_INFO_DEFAULT_TABLES Pointer to default tables
- PCRE_INFO_FIRSTBYTE Fixed first data unit for a match, or
- -1 for start of string
- or after newline, or
- -2 otherwise
- PCRE_INFO_FIRSTTABLE Table of first data units (after studying)
- PCRE_INFO_HASCRORLF Return 1 if explicit CR or LF matches exist
- PCRE_INFO_JCHANGED Return 1 if (?J) or (?-J) was used
- PCRE_INFO_JIT Return 1 after successful JIT compilation
- PCRE_INFO_JITSIZE Size of JIT compiled code
- PCRE_INFO_LASTLITERAL Literal last data unit required
- PCRE_INFO_MINLENGTH Lower bound length of matching strings
- PCRE_INFO_NAMECOUNT Number of named subpatterns
- PCRE_INFO_NAMEENTRYSIZE Size of name table entry
- PCRE_INFO_NAMETABLE Pointer to name table
- PCRE_INFO_OKPARTIAL Return 1 if partial matching can be tried
- (always returns 1 after release 8.00)
- PCRE_INFO_OPTIONS Option bits used for compilation
- PCRE_INFO_SIZE Size of compiled pattern
- PCRE_INFO_STUDYSIZE Size of study data
-</pre>
-The <i>where</i> argument must point to an integer variable, except for the
-following <i>what</i> values:
-<pre>
- PCRE_INFO_DEFAULT_TABLES const unsigned char *
- PCRE_INFO_FIRSTTABLE const unsigned char *
- PCRE_INFO_NAMETABLE PCRE_SPTR16 (16-bit library)
- PCRE_INFO_NAMETABLE const unsigned char * (8-bit library)
- PCRE_INFO_OPTIONS unsigned long int
- PCRE_INFO_SIZE size_t
-</pre>
-The yield of the function is zero on success or:
-<pre>
- PCRE_ERROR_NULL the argument <i>code</i> was NULL
- the argument <i>where</i> was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADOPTION the value of <i>what</i> was invalid
-</PRE>
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_get_named_substring.html b/src/third_party/pcre-8.30/doc/html/pcre_get_named_substring.html
deleted file mode 100644
index 5eea87ca594..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_get_named_substring.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<html>
-<head>
-<title>pcre_get_named_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_named_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
-<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b>const char **<i>stringptr</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_named_substring(const pcre16 *<i>code</i>,</b>
-<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
-<b>PCRE_SPTR16 *<i>stringptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a captured substring by name. The
-arguments are:
-<pre>
- <i>code</i> Compiled pattern
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16]_exec()</b> used
- <i>stringcount</i> Value returned by <b>pcre[16]_exec()</b>
- <i>stringname</i> Name of the required substring
- <i>stringptr</i> Where to put the string pointer
-</pre>
-The memory in which the substring is placed is obtained by calling
-<b>pcre[16]_malloc()</b>. The convenience function
-<b>pcre[16]_free_substring()</b> can be used to free it when it is no longer
-needed. The yield of the function is the length of the extracted substring,
-PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or
-PCRE_ERROR_NOSUBSTRING if the string name is invalid.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_get_stringnumber.html b/src/third_party/pcre-8.30/doc/html/pcre_get_stringnumber.html
deleted file mode 100644
index 1c9483a7a8c..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_get_stringnumber.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<html>
-<head>
-<title>pcre_get_stringnumber specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_stringnumber man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
-<b>const char *<i>name</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_stringnumber(const pcre16 *<i>code</i>,</b>
-<b>PCRE_SPTR16 <i>name</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This convenience function finds the number of a named substring capturing
-parenthesis in a compiled pattern. Its arguments are:
-<pre>
- <i>code</i> Compiled regular expression
- <i>name</i> Name whose number is required
-</pre>
-The yield of the function is the number of the parenthesis if the name is
-found, or PCRE_ERROR_NOSUBSTRING otherwise. When duplicate names are allowed
-(PCRE_DUPNAMES is set), it is not defined which of the numbers is returned by
-<b>pcre[16]_get_stringnumber()</b>. You can obtain the complete list by calling
-<b>pcre[16]_get_stringtable_entries()</b>.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_get_stringtable_entries.html b/src/third_party/pcre-8.30/doc/html/pcre_get_stringtable_entries.html
deleted file mode 100644
index 954fb5b64bb..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_get_stringtable_entries.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<html>
-<head>
-<title>pcre_get_stringtable_entries specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_stringtable_entries man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b>
-<b>const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_stringtable_entries(const pcre16 *<i>code</i>,</b>
-<b>PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This convenience function finds, for a compiled pattern, the first and last
-entries for a given name in the table that translates capturing parenthesis
-names into numbers. When names are required to be unique (PCRE_DUPNAMES is
-<i>not</i> set), it is usually easier to use <b>pcre[16]_get_stringnumber()</b>
-instead.
-<pre>
- <i>code</i> Compiled regular expression
- <i>name</i> Name whose entries required
- <i>first</i> Where to return a pointer to the first entry
- <i>last</i> Where to return a pointer to the last entry
-</pre>
-The yield of the function is the length of each entry, or
-PCRE_ERROR_NOSUBSTRING if none are found.
-</P>
-<P>
-There is a complete description of the PCRE native API, including the format of
-the table entries, in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page, and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_get_substring.html b/src/third_party/pcre-8.30/doc/html/pcre_get_substring.html
deleted file mode 100644
index 279cee699bf..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_get_substring.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html>
-<head>
-<title>pcre_get_substring specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_substring man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b>const char **<i>stringptr</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b>PCRE_SPTR16 *<i>stringptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a captured substring. The
-arguments are:
-<pre>
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16]_exec()</b> used
- <i>stringcount</i> Value returned by <b>pcre[16]_exec()</b>
- <i>stringnumber</i> Number of the required substring
- <i>stringptr</i> Where to put the string pointer
-</pre>
-The memory in which the substring is placed is obtained by calling
-<b>pcre[16]_malloc()</b>. The convenience function
-<b>pcre[16]_free_substring()</b> can be used to free it when it is no longer
-needed. The yield of the function is the length of the substring,
-PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or
-PCRE_ERROR_NOSUBSTRING if the string number is invalid.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_get_substring_list.html b/src/third_party/pcre-8.30/doc/html/pcre_get_substring_list.html
deleted file mode 100644
index 178b22e64c2..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_get_substring_list.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
-<head>
-<title>pcre_get_substring_list specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_get_substring_list man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
-<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
-</P>
-<P>
-<b>int pcre16_get_substring_list(PCRE_SPTR16 <i>subject</i>,</b>
-<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This is a convenience function for extracting a list of all the captured
-substrings. The arguments are:
-<pre>
- <i>subject</i> Subject that has been successfully matched
- <i>ovector</i> Offset vector that <b>pcre[16]_exec</b> used
- <i>stringcount</i> Value returned by <b>pcre[16]_exec</b>
- <i>listptr</i> Where to put a pointer to the list
-</pre>
-The memory in which the substrings and the list are placed is obtained by
-calling <b>pcre[16]_malloc()</b>. The convenience function
-<b>pcre[16]_free_substring_list()</b> can be used to free it when it is no
-longer needed. A pointer to a list of pointers is put in the variable whose
-address is in <i>listptr</i>. The list is terminated by a NULL pointer. The
-yield of the function is zero on success or PCRE_ERROR_NOMEMORY if sufficient
-memory could not be obtained.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_jit_stack_alloc.html b/src/third_party/pcre-8.30/doc/html/pcre_jit_stack_alloc.html
deleted file mode 100644
index 2daac72b55a..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_jit_stack_alloc.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<html>
-<head>
-<title>pcre_jit_stack_alloc specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_jit_stack_alloc man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>pcre_jit_stack *pcre_jit_stack_alloc(int <i>startsize</i>,</b>
-<b>int <i>maxsize</i>);</b>
-</P>
-<P>
-<b>pcre16_jit_stack *pcre16_jit_stack_alloc(int <i>startsize</i>,</b>
-<b>int <i>maxsize</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function is used to create a stack for use by the code compiled by the JIT
-optimization of <b>pcre[16]_study()</b>. The arguments are a starting size for
-the stack, and a maximum size to which it is allowed to grow. The result can be
-passed to the JIT runtime code by <b>pcre[16]_assign_jit_stack()</b>, or that
-function can set up a callback for obtaining a stack. A maximum stack size of
-512K to 1M should be more than enough for any pattern. For more details, see
-the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-page.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_jit_stack_free.html b/src/third_party/pcre-8.30/doc/html/pcre_jit_stack_free.html
deleted file mode 100644
index ecbf5d047b4..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_jit_stack_free.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<html>
-<head>
-<title>pcre_jit_stack_free specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_jit_stack_free man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>void pcre_jit_stack_free(pcre_jit_stack *<i>stack</i>);</b>
-</P>
-<P>
-<b>void pcre16_jit_stack_free(pcre16_jit_stack *<i>stack</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function is used to free a JIT stack that was created by
-<b>pcre[16]_jit_stack_alloc()</b> when it is no longer needed. For more details,
-see the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-page.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_maketables.html b/src/third_party/pcre-8.30/doc/html/pcre_maketables.html
deleted file mode 100644
index a4be6b19ab3..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_maketables.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<html>
-<head>
-<title>pcre_maketables specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_maketables man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>const unsigned char *pcre_maketables(void);</b>
-</P>
-<P>
-<b>const unsigned char *pcre16_maketables(void);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function builds a set of character tables for character values less than
-256. These can be passed to <b>pcre[16]_compile()</b> to override PCRE's
-internal, built-in tables (which were made by <b>pcre[16]_maketables()</b> when
-PCRE was compiled). You might want to do this if you are using a non-standard
-locale. The function yields a pointer to the tables.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_pattern_to_host_byte_order.html b/src/third_party/pcre-8.30/doc/html/pcre_pattern_to_host_byte_order.html
deleted file mode 100644
index 2fb7f1035f4..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_pattern_to_host_byte_order.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html>
-<head>
-<title>pcre_pattern_to_host_byte_order specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_pattern_to_host_byte_order man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_pattern_to_host_byte_order(pcre *<i>code</i>,</b>
-<b>pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-</P>
-<P>
-<b>int pcre16_pattern_to_host_byte_order(pcre16 *<i>code</i>,</b>
-<b>pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function ensures that the bytes in 2-byte and 4-byte values in a compiled
-pattern are in the correct order for the current host. It is useful when a
-pattern that has been compiled on one host is transferred to another that might
-have different endianness. The arguments are:
-<pre>
- <i>code</i> A compiled regular expression
- <i>extra</i> Points to an associated <b>pcre[16]_extra</b> structure,
- or is NULL
- <i>tables</i> Pointer to character tables, or NULL to
- set the built-in default
-</pre>
-The result is 0 for success, a negative PCRE_ERROR_xxx value otherwise.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_refcount.html b/src/third_party/pcre-8.30/doc/html/pcre_refcount.html
deleted file mode 100644
index a2af821a750..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_refcount.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<html>
-<head>
-<title>pcre_refcount specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_refcount man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre_refcount(pcre *<i>code</i>, int <i>adjust</i>);</b>
-</P>
-<P>
-<b>int pcre16_refcount(pcre16 *<i>code</i>, int <i>adjust</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function is used to maintain a reference count inside a data block that
-contains a compiled pattern. Its arguments are:
-<pre>
- <i>code</i> Compiled regular expression
- <i>adjust</i> Adjustment to reference value
-</pre>
-The yield of the function is the adjusted reference value, which is constrained
-to lie between 0 and 65535.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_study.html b/src/third_party/pcre-8.30/doc/html/pcre_study.html
deleted file mode 100644
index ab56c62b667..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_study.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<html>
-<head>
-<title>pcre_study specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_study man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b>
-<b>const char **<i>errptr</i>);</b>
-</P>
-<P>
-<b>pcre16_extra *pcre16_study(const pcre16 *<i>code</i>, int <i>options</i>,</b>
-<b>const char **<i>errptr</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function studies a compiled pattern, to see if additional information can
-be extracted that might speed up matching. Its arguments are:
-<pre>
- <i>code</i> A compiled regular expression
- <i>options</i> Options for <b>pcre[16]_study()</b>
- <i>errptr</i> Where to put an error message
-</pre>
-If the function succeeds, it returns a value that can be passed to
-<b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b> via their <i>extra</i>
-arguments.
-</P>
-<P>
-If the function returns NULL, either it could not find any additional
-information, or there was an error. You can tell the difference by looking at
-the error value. It is NULL in first case.
-</P>
-<P>
-The only option is PCRE_STUDY_JIT_COMPILE. It requests just-in-time compilation
-if possible. If PCRE has been compiled without JIT support, this option is
-ignored. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-page for further details.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_utf16_to_host_byte_order.html b/src/third_party/pcre-8.30/doc/html/pcre_utf16_to_host_byte_order.html
deleted file mode 100644
index 164e2365a15..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_utf16_to_host_byte_order.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
-<head>
-<title>pcre_utf16_to_host_byte_order specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_utf16_to_host_byte_order man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *<i>output</i>,</b>
-<b>PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b>
-<b>int <i>keep_boms</i>);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function, which exists only in the 16-bit library, converts a UTF-16
-string to the correct order for the current host, taking account of any byte
-order marks (BOMs) within the string. Its arguments are:
-<pre>
- <i>output</i> pointer to output buffer, may be the same as <i>input</i>
- <i>input</i> pointer to input buffer
- <i>length</i> number of 16-bit units in the input, or negative for
- a zero-terminated string
- <i>host_byte_order</i> a NULL value or a non-zero value pointed to means
- start in host byte order
- <i>keep_boms</i> if non-zero, BOMs are copied to the output string
-</pre>
-The result of the function is the number of 16-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-</P>
-<P>
-If <i>host_byte_order</i> is not NULL, it is set to indicate the byte order that
-is current at the end of the string.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcre_version.html b/src/third_party/pcre-8.30/doc/html/pcre_version.html
deleted file mode 100644
index 6b6a8abf101..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcre_version.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html>
-<head>
-<title>pcre_version specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcre_version man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SYNOPSIS
-</b><br>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<P>
-<b>const char *pcre_version(void);</b>
-</P>
-<P>
-<b>const char *pcre16_version(void);</b>
-</P>
-<br><b>
-DESCRIPTION
-</b><br>
-<P>
-This function (even in the 16-bit library) returns a zero-terminated, 8-bit
-character string that gives the version number of the PCRE library and the date
-of its release.
-</P>
-<P>
-There is a complete description of the PCRE native API in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page and a description of the POSIX API in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-page.
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcreapi.html b/src/third_party/pcre-8.30/doc/html/pcreapi.html
deleted file mode 100644
index c5b58ffc65e..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcreapi.html
+++ /dev/null
@@ -1,2608 +0,0 @@
-<html>
-<head>
-<title>pcreapi specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreapi man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE NATIVE API BASIC FUNCTIONS</a>
-<li><a name="TOC2" href="#SEC2">PCRE NATIVE API STRING EXTRACTION FUNCTIONS</a>
-<li><a name="TOC3" href="#SEC3">PCRE NATIVE API AUXILIARY FUNCTIONS</a>
-<li><a name="TOC4" href="#SEC4">PCRE NATIVE API INDIRECTED FUNCTIONS</a>
-<li><a name="TOC5" href="#SEC5">PCRE 8-BIT AND 16-BIT LIBRARIES</a>
-<li><a name="TOC6" href="#SEC6">PCRE API OVERVIEW</a>
-<li><a name="TOC7" href="#SEC7">NEWLINES</a>
-<li><a name="TOC8" href="#SEC8">MULTITHREADING</a>
-<li><a name="TOC9" href="#SEC9">SAVING PRECOMPILED PATTERNS FOR LATER USE</a>
-<li><a name="TOC10" href="#SEC10">CHECKING BUILD-TIME OPTIONS</a>
-<li><a name="TOC11" href="#SEC11">COMPILING A PATTERN</a>
-<li><a name="TOC12" href="#SEC12">COMPILATION ERROR CODES</a>
-<li><a name="TOC13" href="#SEC13">STUDYING A PATTERN</a>
-<li><a name="TOC14" href="#SEC14">LOCALE SUPPORT</a>
-<li><a name="TOC15" href="#SEC15">INFORMATION ABOUT A PATTERN</a>
-<li><a name="TOC16" href="#SEC16">REFERENCE COUNTS</a>
-<li><a name="TOC17" href="#SEC17">MATCHING A PATTERN: THE TRADITIONAL FUNCTION</a>
-<li><a name="TOC18" href="#SEC18">EXTRACTING CAPTURED SUBSTRINGS BY NUMBER</a>
-<li><a name="TOC19" href="#SEC19">EXTRACTING CAPTURED SUBSTRINGS BY NAME</a>
-<li><a name="TOC20" href="#SEC20">DUPLICATE SUBPATTERN NAMES</a>
-<li><a name="TOC21" href="#SEC21">FINDING ALL POSSIBLE MATCHES</a>
-<li><a name="TOC22" href="#SEC22">OBTAINING AN ESTIMATE OF STACK USAGE</a>
-<li><a name="TOC23" href="#SEC23">MATCHING A PATTERN: THE ALTERNATIVE FUNCTION</a>
-<li><a name="TOC24" href="#SEC24">SEE ALSO</a>
-<li><a name="TOC25" href="#SEC25">AUTHOR</a>
-<li><a name="TOC26" href="#SEC26">REVISION</a>
-</ul>
-<P>
-<b>#include &#60;pcre.h&#62;</b>
-</P>
-<br><a name="SEC1" href="#TOC1">PCRE NATIVE API BASIC FUNCTIONS</a><br>
-<P>
-<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-</P>
-<P>
-<b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b>int *<i>errorcodeptr</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-</P>
-<P>
-<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b>
-<b>const char **<i>errptr</i>);</b>
-</P>
-<P>
-<b>void pcre_free_study(pcre_extra *<i>extra</i>);</b>
-</P>
-<P>
-<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-</P>
-<P>
-<b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<br><a name="SEC2" href="#TOC1">PCRE NATIVE API STRING EXTRACTION FUNCTIONS</a><br>
-<P>
-<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
-<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b>char *<i>buffer</i>, int <i>buffersize</i>);</b>
-</P>
-<P>
-<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
-<b>int <i>buffersize</i>);</b>
-</P>
-<P>
-<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
-<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b>const char **<i>stringptr</i>);</b>
-</P>
-<P>
-<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
-<b>const char *<i>name</i>);</b>
-</P>
-<P>
-<b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b>
-<b>const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b>
-</P>
-<P>
-<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b>const char **<i>stringptr</i>);</b>
-</P>
-<P>
-<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
-<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
-</P>
-<P>
-<b>void pcre_free_substring(const char *<i>stringptr</i>);</b>
-</P>
-<P>
-<b>void pcre_free_substring_list(const char **<i>stringptr</i>);</b>
-</P>
-<br><a name="SEC3" href="#TOC1">PCRE NATIVE API AUXILIARY FUNCTIONS</a><br>
-<P>
-<b>pcre_jit_stack *pcre_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b>
-</P>
-<P>
-<b>void pcre_jit_stack_free(pcre_jit_stack *<i>stack</i>);</b>
-</P>
-<P>
-<b>void pcre_assign_jit_stack(pcre_extra *<i>extra</i>,</b>
-<b>pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b>
-</P>
-<P>
-<b>const unsigned char *pcre_maketables(void);</b>
-</P>
-<P>
-<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b>int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-<b>int pcre_refcount(pcre *<i>code</i>, int <i>adjust</i>);</b>
-</P>
-<P>
-<b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-<b>const char *pcre_version(void);</b>
-</P>
-<P>
-<b>int pcre_pattern_to_host_byte_order(pcre *<i>code</i>,</b>
-<b>pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
-</P>
-<br><a name="SEC4" href="#TOC1">PCRE NATIVE API INDIRECTED FUNCTIONS</a><br>
-<P>
-<b>void *(*pcre_malloc)(size_t);</b>
-</P>
-<P>
-<b>void (*pcre_free)(void *);</b>
-</P>
-<P>
-<b>void *(*pcre_stack_malloc)(size_t);</b>
-</P>
-<P>
-<b>void (*pcre_stack_free)(void *);</b>
-</P>
-<P>
-<b>int (*pcre_callout)(pcre_callout_block *);</b>
-</P>
-<br><a name="SEC5" href="#TOC1">PCRE 8-BIT AND 16-BIT LIBRARIES</a><br>
-<P>
-From release 8.30, PCRE can be compiled as a library for handling 16-bit
-character strings as well as, or instead of, the original library that handles
-8-bit character strings. To avoid too much complication, this document
-describes the 8-bit versions of the functions, with only occasional references
-to the 16-bit library.
-</P>
-<P>
-The 16-bit functions operate in the same way as their 8-bit counterparts; they
-just use different data types for their arguments and results, and their names
-start with <b>pcre16_</b> instead of <b>pcre_</b>. For every option that has UTF8
-in its name (for example, PCRE_UTF8), there is a corresponding 16-bit name with
-UTF8 replaced by UTF16. This facility is in fact just cosmetic; the 16-bit
-option names define the same bit values.
-</P>
-<P>
-References to bytes and UTF-8 in this document should be read as references to
-16-bit data quantities and UTF-16 when using the 16-bit library, unless
-specified otherwise. More details of the specific differences for the 16-bit
-library are given in the
-<a href="pcre16.html"><b>pcre16</b></a>
-page.
-</P>
-<br><a name="SEC6" href="#TOC1">PCRE API OVERVIEW</a><br>
-<P>
-PCRE has its own native API, which is described in this document. There are
-also some wrapper functions (for the 8-bit library only) that correspond to the
-POSIX regular expression API, but they do not give access to all the
-functionality. They are described in the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-documentation. Both of these APIs define a set of C function calls. A C++
-wrapper (again for the 8-bit library only) is also distributed with PCRE. It is
-documented in the
-<a href="pcrecpp.html"><b>pcrecpp</b></a>
-page.
-</P>
-<P>
-The native API C function prototypes are defined in the header file
-<b>pcre.h</b>, and on Unix-like systems the (8-bit) library itself is called
-<b>libpcre</b>. It can normally be accessed by adding <b>-lpcre</b> to the
-command for linking an application that uses PCRE. The header file defines the
-macros PCRE_MAJOR and PCRE_MINOR to contain the major and minor release numbers
-for the library. Applications can use these to include support for different
-releases of PCRE.
-</P>
-<P>
-In a Windows environment, if you want to statically link an application program
-against a non-dll <b>pcre.a</b> file, you must define PCRE_STATIC before
-including <b>pcre.h</b> or <b>pcrecpp.h</b>, because otherwise the
-<b>pcre_malloc()</b> and <b>pcre_free()</b> exported functions will be declared
-<b>__declspec(dllimport)</b>, with unwanted results.
-</P>
-<P>
-The functions <b>pcre_compile()</b>, <b>pcre_compile2()</b>, <b>pcre_study()</b>,
-and <b>pcre_exec()</b> are used for compiling and matching regular expressions
-in a Perl-compatible manner. A sample program that demonstrates the simplest
-way of using them is provided in the file called <i>pcredemo.c</i> in the PCRE
-source distribution. A listing of this program is given in the
-<a href="pcredemo.html"><b>pcredemo</b></a>
-documentation, and the
-<a href="pcresample.html"><b>pcresample</b></a>
-documentation describes how to compile and run it.
-</P>
-<P>
-Just-in-time compiler support is an optional feature of PCRE that can be built
-in appropriate hardware environments. It greatly speeds up the matching
-performance of many patterns. Simple programs can easily request that it be
-used if available, by setting an option that is ignored when it is not
-relevant. More complicated programs might need to make use of the functions
-<b>pcre_jit_stack_alloc()</b>, <b>pcre_jit_stack_free()</b>, and
-<b>pcre_assign_jit_stack()</b> in order to control the JIT code's memory usage.
-These functions are discussed in the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation.
-</P>
-<P>
-A second matching function, <b>pcre_dfa_exec()</b>, which is not
-Perl-compatible, is also provided. This uses a different algorithm for the
-matching. The alternative algorithm finds all possible matches (at a given
-point in the subject), and scans the subject just once (unless there are
-lookbehind assertions). However, this algorithm does not return captured
-substrings. A description of the two matching algorithms and their advantages
-and disadvantages is given in the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-documentation.
-</P>
-<P>
-In addition to the main compiling and matching functions, there are convenience
-functions for extracting captured substrings from a subject string that is
-matched by <b>pcre_exec()</b>. They are:
-<pre>
- <b>pcre_copy_substring()</b>
- <b>pcre_copy_named_substring()</b>
- <b>pcre_get_substring()</b>
- <b>pcre_get_named_substring()</b>
- <b>pcre_get_substring_list()</b>
- <b>pcre_get_stringnumber()</b>
- <b>pcre_get_stringtable_entries()</b>
-</pre>
-<b>pcre_free_substring()</b> and <b>pcre_free_substring_list()</b> are also
-provided, to free the memory used for extracted strings.
-</P>
-<P>
-The function <b>pcre_maketables()</b> is used to build a set of character tables
-in the current locale for passing to <b>pcre_compile()</b>, <b>pcre_exec()</b>,
-or <b>pcre_dfa_exec()</b>. This is an optional facility that is provided for
-specialist use. Most commonly, no special tables are passed, in which case
-internal tables that are generated when PCRE is built are used.
-</P>
-<P>
-The function <b>pcre_fullinfo()</b> is used to find out information about a
-compiled pattern. The function <b>pcre_version()</b> returns a pointer to a
-string containing the version of PCRE and its date of release.
-</P>
-<P>
-The function <b>pcre_refcount()</b> maintains a reference count in a data block
-containing a compiled pattern. This is provided for the benefit of
-object-oriented applications.
-</P>
-<P>
-The global variables <b>pcre_malloc</b> and <b>pcre_free</b> initially contain
-the entry points of the standard <b>malloc()</b> and <b>free()</b> functions,
-respectively. PCRE calls the memory management functions via these variables,
-so a calling program can replace them if it wishes to intercept the calls. This
-should be done before calling any PCRE functions.
-</P>
-<P>
-The global variables <b>pcre_stack_malloc</b> and <b>pcre_stack_free</b> are also
-indirections to memory management functions. These special functions are used
-only when PCRE is compiled to use the heap for remembering data, instead of
-recursive function calls, when running the <b>pcre_exec()</b> function. See the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation for details of how to do this. It is a non-standard way of
-building PCRE, for use in environments that have limited stacks. Because of the
-greater use of memory management, it runs more slowly. Separate functions are
-provided so that special-purpose external code can be used for this case. When
-used, these functions are always called in a stack-like manner (last obtained,
-first freed), and always for memory blocks of the same size. There is a
-discussion about PCRE's stack usage in the
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation.
-</P>
-<P>
-The global variable <b>pcre_callout</b> initially contains NULL. It can be set
-by the caller to a "callout" function, which PCRE will then call at specified
-points during a matching operation. Details are given in the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-<a name="newlines"></a></P>
-<br><a name="SEC7" href="#TOC1">NEWLINES</a><br>
-<P>
-PCRE supports five different conventions for indicating line breaks in
-strings: a single CR (carriage return) character, a single LF (linefeed)
-character, the two-character sequence CRLF, any of the three preceding, or any
-Unicode newline sequence. The Unicode newline sequences are the three just
-mentioned, plus the single characters VT (vertical tab, U+000B), FF (formfeed,
-U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
-(paragraph separator, U+2029).
-</P>
-<P>
-Each of the first three conventions is used by at least one operating system as
-its standard newline sequence. When PCRE is built, a default can be specified.
-The default default is LF, which is the Unix standard. When PCRE is run, the
-default can be overridden, either when a pattern is compiled, or when it is
-matched.
-</P>
-<P>
-At compile time, the newline convention can be specified by the <i>options</i>
-argument of <b>pcre_compile()</b>, or it can be specified by special text at the
-start of the pattern itself; this overrides any other settings. See the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page for details of the special character sequences.
-</P>
-<P>
-In the PCRE documentation the word "newline" is used to mean "the character or
-pair of characters that indicate a line break". The choice of newline
-convention affects the handling of the dot, circumflex, and dollar
-metacharacters, the handling of #-comments in /x mode, and, when CRLF is a
-recognized line ending sequence, the match position advancement for a
-non-anchored pattern. There is more detail about this in the
-<a href="#execoptions">section on <b>pcre_exec()</b> options</a>
-below.
-</P>
-<P>
-The choice of newline convention does not affect the interpretation of
-the \n or \r escape sequences, nor does it affect what \R matches, which is
-controlled in a similar way, but by separate options.
-</P>
-<br><a name="SEC8" href="#TOC1">MULTITHREADING</a><br>
-<P>
-The PCRE functions can be used in multi-threading applications, with the
-proviso that the memory management functions pointed to by <b>pcre_malloc</b>,
-<b>pcre_free</b>, <b>pcre_stack_malloc</b>, and <b>pcre_stack_free</b>, and the
-callout function pointed to by <b>pcre_callout</b>, are shared by all threads.
-</P>
-<P>
-The compiled form of a regular expression is not altered during matching, so
-the same compiled pattern can safely be used by several threads at once.
-</P>
-<P>
-If the just-in-time optimization feature is being used, it needs separate
-memory stack areas for each thread. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for more details.
-</P>
-<br><a name="SEC9" href="#TOC1">SAVING PRECOMPILED PATTERNS FOR LATER USE</a><br>
-<P>
-The compiled form of a regular expression can be saved and re-used at a later
-time, possibly by a different program, and even on a host other than the one on
-which it was compiled. Details are given in the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation, which includes a description of the
-<b>pcre_pattern_to_host_byte_order()</b> function. However, compiling a regular
-expression with one version of PCRE for use with a different version is not
-guaranteed to work and may cause crashes.
-</P>
-<br><a name="SEC10" href="#TOC1">CHECKING BUILD-TIME OPTIONS</a><br>
-<P>
-<b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-The function <b>pcre_config()</b> makes it possible for a PCRE client to
-discover which optional features have been compiled into the PCRE library. The
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation has more details about these optional features.
-</P>
-<P>
-The first argument for <b>pcre_config()</b> is an integer, specifying which
-information is required; the second argument is a pointer to a variable into
-which the information is placed. The returned value is zero on success, or the
-negative error code PCRE_ERROR_BADOPTION if the value in the first argument is
-not recognized. The following information is available:
-<pre>
- PCRE_CONFIG_UTF8
-</pre>
-The output is an integer that is set to one if UTF-8 support is available;
-otherwise it is set to zero. If this option is given to the 16-bit version of
-this function, <b>pcre16_config()</b>, the result is PCRE_ERROR_BADOPTION.
-<pre>
- PCRE_CONFIG_UTF16
-</pre>
-The output is an integer that is set to one if UTF-16 support is available;
-otherwise it is set to zero. This value should normally be given to the 16-bit
-version of this function, <b>pcre16_config()</b>. If it is given to the 8-bit
-version of this function, the result is PCRE_ERROR_BADOPTION.
-<pre>
- PCRE_CONFIG_UNICODE_PROPERTIES
-</pre>
-The output is an integer that is set to one if support for Unicode character
-properties is available; otherwise it is set to zero.
-<pre>
- PCRE_CONFIG_JIT
-</pre>
-The output is an integer that is set to one if support for just-in-time
-compiling is available; otherwise it is set to zero.
-<pre>
- PCRE_CONFIG_JITTARGET
-</pre>
-The output is a pointer to a zero-terminated "const char *" string. If JIT
-support is available, the string contains the name of the architecture for
-which the JIT compiler is configured, for example "x86 32bit (little endian +
-unaligned)". If JIT support is not available, the result is NULL.
-<pre>
- PCRE_CONFIG_NEWLINE
-</pre>
-The output is an integer whose value specifies the default character sequence
-that is recognized as meaning "newline". The four values that are supported
-are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF, and -1 for ANY.
-Though they are derived from ASCII, the same values are returned in EBCDIC
-environments. The default should normally correspond to the standard sequence
-for your operating system.
-<pre>
- PCRE_CONFIG_BSR
-</pre>
-The output is an integer whose value indicates what character sequences the \R
-escape sequence matches by default. A value of 0 means that \R matches any
-Unicode line ending sequence; a value of 1 means that \R matches only CR, LF,
-or CRLF. The default can be overridden when a pattern is compiled or matched.
-<pre>
- PCRE_CONFIG_LINK_SIZE
-</pre>
-The output is an integer that contains the number of bytes used for internal
-linkage in compiled regular expressions. For the 8-bit library, the value can
-be 2, 3, or 4. For the 16-bit library, the value is either 2 or 4 and is still
-a number of bytes. The default value of 2 is sufficient for all but the most
-massive patterns, since it allows the compiled pattern to be up to 64K in size.
-Larger values allow larger regular expressions to be compiled, at the expense
-of slower matching.
-<pre>
- PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
-</pre>
-The output is an integer that contains the threshold above which the POSIX
-interface uses <b>malloc()</b> for output vectors. Further details are given in
-the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-documentation.
-<pre>
- PCRE_CONFIG_MATCH_LIMIT
-</pre>
-The output is a long integer that gives the default limit for the number of
-internal matching function calls in a <b>pcre_exec()</b> execution. Further
-details are given with <b>pcre_exec()</b> below.
-<pre>
- PCRE_CONFIG_MATCH_LIMIT_RECURSION
-</pre>
-The output is a long integer that gives the default limit for the depth of
-recursion when calling the internal matching function in a <b>pcre_exec()</b>
-execution. Further details are given with <b>pcre_exec()</b> below.
-<pre>
- PCRE_CONFIG_STACKRECURSE
-</pre>
-The output is an integer that is set to one if internal recursion when running
-<b>pcre_exec()</b> is implemented by recursive function calls that use the stack
-to remember their state. This is the usual way that PCRE is compiled. The
-output is zero if PCRE was compiled to use blocks of data on the heap instead
-of recursive function calls. In this case, <b>pcre_stack_malloc</b> and
-<b>pcre_stack_free</b> are called to manage memory blocks on the heap, thus
-avoiding the use of the stack.
-</P>
-<br><a name="SEC11" href="#TOC1">COMPILING A PATTERN</a><br>
-<P>
-<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-<b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b>
-<b>int *<i>errorcodeptr</i>,</b>
-<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
-<b>const unsigned char *<i>tableptr</i>);</b>
-</P>
-<P>
-Either of the functions <b>pcre_compile()</b> or <b>pcre_compile2()</b> can be
-called to compile a pattern into an internal form. The only difference between
-the two interfaces is that <b>pcre_compile2()</b> has an additional argument,
-<i>errorcodeptr</i>, via which a numerical error code can be returned. To avoid
-too much repetition, we refer just to <b>pcre_compile()</b> below, but the
-information applies equally to <b>pcre_compile2()</b>.
-</P>
-<P>
-The pattern is a C string terminated by a binary zero, and is passed in the
-<i>pattern</i> argument. A pointer to a single block of memory that is obtained
-via <b>pcre_malloc</b> is returned. This contains the compiled code and related
-data. The <b>pcre</b> type is defined for the returned block; this is a typedef
-for a structure whose contents are not externally defined. It is up to the
-caller to free the memory (via <b>pcre_free</b>) when it is no longer required.
-</P>
-<P>
-Although the compiled code of a PCRE regex is relocatable, that is, it does not
-depend on memory location, the complete <b>pcre</b> data block is not
-fully relocatable, because it may contain a copy of the <i>tableptr</i>
-argument, which is an address (see below).
-</P>
-<P>
-The <i>options</i> argument contains various bit settings that affect the
-compilation. It should be zero if no options are required. The available
-options are described below. Some of them (in particular, those that are
-compatible with Perl, but some others as well) can also be set and unset from
-within the pattern (see the detailed description in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation). For those options that can be different in different parts of
-the pattern, the contents of the <i>options</i> argument specifies their
-settings at the start of compilation and execution. The PCRE_ANCHORED,
-PCRE_BSR_<i>xxx</i>, PCRE_NEWLINE_<i>xxx</i>, PCRE_NO_UTF8_CHECK, and
-PCRE_NO_START_OPT options can be set at the time of matching as well as at
-compile time.
-</P>
-<P>
-If <i>errptr</i> is NULL, <b>pcre_compile()</b> returns NULL immediately.
-Otherwise, if compilation of a pattern fails, <b>pcre_compile()</b> returns
-NULL, and sets the variable pointed to by <i>errptr</i> to point to a textual
-error message. This is a static string that is part of the library. You must
-not try to free it. Normally, the offset from the start of the pattern to the
-byte that was being processed when the error was discovered is placed in the
-variable pointed to by <i>erroffset</i>, which must not be NULL (if it is, an
-immediate error is given). However, for an invalid UTF-8 string, the offset is
-that of the first byte of the failing character.
-</P>
-<P>
-Some errors are not detected until the whole pattern has been scanned; in these
-cases, the offset passed back is the length of the pattern. Note that the
-offset is in bytes, not characters, even in UTF-8 mode. It may sometimes point
-into the middle of a UTF-8 character.
-</P>
-<P>
-If <b>pcre_compile2()</b> is used instead of <b>pcre_compile()</b>, and the
-<i>errorcodeptr</i> argument is not NULL, a non-zero error code number is
-returned via this argument in the event of an error. This is in addition to the
-textual error message. Error codes and messages are listed below.
-</P>
-<P>
-If the final argument, <i>tableptr</i>, is NULL, PCRE uses a default set of
-character tables that are built when PCRE is compiled, using the default C
-locale. Otherwise, <i>tableptr</i> must be an address that is the result of a
-call to <b>pcre_maketables()</b>. This value is stored with the compiled
-pattern, and used again by <b>pcre_exec()</b>, unless another table pointer is
-passed to it. For more discussion, see the section on locale support below.
-</P>
-<P>
-This code fragment shows a typical straightforward call to <b>pcre_compile()</b>:
-<pre>
- pcre *re;
- const char *error;
- int erroffset;
- re = pcre_compile(
- "^A.*Z", /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-</pre>
-The following names for option bits are defined in the <b>pcre.h</b> header
-file:
-<pre>
- PCRE_ANCHORED
-</pre>
-If this bit is set, the pattern is forced to be "anchored", that is, it is
-constrained to match only at the first matching point in the string that is
-being searched (the "subject string"). This effect can also be achieved by
-appropriate constructs in the pattern itself, which is the only way to do it in
-Perl.
-<pre>
- PCRE_AUTO_CALLOUT
-</pre>
-If this bit is set, <b>pcre_compile()</b> automatically inserts callout items,
-all with number 255, before each pattern item. For discussion of the callout
-facility, see the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-<pre>
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-</pre>
-These options (which are mutually exclusive) control what the \R escape
-sequence matches. The choice is either to match only CR, LF, or CRLF, or to
-match any Unicode newline sequence. The default is specified when PCRE is
-built. It can be overridden from within the pattern, or by setting an option
-when a compiled pattern is matched.
-<pre>
- PCRE_CASELESS
-</pre>
-If this bit is set, letters in the pattern match both upper and lower case
-letters. It is equivalent to Perl's /i option, and it can be changed within a
-pattern by a (?i) option setting. In UTF-8 mode, PCRE always understands the
-concept of case for characters whose values are less than 128, so caseless
-matching is always possible. For characters with higher values, the concept of
-case is supported if PCRE is compiled with Unicode property support, but not
-otherwise. If you want to use caseless matching for characters 128 and above,
-you must ensure that PCRE is compiled with Unicode property support as well as
-with UTF-8 support.
-<pre>
- PCRE_DOLLAR_ENDONLY
-</pre>
-If this bit is set, a dollar metacharacter in the pattern matches only at the
-end of the subject string. Without this option, a dollar also matches
-immediately before a newline at the end of the string (but not before any other
-newlines). The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set.
-There is no equivalent to this option in Perl, and no way to set it within a
-pattern.
-<pre>
- PCRE_DOTALL
-</pre>
-If this bit is set, a dot metacharacter in the pattern matches a character of
-any value, including one that indicates a newline. However, it only ever
-matches one character, even if newlines are coded as CRLF. Without this option,
-a dot does not match when the current position is at a newline. This option is
-equivalent to Perl's /s option, and it can be changed within a pattern by a
-(?s) option setting. A negative class such as [^a] always matches newline
-characters, independent of the setting of this option.
-<pre>
- PCRE_DUPNAMES
-</pre>
-If this bit is set, names used to identify capturing subpatterns need not be
-unique. This can be helpful for certain types of pattern when it is known that
-only one instance of the named subpattern can ever be matched. There are more
-details of named subpatterns below; see also the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-<pre>
- PCRE_EXTENDED
-</pre>
-If this bit is set, whitespace data characters in the pattern are totally
-ignored except when escaped or inside a character class. Whitespace does not
-include the VT character (code 11). In addition, characters between an
-unescaped # outside a character class and the next newline, inclusive, are also
-ignored. This is equivalent to Perl's /x option, and it can be changed within a
-pattern by a (?x) option setting.
-</P>
-<P>
-Which characters are interpreted as newlines is controlled by the options
-passed to <b>pcre_compile()</b> or by a special sequence at the start of the
-pattern, as described in the section entitled
-<a href="pcrepattern.html#newlines">"Newline conventions"</a>
-in the <b>pcrepattern</b> documentation. Note that the end of this type of
-comment is a literal newline sequence in the pattern; escape sequences that
-happen to represent a newline do not count.
-</P>
-<P>
-This option makes it possible to include comments inside complicated patterns.
-Note, however, that this applies only to data characters. Whitespace characters
-may never appear within special character sequences in a pattern, for example
-within the sequence (?( that introduces a conditional subpattern.
-<pre>
- PCRE_EXTRA
-</pre>
-This option was invented in order to turn on additional functionality of PCRE
-that is incompatible with Perl, but it is currently of very little use. When
-set, any backslash in a pattern that is followed by a letter that has no
-special meaning causes an error, thus reserving these combinations for future
-expansion. By default, as in Perl, a backslash followed by a letter with no
-special meaning is treated as a literal. (Perl can, however, be persuaded to
-give an error for this, by running it with the -w option.) There are at present
-no other features controlled by this option. It can also be set by a (?X)
-option setting within a pattern.
-<pre>
- PCRE_FIRSTLINE
-</pre>
-If this option is set, an unanchored pattern is required to match before or at
-the first newline in the subject string, though the matched text may continue
-over the newline.
-<pre>
- PCRE_JAVASCRIPT_COMPAT
-</pre>
-If this option is set, PCRE's behaviour is changed in some ways so that it is
-compatible with JavaScript rather than Perl. The changes are as follows:
-</P>
-<P>
-(1) A lone closing square bracket in a pattern causes a compile-time error,
-because this is illegal in JavaScript (by default it is treated as a data
-character). Thus, the pattern AB]CD becomes illegal when this option is set.
-</P>
-<P>
-(2) At run time, a back reference to an unset subpattern group matches an empty
-string (by default this causes the current matching alternative to fail). A
-pattern such as (\1)(a) succeeds when this option is set (assuming it can find
-an "a" in the subject), whereas it fails by default, for Perl compatibility.
-</P>
-<P>
-(3) \U matches an upper case "U" character; by default \U causes a compile
-time error (Perl uses \U to upper case subsequent characters).
-</P>
-<P>
-(4) \u matches a lower case "u" character unless it is followed by four
-hexadecimal digits, in which case the hexadecimal number defines the code point
-to match. By default, \u causes a compile time error (Perl uses it to upper
-case the following character).
-</P>
-<P>
-(5) \x matches a lower case "x" character unless it is followed by two
-hexadecimal digits, in which case the hexadecimal number defines the code point
-to match. By default, as in Perl, a hexadecimal number is always expected after
-\x, but it may have zero, one, or two digits (so, for example, \xz matches a
-binary zero character followed by z).
-<pre>
- PCRE_MULTILINE
-</pre>
-By default, PCRE treats the subject string as consisting of a single line of
-characters (even if it actually contains newlines). The "start of line"
-metacharacter (^) matches only at the start of the string, while the "end of
-line" metacharacter ($) matches only at the end of the string, or before a
-terminating newline (unless PCRE_DOLLAR_ENDONLY is set). This is the same as
-Perl.
-</P>
-<P>
-When PCRE_MULTILINE it is set, the "start of line" and "end of line" constructs
-match immediately following or immediately before internal newlines in the
-subject string, respectively, as well as at the very start and end. This is
-equivalent to Perl's /m option, and it can be changed within a pattern by a
-(?m) option setting. If there are no newlines in a subject string, or no
-occurrences of ^ or $ in a pattern, setting PCRE_MULTILINE has no effect.
-<pre>
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-</pre>
-These options override the default newline definition that was chosen when PCRE
-was built. Setting the first or the second specifies that a newline is
-indicated by a single character (CR or LF, respectively). Setting
-PCRE_NEWLINE_CRLF specifies that a newline is indicated by the two-character
-CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies that any of the three
-preceding sequences should be recognized. Setting PCRE_NEWLINE_ANY specifies
-that any Unicode newline sequence should be recognized. The Unicode newline
-sequences are the three just mentioned, plus the single characters VT (vertical
-tab, U+000B), FF (formfeed, U+000C), NEL (next line, U+0085), LS (line
-separator, U+2028), and PS (paragraph separator, U+2029). For the 8-bit
-library, the last two are recognized only in UTF-8 mode.
-</P>
-<P>
-The newline setting in the options word uses three bits that are treated
-as a number, giving eight possibilities. Currently only six are used (default
-plus the five values above). This means that if you set more than one newline
-option, the combination may or may not be sensible. For example,
-PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to PCRE_NEWLINE_CRLF, but
-other combinations may yield unused numbers and cause an error.
-</P>
-<P>
-The only time that a line break in a pattern is specially recognized when
-compiling is when PCRE_EXTENDED is set. CR and LF are whitespace characters,
-and so are ignored in this mode. Also, an unescaped # outside a character class
-indicates a comment that lasts until after the next line break sequence. In
-other circumstances, line break sequences in patterns are treated as literal
-data.
-</P>
-<P>
-The newline option that is set at compile time becomes the default that is used
-for <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b>, but it can be overridden.
-<pre>
- PCRE_NO_AUTO_CAPTURE
-</pre>
-If this option is set, it disables the use of numbered capturing parentheses in
-the pattern. Any opening parenthesis that is not followed by ? behaves as if it
-were followed by ?: but named parentheses can still be used for capturing (and
-they acquire numbers in the usual way). There is no equivalent of this option
-in Perl.
-<pre>
- NO_START_OPTIMIZE
-</pre>
-This is an option that acts at matching time; that is, it is really an option
-for <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>. If it is set at compile time,
-it is remembered with the compiled pattern and assumed at matching time. For
-details see the discussion of PCRE_NO_START_OPTIMIZE
-<a href="#execoptions">below.</a>
-<pre>
- PCRE_UCP
-</pre>
-This option changes the way PCRE processes \B, \b, \D, \d, \S, \s, \W,
-\w, and some of the POSIX character classes. By default, only ASCII characters
-are recognized, but if PCRE_UCP is set, Unicode properties are used instead to
-classify characters. More details are given in the section on
-<a href="pcre.html#genericchartypes">generic character types</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page. If you set PCRE_UCP, matching one of the items it affects takes much
-longer. The option is available only if PCRE has been compiled with Unicode
-property support.
-<pre>
- PCRE_UNGREEDY
-</pre>
-This option inverts the "greediness" of the quantifiers so that they are not
-greedy by default, but become greedy if followed by "?". It is not compatible
-with Perl. It can also be set by a (?U) option setting within the pattern.
-<pre>
- PCRE_UTF8
-</pre>
-This option causes PCRE to regard both the pattern and the subject as strings
-of UTF-8 characters instead of single-byte strings. However, it is available
-only when PCRE is built to include UTF support. If not, the use of this option
-provokes an error. Details of how this option changes the behaviour of PCRE are
-given in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page.
-<pre>
- PCRE_NO_UTF8_CHECK
-</pre>
-When PCRE_UTF8 is set, the validity of the pattern as a UTF-8
-string is automatically checked. There is a discussion about the
-<a href="pcreunicode.html#utf8strings">validity of UTF-8 strings</a>
-in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page. If an invalid UTF-8 sequence is found, <b>pcre_compile()</b> returns an
-error. If you already know that your pattern is valid, and you want to skip
-this check for performance reasons, you can set the PCRE_NO_UTF8_CHECK option.
-When it is set, the effect of passing an invalid UTF-8 string as a pattern is
-undefined. It may cause your program to crash. Note that this option can also
-be passed to <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b>, to suppress the
-validity checking of subject strings.
-</P>
-<br><a name="SEC12" href="#TOC1">COMPILATION ERROR CODES</a><br>
-<P>
-The following table lists the error codes than may be returned by
-<b>pcre_compile2()</b>, along with the error messages that may be returned by
-both compiling functions. Note that error messages are always 8-bit ASCII
-strings, even in 16-bit mode. As PCRE has developed, some error codes have
-fallen out of use. To avoid confusion, they have not been re-used.
-<pre>
- 0 no error
- 1 \ at end of pattern
- 2 \c at end of pattern
- 3 unrecognized character follows \
- 4 numbers out of order in {} quantifier
- 5 number too big in {} quantifier
- 6 missing terminating ] for character class
- 7 invalid escape sequence in character class
- 8 range out of order in character class
- 9 nothing to repeat
- 10 [this code is not in use]
- 11 internal error: unexpected repeat
- 12 unrecognized character after (? or (?-
- 13 POSIX named classes are supported only within a class
- 14 missing )
- 15 reference to non-existent subpattern
- 16 erroffset passed as NULL
- 17 unknown option bit(s) set
- 18 missing ) after comment
- 19 [this code is not in use]
- 20 regular expression is too large
- 21 failed to get memory
- 22 unmatched parentheses
- 23 internal error: code overflow
- 24 unrecognized character after (?&#60;
- 25 lookbehind assertion is not fixed length
- 26 malformed number or name after (?(
- 27 conditional group contains more than two branches
- 28 assertion expected after (?(
- 29 (?R or (?[+-]digits must be followed by )
- 30 unknown POSIX class name
- 31 POSIX collating elements are not supported
- 32 this version of PCRE is compiled without UTF support
- 33 [this code is not in use]
- 34 character value in \x{...} sequence is too large
- 35 invalid condition (?(0)
- 36 \C not allowed in lookbehind assertion
- 37 PCRE does not support \L, \l, \N{name}, \U, or \u
- 38 number after (?C is &#62; 255
- 39 closing ) for (?C expected
- 40 recursive call could loop indefinitely
- 41 unrecognized character after (?P
- 42 syntax error in subpattern name (missing terminator)
- 43 two named subpatterns have the same name
- 44 invalid UTF-8 string (specifically UTF-8)
- 45 support for \P, \p, and \X has not been compiled
- 46 malformed \P or \p sequence
- 47 unknown property name after \P or \p
- 48 subpattern name is too long (maximum 32 characters)
- 49 too many named subpatterns (maximum 10000)
- 50 [this code is not in use]
- 51 octal value is greater than \377 in 8-bit non-UTF-8 mode
- 52 internal error: overran compiling workspace
- 53 internal error: previously-checked referenced subpattern
- not found
- 54 DEFINE group contains more than one branch
- 55 repeating a DEFINE group is not allowed
- 56 inconsistent NEWLINE options
- 57 \g is not followed by a braced, angle-bracketed, or quoted
- name/number or by a plain number
- 58 a numbered reference must not be zero
- 59 an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)
- 60 (*VERB) not recognized
- 61 number is too big
- 62 subpattern name expected
- 63 digit expected after (?+
- 64 ] is an invalid data character in JavaScript compatibility mode
- 65 different names for subpatterns of the same number are
- not allowed
- 66 (*MARK) must have an argument
- 67 this version of PCRE is not compiled with Unicode property
- support
- 68 \c must be followed by an ASCII character
- 69 \k is not followed by a braced, angle-bracketed, or quoted name
- 70 internal error: unknown opcode in find_fixedlength()
- 71 \N is not supported in a class
- 72 too many forward references
- 73 disallowed Unicode code point (&#62;= 0xd800 && &#60;= 0xdfff)
- 74 invalid UTF-16 string (specifically UTF-16)
-</pre>
-The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may
-be used if the limits were changed when PCRE was built.
-<a name="studyingapattern"></a></P>
-<br><a name="SEC13" href="#TOC1">STUDYING A PATTERN</a><br>
-<P>
-<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i></b>
-<b>const char **<i>errptr</i>);</b>
-</P>
-<P>
-If a compiled pattern is going to be used several times, it is worth spending
-more time analyzing it in order to speed up the time taken for matching. The
-function <b>pcre_study()</b> takes a pointer to a compiled pattern as its first
-argument. If studying the pattern produces additional information that will
-help speed up matching, <b>pcre_study()</b> returns a pointer to a
-<b>pcre_extra</b> block, in which the <i>study_data</i> field points to the
-results of the study.
-</P>
-<P>
-The returned value from <b>pcre_study()</b> can be passed directly to
-<b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>. However, a <b>pcre_extra</b> block
-also contains other fields that can be set by the caller before the block is
-passed; these are described
-<a href="#extradata">below</a>
-in the section on matching a pattern.
-</P>
-<P>
-If studying the pattern does not produce any useful information,
-<b>pcre_study()</b> returns NULL. In that circumstance, if the calling program
-wants to pass any of the other fields to <b>pcre_exec()</b> or
-<b>pcre_dfa_exec()</b>, it must set up its own <b>pcre_extra</b> block.
-</P>
-<P>
-The second argument of <b>pcre_study()</b> contains option bits. There is only
-one option: PCRE_STUDY_JIT_COMPILE. If this is set, and the just-in-time
-compiler is available, the pattern is further compiled into machine code that
-executes much faster than the <b>pcre_exec()</b> matching function. If
-the just-in-time compiler is not available, this option is ignored. All other
-bits in the <i>options</i> argument must be zero.
-</P>
-<P>
-JIT compilation is a heavyweight optimization. It can take some time for
-patterns to be analyzed, and for one-off matches and simple patterns the
-benefit of faster execution might be offset by a much slower study time.
-Not all patterns can be optimized by the JIT compiler. For those that cannot be
-handled, matching automatically falls back to the <b>pcre_exec()</b>
-interpreter. For more details, see the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation.
-</P>
-<P>
-The third argument for <b>pcre_study()</b> is a pointer for an error message. If
-studying succeeds (even if no data is returned), the variable it points to is
-set to NULL. Otherwise it is set to point to a textual error message. This is a
-static string that is part of the library. You must not try to free it. You
-should test the error pointer for NULL after calling <b>pcre_study()</b>, to be
-sure that it has run successfully.
-</P>
-<P>
-When you are finished with a pattern, you can free the memory used for the
-study data by calling <b>pcre_free_study()</b>. This function was added to the
-API for release 8.20. For earlier versions, the memory could be freed with
-<b>pcre_free()</b>, just like the pattern itself. This will still work in cases
-where PCRE_STUDY_JIT_COMPILE is not used, but it is advisable to change to the
-new function when convenient.
-</P>
-<P>
-This is a typical way in which <b>pcre_study</b>() is used (except that in a
-real application there should be tests for errors):
-<pre>
- int rc;
- pcre *re;
- pcre_extra *sd;
- re = pcre_compile("pattern", 0, &error, &erroroffset, NULL);
- sd = pcre_study(
- re, /* result of pcre_compile() */
- 0, /* no options */
- &error); /* set to NULL or points to a message */
- rc = pcre_exec( /* see below for details of pcre_exec() options */
- re, sd, "subject", 7, 0, 0, ovector, 30);
- ...
- pcre_free_study(sd);
- pcre_free(re);
-</pre>
-Studying a pattern does two things: first, a lower bound for the length of
-subject string that is needed to match the pattern is computed. This does not
-mean that there are any strings of that length that match, but it does
-guarantee that no shorter strings match. The value is used by
-<b>pcre_exec()</b> and <b>pcre_dfa_exec()</b> to avoid wasting time by trying to
-match strings that are shorter than the lower bound. You can find out the value
-in a calling program via the <b>pcre_fullinfo()</b> function.
-</P>
-<P>
-Studying a pattern is also useful for non-anchored patterns that do not have a
-single fixed starting character. A bitmap of possible starting bytes is
-created. This speeds up finding a position in the subject at which to start
-matching. (In 16-bit mode, the bitmap is used for 16-bit values less than 256.)
-</P>
-<P>
-These two optimizations apply to both <b>pcre_exec()</b> and
-<b>pcre_dfa_exec()</b>. However, they are not used by <b>pcre_exec()</b> if
-<b>pcre_study()</b> is called with the PCRE_STUDY_JIT_COMPILE option, and
-just-in-time compiling is successful. The optimizations can be disabled by
-setting the PCRE_NO_START_OPTIMIZE option when calling <b>pcre_exec()</b> or
-<b>pcre_dfa_exec()</b>. You might want to do this if your pattern contains
-callouts or (*MARK) (which cannot be handled by the JIT compiler), and you want
-to make use of these facilities in cases where matching fails. See the
-discussion of PCRE_NO_START_OPTIMIZE
-<a href="#execoptions">below.</a>
-<a name="localesupport"></a></P>
-<br><a name="SEC14" href="#TOC1">LOCALE SUPPORT</a><br>
-<P>
-PCRE handles caseless matching, and determines whether characters are letters,
-digits, or whatever, by reference to a set of tables, indexed by character
-value. When running in UTF-8 mode, this applies only to characters
-with codes less than 128. By default, higher-valued codes never match escapes
-such as \w or \d, but they can be tested with \p if PCRE is built with
-Unicode character property support. Alternatively, the PCRE_UCP option can be
-set at compile time; this causes \w and friends to use Unicode property
-support instead of built-in tables. The use of locales with Unicode is
-discouraged. If you are handling characters with codes greater than 128, you
-should either use UTF-8 and Unicode, or use locales, but not try to mix the
-two.
-</P>
-<P>
-PCRE contains an internal set of tables that are used when the final argument
-of <b>pcre_compile()</b> is NULL. These are sufficient for many applications.
-Normally, the internal tables recognize only ASCII characters. However, when
-PCRE is built, it is possible to cause the internal tables to be rebuilt in the
-default "C" locale of the local system, which may cause them to be different.
-</P>
-<P>
-The internal tables can always be overridden by tables supplied by the
-application that calls PCRE. These may be created in a different locale from
-the default. As more and more applications change to using Unicode, the need
-for this locale support is expected to die away.
-</P>
-<P>
-External tables are built by calling the <b>pcre_maketables()</b> function,
-which has no arguments, in the relevant locale. The result can then be passed
-to <b>pcre_compile()</b> or <b>pcre_exec()</b> as often as necessary. For
-example, to build and use tables that are appropriate for the French locale
-(where accented characters with values greater than 128 are treated as letters),
-the following code could be used:
-<pre>
- setlocale(LC_CTYPE, "fr_FR");
- tables = pcre_maketables();
- re = pcre_compile(..., tables);
-</pre>
-The locale name "fr_FR" is used on Linux and other Unix-like systems; if you
-are using Windows, the name for the French locale is "french".
-</P>
-<P>
-When <b>pcre_maketables()</b> runs, the tables are built in memory that is
-obtained via <b>pcre_malloc</b>. It is the caller's responsibility to ensure
-that the memory containing the tables remains available for as long as it is
-needed.
-</P>
-<P>
-The pointer that is passed to <b>pcre_compile()</b> is saved with the compiled
-pattern, and the same tables are used via this pointer by <b>pcre_study()</b>
-and normally also by <b>pcre_exec()</b>. Thus, by default, for any single
-pattern, compilation, studying and matching all happen in the same locale, but
-different patterns can be compiled in different locales.
-</P>
-<P>
-It is possible to pass a table pointer or NULL (indicating the use of the
-internal tables) to <b>pcre_exec()</b>. Although not intended for this purpose,
-this facility could be used to match a pattern in a different locale from the
-one in which it was compiled. Passing table pointers at run time is discussed
-below in the section on matching a pattern.
-<a name="infoaboutpattern"></a></P>
-<br><a name="SEC15" href="#TOC1">INFORMATION ABOUT A PATTERN</a><br>
-<P>
-<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b>int <i>what</i>, void *<i>where</i>);</b>
-</P>
-<P>
-The <b>pcre_fullinfo()</b> function returns information about a compiled
-pattern. It replaces the <b>pcre_info()</b> function, which was removed from the
-library at version 8.30, after more than 10 years of obsolescence.
-</P>
-<P>
-The first argument for <b>pcre_fullinfo()</b> is a pointer to the compiled
-pattern. The second argument is the result of <b>pcre_study()</b>, or NULL if
-the pattern was not studied. The third argument specifies which piece of
-information is required, and the fourth argument is a pointer to a variable
-to receive the data. The yield of the function is zero for success, or one of
-the following negative numbers:
-<pre>
- PCRE_ERROR_NULL the argument <i>code</i> was NULL
- the argument <i>where</i> was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADENDIANNESS the pattern was compiled with different
- endianness
- PCRE_ERROR_BADOPTION the value of <i>what</i> was invalid
-</pre>
-The "magic number" is placed at the start of each compiled pattern as an simple
-check against passing an arbitrary memory pointer. The endianness error can
-occur if a compiled pattern is saved and reloaded on a different host. Here is
-a typical call of <b>pcre_fullinfo()</b>, to obtain the length of the compiled
-pattern:
-<pre>
- int rc;
- size_t length;
- rc = pcre_fullinfo(
- re, /* result of pcre_compile() */
- sd, /* result of pcre_study(), or NULL */
- PCRE_INFO_SIZE, /* what is required */
- &length); /* where to put the data */
-</pre>
-The possible values for the third argument are defined in <b>pcre.h</b>, and are
-as follows:
-<pre>
- PCRE_INFO_BACKREFMAX
-</pre>
-Return the number of the highest back reference in the pattern. The fourth
-argument should point to an <b>int</b> variable. Zero is returned if there are
-no back references.
-<pre>
- PCRE_INFO_CAPTURECOUNT
-</pre>
-Return the number of capturing subpatterns in the pattern. The fourth argument
-should point to an <b>int</b> variable.
-<pre>
- PCRE_INFO_DEFAULT_TABLES
-</pre>
-Return a pointer to the internal default character tables within PCRE. The
-fourth argument should point to an <b>unsigned char *</b> variable. This
-information call is provided for internal use by the <b>pcre_study()</b>
-function. External callers can cause PCRE to use its internal tables by passing
-a NULL table pointer.
-<pre>
- PCRE_INFO_FIRSTBYTE
-</pre>
-Return information about the first data unit of any matched string, for a
-non-anchored pattern. (The name of this option refers to the 8-bit library,
-where data units are bytes.) The fourth argument should point to an <b>int</b>
-variable.
-</P>
-<P>
-If there is a fixed first value, for example, the letter "c" from a pattern
-such as (cat|cow|coyote), its value is returned. In the 8-bit library, the
-value is always less than 256; in the 16-bit library the value can be up to
-0xffff.
-</P>
-<P>
-If there is no fixed first value, and if either
-<br>
-<br>
-(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch
-starts with "^", or
-<br>
-<br>
-(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set
-(if it were set, the pattern would be anchored),
-<br>
-<br>
--1 is returned, indicating that the pattern matches only at the start of a
-subject string or after any newline within the string. Otherwise -2 is
-returned. For anchored patterns, -2 is returned.
-<pre>
- PCRE_INFO_FIRSTTABLE
-</pre>
-If the pattern was studied, and this resulted in the construction of a 256-bit
-table indicating a fixed set of values for the first data unit in any matching
-string, a pointer to the table is returned. Otherwise NULL is returned. The
-fourth argument should point to an <b>unsigned char *</b> variable.
-<pre>
- PCRE_INFO_HASCRORLF
-</pre>
-Return 1 if the pattern contains any explicit matches for CR or LF characters,
-otherwise 0. The fourth argument should point to an <b>int</b> variable. An
-explicit match is either a literal CR or LF character, or \r or \n.
-<pre>
- PCRE_INFO_JCHANGED
-</pre>
-Return 1 if the (?J) or (?-J) option setting is used in the pattern, otherwise
-0. The fourth argument should point to an <b>int</b> variable. (?J) and
-(?-J) set and unset the local PCRE_DUPNAMES option, respectively.
-<pre>
- PCRE_INFO_JIT
-</pre>
-Return 1 if the pattern was studied with the PCRE_STUDY_JIT_COMPILE option, and
-just-in-time compiling was successful. The fourth argument should point to an
-<b>int</b> variable. A return value of 0 means that JIT support is not available
-in this version of PCRE, or that the pattern was not studied with the
-PCRE_STUDY_JIT_COMPILE option, or that the JIT compiler could not handle this
-particular pattern. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for details of what can and cannot be handled.
-<pre>
- PCRE_INFO_JITSIZE
-</pre>
-If the pattern was successfully studied with the PCRE_STUDY_JIT_COMPILE option,
-return the size of the JIT compiled code, otherwise return zero. The fourth
-argument should point to a <b>size_t</b> variable.
-<pre>
- PCRE_INFO_LASTLITERAL
-</pre>
-Return the value of the rightmost literal data unit that must exist in any
-matched string, other than at its start, if such a value has been recorded. The
-fourth argument should point to an <b>int</b> variable. If there is no such
-value, -1 is returned. For anchored patterns, a last literal value is recorded
-only if it follows something of variable length. For example, for the pattern
-/^a\d+z\d+/ the returned value is "z", but for /^a\dz\d/ the returned value
-is -1.
-<pre>
- PCRE_INFO_MINLENGTH
-</pre>
-If the pattern was studied and a minimum length for matching subject strings
-was computed, its value is returned. Otherwise the returned value is -1. The
-value is a number of characters, which in UTF-8 mode may be different from the
-number of bytes. The fourth argument should point to an <b>int</b> variable. A
-non-negative value is a lower bound to the length of any matching string. There
-may not be any strings of that length that do actually match, but every string
-that does match is at least that long.
-<pre>
- PCRE_INFO_NAMECOUNT
- PCRE_INFO_NAMEENTRYSIZE
- PCRE_INFO_NAMETABLE
-</pre>
-PCRE supports the use of named as well as numbered capturing parentheses. The
-names are just an additional way of identifying the parentheses, which still
-acquire numbers. Several convenience functions such as
-<b>pcre_get_named_substring()</b> are provided for extracting captured
-substrings by name. It is also possible to extract the data directly, by first
-converting the name to a number in order to access the correct pointers in the
-output vector (described with <b>pcre_exec()</b> below). To do the conversion,
-you need to use the name-to-number map, which is described by these three
-values.
-</P>
-<P>
-The map consists of a number of fixed-size entries. PCRE_INFO_NAMECOUNT gives
-the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size of each
-entry; both of these return an <b>int</b> value. The entry size depends on the
-length of the longest name. PCRE_INFO_NAMETABLE returns a pointer to the first
-entry of the table. This is a pointer to <b>char</b> in the 8-bit library, where
-the first two bytes of each entry are the number of the capturing parenthesis,
-most significant byte first. In the 16-bit library, the pointer points to
-16-bit data units, the first of which contains the parenthesis number. The rest
-of the entry is the corresponding name, zero terminated.
-</P>
-<P>
-The names are in alphabetical order. Duplicate names may appear if (?| is used
-to create multiple groups with the same number, as described in the
-<a href="pcrepattern.html#dupsubpatternnumber">section on duplicate subpattern numbers</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page. Duplicate names for subpatterns with different numbers are permitted only
-if PCRE_DUPNAMES is set. In all cases of duplicate names, they appear in the
-table in the order in which they were found in the pattern. In the absence of
-(?| this is the order of increasing number; when (?| is used this is not
-necessarily the case because later subpatterns may have lower numbers.
-</P>
-<P>
-As a simple example of the name/number table, consider the following pattern
-after compilation by the 8-bit library (assume PCRE_EXTENDED is set, so white
-space - including newlines - is ignored):
-<pre>
- (?&#60;date&#62; (?&#60;year&#62;(\d\d)?\d\d) - (?&#60;month&#62;\d\d) - (?&#60;day&#62;\d\d) )
-</pre>
-There are four named subpatterns, so the table has four entries, and each entry
-in the table is eight bytes long. The table is as follows, with non-printing
-bytes shows in hexadecimal, and undefined bytes shown as ??:
-<pre>
- 00 01 d a t e 00 ??
- 00 05 d a y 00 ?? ??
- 00 04 m o n t h 00
- 00 02 y e a r 00 ??
-</pre>
-When writing code to extract data from named subpatterns using the
-name-to-number map, remember that the length of the entries is likely to be
-different for each compiled pattern.
-<pre>
- PCRE_INFO_OKPARTIAL
-</pre>
-Return 1 if the pattern can be used for partial matching with
-<b>pcre_exec()</b>, otherwise 0. The fourth argument should point to an
-<b>int</b> variable. From release 8.00, this always returns 1, because the
-restrictions that previously applied to partial matching have been lifted. The
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation gives details of partial matching.
-<pre>
- PCRE_INFO_OPTIONS
-</pre>
-Return a copy of the options with which the pattern was compiled. The fourth
-argument should point to an <b>unsigned long int</b> variable. These option bits
-are those specified in the call to <b>pcre_compile()</b>, modified by any
-top-level option settings at the start of the pattern itself. In other words,
-they are the options that will be in force when matching starts. For example,
-if the pattern /(?im)abc(?-i)d/ is compiled with the PCRE_EXTENDED option, the
-result is PCRE_CASELESS, PCRE_MULTILINE, and PCRE_EXTENDED.
-</P>
-<P>
-A pattern is automatically anchored by PCRE if all of its top-level
-alternatives begin with one of the following:
-<pre>
- ^ unless PCRE_MULTILINE is set
- \A always
- \G always
- .* if PCRE_DOTALL is set and there are no back references to the subpattern in which .* appears
-</pre>
-For such patterns, the PCRE_ANCHORED bit is set in the options returned by
-<b>pcre_fullinfo()</b>.
-<pre>
- PCRE_INFO_SIZE
-</pre>
-Return the size of the compiled pattern in bytes (for both libraries). The
-fourth argument should point to a <b>size_t</b> variable. This value does not
-include the size of the <b>pcre</b> structure that is returned by
-<b>pcre_compile()</b>. The value that is passed as the argument to
-<b>pcre_malloc()</b> when <b>pcre_compile()</b> is getting memory in which to
-place the compiled data is the value returned by this option plus the size of
-the <b>pcre</b> structure. Studying a compiled pattern, with or without JIT,
-does not alter the value returned by this option.
-<pre>
- PCRE_INFO_STUDYSIZE
-</pre>
-Return the size in bytes of the data block pointed to by the <i>study_data</i>
-field in a <b>pcre_extra</b> block. If <b>pcre_extra</b> is NULL, or there is no
-study data, zero is returned. The fourth argument should point to a
-<b>size_t</b> variable. The <i>study_data</i> field is set by <b>pcre_study()</b>
-to record information that will speed up matching (see the section entitled
-<a href="#studyingapattern">"Studying a pattern"</a>
-above). The format of the <i>study_data</i> block is private, but its length
-is made available via this option so that it can be saved and restored (see the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation for details).
-</P>
-<br><a name="SEC16" href="#TOC1">REFERENCE COUNTS</a><br>
-<P>
-<b>int pcre_refcount(pcre *<i>code</i>, int <i>adjust</i>);</b>
-</P>
-<P>
-The <b>pcre_refcount()</b> function is used to maintain a reference count in the
-data block that contains a compiled pattern. It is provided for the benefit of
-applications that operate in an object-oriented manner, where different parts
-of the application may be using the same compiled pattern, but you want to free
-the block when they are all done.
-</P>
-<P>
-When a pattern is compiled, the reference count field is initialized to zero.
-It is changed only by calling this function, whose action is to add the
-<i>adjust</i> value (which may be positive or negative) to it. The yield of the
-function is the new value. However, the value of the count is constrained to
-lie between 0 and 65535, inclusive. If the new value is outside these limits,
-it is forced to the appropriate limit value.
-</P>
-<P>
-Except when it is zero, the reference count is not correctly preserved if a
-pattern is compiled on one host and then transferred to a host whose byte-order
-is different. (This seems a highly unlikely scenario.)
-</P>
-<br><a name="SEC17" href="#TOC1">MATCHING A PATTERN: THE TRADITIONAL FUNCTION</a><br>
-<P>
-<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
-</P>
-<P>
-The function <b>pcre_exec()</b> is called to match a subject string against a
-compiled pattern, which is passed in the <i>code</i> argument. If the
-pattern was studied, the result of the study should be passed in the
-<i>extra</i> argument. You can call <b>pcre_exec()</b> with the same <i>code</i>
-and <i>extra</i> arguments as many times as you like, in order to match
-different subject strings with the same pattern.
-</P>
-<P>
-This function is the main matching facility of the library, and it operates in
-a Perl-like manner. For specialist use there is also an alternative matching
-function, which is described
-<a href="#dfamatch">below</a>
-in the section about the <b>pcre_dfa_exec()</b> function.
-</P>
-<P>
-In most applications, the pattern will have been compiled (and optionally
-studied) in the same process that calls <b>pcre_exec()</b>. However, it is
-possible to save compiled patterns and study data, and then use them later
-in different processes, possibly even on different hosts. For a discussion
-about this, see the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation.
-</P>
-<P>
-Here is an example of a simple call to <b>pcre_exec()</b>:
-<pre>
- int rc;
- int ovector[30];
- rc = pcre_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 30); /* number of elements (NOT size in bytes) */
-<a name="extradata"></a></PRE>
-</P>
-<br><b>
-Extra data for <b>pcre_exec()</b>
-</b><br>
-<P>
-If the <i>extra</i> argument is not NULL, it must point to a <b>pcre_extra</b>
-data block. The <b>pcre_study()</b> function returns such a block (when it
-doesn't return NULL), but you can also create one for yourself, and pass
-additional information in it. The <b>pcre_extra</b> block contains the following
-fields (not necessarily in this order):
-<pre>
- unsigned long int <i>flags</i>;
- void *<i>study_data</i>;
- void *<i>executable_jit</i>;
- unsigned long int <i>match_limit</i>;
- unsigned long int <i>match_limit_recursion</i>;
- void *<i>callout_data</i>;
- const unsigned char *<i>tables</i>;
- unsigned char **<i>mark</i>;
-</pre>
-In the 16-bit version of this structure, the <i>mark</i> field has type
-"PCRE_UCHAR16 **".
-</P>
-<P>
-The <i>flags</i> field is a bitmap that specifies which of the other fields
-are set. The flag bits are:
-<pre>
- PCRE_EXTRA_STUDY_DATA
- PCRE_EXTRA_EXECUTABLE_JIT
- PCRE_EXTRA_MATCH_LIMIT
- PCRE_EXTRA_MATCH_LIMIT_RECURSION
- PCRE_EXTRA_CALLOUT_DATA
- PCRE_EXTRA_TABLES
- PCRE_EXTRA_MARK
-</pre>
-Other flag bits should be set to zero. The <i>study_data</i> field and sometimes
-the <i>executable_jit</i> field are set in the <b>pcre_extra</b> block that is
-returned by <b>pcre_study()</b>, together with the appropriate flag bits. You
-should not set these yourself, but you may add to the block by setting the
-other fields and their corresponding flag bits.
-</P>
-<P>
-The <i>match_limit</i> field provides a means of preventing PCRE from using up a
-vast amount of resources when running patterns that are not going to match,
-but which have a very large number of possibilities in their search trees. The
-classic example is a pattern that uses nested unlimited repeats.
-</P>
-<P>
-Internally, <b>pcre_exec()</b> uses a function called <b>match()</b>, which it
-calls repeatedly (sometimes recursively). The limit set by <i>match_limit</i> is
-imposed on the number of times this function is called during a match, which
-has the effect of limiting the amount of backtracking that can take place. For
-patterns that are not anchored, the count restarts from zero for each position
-in the subject string.
-</P>
-<P>
-When <b>pcre_exec()</b> is called with a pattern that was successfully studied
-with the PCRE_STUDY_JIT_COMPILE option, the way that the matching is executed
-is entirely different. However, there is still the possibility of runaway
-matching that goes on for a very long time, and so the <i>match_limit</i> value
-is also used in this case (but in a different way) to limit how long the
-matching can continue.
-</P>
-<P>
-The default value for the limit can be set when PCRE is built; the default
-default is 10 million, which handles all but the most extreme cases. You can
-override the default by suppling <b>pcre_exec()</b> with a <b>pcre_extra</b>
-block in which <i>match_limit</i> is set, and PCRE_EXTRA_MATCH_LIMIT is set in
-the <i>flags</i> field. If the limit is exceeded, <b>pcre_exec()</b> returns
-PCRE_ERROR_MATCHLIMIT.
-</P>
-<P>
-The <i>match_limit_recursion</i> field is similar to <i>match_limit</i>, but
-instead of limiting the total number of times that <b>match()</b> is called, it
-limits the depth of recursion. The recursion depth is a smaller number than the
-total number of calls, because not all calls to <b>match()</b> are recursive.
-This limit is of use only if it is set smaller than <i>match_limit</i>.
-</P>
-<P>
-Limiting the recursion depth limits the amount of machine stack that can be
-used, or, when PCRE has been compiled to use memory on the heap instead of the
-stack, the amount of heap memory that can be used. This limit is not relevant,
-and is ignored, if the pattern was successfully studied with
-PCRE_STUDY_JIT_COMPILE.
-</P>
-<P>
-The default value for <i>match_limit_recursion</i> can be set when PCRE is
-built; the default default is the same value as the default for
-<i>match_limit</i>. You can override the default by suppling <b>pcre_exec()</b>
-with a <b>pcre_extra</b> block in which <i>match_limit_recursion</i> is set, and
-PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the <i>flags</i> field. If the limit
-is exceeded, <b>pcre_exec()</b> returns PCRE_ERROR_RECURSIONLIMIT.
-</P>
-<P>
-The <i>callout_data</i> field is used in conjunction with the "callout" feature,
-and is described in the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-</P>
-<P>
-The <i>tables</i> field is used to pass a character tables pointer to
-<b>pcre_exec()</b>; this overrides the value that is stored with the compiled
-pattern. A non-NULL value is stored with the compiled pattern only if custom
-tables were supplied to <b>pcre_compile()</b> via its <i>tableptr</i> argument.
-If NULL is passed to <b>pcre_exec()</b> using this mechanism, it forces PCRE's
-internal tables to be used. This facility is helpful when re-using patterns
-that have been saved after compiling with an external set of tables, because
-the external tables might be at a different address when <b>pcre_exec()</b> is
-called. See the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation for a discussion of saving compiled patterns for later use.
-</P>
-<P>
-If PCRE_EXTRA_MARK is set in the <i>flags</i> field, the <i>mark</i> field must
-be set to point to a suitable variable. If the pattern contains any
-backtracking control verbs such as (*MARK:NAME), and the execution ends up with
-a name to pass back, a pointer to the name string (zero terminated) is placed
-in the variable pointed to by the <i>mark</i> field. The names are within the
-compiled pattern; if you wish to retain such a name you must copy it before
-freeing the memory of a compiled pattern. If there is no name to pass back, the
-variable pointed to by the <i>mark</i> field is set to NULL. For details of the
-backtracking control verbs, see the section entitled
-<a href="pcrepattern#backtrackcontrol">"Backtracking control"</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-<a name="execoptions"></a></P>
-<br><b>
-Option bits for <b>pcre_exec()</b>
-</b><br>
-<P>
-The unused bits of the <i>options</i> argument for <b>pcre_exec()</b> must be
-zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_<i>xxx</i>,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
-PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_SOFT, and
-PCRE_PARTIAL_HARD.
-</P>
-<P>
-If the pattern was successfully studied with the PCRE_STUDY_JIT_COMPILE option,
-the only supported options for JIT execution are PCRE_NO_UTF8_CHECK,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and PCRE_NOTEMPTY_ATSTART. Note in
-particular that partial matching is not supported. If an unsupported option is
-used, JIT execution is disabled and the normal interpretive code in
-<b>pcre_exec()</b> is run.
-<pre>
- PCRE_ANCHORED
-</pre>
-The PCRE_ANCHORED option limits <b>pcre_exec()</b> to matching at the first
-matching position. If a pattern was compiled with PCRE_ANCHORED, or turned out
-to be anchored by virtue of its contents, it cannot be made unachored at
-matching time.
-<pre>
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-</pre>
-These options (which are mutually exclusive) control what the \R escape
-sequence matches. The choice is either to match only CR, LF, or CRLF, or to
-match any Unicode newline sequence. These options override the choice that was
-made or defaulted when the pattern was compiled.
-<pre>
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-</pre>
-These options override the newline definition that was chosen or defaulted when
-the pattern was compiled. For details, see the description of
-<b>pcre_compile()</b> above. During matching, the newline choice affects the
-behaviour of the dot, circumflex, and dollar metacharacters. It may also alter
-the way the match position is advanced after a match failure for an unanchored
-pattern.
-</P>
-<P>
-When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is set, and a
-match attempt for an unanchored pattern fails when the current position is at a
-CRLF sequence, and the pattern contains no explicit matches for CR or LF
-characters, the match position is advanced by two characters instead of one, in
-other words, to after the CRLF.
-</P>
-<P>
-The above rule is a compromise that makes the most common cases work as
-expected. For example, if the pattern is .+A (and the PCRE_DOTALL option is not
-set), it does not match the string "\r\nA" because, after failing at the
-start, it skips both the CR and the LF before retrying. However, the pattern
-[\r\n]A does match that string, because it contains an explicit CR or LF
-reference, and so advances only by one character after the first failure.
-</P>
-<P>
-An explicit match for CR of LF is either a literal appearance of one of those
-characters, or one of the \r or \n escape sequences. Implicit matches such as
-[^X] do not count, nor does \s (which includes CR and LF in the characters
-that it matches).
-</P>
-<P>
-Notwithstanding the above, anomalous effects may still occur when CRLF is a
-valid newline sequence and explicit \r or \n escapes appear in the pattern.
-<pre>
- PCRE_NOTBOL
-</pre>
-This option specifies that first character of the subject string is not the
-beginning of a line, so the circumflex metacharacter should not match before
-it. Setting this without PCRE_MULTILINE (at compile time) causes circumflex
-never to match. This option affects only the behaviour of the circumflex
-metacharacter. It does not affect \A.
-<pre>
- PCRE_NOTEOL
-</pre>
-This option specifies that the end of the subject string is not the end of a
-line, so the dollar metacharacter should not match it nor (except in multiline
-mode) a newline immediately before it. Setting this without PCRE_MULTILINE (at
-compile time) causes dollar never to match. This option affects only the
-behaviour of the dollar metacharacter. It does not affect \Z or \z.
-<pre>
- PCRE_NOTEMPTY
-</pre>
-An empty string is not considered to be a valid match if this option is set. If
-there are alternatives in the pattern, they are tried. If all the alternatives
-match the empty string, the entire match fails. For example, if the pattern
-<pre>
- a?b?
-</pre>
-is applied to a string not beginning with "a" or "b", it matches an empty
-string at the start of the subject. With PCRE_NOTEMPTY set, this match is not
-valid, so PCRE searches further into the string for occurrences of "a" or "b".
-<pre>
- PCRE_NOTEMPTY_ATSTART
-</pre>
-This is like PCRE_NOTEMPTY, except that an empty string match that is not at
-the start of the subject is permitted. If the pattern is anchored, such a match
-can occur only if the pattern contains \K.
-</P>
-<P>
-Perl has no direct equivalent of PCRE_NOTEMPTY or PCRE_NOTEMPTY_ATSTART, but it
-does make a special case of a pattern match of the empty string within its
-<b>split()</b> function, and when using the /g modifier. It is possible to
-emulate Perl's behaviour after matching a null string by first trying the match
-again at the same offset with PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED, and then
-if that fails, by advancing the starting offset (see below) and trying an
-ordinary match again. There is some code that demonstrates how to do this in
-the
-<a href="pcredemo.html"><b>pcredemo</b></a>
-sample program. In the most general case, you have to check to see if the
-newline convention recognizes CRLF as a newline, and if so, and the current
-character is CR followed by LF, advance the starting offset by two characters
-instead of one.
-<pre>
- PCRE_NO_START_OPTIMIZE
-</pre>
-There are a number of optimizations that <b>pcre_exec()</b> uses at the start of
-a match, in order to speed up the process. For example, if it is known that an
-unanchored match must start with a specific character, it searches the subject
-for that character, and fails immediately if it cannot find it, without
-actually running the main matching function. This means that a special item
-such as (*COMMIT) at the start of a pattern is not considered until after a
-suitable starting point for the match has been found. When callouts or (*MARK)
-items are in use, these "start-up" optimizations can cause them to be skipped
-if the pattern is never actually used. The start-up optimizations are in effect
-a pre-scan of the subject that takes place before the pattern is run.
-</P>
-<P>
-The PCRE_NO_START_OPTIMIZE option disables the start-up optimizations, possibly
-causing performance to suffer, but ensuring that in cases where the result is
-"no match", the callouts do occur, and that items such as (*COMMIT) and (*MARK)
-are considered at every possible starting position in the subject string. If
-PCRE_NO_START_OPTIMIZE is set at compile time, it cannot be unset at matching
-time.
-</P>
-<P>
-Setting PCRE_NO_START_OPTIMIZE can change the outcome of a matching operation.
-Consider the pattern
-<pre>
- (*COMMIT)ABC
-</pre>
-When this is compiled, PCRE records the fact that a match must start with the
-character "A". Suppose the subject string is "DEFABC". The start-up
-optimization scans along the subject, finds "A" and runs the first match
-attempt from there. The (*COMMIT) item means that the pattern must match the
-current starting position, which in this case, it does. However, if the same
-match is run with PCRE_NO_START_OPTIMIZE set, the initial scan along the
-subject string does not happen. The first match attempt is run starting from
-"D" and when this fails, (*COMMIT) prevents any further matches being tried, so
-the overall result is "no match". If the pattern is studied, more start-up
-optimizations may be used. For example, a minimum length for the subject may be
-recorded. Consider the pattern
-<pre>
- (*MARK:A)(X|Y)
-</pre>
-The minimum length for a match is one character. If the subject is "ABC", there
-will be attempts to match "ABC", "BC", "C", and then finally an empty string.
-If the pattern is studied, the final attempt does not take place, because PCRE
-knows that the subject is too short, and so the (*MARK) is never encountered.
-In this case, studying the pattern does not affect the overall match result,
-which is still "no match", but it does affect the auxiliary information that is
-returned.
-<pre>
- PCRE_NO_UTF8_CHECK
-</pre>
-When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8
-string is automatically checked when <b>pcre_exec()</b> is subsequently called.
-The value of <i>startoffset</i> is also checked to ensure that it points to the
-start of a UTF-8 character. There is a discussion about the validity of UTF-8
-strings in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page. If an invalid sequence of bytes is found, <b>pcre_exec()</b> returns the
-error PCRE_ERROR_BADUTF8 or, if PCRE_PARTIAL_HARD is set and the problem is a
-truncated character at the end of the subject, PCRE_ERROR_SHORTUTF8. In both
-cases, information about the precise nature of the error may also be returned
-(see the descriptions of these errors in the section entitled \fIError return
-values from\fP <b>pcre_exec()</b>
-<a href="#errorlist">below).</a>
-If <i>startoffset</i> contains a value that does not point to the start of a
-UTF-8 character (or to the end of the subject), PCRE_ERROR_BADUTF8_OFFSET is
-returned.
-</P>
-<P>
-If you already know that your subject is valid, and you want to skip these
-checks for performance reasons, you can set the PCRE_NO_UTF8_CHECK option when
-calling <b>pcre_exec()</b>. You might want to do this for the second and
-subsequent calls to <b>pcre_exec()</b> if you are making repeated calls to find
-all the matches in a single subject string. However, you should be sure that
-the value of <i>startoffset</i> points to the start of a character (or the end
-of the subject). When PCRE_NO_UTF8_CHECK is set, the effect of passing an
-invalid string as a subject or an invalid value of <i>startoffset</i> is
-undefined. Your program may crash.
-<pre>
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-</pre>
-These options turn on the partial matching feature. For backwards
-compatibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial match
-occurs if the end of the subject string is reached successfully, but there are
-not enough subject characters to complete the match. If this happens when
-PCRE_PARTIAL_SOFT (but not PCRE_PARTIAL_HARD) is set, matching continues by
-testing any remaining alternatives. Only if no complete match can be found is
-PCRE_ERROR_PARTIAL returned instead of PCRE_ERROR_NOMATCH. In other words,
-PCRE_PARTIAL_SOFT says that the caller is prepared to handle a partial match,
-but only if no complete match can be found.
-</P>
-<P>
-If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this case, if a
-partial match is found, <b>pcre_exec()</b> immediately returns
-PCRE_ERROR_PARTIAL, without considering any other alternatives. In other words,
-when PCRE_PARTIAL_HARD is set, a partial match is considered to be more
-important that an alternative complete match.
-</P>
-<P>
-In both cases, the portion of the string that was inspected when the partial
-match was found is set as the first matching string. There is a more detailed
-discussion of partial and multi-segment matching, with examples, in the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation.
-</P>
-<br><b>
-The string to be matched by <b>pcre_exec()</b>
-</b><br>
-<P>
-The subject string is passed to <b>pcre_exec()</b> as a pointer in
-<i>subject</i>, a length in bytes in <i>length</i>, and a starting byte offset
-in <i>startoffset</i>. If this is negative or greater than the length of the
-subject, <b>pcre_exec()</b> returns PCRE_ERROR_BADOFFSET. When the starting
-offset is zero, the search for a match starts at the beginning of the subject,
-and this is by far the most common case. In UTF-8 mode, the byte offset must
-point to the start of a UTF-8 character (or the end of the subject). Unlike the
-pattern string, the subject may contain binary zero bytes.
-</P>
-<P>
-A non-zero starting offset is useful when searching for another match in the
-same subject by calling <b>pcre_exec()</b> again after a previous success.
-Setting <i>startoffset</i> differs from just passing over a shortened string and
-setting PCRE_NOTBOL in the case of a pattern that begins with any kind of
-lookbehind. For example, consider the pattern
-<pre>
- \Biss\B
-</pre>
-which finds occurrences of "iss" in the middle of words. (\B matches only if
-the current position in the subject is not a word boundary.) When applied to
-the string "Mississipi" the first call to <b>pcre_exec()</b> finds the first
-occurrence. If <b>pcre_exec()</b> is called again with just the remainder of the
-subject, namely "issipi", it does not match, because \B is always false at the
-start of the subject, which is deemed to be a word boundary. However, if
-<b>pcre_exec()</b> is passed the entire string again, but with <i>startoffset</i>
-set to 4, it finds the second occurrence of "iss" because it is able to look
-behind the starting point to discover that it is preceded by a letter.
-</P>
-<P>
-Finding all the matches in a subject is tricky when the pattern can match an
-empty string. It is possible to emulate Perl's /g behaviour by first trying the
-match again at the same offset, with the PCRE_NOTEMPTY_ATSTART and
-PCRE_ANCHORED options, and then if that fails, advancing the starting offset
-and trying an ordinary match again. There is some code that demonstrates how to
-do this in the
-<a href="pcredemo.html"><b>pcredemo</b></a>
-sample program. In the most general case, you have to check to see if the
-newline convention recognizes CRLF as a newline, and if so, and the current
-character is CR followed by LF, advance the starting offset by two characters
-instead of one.
-</P>
-<P>
-If a non-zero starting offset is passed when the pattern is anchored, one
-attempt to match at the given offset is made. This can only succeed if the
-pattern does not require the match to be at the start of the subject.
-</P>
-<br><b>
-How <b>pcre_exec()</b> returns captured substrings
-</b><br>
-<P>
-In general, a pattern matches a certain portion of the subject, and in
-addition, further substrings from the subject may be picked out by parts of the
-pattern. Following the usage in Jeffrey Friedl's book, this is called
-"capturing" in what follows, and the phrase "capturing subpattern" is used for
-a fragment of a pattern that picks out a substring. PCRE supports several other
-kinds of parenthesized subpattern that do not cause substrings to be captured.
-</P>
-<P>
-Captured substrings are returned to the caller via a vector of integers whose
-address is passed in <i>ovector</i>. The number of elements in the vector is
-passed in <i>ovecsize</i>, which must be a non-negative number. <b>Note</b>: this
-argument is NOT the size of <i>ovector</i> in bytes.
-</P>
-<P>
-The first two-thirds of the vector is used to pass back captured substrings,
-each substring using a pair of integers. The remaining third of the vector is
-used as workspace by <b>pcre_exec()</b> while matching capturing subpatterns,
-and is not available for passing back information. The number passed in
-<i>ovecsize</i> should always be a multiple of three. If it is not, it is
-rounded down.
-</P>
-<P>
-When a match is successful, information about captured substrings is returned
-in pairs of integers, starting at the beginning of <i>ovector</i>, and
-continuing up to two-thirds of its length at the most. The first element of
-each pair is set to the byte offset of the first character in a substring, and
-the second is set to the byte offset of the first character after the end of a
-substring. <b>Note</b>: these values are always byte offsets, even in UTF-8
-mode. They are not character counts.
-</P>
-<P>
-The first pair of integers, <i>ovector[0]</i> and <i>ovector[1]</i>, identify the
-portion of the subject string matched by the entire pattern. The next pair is
-used for the first capturing subpattern, and so on. The value returned by
-<b>pcre_exec()</b> is one more than the highest numbered pair that has been set.
-For example, if two substrings have been captured, the returned value is 3. If
-there are no capturing subpatterns, the return value from a successful match is
-1, indicating that just the first pair of offsets has been set.
-</P>
-<P>
-If a capturing subpattern is matched repeatedly, it is the last portion of the
-string that it matched that is returned.
-</P>
-<P>
-If the vector is too small to hold all the captured substring offsets, it is
-used as far as possible (up to two-thirds of its length), and the function
-returns a value of zero. If neither the actual string matched not any captured
-substrings are of interest, <b>pcre_exec()</b> may be called with <i>ovector</i>
-passed as NULL and <i>ovecsize</i> as zero. However, if the pattern contains
-back references and the <i>ovector</i> is not big enough to remember the related
-substrings, PCRE has to get additional memory for use during matching. Thus it
-is usually advisable to supply an <i>ovector</i> of reasonable size.
-</P>
-<P>
-There are some cases where zero is returned (indicating vector overflow) when
-in fact the vector is exactly the right size for the final match. For example,
-consider the pattern
-<pre>
- (a)(?:(b)c|bd)
-</pre>
-If a vector of 6 elements (allowing for only 1 captured substring) is given
-with subject string "abd", <b>pcre_exec()</b> will try to set the second
-captured string, thereby recording a vector overflow, before failing to match
-"c" and backing up to try the second alternative. The zero return, however,
-does correctly indicate that the maximum number of slots (namely 2) have been
-filled. In similar cases where there is temporary overflow, but the final
-number of used slots is actually less than the maximum, a non-zero value is
-returned.
-</P>
-<P>
-The <b>pcre_fullinfo()</b> function can be used to find out how many capturing
-subpatterns there are in a compiled pattern. The smallest size for
-<i>ovector</i> that will allow for <i>n</i> captured substrings, in addition to
-the offsets of the substring matched by the whole pattern, is (<i>n</i>+1)*3.
-</P>
-<P>
-It is possible for capturing subpattern number <i>n+1</i> to match some part of
-the subject when subpattern <i>n</i> has not been used at all. For example, if
-the string "abc" is matched against the pattern (a|(z))(bc) the return from the
-function is 4, and subpatterns 1 and 3 are matched, but 2 is not. When this
-happens, both values in the offset pairs corresponding to unused subpatterns
-are set to -1.
-</P>
-<P>
-Offset values that correspond to unused subpatterns at the end of the
-expression are also set to -1. For example, if the string "abc" is matched
-against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not matched. The
-return from the function is 2, because the highest used capturing subpattern
-number is 1, and the offsets for for the second and third capturing subpatterns
-(assuming the vector is large enough, of course) are set to -1.
-</P>
-<P>
-<b>Note</b>: Elements in the first two-thirds of <i>ovector</i> that do not
-correspond to capturing parentheses in the pattern are never changed. That is,
-if a pattern contains <i>n</i> capturing parentheses, no more than
-<i>ovector[0]</i> to <i>ovector[2n+1]</i> are set by <b>pcre_exec()</b>. The other
-elements (in the first two-thirds) retain whatever values they previously had.
-</P>
-<P>
-Some convenience functions are provided for extracting the captured substrings
-as separate strings. These are described below.
-<a name="errorlist"></a></P>
-<br><b>
-Error return values from <b>pcre_exec()</b>
-</b><br>
-<P>
-If <b>pcre_exec()</b> fails, it returns a negative number. The following are
-defined in the header file:
-<pre>
- PCRE_ERROR_NOMATCH (-1)
-</pre>
-The subject string did not match the pattern.
-<pre>
- PCRE_ERROR_NULL (-2)
-</pre>
-Either <i>code</i> or <i>subject</i> was passed as NULL, or <i>ovector</i> was
-NULL and <i>ovecsize</i> was not zero.
-<pre>
- PCRE_ERROR_BADOPTION (-3)
-</pre>
-An unrecognized bit was set in the <i>options</i> argument.
-<pre>
- PCRE_ERROR_BADMAGIC (-4)
-</pre>
-PCRE stores a 4-byte "magic number" at the start of the compiled code, to catch
-the case when it is passed a junk pointer and to detect when a pattern that was
-compiled in an environment of one endianness is run in an environment with the
-other endianness. This is the error that PCRE gives when the magic number is
-not present.
-<pre>
- PCRE_ERROR_UNKNOWN_OPCODE (-5)
-</pre>
-While running the pattern match, an unknown item was encountered in the
-compiled pattern. This error could be caused by a bug in PCRE or by overwriting
-of the compiled pattern.
-<pre>
- PCRE_ERROR_NOMEMORY (-6)
-</pre>
-If a pattern contains back references, but the <i>ovector</i> that is passed to
-<b>pcre_exec()</b> is not big enough to remember the referenced substrings, PCRE
-gets a block of memory at the start of matching to use for this purpose. If the
-call via <b>pcre_malloc()</b> fails, this error is given. The memory is
-automatically freed at the end of matching.
-</P>
-<P>
-This error is also given if <b>pcre_stack_malloc()</b> fails in
-<b>pcre_exec()</b>. This can happen only when PCRE has been compiled with
-<b>--disable-stack-for-recursion</b>.
-<pre>
- PCRE_ERROR_NOSUBSTRING (-7)
-</pre>
-This error is used by the <b>pcre_copy_substring()</b>,
-<b>pcre_get_substring()</b>, and <b>pcre_get_substring_list()</b> functions (see
-below). It is never returned by <b>pcre_exec()</b>.
-<pre>
- PCRE_ERROR_MATCHLIMIT (-8)
-</pre>
-The backtracking limit, as specified by the <i>match_limit</i> field in a
-<b>pcre_extra</b> structure (or defaulted) was reached. See the description
-above.
-<pre>
- PCRE_ERROR_CALLOUT (-9)
-</pre>
-This error is never generated by <b>pcre_exec()</b> itself. It is provided for
-use by callout functions that want to yield a distinctive error code. See the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation for details.
-<pre>
- PCRE_ERROR_BADUTF8 (-10)
-</pre>
-A string that contains an invalid UTF-8 byte sequence was passed as a subject,
-and the PCRE_NO_UTF8_CHECK option was not set. If the size of the output vector
-(<i>ovecsize</i>) is at least 2, the byte offset to the start of the the invalid
-UTF-8 character is placed in the first element, and a reason code is placed in
-the second element. The reason codes are listed in the
-<a href="#badutf8reasons">following section.</a>
-For backward compatibility, if PCRE_PARTIAL_HARD is set and the problem is a
-truncated UTF-8 character at the end of the subject (reason codes 1 to 5),
-PCRE_ERROR_SHORTUTF8 is returned instead of PCRE_ERROR_BADUTF8.
-<pre>
- PCRE_ERROR_BADUTF8_OFFSET (-11)
-</pre>
-The UTF-8 byte sequence that was passed as a subject was checked and found to
-be valid (the PCRE_NO_UTF8_CHECK option was not set), but the value of
-<i>startoffset</i> did not point to the beginning of a UTF-8 character or the
-end of the subject.
-<pre>
- PCRE_ERROR_PARTIAL (-12)
-</pre>
-The subject string did not match, but it did match partially. See the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation for details of partial matching.
-<pre>
- PCRE_ERROR_BADPARTIAL (-13)
-</pre>
-This code is no longer in use. It was formerly returned when the PCRE_PARTIAL
-option was used with a compiled pattern containing items that were not
-supported for partial matching. From release 8.00 onwards, there are no
-restrictions on partial matching.
-<pre>
- PCRE_ERROR_INTERNAL (-14)
-</pre>
-An unexpected internal error has occurred. This error could be caused by a bug
-in PCRE or by overwriting of the compiled pattern.
-<pre>
- PCRE_ERROR_BADCOUNT (-15)
-</pre>
-This error is given if the value of the <i>ovecsize</i> argument is negative.
-<pre>
- PCRE_ERROR_RECURSIONLIMIT (-21)
-</pre>
-The internal recursion limit, as specified by the <i>match_limit_recursion</i>
-field in a <b>pcre_extra</b> structure (or defaulted) was reached. See the
-description above.
-<pre>
- PCRE_ERROR_BADNEWLINE (-23)
-</pre>
-An invalid combination of PCRE_NEWLINE_<i>xxx</i> options was given.
-<pre>
- PCRE_ERROR_BADOFFSET (-24)
-</pre>
-The value of <i>startoffset</i> was negative or greater than the length of the
-subject, that is, the value in <i>length</i>.
-<pre>
- PCRE_ERROR_SHORTUTF8 (-25)
-</pre>
-This error is returned instead of PCRE_ERROR_BADUTF8 when the subject string
-ends with a truncated UTF-8 character and the PCRE_PARTIAL_HARD option is set.
-Information about the failure is returned as for PCRE_ERROR_BADUTF8. It is in
-fact sufficient to detect this case, but this special error code for
-PCRE_PARTIAL_HARD precedes the implementation of returned information; it is
-retained for backwards compatibility.
-<pre>
- PCRE_ERROR_RECURSELOOP (-26)
-</pre>
-This error is returned when <b>pcre_exec()</b> detects a recursion loop within
-the pattern. Specifically, it means that either the whole pattern or a
-subpattern has been called recursively for the second time at the same position
-in the subject string. Some simple patterns that might do this are detected and
-faulted at compile time, but more complicated cases, in particular mutual
-recursions between two different subpatterns, cannot be detected until run
-time.
-<pre>
- PCRE_ERROR_JIT_STACKLIMIT (-27)
-</pre>
-This error is returned when a pattern that was successfully studied using the
-PCRE_STUDY_JIT_COMPILE option is being matched, but the memory available for
-the just-in-time processing stack is not large enough. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for more details.
-<pre>
- PCRE_ERROR_BADMODE (-28)
-</pre>
-This error is given if a pattern that was compiled by the 8-bit library is
-passed to a 16-bit library function, or vice versa.
-<pre>
- PCRE_ERROR_BADENDIANNESS (-29)
-</pre>
-This error is given if a pattern that was compiled and saved is reloaded on a
-host with different endianness. The utility function
-<b>pcre_pattern_to_host_byte_order()</b> can be used to convert such a pattern
-so that it runs on the new host.
-</P>
-<P>
-Error numbers -16 to -20 and -22 are not used by <b>pcre_exec()</b>.
-<a name="badutf8reasons"></a></P>
-<br><b>
-Reason codes for invalid UTF-8 strings
-</b><br>
-<P>
-This section applies only to the 8-bit library. The corresponding information
-for the 16-bit library is given in the
-<a href="pcre16.html"><b>pcre16</b></a>
-page.
-</P>
-<P>
-When <b>pcre_exec()</b> returns either PCRE_ERROR_BADUTF8 or
-PCRE_ERROR_SHORTUTF8, and the size of the output vector (<i>ovecsize</i>) is at
-least 2, the offset of the start of the invalid UTF-8 character is placed in
-the first output vector element (<i>ovector[0]</i>) and a reason code is placed
-in the second element (<i>ovector[1]</i>). The reason codes are given names in
-the <b>pcre.h</b> header file:
-<pre>
- PCRE_UTF8_ERR1
- PCRE_UTF8_ERR2
- PCRE_UTF8_ERR3
- PCRE_UTF8_ERR4
- PCRE_UTF8_ERR5
-</pre>
-The string ends with a truncated UTF-8 character; the code specifies how many
-bytes are missing (1 to 5). Although RFC 3629 restricts UTF-8 characters to be
-no longer than 4 bytes, the encoding scheme (originally defined by RFC 2279)
-allows for up to 6 bytes, and this is checked first; hence the possibility of
-4 or 5 missing bytes.
-<pre>
- PCRE_UTF8_ERR6
- PCRE_UTF8_ERR7
- PCRE_UTF8_ERR8
- PCRE_UTF8_ERR9
- PCRE_UTF8_ERR10
-</pre>
-The two most significant bits of the 2nd, 3rd, 4th, 5th, or 6th byte of the
-character do not have the binary value 0b10 (that is, either the most
-significant bit is 0, or the next bit is 1).
-<pre>
- PCRE_UTF8_ERR11
- PCRE_UTF8_ERR12
-</pre>
-A character that is valid by the RFC 2279 rules is either 5 or 6 bytes long;
-these code points are excluded by RFC 3629.
-<pre>
- PCRE_UTF8_ERR13
-</pre>
-A 4-byte character has a value greater than 0x10fff; these code points are
-excluded by RFC 3629.
-<pre>
- PCRE_UTF8_ERR14
-</pre>
-A 3-byte character has a value in the range 0xd800 to 0xdfff; this range of
-code points are reserved by RFC 3629 for use with UTF-16, and so are excluded
-from UTF-8.
-<pre>
- PCRE_UTF8_ERR15
- PCRE_UTF8_ERR16
- PCRE_UTF8_ERR17
- PCRE_UTF8_ERR18
- PCRE_UTF8_ERR19
-</pre>
-A 2-, 3-, 4-, 5-, or 6-byte character is "overlong", that is, it codes for a
-value that can be represented by fewer bytes, which is invalid. For example,
-the two bytes 0xc0, 0xae give the value 0x2e, whose correct coding uses just
-one byte.
-<pre>
- PCRE_UTF8_ERR20
-</pre>
-The two most significant bits of the first byte of a character have the binary
-value 0b10 (that is, the most significant bit is 1 and the second is 0). Such a
-byte can only validly occur as the second or subsequent byte of a multi-byte
-character.
-<pre>
- PCRE_UTF8_ERR21
-</pre>
-The first byte of a character has the value 0xfe or 0xff. These values can
-never occur in a valid UTF-8 string.
-</P>
-<br><a name="SEC18" href="#TOC1">EXTRACTING CAPTURED SUBSTRINGS BY NUMBER</a><br>
-<P>
-<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
-<b>int <i>buffersize</i>);</b>
-</P>
-<P>
-<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
-<b>const char **<i>stringptr</i>);</b>
-</P>
-<P>
-<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
-<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
-</P>
-<P>
-Captured substrings can be accessed directly by using the offsets returned by
-<b>pcre_exec()</b> in <i>ovector</i>. For convenience, the functions
-<b>pcre_copy_substring()</b>, <b>pcre_get_substring()</b>, and
-<b>pcre_get_substring_list()</b> are provided for extracting captured substrings
-as new, separate, zero-terminated strings. These functions identify substrings
-by number. The next section describes functions for extracting named
-substrings.
-</P>
-<P>
-A substring that contains a binary zero is correctly extracted and has a
-further zero added on the end, but the result is not, of course, a C string.
-However, you can process such a string by referring to the length that is
-returned by <b>pcre_copy_substring()</b> and <b>pcre_get_substring()</b>.
-Unfortunately, the interface to <b>pcre_get_substring_list()</b> is not adequate
-for handling strings containing binary zeros, because the end of the final
-string is not independently indicated.
-</P>
-<P>
-The first three arguments are the same for all three of these functions:
-<i>subject</i> is the subject string that has just been successfully matched,
-<i>ovector</i> is a pointer to the vector of integer offsets that was passed to
-<b>pcre_exec()</b>, and <i>stringcount</i> is the number of substrings that were
-captured by the match, including the substring that matched the entire regular
-expression. This is the value returned by <b>pcre_exec()</b> if it is greater
-than zero. If <b>pcre_exec()</b> returned zero, indicating that it ran out of
-space in <i>ovector</i>, the value passed as <i>stringcount</i> should be the
-number of elements in the vector divided by three.
-</P>
-<P>
-The functions <b>pcre_copy_substring()</b> and <b>pcre_get_substring()</b>
-extract a single substring, whose number is given as <i>stringnumber</i>. A
-value of zero extracts the substring that matched the entire pattern, whereas
-higher values extract the captured substrings. For <b>pcre_copy_substring()</b>,
-the string is placed in <i>buffer</i>, whose length is given by
-<i>buffersize</i>, while for <b>pcre_get_substring()</b> a new block of memory is
-obtained via <b>pcre_malloc</b>, and its address is returned via
-<i>stringptr</i>. The yield of the function is the length of the string, not
-including the terminating zero, or one of these error codes:
-<pre>
- PCRE_ERROR_NOMEMORY (-6)
-</pre>
-The buffer was too small for <b>pcre_copy_substring()</b>, or the attempt to get
-memory failed for <b>pcre_get_substring()</b>.
-<pre>
- PCRE_ERROR_NOSUBSTRING (-7)
-</pre>
-There is no substring whose number is <i>stringnumber</i>.
-</P>
-<P>
-The <b>pcre_get_substring_list()</b> function extracts all available substrings
-and builds a list of pointers to them. All this is done in a single block of
-memory that is obtained via <b>pcre_malloc</b>. The address of the memory block
-is returned via <i>listptr</i>, which is also the start of the list of string
-pointers. The end of the list is marked by a NULL pointer. The yield of the
-function is zero if all went well, or the error code
-<pre>
- PCRE_ERROR_NOMEMORY (-6)
-</pre>
-if the attempt to get the memory block failed.
-</P>
-<P>
-When any of these functions encounter a substring that is unset, which can
-happen when capturing subpattern number <i>n+1</i> matches some part of the
-subject, but subpattern <i>n</i> has not been used at all, they return an empty
-string. This can be distinguished from a genuine zero-length substring by
-inspecting the appropriate offset in <i>ovector</i>, which is negative for unset
-substrings.
-</P>
-<P>
-The two convenience functions <b>pcre_free_substring()</b> and
-<b>pcre_free_substring_list()</b> can be used to free the memory returned by
-a previous call of <b>pcre_get_substring()</b> or
-<b>pcre_get_substring_list()</b>, respectively. They do nothing more than call
-the function pointed to by <b>pcre_free</b>, which of course could be called
-directly from a C program. However, PCRE is used in some situations where it is
-linked via a special interface to another programming language that cannot use
-<b>pcre_free</b> directly; it is for these cases that the functions are
-provided.
-</P>
-<br><a name="SEC19" href="#TOC1">EXTRACTING CAPTURED SUBSTRINGS BY NAME</a><br>
-<P>
-<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
-<b>const char *<i>name</i>);</b>
-</P>
-<P>
-<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
-<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b>char *<i>buffer</i>, int <i>buffersize</i>);</b>
-</P>
-<P>
-<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
-<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
-<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
-<b>const char **<i>stringptr</i>);</b>
-</P>
-<P>
-To extract a substring by name, you first have to find associated number.
-For example, for this pattern
-<pre>
- (a+)b(?&#60;xxx&#62;\d+)...
-</pre>
-the number of the subpattern called "xxx" is 2. If the name is known to be
-unique (PCRE_DUPNAMES was not set), you can find the number from the name by
-calling <b>pcre_get_stringnumber()</b>. The first argument is the compiled
-pattern, and the second is the name. The yield of the function is the
-subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no subpattern of
-that name.
-</P>
-<P>
-Given the number, you can extract the substring directly, or use one of the
-functions described in the previous section. For convenience, there are also
-two functions that do the whole job.
-</P>
-<P>
-Most of the arguments of <b>pcre_copy_named_substring()</b> and
-<b>pcre_get_named_substring()</b> are the same as those for the similarly named
-functions that extract by number. As these are described in the previous
-section, they are not re-described here. There are just two differences:
-</P>
-<P>
-First, instead of a substring number, a substring name is given. Second, there
-is an extra argument, given at the start, which is a pointer to the compiled
-pattern. This is needed in order to gain access to the name-to-number
-translation table.
-</P>
-<P>
-These functions call <b>pcre_get_stringnumber()</b>, and if it succeeds, they
-then call <b>pcre_copy_substring()</b> or <b>pcre_get_substring()</b>, as
-appropriate. <b>NOTE:</b> If PCRE_DUPNAMES is set and there are duplicate names,
-the behaviour may not be what you want (see the next section).
-</P>
-<P>
-<b>Warning:</b> If the pattern uses the (?| feature to set up multiple
-subpatterns with the same number, as described in the
-<a href="pcrepattern.html#dupsubpatternnumber">section on duplicate subpattern numbers</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page, you cannot use names to distinguish the different subpatterns, because
-names are not included in the compiled code. The matching process uses only
-numbers. For this reason, the use of different names for subpatterns of the
-same number causes an error at compile time.
-</P>
-<br><a name="SEC20" href="#TOC1">DUPLICATE SUBPATTERN NAMES</a><br>
-<P>
-<b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b>
-<b>const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b>
-</P>
-<P>
-When a pattern is compiled with the PCRE_DUPNAMES option, names for subpatterns
-are not required to be unique. (Duplicate names are always allowed for
-subpatterns with the same number, created by using the (?| feature. Indeed, if
-such subpatterns are named, they are required to use the same names.)
-</P>
-<P>
-Normally, patterns with duplicate names are such that in any one match, only
-one of the named subpatterns participates. An example is shown in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-</P>
-<P>
-When duplicates are present, <b>pcre_copy_named_substring()</b> and
-<b>pcre_get_named_substring()</b> return the first substring corresponding to
-the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING (-7) is
-returned; no data is returned. The <b>pcre_get_stringnumber()</b> function
-returns one of the numbers that are associated with the name, but it is not
-defined which it is.
-</P>
-<P>
-If you want to get full details of all captured substrings for a given name,
-you must use the <b>pcre_get_stringtable_entries()</b> function. The first
-argument is the compiled pattern, and the second is the name. The third and
-fourth are pointers to variables which are updated by the function. After it
-has run, they point to the first and last entries in the name-to-number table
-for the given name. The function itself returns the length of each entry, or
-PCRE_ERROR_NOSUBSTRING (-7) if there are none. The format of the table is
-described above in the section entitled <i>Information about a pattern</i>
-<a href="#infoaboutpattern">above.</a>
-Given all the relevant entries for the name, you can extract each of their
-numbers, and hence the captured data, if any.
-</P>
-<br><a name="SEC21" href="#TOC1">FINDING ALL POSSIBLE MATCHES</a><br>
-<P>
-The traditional matching function uses a similar algorithm to Perl, which stops
-when it finds the first match, starting at a given point in the subject. If you
-want to find all possible matches, or the longest possible match, consider
-using the alternative matching function (see below) instead. If you cannot use
-the alternative function, but still need to find all possible matches, you
-can kludge it up by making use of the callout facility, which is described in
-the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-</P>
-<P>
-What you have to do is to insert a callout right at the end of the pattern.
-When your callout function is called, extract and save the current matched
-substring. Then return 1, which forces <b>pcre_exec()</b> to backtrack and try
-other alternatives. Ultimately, when it runs out of matches, <b>pcre_exec()</b>
-will yield PCRE_ERROR_NOMATCH.
-</P>
-<br><a name="SEC22" href="#TOC1">OBTAINING AN ESTIMATE OF STACK USAGE</a><br>
-<P>
-Matching certain patterns using <b>pcre_exec()</b> can use a lot of process
-stack, which in certain environments can be rather limited in size. Some users
-find it helpful to have an estimate of the amount of stack that is used by
-<b>pcre_exec()</b>, to help them set recursion limits, as described in the
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation. The estimate that is output by <b>pcretest</b> when called with
-the <b>-m</b> and <b>-C</b> options is obtained by calling <b>pcre_exec</b> with
-the values NULL, NULL, NULL, -999, and -999 for its first five arguments.
-</P>
-<P>
-Normally, if its first argument is NULL, <b>pcre_exec()</b> immediately returns
-the negative error code PCRE_ERROR_NULL, but with this special combination of
-arguments, it returns instead a negative number whose absolute value is the
-approximate stack frame size in bytes. (A negative number is used so that it is
-clear that no match has happened.) The value is approximate because in some
-cases, recursive calls to <b>pcre_exec()</b> occur when there are one or two
-additional variables on the stack.
-</P>
-<P>
-If PCRE has been compiled to use the heap instead of the stack for recursion,
-the value returned is the size of each block that is obtained from the heap.
-<a name="dfamatch"></a></P>
-<br><a name="SEC23" href="#TOC1">MATCHING A PATTERN: THE ALTERNATIVE FUNCTION</a><br>
-<P>
-<b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
-<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
-<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
-<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
-</P>
-<P>
-The function <b>pcre_dfa_exec()</b> is called to match a subject string against
-a compiled pattern, using a matching algorithm that scans the subject string
-just once, and does not backtrack. This has different characteristics to the
-normal algorithm, and is not compatible with Perl. Some of the features of PCRE
-patterns are not supported. Nevertheless, there are times when this kind of
-matching can be useful. For a discussion of the two matching algorithms, and a
-list of features that <b>pcre_dfa_exec()</b> does not support, see the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-documentation.
-</P>
-<P>
-The arguments for the <b>pcre_dfa_exec()</b> function are the same as for
-<b>pcre_exec()</b>, plus two extras. The <i>ovector</i> argument is used in a
-different way, and this is described below. The other common arguments are used
-in the same way as for <b>pcre_exec()</b>, so their description is not repeated
-here.
-</P>
-<P>
-The two additional arguments provide workspace for the function. The workspace
-vector should contain at least 20 elements. It is used for keeping track of
-multiple paths through the pattern tree. More workspace will be needed for
-patterns and subjects where there are a lot of potential matches.
-</P>
-<P>
-Here is an example of a simple call to <b>pcre_dfa_exec()</b>:
-<pre>
- int rc;
- int ovector[10];
- int wspace[20];
- rc = pcre_dfa_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 10, /* number of elements (NOT size in bytes) */
- wspace, /* working space vector */
- 20); /* number of elements (NOT size in bytes) */
-</PRE>
-</P>
-<br><b>
-Option bits for <b>pcre_dfa_exec()</b>
-</b><br>
-<P>
-The unused bits of the <i>options</i> argument for <b>pcre_dfa_exec()</b> must be
-zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_<i>xxx</i>,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
-PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF, PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE,
-PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART.
-All but the last four of these are exactly the same as for <b>pcre_exec()</b>,
-so their description is not repeated here.
-<pre>
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-</pre>
-These have the same general effect as they do for <b>pcre_exec()</b>, but the
-details are slightly different. When PCRE_PARTIAL_HARD is set for
-<b>pcre_dfa_exec()</b>, it returns PCRE_ERROR_PARTIAL if the end of the subject
-is reached and there is still at least one matching possibility that requires
-additional characters. This happens even if some complete matches have also
-been found. When PCRE_PARTIAL_SOFT is set, the return code PCRE_ERROR_NOMATCH
-is converted into PCRE_ERROR_PARTIAL if the end of the subject is reached,
-there have been no complete matches, but there is still at least one matching
-possibility. The portion of the string that was inspected when the longest
-partial match was found is set as the first matching string in both cases.
-There is a more detailed discussion of partial and multi-segment matching, with
-examples, in the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation.
-<pre>
- PCRE_DFA_SHORTEST
-</pre>
-Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to stop as
-soon as it has found one match. Because of the way the alternative algorithm
-works, this is necessarily the shortest possible match at the first possible
-matching point in the subject string.
-<pre>
- PCRE_DFA_RESTART
-</pre>
-When <b>pcre_dfa_exec()</b> returns a partial match, it is possible to call it
-again, with additional subject characters, and have it continue with the same
-match. The PCRE_DFA_RESTART option requests this action; when it is set, the
-<i>workspace</i> and <i>wscount</i> options must reference the same vector as
-before because data about the match so far is left in them after a partial
-match. There is more discussion of this facility in the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation.
-</P>
-<br><b>
-Successful returns from <b>pcre_dfa_exec()</b>
-</b><br>
-<P>
-When <b>pcre_dfa_exec()</b> succeeds, it may have matched more than one
-substring in the subject. Note, however, that all the matches from one run of
-the function start at the same point in the subject. The shorter matches are
-all initial substrings of the longer matches. For example, if the pattern
-<pre>
- &#60;.*&#62;
-</pre>
-is matched against the string
-<pre>
- This is &#60;something&#62; &#60;something else&#62; &#60;something further&#62; no more
-</pre>
-the three matched strings are
-<pre>
- &#60;something&#62;
- &#60;something&#62; &#60;something else&#62;
- &#60;something&#62; &#60;something else&#62; &#60;something further&#62;
-</pre>
-On success, the yield of the function is a number greater than zero, which is
-the number of matched substrings. The substrings themselves are returned in
-<i>ovector</i>. Each string uses two elements; the first is the offset to the
-start, and the second is the offset to the end. In fact, all the strings have
-the same start offset. (Space could have been saved by giving this only once,
-but it was decided to retain some compatibility with the way <b>pcre_exec()</b>
-returns data, even though the meaning of the strings is different.)
-</P>
-<P>
-The strings are returned in reverse order of length; that is, the longest
-matching string is given first. If there were too many matches to fit into
-<i>ovector</i>, the yield of the function is zero, and the vector is filled with
-the longest matches. Unlike <b>pcre_exec()</b>, <b>pcre_dfa_exec()</b> can use
-the entire <i>ovector</i> for returning matched strings.
-</P>
-<br><b>
-Error returns from <b>pcre_dfa_exec()</b>
-</b><br>
-<P>
-The <b>pcre_dfa_exec()</b> function returns a negative number when it fails.
-Many of the errors are the same as for <b>pcre_exec()</b>, and these are
-described
-<a href="#errorlist">above.</a>
-There are in addition the following errors that are specific to
-<b>pcre_dfa_exec()</b>:
-<pre>
- PCRE_ERROR_DFA_UITEM (-16)
-</pre>
-This return is given if <b>pcre_dfa_exec()</b> encounters an item in the pattern
-that it does not support, for instance, the use of \C or a back reference.
-<pre>
- PCRE_ERROR_DFA_UCOND (-17)
-</pre>
-This return is given if <b>pcre_dfa_exec()</b> encounters a condition item that
-uses a back reference for the condition, or a test for recursion in a specific
-group. These are not supported.
-<pre>
- PCRE_ERROR_DFA_UMLIMIT (-18)
-</pre>
-This return is given if <b>pcre_dfa_exec()</b> is called with an <i>extra</i>
-block that contains a setting of the <i>match_limit</i> or
-<i>match_limit_recursion</i> fields. This is not supported (these fields are
-meaningless for DFA matching).
-<pre>
- PCRE_ERROR_DFA_WSSIZE (-19)
-</pre>
-This return is given if <b>pcre_dfa_exec()</b> runs out of space in the
-<i>workspace</i> vector.
-<pre>
- PCRE_ERROR_DFA_RECURSE (-20)
-</pre>
-When a recursive subpattern is processed, the matching function calls itself
-recursively, using private vectors for <i>ovector</i> and <i>workspace</i>. This
-error is given if the output vector is not large enough. This should be
-extremely rare, as a vector of size 1000 is used.
-</P>
-<br><a name="SEC24" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcre16</b>(3), <b>pcrebuild</b>(3), <b>pcrecallout</b>(3), <b>pcrecpp(3)</b>(3),
-<b>pcrematching</b>(3), <b>pcrepartial</b>(3), <b>pcreposix</b>(3),
-<b>pcreprecompile</b>(3), <b>pcresample</b>(3), <b>pcrestack</b>(3).
-</P>
-<br><a name="SEC25" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC26" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 21 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrebuild.html b/src/third_party/pcre-8.30/doc/html/pcrebuild.html
deleted file mode 100644
index 8faed44a98a..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrebuild.html
+++ /dev/null
@@ -1,420 +0,0 @@
-<html>
-<head>
-<title>pcrebuild specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrebuild man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE BUILD-TIME OPTIONS</a>
-<li><a name="TOC2" href="#SEC2">BUILDING 8-BIT and 16-BIT LIBRARIES</a>
-<li><a name="TOC3" href="#SEC3">BUILDING SHARED AND STATIC LIBRARIES</a>
-<li><a name="TOC4" href="#SEC4">C++ SUPPORT</a>
-<li><a name="TOC5" href="#SEC5">UTF-8 and UTF-16 SUPPORT</a>
-<li><a name="TOC6" href="#SEC6">UNICODE CHARACTER PROPERTY SUPPORT</a>
-<li><a name="TOC7" href="#SEC7">JUST-IN-TIME COMPILER SUPPORT</a>
-<li><a name="TOC8" href="#SEC8">CODE VALUE OF NEWLINE</a>
-<li><a name="TOC9" href="#SEC9">WHAT \R MATCHES</a>
-<li><a name="TOC10" href="#SEC10">POSIX MALLOC USAGE</a>
-<li><a name="TOC11" href="#SEC11">HANDLING VERY LARGE PATTERNS</a>
-<li><a name="TOC12" href="#SEC12">AVOIDING EXCESSIVE STACK USAGE</a>
-<li><a name="TOC13" href="#SEC13">LIMITING PCRE RESOURCE USAGE</a>
-<li><a name="TOC14" href="#SEC14">CREATING CHARACTER TABLES AT BUILD TIME</a>
-<li><a name="TOC15" href="#SEC15">USING EBCDIC CODE</a>
-<li><a name="TOC16" href="#SEC16">PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT</a>
-<li><a name="TOC17" href="#SEC17">PCREGREP BUFFER SIZE</a>
-<li><a name="TOC18" href="#SEC18">PCRETEST OPTION FOR LIBREADLINE SUPPORT</a>
-<li><a name="TOC19" href="#SEC19">SEE ALSO</a>
-<li><a name="TOC20" href="#SEC20">AUTHOR</a>
-<li><a name="TOC21" href="#SEC21">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE BUILD-TIME OPTIONS</a><br>
-<P>
-This document describes the optional features of PCRE that can be selected when
-the library is compiled. It assumes use of the <b>configure</b> script, where
-the optional features are selected or deselected by providing options to
-<b>configure</b> before running the <b>make</b> command. However, the same
-options can be selected in both Unix-like and non-Unix-like environments using
-the GUI facility of <b>cmake-gui</b> if you are using <b>CMake</b> instead of
-<b>configure</b> to build PCRE.
-</P>
-<P>
-There is a lot more information about building PCRE in non-Unix-like
-environments in the file called <i>NON_UNIX_USE</i>, which is part of the PCRE
-distribution. You should consult this file as well as the <i>README</i> file if
-you are building in a non-Unix-like environment.
-</P>
-<P>
-The complete list of options for <b>configure</b> (which includes the standard
-ones such as the selection of the installation directory) can be obtained by
-running
-<pre>
- ./configure --help
-</pre>
-The following sections include descriptions of options whose names begin with
---enable or --disable. These settings specify changes to the defaults for the
-<b>configure</b> command. Because of the way that <b>configure</b> works,
---enable and --disable always come in pairs, so the complementary option always
-exists as well, but as it specifies the default, it is not described.
-</P>
-<br><a name="SEC2" href="#TOC1">BUILDING 8-BIT and 16-BIT LIBRARIES</a><br>
-<P>
-By default, a library called <b>libpcre</b> is built, containing functions that
-take string arguments contained in vectors of bytes, either as single-byte
-characters, or interpreted as UTF-8 strings. You can also build a separate
-library, called <b>libpcre16</b>, in which strings are contained in vectors of
-16-bit data units and interpreted either as single-unit characters or UTF-16
-strings, by adding
-<pre>
- --enable-pcre16
-</pre>
-to the <b>configure</b> command. If you do not want the 8-bit library, add
-<pre>
- --disable-pcre8
-</pre>
-as well. At least one of the two libraries must be built. Note that the C++ and
-POSIX wrappers are for the 8-bit library only, and that <b>pcregrep</b> is an
-8-bit program. None of these are built if you select only the 16-bit library.
-</P>
-<br><a name="SEC3" href="#TOC1">BUILDING SHARED AND STATIC LIBRARIES</a><br>
-<P>
-The PCRE building process uses <b>libtool</b> to build both shared and static
-Unix libraries by default. You can suppress one of these by adding one of
-<pre>
- --disable-shared
- --disable-static
-</pre>
-to the <b>configure</b> command, as required.
-</P>
-<br><a name="SEC4" href="#TOC1">C++ SUPPORT</a><br>
-<P>
-By default, if the 8-bit library is being built, the <b>configure</b> script
-will search for a C++ compiler and C++ header files. If it finds them, it
-automatically builds the C++ wrapper library (which supports only 8-bit
-strings). You can disable this by adding
-<pre>
- --disable-cpp
-</pre>
-to the <b>configure</b> command.
-</P>
-<br><a name="SEC5" href="#TOC1">UTF-8 and UTF-16 SUPPORT</a><br>
-<P>
-To build PCRE with support for UTF Unicode character strings, add
-<pre>
- --enable-utf
-</pre>
-to the <b>configure</b> command. This setting applies to both libraries, adding
-support for UTF-8 to the 8-bit library and support for UTF-16 to the 16-bit
-library. There are no separate options for enabling UTF-8 and UTF-16
-independently because that would allow ridiculous settings such as requesting
-UTF-16 support while building only the 8-bit library. It is not possible to
-build one library with UTF support and the other without in the same
-configuration. (For backwards compatibility, --enable-utf8 is a synonym of
---enable-utf.)
-</P>
-<P>
-Of itself, this setting does not make PCRE treat strings as UTF-8 or UTF-16. As
-well as compiling PCRE with this option, you also have have to set the
-PCRE_UTF8 or PCRE_UTF16 option when you call one of the pattern compiling
-functions.
-</P>
-<P>
-If you set --enable-utf when compiling in an EBCDIC environment, PCRE expects
-its input to be either ASCII or UTF-8 (depending on the runtime option). It is
-not possible to support both EBCDIC and UTF-8 codes in the same version of the
-library. Consequently, --enable-utf and --enable-ebcdic are mutually
-exclusive.
-</P>
-<br><a name="SEC6" href="#TOC1">UNICODE CHARACTER PROPERTY SUPPORT</a><br>
-<P>
-UTF support allows the libraries to process character codepoints up to 0x10ffff
-in the strings that they handle. On its own, however, it does not provide any
-facilities for accessing the properties of such characters. If you want to be
-able to use the pattern escapes \P, \p, and \X, which refer to Unicode
-character properties, you must add
-<pre>
- --enable-unicode-properties
-</pre>
-to the <b>configure</b> command. This implies UTF support, even if you have
-not explicitly requested it.
-</P>
-<P>
-Including Unicode property support adds around 30K of tables to the PCRE
-library. Only the general category properties such as <i>Lu</i> and <i>Nd</i> are
-supported. Details are given in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-</P>
-<br><a name="SEC7" href="#TOC1">JUST-IN-TIME COMPILER SUPPORT</a><br>
-<P>
-Just-in-time compiler support is included in the build by specifying
-<pre>
- --enable-jit
-</pre>
-This support is available only for certain hardware architectures. If this
-option is set for an unsupported architecture, a compile time error occurs.
-See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for a discussion of JIT usage. When JIT support is enabled,
-pcregrep automatically makes use of it, unless you add
-<pre>
- --disable-pcregrep-jit
-</pre>
-to the "configure" command.
-</P>
-<br><a name="SEC8" href="#TOC1">CODE VALUE OF NEWLINE</a><br>
-<P>
-By default, PCRE interprets the linefeed (LF) character as indicating the end
-of a line. This is the normal newline character on Unix-like systems. You can
-compile PCRE to use carriage return (CR) instead, by adding
-<pre>
- --enable-newline-is-cr
-</pre>
-to the <b>configure</b> command. There is also a --enable-newline-is-lf option,
-which explicitly specifies linefeed as the newline character.
-<br>
-<br>
-Alternatively, you can specify that line endings are to be indicated by the two
-character sequence CRLF. If you want this, add
-<pre>
- --enable-newline-is-crlf
-</pre>
-to the <b>configure</b> command. There is a fourth option, specified by
-<pre>
- --enable-newline-is-anycrlf
-</pre>
-which causes PCRE to recognize any of the three sequences CR, LF, or CRLF as
-indicating a line ending. Finally, a fifth option, specified by
-<pre>
- --enable-newline-is-any
-</pre>
-causes PCRE to recognize any Unicode newline sequence.
-</P>
-<P>
-Whatever line ending convention is selected when PCRE is built can be
-overridden when the library functions are called. At build time it is
-conventional to use the standard for your operating system.
-</P>
-<br><a name="SEC9" href="#TOC1">WHAT \R MATCHES</a><br>
-<P>
-By default, the sequence \R in a pattern matches any Unicode newline sequence,
-whatever has been selected as the line ending sequence. If you specify
-<pre>
- --enable-bsr-anycrlf
-</pre>
-the default is changed so that \R matches only CR, LF, or CRLF. Whatever is
-selected when PCRE is built can be overridden when the library functions are
-called.
-</P>
-<br><a name="SEC10" href="#TOC1">POSIX MALLOC USAGE</a><br>
-<P>
-When the 8-bit library is called through the POSIX interface (see the
-<a href="pcreposix.html"><b>pcreposix</b></a>
-documentation), additional working storage is required for holding the pointers
-to capturing substrings, because PCRE requires three integers per substring,
-whereas the POSIX interface provides only two. If the number of expected
-substrings is small, the wrapper function uses space on the stack, because this
-is faster than using <b>malloc()</b> for each call. The default threshold above
-which the stack is no longer used is 10; it can be changed by adding a setting
-such as
-<pre>
- --with-posix-malloc-threshold=20
-</pre>
-to the <b>configure</b> command.
-</P>
-<br><a name="SEC11" href="#TOC1">HANDLING VERY LARGE PATTERNS</a><br>
-<P>
-Within a compiled pattern, offset values are used to point from one part to
-another (for example, from an opening parenthesis to an alternation
-metacharacter). By default, two-byte values are used for these offsets, leading
-to a maximum size for a compiled pattern of around 64K. This is sufficient to
-handle all but the most gigantic patterns. Nevertheless, some people do want to
-process truly enormous patterns, so it is possible to compile PCRE to use
-three-byte or four-byte offsets by adding a setting such as
-<pre>
- --with-link-size=3
-</pre>
-to the <b>configure</b> command. The value given must be 2, 3, or 4. For the
-16-bit library, a value of 3 is rounded up to 4. Using longer offsets slows
-down the operation of PCRE because it has to load additional data when handling
-them.
-</P>
-<br><a name="SEC12" href="#TOC1">AVOIDING EXCESSIVE STACK USAGE</a><br>
-<P>
-When matching with the <b>pcre_exec()</b> function, PCRE implements backtracking
-by making recursive calls to an internal function called <b>match()</b>. In
-environments where the size of the stack is limited, this can severely limit
-PCRE's operation. (The Unix environment does not usually suffer from this
-problem, but it may sometimes be necessary to increase the maximum stack size.
-There is a discussion in the
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation.) An alternative approach to recursion that uses memory from the
-heap to remember data, instead of using recursive function calls, has been
-implemented to work round the problem of limited stack size. If you want to
-build a version of PCRE that works this way, add
-<pre>
- --disable-stack-for-recursion
-</pre>
-to the <b>configure</b> command. With this configuration, PCRE will use the
-<b>pcre_stack_malloc</b> and <b>pcre_stack_free</b> variables to call memory
-management functions. By default these point to <b>malloc()</b> and
-<b>free()</b>, but you can replace the pointers so that your own functions are
-used instead.
-</P>
-<P>
-Separate functions are provided rather than using <b>pcre_malloc</b> and
-<b>pcre_free</b> because the usage is very predictable: the block sizes
-requested are always the same, and the blocks are always freed in reverse
-order. A calling program might be able to implement optimized functions that
-perform better than <b>malloc()</b> and <b>free()</b>. PCRE runs noticeably more
-slowly when built in this way. This option affects only the <b>pcre_exec()</b>
-function; it is not relevant for <b>pcre_dfa_exec()</b>.
-</P>
-<br><a name="SEC13" href="#TOC1">LIMITING PCRE RESOURCE USAGE</a><br>
-<P>
-Internally, PCRE has a function called <b>match()</b>, which it calls repeatedly
-(sometimes recursively) when matching a pattern with the <b>pcre_exec()</b>
-function. By controlling the maximum number of times this function may be
-called during a single matching operation, a limit can be placed on the
-resources used by a single call to <b>pcre_exec()</b>. The limit can be changed
-at run time, as described in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation. The default is 10 million, but this can be changed by adding a
-setting such as
-<pre>
- --with-match-limit=500000
-</pre>
-to the <b>configure</b> command. This setting has no effect on the
-<b>pcre_dfa_exec()</b> matching function.
-</P>
-<P>
-In some environments it is desirable to limit the depth of recursive calls of
-<b>match()</b> more strictly than the total number of calls, in order to
-restrict the maximum amount of stack (or heap, if --disable-stack-for-recursion
-is specified) that is used. A second limit controls this; it defaults to the
-value that is set for --with-match-limit, which imposes no additional
-constraints. However, you can set a lower limit by adding, for example,
-<pre>
- --with-match-limit-recursion=10000
-</pre>
-to the <b>configure</b> command. This value can also be overridden at run time.
-</P>
-<br><a name="SEC14" href="#TOC1">CREATING CHARACTER TABLES AT BUILD TIME</a><br>
-<P>
-PCRE uses fixed tables for processing characters whose code values are less
-than 256. By default, PCRE is built with a set of tables that are distributed
-in the file <i>pcre_chartables.c.dist</i>. These tables are for ASCII codes
-only. If you add
-<pre>
- --enable-rebuild-chartables
-</pre>
-to the <b>configure</b> command, the distributed tables are no longer used.
-Instead, a program called <b>dftables</b> is compiled and run. This outputs the
-source for new set of tables, created in the default locale of your C runtime
-system. (This method of replacing the tables does not work if you are cross
-compiling, because <b>dftables</b> is run on the local host. If you need to
-create alternative tables when cross compiling, you will have to do so "by
-hand".)
-</P>
-<br><a name="SEC15" href="#TOC1">USING EBCDIC CODE</a><br>
-<P>
-PCRE assumes by default that it will run in an environment where the character
-code is ASCII (or Unicode, which is a superset of ASCII). This is the case for
-most computer operating systems. PCRE can, however, be compiled to run in an
-EBCDIC environment by adding
-<pre>
- --enable-ebcdic
-</pre>
-to the <b>configure</b> command. This setting implies
---enable-rebuild-chartables. You should only use it if you know that you are in
-an EBCDIC environment (for example, an IBM mainframe operating system). The
---enable-ebcdic option is incompatible with --enable-utf.
-</P>
-<br><a name="SEC16" href="#TOC1">PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT</a><br>
-<P>
-By default, <b>pcregrep</b> reads all files as plain text. You can build it so
-that it recognizes files whose names end in <b>.gz</b> or <b>.bz2</b>, and reads
-them with <b>libz</b> or <b>libbz2</b>, respectively, by adding one or both of
-<pre>
- --enable-pcregrep-libz
- --enable-pcregrep-libbz2
-</pre>
-to the <b>configure</b> command. These options naturally require that the
-relevant libraries are installed on your system. Configuration will fail if
-they are not.
-</P>
-<br><a name="SEC17" href="#TOC1">PCREGREP BUFFER SIZE</a><br>
-<P>
-<b>pcregrep</b> uses an internal buffer to hold a "window" on the file it is
-scanning, in order to be able to output "before" and "after" lines when it
-finds a match. The size of the buffer is controlled by a parameter whose
-default value is 20K. The buffer itself is three times this size, but because
-of the way it is used for holding "before" lines, the longest line that is
-guaranteed to be processable is the parameter size. You can change the default
-parameter value by adding, for example,
-<pre>
- --with-pcregrep-bufsize=50K
-</pre>
-to the <b>configure</b> command. The caller of \fPpcregrep\fP can, however,
-override this value by specifying a run-time option.
-</P>
-<br><a name="SEC18" href="#TOC1">PCRETEST OPTION FOR LIBREADLINE SUPPORT</a><br>
-<P>
-If you add
-<pre>
- --enable-pcretest-libreadline
-</pre>
-to the <b>configure</b> command, <b>pcretest</b> is linked with the
-<b>libreadline</b> library, and when its input is from a terminal, it reads it
-using the <b>readline()</b> function. This provides line-editing and history
-facilities. Note that <b>libreadline</b> is GPL-licensed, so if you distribute a
-binary of <b>pcretest</b> linked in this way, there may be licensing issues.
-</P>
-<P>
-Setting this option causes the <b>-lreadline</b> option to be added to the
-<b>pcretest</b> build. In many operating environments with a sytem-installed
-<b>libreadline</b> this is sufficient. However, in some environments (e.g.
-if an unmodified distribution version of readline is in use), some extra
-configuration may be necessary. The INSTALL file for <b>libreadline</b> says
-this:
-<pre>
- "Readline uses the termcap functions, but does not link with the
- termcap or curses library itself, allowing applications which link
- with readline the to choose an appropriate library."
-</pre>
-If your environment has not been set up so that an appropriate library is
-automatically included, you may need to add something like
-<pre>
- LIBS="-ncurses"
-</pre>
-immediately before the <b>configure</b> command.
-</P>
-<br><a name="SEC19" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcreapi</b>(3), <b>pcre16</b>, <b>pcre_config</b>(3).
-</P>
-<br><a name="SEC20" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC21" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 07 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrecallout.html b/src/third_party/pcre-8.30/doc/html/pcrecallout.html
deleted file mode 100644
index 8076cee46f9..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrecallout.html
+++ /dev/null
@@ -1,232 +0,0 @@
-<html>
-<head>
-<title>pcrecallout specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrecallout man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE CALLOUTS</a>
-<li><a name="TOC2" href="#SEC2">MISSING CALLOUTS</a>
-<li><a name="TOC3" href="#SEC3">THE CALLOUT INTERFACE</a>
-<li><a name="TOC4" href="#SEC4">RETURN VALUES</a>
-<li><a name="TOC5" href="#SEC5">AUTHOR</a>
-<li><a name="TOC6" href="#SEC6">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE CALLOUTS</a><br>
-<P>
-<b>int (*pcre_callout)(pcre_callout_block *);</b>
-</P>
-<P>
-<b>int (*pcre16_callout)(pcre16_callout_block *);</b>
-</P>
-<P>
-PCRE provides a feature called "callout", which is a means of temporarily
-passing control to the caller of PCRE in the middle of pattern matching. The
-caller of PCRE provides an external function by putting its entry point in the
-global variable <i>pcre_callout</i> (<i>pcre16_callout</i> for the 16-bit
-library). By default, this variable contains NULL, which disables all calling
-out.
-</P>
-<P>
-Within a regular expression, (?C) indicates the points at which the external
-function is to be called. Different callout points can be identified by putting
-a number less than 256 after the letter C. The default value is zero.
-For example, this pattern has two callout points:
-<pre>
- (?C1)abc(?C2)def
-</pre>
-If the PCRE_AUTO_CALLOUT option bit is set when a pattern is compiled, PCRE
-automatically inserts callouts, all with number 255, before each item in the
-pattern. For example, if PCRE_AUTO_CALLOUT is used with the pattern
-<pre>
- A(\d{2}|--)
-</pre>
-it is processed as if it were
-<br>
-<br>
-(?C255)A(?C255)((?C255)\d{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
-<br>
-<br>
-Notice that there is a callout before and after each parenthesis and
-alternation bar. Automatic callouts can be used for tracking the progress of
-pattern matching. The
-<a href="pcretest.html"><b>pcretest</b></a>
-command has an option that sets automatic callouts; when it is used, the output
-indicates how the pattern is matched. This is useful information when you are
-trying to optimize the performance of a particular pattern.
-</P>
-<P>
-The use of callouts in a pattern makes it ineligible for optimization by the
-just-in-time compiler. Studying such a pattern with the PCRE_STUDY_JIT_COMPILE
-option always fails.
-</P>
-<br><a name="SEC2" href="#TOC1">MISSING CALLOUTS</a><br>
-<P>
-You should be aware that, because of optimizations in the way PCRE matches
-patterns by default, callouts sometimes do not happen. For example, if the
-pattern is
-<pre>
- ab(?C4)cd
-</pre>
-PCRE knows that any matching string must contain the letter "d". If the subject
-string is "abyz", the lack of "d" means that matching doesn't ever start, and
-the callout is never reached. However, with "abyd", though the result is still
-no match, the callout is obeyed.
-</P>
-<P>
-If the pattern is studied, PCRE knows the minimum length of a matching string,
-and will immediately give a "no match" return without actually running a match
-if the subject is not long enough, or, for unanchored patterns, if it has
-been scanned far enough.
-</P>
-<P>
-You can disable these optimizations by passing the PCRE_NO_START_OPTIMIZE
-option to the matching function, or by starting the pattern with
-(*NO_START_OPT). This slows down the matching process, but does ensure that
-callouts such as the example above are obeyed.
-</P>
-<br><a name="SEC3" href="#TOC1">THE CALLOUT INTERFACE</a><br>
-<P>
-During matching, when PCRE reaches a callout point, the external function
-defined by <i>pcre_callout</i> or <i>pcre16_callout</i> is called (if it is set).
-This applies to both normal and DFA matching. The only argument to the callout
-function is a pointer to a <b>pcre_callout</b> or <b>pcre16_callout</b> block.
-These structures contains the following fields:
-<pre>
- int <i>version</i>;
- int <i>callout_number</i>;
- int *<i>offset_vector</i>;
- const char *<i>subject</i>; (8-bit version)
- PCRE_SPTR16 <i>subject</i>; (16-bit version)
- int <i>subject_length</i>;
- int <i>start_match</i>;
- int <i>current_position</i>;
- int <i>capture_top</i>;
- int <i>capture_last</i>;
- void *<i>callout_data</i>;
- int <i>pattern_position</i>;
- int <i>next_item_length</i>;
- const unsigned char *<i>mark</i>; (8-bit version)
- const PCRE_UCHAR16 *<i>mark</i>; (16-bit version)
-</pre>
-The <i>version</i> field is an integer containing the version number of the
-block format. The initial version was 0; the current version is 2. The version
-number will change again in future if additional fields are added, but the
-intention is never to remove any of the existing fields.
-</P>
-<P>
-The <i>callout_number</i> field contains the number of the callout, as compiled
-into the pattern (that is, the number after ?C for manual callouts, and 255 for
-automatically generated callouts).
-</P>
-<P>
-The <i>offset_vector</i> field is a pointer to the vector of offsets that was
-passed by the caller to the matching function. When <b>pcre_exec()</b> or
-<b>pcre16_exec()</b> is used, the contents can be inspected, in order to extract
-substrings that have been matched so far, in the same way as for extracting
-substrings after a match has completed. For the DFA matching functions, this
-field is not useful.
-</P>
-<P>
-The <i>subject</i> and <i>subject_length</i> fields contain copies of the values
-that were passed to the matching function.
-</P>
-<P>
-The <i>start_match</i> field normally contains the offset within the subject at
-which the current match attempt started. However, if the escape sequence \K
-has been encountered, this value is changed to reflect the modified starting
-point. If the pattern is not anchored, the callout function may be called
-several times from the same point in the pattern for different starting points
-in the subject.
-</P>
-<P>
-The <i>current_position</i> field contains the offset within the subject of the
-current match pointer.
-</P>
-<P>
-When the <b>pcre_exec()</b> or <b>pcre16_exec()</b> is used, the
-<i>capture_top</i> field contains one more than the number of the highest
-numbered captured substring so far. If no substrings have been captured, the
-value of <i>capture_top</i> is one. This is always the case when the DFA
-functions are used, because they do not support captured substrings.
-</P>
-<P>
-The <i>capture_last</i> field contains the number of the most recently captured
-substring. If no substrings have been captured, its value is -1. This is always
-the case for the DFA matching functions.
-</P>
-<P>
-The <i>callout_data</i> field contains a value that is passed to a matching
-function specifically so that it can be passed back in callouts. It is passed
-in the <i>callout_data</i> field of a <b>pcre_extra</b> or <b>pcre16_extra</b>
-data structure. If no such data was passed, the value of <i>callout_data</i> in
-a callout block is NULL. There is a description of the <b>pcre_extra</b>
-structure in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<P>
-The <i>pattern_position</i> field is present from version 1 of the callout
-structure. It contains the offset to the next item to be matched in the pattern
-string.
-</P>
-<P>
-The <i>next_item_length</i> field is present from version 1 of the callout
-structure. It contains the length of the next item to be matched in the pattern
-string. When the callout immediately precedes an alternation bar, a closing
-parenthesis, or the end of the pattern, the length is zero. When the callout
-precedes an opening parenthesis, the length is that of the entire subpattern.
-</P>
-<P>
-The <i>pattern_position</i> and <i>next_item_length</i> fields are intended to
-help in distinguishing between different automatic callouts, which all have the
-same callout number. However, they are set for all callouts.
-</P>
-<P>
-The <i>mark</i> field is present from version 2 of the callout structure. In
-callouts from <b>pcre_exec()</b> or <b>pcre16_exec()</b> it contains a pointer to
-the zero-terminated name of the most recently passed (*MARK), (*PRUNE), or
-(*THEN) item in the match, or NULL if no such items have been passed. Instances
-of (*PRUNE) or (*THEN) without a name do not obliterate a previous (*MARK). In
-callouts from the DFA matching functions this field always contains NULL.
-</P>
-<br><a name="SEC4" href="#TOC1">RETURN VALUES</a><br>
-<P>
-The external callout function returns an integer to PCRE. If the value is zero,
-matching proceeds as normal. If the value is greater than zero, matching fails
-at the current point, but the testing of other matching possibilities goes
-ahead, just as if a lookahead assertion had failed. If the value is less than
-zero, the match is abandoned, the matching function returns the negative value.
-</P>
-<P>
-Negative values should normally be chosen from the set of PCRE_ERROR_xxx
-values. In particular, PCRE_ERROR_NOMATCH forces a standard "no match" failure.
-The error number PCRE_ERROR_CALLOUT is reserved for use by callout functions;
-it will never be used by PCRE itself.
-</P>
-<br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC6" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 08 Janurary 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrecompat.html b/src/third_party/pcre-8.30/doc/html/pcrecompat.html
deleted file mode 100644
index 740f0fe83b9..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrecompat.html
+++ /dev/null
@@ -1,212 +0,0 @@
-<html>
-<head>
-<title>pcrecompat specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrecompat man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-DIFFERENCES BETWEEN PCRE AND PERL
-</b><br>
-<P>
-This document describes the differences in the ways that PCRE and Perl handle
-regular expressions. The differences described here are with respect to Perl
-versions 5.10 and above.
-</P>
-<P>
-1. PCRE has only a subset of Perl's Unicode support. Details of what it does
-have are given in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page.
-</P>
-<P>
-2. PCRE allows repeat quantifiers only on parenthesized assertions, but they do
-not mean what you might think. For example, (?!a){3} does not assert that the
-next three characters are not "a". It just asserts that the next character is
-not "a" three times (in principle: PCRE optimizes this to run the assertion
-just once). Perl allows repeat quantifiers on other assertions such as \b, but
-these do not seem to have any use.
-</P>
-<P>
-3. Capturing subpatterns that occur inside negative lookahead assertions are
-counted, but their entries in the offsets vector are never set. Perl sets its
-numerical variables from any such patterns that are matched before the
-assertion fails to match something (thereby succeeding), but only if the
-negative lookahead assertion contains just one branch.
-</P>
-<P>
-4. Though binary zero characters are supported in the subject string, they are
-not allowed in a pattern string because it is passed as a normal C string,
-terminated by zero. The escape sequence \0 can be used in the pattern to
-represent a binary zero.
-</P>
-<P>
-5. The following Perl escape sequences are not supported: \l, \u, \L,
-\U, and \N when followed by a character name or Unicode value. (\N on its
-own, matching a non-newline character, is supported.) In fact these are
-implemented by Perl's general string-handling and are not part of its pattern
-matching engine. If any of these are encountered by PCRE, an error is
-generated by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set,
-\U and \u are interpreted as JavaScript interprets them.
-</P>
-<P>
-6. The Perl escape sequences \p, \P, and \X are supported only if PCRE is
-built with Unicode character property support. The properties that can be
-tested with \p and \P are limited to the general category properties such as
-Lu and Nd, script names such as Greek or Han, and the derived properties Any
-and L&. PCRE does support the Cs (surrogate) property, which Perl does not; the
-Perl documentation says "Because Perl hides the need for the user to understand
-the internal representation of Unicode characters, there is no need to
-implement the somewhat messy concept of surrogates."
-</P>
-<P>
-7. PCRE implements a simpler version of \X than Perl, which changed to make
-\X match what Unicode calls an "extended grapheme cluster". This is more
-complicated than an extended Unicode sequence, which is what PCRE matches.
-</P>
-<P>
-8. PCRE does support the \Q...\E escape for quoting substrings. Characters in
-between are treated as literals. This is slightly different from Perl in that $
-and @ are also handled as literals inside the quotes. In Perl, they cause
-variable interpolation (but of course PCRE does not have variables). Note the
-following examples:
-<pre>
- Pattern PCRE matches Perl matches
-
- \Qabc$xyz\E abc$xyz abc followed by the contents of $xyz
- \Qabc\$xyz\E abc\$xyz abc\$xyz
- \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
-</pre>
-The \Q...\E sequence is recognized both inside and outside character classes.
-</P>
-<P>
-9. Fairly obviously, PCRE does not support the (?{code}) and (??{code})
-constructions. However, there is support for recursive patterns. This is not
-available in Perl 5.8, but it is in Perl 5.10. Also, the PCRE "callout"
-feature allows an external function to be called during pattern matching. See
-the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation for details.
-</P>
-<P>
-10. Subpatterns that are called as subroutines (whether or not recursively) are
-always treated as atomic groups in PCRE. This is like Python, but unlike Perl.
-Captured values that are set outside a subroutine call can be reference from
-inside in PCRE, but not in Perl. There is a discussion that explains these
-differences in more detail in the
-<a href="pcrepattern.html#recursiondifference">section on recursion differences from Perl</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-page.
-</P>
-<P>
-11. If (*THEN) is present in a group that is called as a subroutine, its action
-is limited to that group, even if the group does not contain any | characters.
-</P>
-<P>
-12. There are some differences that are concerned with the settings of captured
-strings when part of a pattern is repeated. For example, matching "aba" against
-the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b".
-</P>
-<P>
-13. PCRE's handling of duplicate subpattern numbers and duplicate subpattern
-names is not as general as Perl's. This is a consequence of the fact the PCRE
-works internally just with numbers, using an external table to translate
-between numbers and names. In particular, a pattern such as (?|(?&#60;a&#62;A)|(?&#60;b)B),
-where the two capturing parentheses have the same number but different names,
-is not supported, and causes an error at compile time. If it were allowed, it
-would not be possible to distinguish which parentheses matched, because both
-names map to capturing subpattern number 1. To avoid this confusing situation,
-an error is given at compile time.
-</P>
-<P>
-14. Perl recognizes comments in some places that PCRE does not, for example,
-between the ( and ? at the start of a subpattern. If the /x modifier is set,
-Perl allows whitespace between ( and ? but PCRE never does, even if the
-PCRE_EXTENDED option is set.
-</P>
-<P>
-15. PCRE provides some extensions to the Perl regular expression facilities.
-Perl 5.10 includes new features that are not in earlier versions of Perl, some
-of which (such as named parentheses) have been in PCRE for some time. This list
-is with respect to Perl 5.10:
-<br>
-<br>
-(a) Although lookbehind assertions in PCRE must match fixed length strings,
-each alternative branch of a lookbehind assertion can match a different length
-of string. Perl requires them all to have the same length.
-<br>
-<br>
-(b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
-meta-character matches only at the very end of the string.
-<br>
-<br>
-(c) If PCRE_EXTRA is set, a backslash followed by a letter with no special
-meaning is faulted. Otherwise, like Perl, the backslash is quietly ignored.
-(Perl can be made to issue a warning.)
-<br>
-<br>
-(d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is
-inverted, that is, by default they are not greedy, but if followed by a
-question mark they are.
-<br>
-<br>
-(e) PCRE_ANCHORED can be used at matching time to force a pattern to be tried
-only at the first matching position in the subject string.
-<br>
-<br>
-(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, and
-PCRE_NO_AUTO_CAPTURE options for <b>pcre_exec()</b> have no Perl equivalents.
-<br>
-<br>
-(g) The \R escape sequence can be restricted to match only CR, LF, or CRLF
-by the PCRE_BSR_ANYCRLF option.
-<br>
-<br>
-(h) The callout facility is PCRE-specific.
-<br>
-<br>
-(i) The partial matching facility is PCRE-specific.
-<br>
-<br>
-(j) Patterns compiled by PCRE can be saved and re-used at a later time, even on
-different hosts that have the other endianness. However, this does not apply to
-optimized data created by the just-in-time compiler.
-<br>
-<br>
-(k) The alternative matching functions (<b>pcre_dfa_exec()</b> and
-<b>pcre16_dfa_exec()</b>) match in a different way and are not Perl-compatible.
-<br>
-<br>
-(l) PCRE recognizes some special sequences such as (*CR) at the start of
-a pattern that set overall options that cannot be changed within the pattern.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 08 Januray 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrecpp.html b/src/third_party/pcre-8.30/doc/html/pcrecpp.html
deleted file mode 100644
index 06518da1752..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrecpp.html
+++ /dev/null
@@ -1,368 +0,0 @@
-<html>
-<head>
-<title>pcrecpp specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrecpp man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS OF C++ WRAPPER</a>
-<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
-<li><a name="TOC3" href="#SEC3">MATCHING INTERFACE</a>
-<li><a name="TOC4" href="#SEC4">QUOTING METACHARACTERS</a>
-<li><a name="TOC5" href="#SEC5">PARTIAL MATCHES</a>
-<li><a name="TOC6" href="#SEC6">UTF-8 AND THE MATCHING INTERFACE</a>
-<li><a name="TOC7" href="#SEC7">PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE</a>
-<li><a name="TOC8" href="#SEC8">SCANNING TEXT INCREMENTALLY</a>
-<li><a name="TOC9" href="#SEC9">PARSING HEX/OCTAL/C-RADIX NUMBERS</a>
-<li><a name="TOC10" href="#SEC10">REPLACING PARTS OF STRINGS</a>
-<li><a name="TOC11" href="#SEC11">AUTHOR</a>
-<li><a name="TOC12" href="#SEC12">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS OF C++ WRAPPER</a><br>
-<P>
-<b>#include &#60;pcrecpp.h&#62;</b>
-</P>
-<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
-<P>
-The C++ wrapper for PCRE was provided by Google Inc. Some additional
-functionality was added by Giuseppe Maxia. This brief man page was constructed
-from the notes in the <i>pcrecpp.h</i> file, which should be consulted for
-further details. Note that the C++ wrapper supports only the original 8-bit
-PCRE library. There is no 16-bit support at present.
-</P>
-<br><a name="SEC3" href="#TOC1">MATCHING INTERFACE</a><br>
-<P>
-The "FullMatch" operation checks that supplied text matches a supplied pattern
-exactly. If pointer arguments are supplied, it copies matched sub-strings that
-match sub-patterns into them.
-<pre>
- Example: successful match
- pcrecpp::RE re("h.*o");
- re.FullMatch("hello");
-
- Example: unsuccessful match (requires full match):
- pcrecpp::RE re("e");
- !re.FullMatch("hello");
-
- Example: creating a temporary RE object:
- pcrecpp::RE("h.*o").FullMatch("hello");
-</pre>
-You can pass in a "const char*" or a "string" for "text". The examples below
-tend to use a const char*. You can, as in the different examples above, store
-the RE object explicitly in a variable or use a temporary RE object. The
-examples below use one mode or the other arbitrarily. Either could correctly be
-used for any of these examples.
-</P>
-<P>
-You must supply extra pointer arguments to extract matched subpieces.
-<pre>
- Example: extracts "ruby" into "s" and 1234 into "i"
- int i;
- string s;
- pcrecpp::RE re("(\\w+):(\\d+)");
- re.FullMatch("ruby:1234", &s, &i);
-
- Example: does not try to extract any extra sub-patterns
- re.FullMatch("ruby:1234", &s);
-
- Example: does not try to extract into NULL
- re.FullMatch("ruby:1234", NULL, &i);
-
- Example: integer overflow causes failure
- !re.FullMatch("ruby:1234567891234", NULL, &i);
-
- Example: fails because there aren't enough sub-patterns:
- !pcrecpp::RE("\\w+:\\d+").FullMatch("ruby:1234", &s);
-
- Example: fails because string cannot be stored in integer
- !pcrecpp::RE("(.*)").FullMatch("ruby", &i);
-</pre>
-The provided pointer arguments can be pointers to any scalar numeric
-type, or one of:
-<pre>
- string (matched piece is copied to string)
- StringPiece (StringPiece is mutated to point to matched piece)
- T (where "bool T::ParseFrom(const char*, int)" exists)
- NULL (the corresponding matched sub-pattern is not copied)
-</pre>
-The function returns true iff all of the following conditions are satisfied:
-<pre>
- a. "text" matches "pattern" exactly;
-
- b. The number of matched sub-patterns is &#62;= number of supplied
- pointers;
-
- c. The "i"th argument has a suitable type for holding the
- string captured as the "i"th sub-pattern. If you pass in
- void * NULL for the "i"th argument, or a non-void * NULL
- of the correct type, or pass fewer arguments than the
- number of sub-patterns, "i"th captured sub-pattern is
- ignored.
-</pre>
-CAVEAT: An optional sub-pattern that does not exist in the matched
-string is assigned the empty string. Therefore, the following will
-return false (because the empty string is not a valid number):
-<pre>
- int number;
- pcrecpp::RE::FullMatch("abc", "[a-z]+(\\d+)?", &number);
-</pre>
-The matching interface supports at most 16 arguments per call.
-If you need more, consider using the more general interface
-<b>pcrecpp::RE::DoMatch</b>. See <b>pcrecpp.h</b> for the signature for
-<b>DoMatch</b>.
-</P>
-<P>
-NOTE: Do not use <b>no_arg</b>, which is used internally to mark the end of a
-list of optional arguments, as a placeholder for missing arguments, as this can
-lead to segfaults.
-</P>
-<br><a name="SEC4" href="#TOC1">QUOTING METACHARACTERS</a><br>
-<P>
-You can use the "QuoteMeta" operation to insert backslashes before all
-potentially meaningful characters in a string. The returned string, used as a
-regular expression, will exactly match the original string.
-<pre>
- Example:
- string quoted = RE::QuoteMeta(unquoted);
-</pre>
-Note that it's legal to escape a character even if it has no special meaning in
-a regular expression -- so this function does that. (This also makes it
-identical to the perl function of the same name; see "perldoc -f quotemeta".)
-For example, "1.5-2.0?" becomes "1\.5\-2\.0\?".
-</P>
-<br><a name="SEC5" href="#TOC1">PARTIAL MATCHES</a><br>
-<P>
-You can use the "PartialMatch" operation when you want the pattern
-to match any substring of the text.
-<pre>
- Example: simple search for a string:
- pcrecpp::RE("ell").PartialMatch("hello");
-
- Example: find first number in a string:
- int number;
- pcrecpp::RE re("(\\d+)");
- re.PartialMatch("x*100 + 20", &number);
- assert(number == 100);
-</PRE>
-</P>
-<br><a name="SEC6" href="#TOC1">UTF-8 AND THE MATCHING INTERFACE</a><br>
-<P>
-By default, pattern and text are plain text, one byte per character. The UTF8
-flag, passed to the constructor, causes both pattern and string to be treated
-as UTF-8 text, still a byte stream but potentially multiple bytes per
-character. In practice, the text is likelier to be UTF-8 than the pattern, but
-the match returned may depend on the UTF8 flag, so always use it when matching
-UTF8 text. For example, "." will match one byte normally but with UTF8 set may
-match up to three bytes of a multi-byte character.
-<pre>
- Example:
- pcrecpp::RE_Options options;
- options.set_utf8();
- pcrecpp::RE re(utf8_pattern, options);
- re.FullMatch(utf8_string);
-
- Example: using the convenience function UTF8():
- pcrecpp::RE re(utf8_pattern, pcrecpp::UTF8());
- re.FullMatch(utf8_string);
-</pre>
-NOTE: The UTF8 flag is ignored if pcre was not configured with the
-<pre>
- --enable-utf8 flag.
-</PRE>
-</P>
-<br><a name="SEC7" href="#TOC1">PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE</a><br>
-<P>
-PCRE defines some modifiers to change the behavior of the regular expression
-engine. The C++ wrapper defines an auxiliary class, RE_Options, as a vehicle to
-pass such modifiers to a RE class. Currently, the following modifiers are
-supported:
-<pre>
- modifier description Perl corresponding
-
- PCRE_CASELESS case insensitive match /i
- PCRE_MULTILINE multiple lines match /m
- PCRE_DOTALL dot matches newlines /s
- PCRE_DOLLAR_ENDONLY $ matches only at end N/A
- PCRE_EXTRA strict escape parsing N/A
- PCRE_EXTENDED ignore whitespaces /x
- PCRE_UTF8 handles UTF8 chars built-in
- PCRE_UNGREEDY reverses * and *? N/A
- PCRE_NO_AUTO_CAPTURE disables capturing parens N/A (*)
-</pre>
-(*) Both Perl and PCRE allow non capturing parentheses by means of the
-"?:" modifier within the pattern itself. e.g. (?:ab|cd) does not
-capture, while (ab|cd) does.
-</P>
-<P>
-For a full account on how each modifier works, please check the
-PCRE API reference page.
-</P>
-<P>
-For each modifier, there are two member functions whose name is made
-out of the modifier in lowercase, without the "PCRE_" prefix. For
-instance, PCRE_CASELESS is handled by
-<pre>
- bool caseless()
-</pre>
-which returns true if the modifier is set, and
-<pre>
- RE_Options & set_caseless(bool)
-</pre>
-which sets or unsets the modifier. Moreover, PCRE_EXTRA_MATCH_LIMIT can be
-accessed through the <b>set_match_limit()</b> and <b>match_limit()</b> member
-functions. Setting <i>match_limit</i> to a non-zero value will limit the
-execution of pcre to keep it from doing bad things like blowing the stack or
-taking an eternity to return a result. A value of 5000 is good enough to stop
-stack blowup in a 2MB thread stack. Setting <i>match_limit</i> to zero disables
-match limiting. Alternatively, you can call <b>match_limit_recursion()</b>
-which uses PCRE_EXTRA_MATCH_LIMIT_RECURSION to limit how much PCRE
-recurses. <b>match_limit()</b> limits the number of matches PCRE does;
-<b>match_limit_recursion()</b> limits the depth of internal recursion, and
-therefore the amount of stack that is used.
-</P>
-<P>
-Normally, to pass one or more modifiers to a RE class, you declare
-a <i>RE_Options</i> object, set the appropriate options, and pass this
-object to a RE constructor. Example:
-<pre>
- RE_Options opt;
- opt.set_caseless(true);
- if (RE("HELLO", opt).PartialMatch("hello world")) ...
-</pre>
-RE_options has two constructors. The default constructor takes no arguments and
-creates a set of flags that are off by default. The optional parameter
-<i>option_flags</i> is to facilitate transfer of legacy code from C programs.
-This lets you do
-<pre>
- RE(pattern,
- RE_Options(PCRE_CASELESS|PCRE_MULTILINE)).PartialMatch(str);
-</pre>
-However, new code is better off doing
-<pre>
- RE(pattern,
- RE_Options().set_caseless(true).set_multiline(true))
- .PartialMatch(str);
-</pre>
-If you are going to pass one of the most used modifiers, there are some
-convenience functions that return a RE_Options class with the
-appropriate modifier already set: <b>CASELESS()</b>, <b>UTF8()</b>,
-<b>MULTILINE()</b>, <b>DOTALL</b>(), and <b>EXTENDED()</b>.
-</P>
-<P>
-If you need to set several options at once, and you don't want to go through
-the pains of declaring a RE_Options object and setting several options, there
-is a parallel method that give you such ability on the fly. You can concatenate
-several <b>set_xxxxx()</b> member functions, since each of them returns a
-reference to its class object. For example, to pass PCRE_CASELESS,
-PCRE_EXTENDED, and PCRE_MULTILINE to a RE with one statement, you may write:
-<pre>
- RE(" ^ xyz \\s+ .* blah$",
- RE_Options()
- .set_caseless(true)
- .set_extended(true)
- .set_multiline(true)).PartialMatch(sometext);
-
-</PRE>
-</P>
-<br><a name="SEC8" href="#TOC1">SCANNING TEXT INCREMENTALLY</a><br>
-<P>
-The "Consume" operation may be useful if you want to repeatedly
-match regular expressions at the front of a string and skip over
-them as they match. This requires use of the "StringPiece" type,
-which represents a sub-range of a real string. Like RE, StringPiece
-is defined in the pcrecpp namespace.
-<pre>
- Example: read lines of the form "var = value" from a string.
- string contents = ...; // Fill string somehow
- pcrecpp::StringPiece input(contents); // Wrap in a StringPiece
-
- string var;
- int value;
- pcrecpp::RE re("(\\w+) = (\\d+)\n");
- while (re.Consume(&input, &var, &value)) {
- ...;
- }
-</pre>
-Each successful call to "Consume" will set "var/value", and also
-advance "input" so it points past the matched text.
-</P>
-<P>
-The "FindAndConsume" operation is similar to "Consume" but does not
-anchor your match at the beginning of the string. For example, you
-could extract all words from a string by repeatedly calling
-<pre>
- pcrecpp::RE("(\\w+)").FindAndConsume(&input, &word)
-</PRE>
-</P>
-<br><a name="SEC9" href="#TOC1">PARSING HEX/OCTAL/C-RADIX NUMBERS</a><br>
-<P>
-By default, if you pass a pointer to a numeric value, the
-corresponding text is interpreted as a base-10 number. You can
-instead wrap the pointer with a call to one of the operators Hex(),
-Octal(), or CRadix() to interpret the text in another base. The
-CRadix operator interprets C-style "0" (base-8) and "0x" (base-16)
-prefixes, but defaults to base-10.
-<pre>
- Example:
- int a, b, c, d;
- pcrecpp::RE re("(.*) (.*) (.*) (.*)");
- re.FullMatch("100 40 0100 0x40",
- pcrecpp::Octal(&a), pcrecpp::Hex(&b),
- pcrecpp::CRadix(&c), pcrecpp::CRadix(&d));
-</pre>
-will leave 64 in a, b, c, and d.
-</P>
-<br><a name="SEC10" href="#TOC1">REPLACING PARTS OF STRINGS</a><br>
-<P>
-You can replace the first match of "pattern" in "str" with "rewrite".
-Within "rewrite", backslash-escaped digits (\1 to \9) can be
-used to insert text matching corresponding parenthesized group
-from the pattern. \0 in "rewrite" refers to the entire matching
-text. For example:
-<pre>
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").Replace("d", &s);
-</pre>
-will leave "s" containing "yada dabba doo". The result is true if the pattern
-matches and a replacement occurs, false otherwise.
-</P>
-<P>
-<b>GlobalReplace</b> is like <b>Replace</b> except that it replaces all
-occurrences of the pattern in the string with the rewrite. Replacements are
-not subject to re-matching. For example:
-<pre>
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").GlobalReplace("d", &s);
-</pre>
-will leave "s" containing "yada dada doo". It returns the number of
-replacements made.
-</P>
-<P>
-<b>Extract</b> is like <b>Replace</b>, except that if the pattern matches,
-"rewrite" is copied into "out" (an additional argument) with substitutions.
-The non-matching portions of "text" are ignored. Returns true iff a match
-occurred and the extraction happened successfully; if no match occurs, the
-string is left unaffected.
-</P>
-<br><a name="SEC11" href="#TOC1">AUTHOR</a><br>
-<P>
-The C++ wrapper was contributed by Google Inc.
-<br>
-Copyright &copy; 2007 Google Inc.
-<br>
-</P>
-<br><a name="SEC12" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 08 January 2012
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcredemo.html b/src/third_party/pcre-8.30/doc/html/pcredemo.html
deleted file mode 100644
index cbe03e1159f..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcredemo.html
+++ /dev/null
@@ -1,426 +0,0 @@
-<html>
-<head>
-<title>pcredemo specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcredemo man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-</ul>
-<PRE>
-/*************************************************
-* PCRE DEMONSTRATION PROGRAM *
-*************************************************/
-
-/* This is a demonstration program to illustrate the most straightforward ways
-of calling the PCRE regular expression library from a C program. See the
-pcresample documentation for a short discussion ("man pcresample" if you have
-the PCRE man pages installed).
-
-In Unix-like environments, if PCRE is installed in your standard system
-libraries, you should be able to compile this program using this command:
-
-gcc -Wall pcredemo.c -lpcre -o pcredemo
-
-If PCRE is not installed in a standard place, it is likely to be installed with
-support for the pkg-config mechanism. If you have pkg-config, you can compile
-this program using this command:
-
-gcc -Wall pcredemo.c `pkg-config --cflags --libs libpcre` -o pcredemo
-
-If you do not have pkg-config, you may have to use this:
-
-gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
- -R/usr/local/lib -lpcre -o pcredemo
-
-Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and
-library files for PCRE are installed on your system. Only some operating
-systems (e.g. Solaris) use the -R option.
-
-Building under Windows:
-
-If you want to statically link this program against a non-dll .a file, you must
-define PCRE_STATIC before including pcre.h, otherwise the pcre_malloc() and
-pcre_free() exported functions will be declared __declspec(dllimport), with
-unwanted results. So in this environment, uncomment the following line. */
-
-/* #define PCRE_STATIC */
-
-#include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
-#include &lt;pcre.h&gt;
-
-#define OVECCOUNT 30 /* should be a multiple of 3 */
-
-
-int main(int argc, char **argv)
-{
-pcre *re;
-const char *error;
-char *pattern;
-char *subject;
-unsigned char *name_table;
-unsigned int option_bits;
-int erroffset;
-int find_all;
-int crlf_is_newline;
-int namecount;
-int name_entry_size;
-int ovector[OVECCOUNT];
-int subject_length;
-int rc, i;
-int utf8;
-
-
-/**************************************************************************
-* First, sort out the command line. There is only one possible option at *
-* the moment, "-g" to request repeated matching to find all occurrences, *
-* like Perl's /g option. We set the variable find_all to a non-zero value *
-* if the -g option is present. Apart from that, there must be exactly two *
-* arguments. *
-**************************************************************************/
-
-find_all = 0;
-for (i = 1; i &lt; argc; i++)
- {
- if (strcmp(argv[i], "-g") == 0) find_all = 1;
- else break;
- }
-
-/* After the options, we require exactly two arguments, which are the pattern,
-and the subject string. */
-
-if (argc - i != 2)
- {
- printf("Two arguments required: a regex and a subject string\n");
- return 1;
- }
-
-pattern = argv[i];
-subject = argv[i+1];
-subject_length = (int)strlen(subject);
-
-
-/*************************************************************************
-* Now we are going to compile the regular expression pattern, and handle *
-* and errors that are detected. *
-*************************************************************************/
-
-re = pcre_compile(
- pattern, /* the pattern */
- 0, /* default options */
- &amp;error, /* for error message */
- &amp;erroffset, /* for error offset */
- NULL); /* use default character tables */
-
-/* Compilation failed: print the error message and exit */
-
-if (re == NULL)
- {
- printf("PCRE compilation failed at offset %d: %s\n", erroffset, error);
- return 1;
- }
-
-
-/*************************************************************************
-* If the compilation succeeded, we call PCRE again, in order to do a *
-* pattern match against the subject string. This does just ONE match. If *
-* further matching is needed, it will be done below. *
-*************************************************************************/
-
-rc = pcre_exec(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- subject, /* the subject string */
- subject_length, /* the length of the subject */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* output vector for substring information */
- OVECCOUNT); /* number of elements in the output vector */
-
-/* Matching failed: handle error cases */
-
-if (rc &lt; 0)
- {
- switch(rc)
- {
- case PCRE_ERROR_NOMATCH: printf("No match\n"); break;
- /*
- Handle other special cases if you like
- */
- default: printf("Matching error %d\n", rc); break;
- }
- pcre_free(re); /* Release memory used for the compiled pattern */
- return 1;
- }
-
-/* Match succeded */
-
-printf("\nMatch succeeded at offset %d\n", ovector[0]);
-
-
-/*************************************************************************
-* We have found the first match within the subject string. If the output *
-* vector wasn't big enough, say so. Then output any substrings that were *
-* captured. *
-*************************************************************************/
-
-/* The output vector wasn't big enough */
-
-if (rc == 0)
- {
- rc = OVECCOUNT/3;
- printf("ovector only has room for %d captured substrings\n", rc - 1);
- }
-
-/* Show substrings stored in the output vector by number. Obviously, in a real
-application you might want to do things other than print them. */
-
-for (i = 0; i &lt; rc; i++)
- {
- char *substring_start = subject + ovector[2*i];
- int substring_length = ovector[2*i+1] - ovector[2*i];
- printf("%2d: %.*s\n", i, substring_length, substring_start);
- }
-
-
-/**************************************************************************
-* That concludes the basic part of this demonstration program. We have *
-* compiled a pattern, and performed a single match. The code that follows *
-* shows first how to access named substrings, and then how to code for *
-* repeated matches on the same subject. *
-**************************************************************************/
-
-/* See if there are any named substrings, and if so, show them by name. First
-we have to extract the count of named parentheses from the pattern. */
-
-(void)pcre_fullinfo(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- PCRE_INFO_NAMECOUNT, /* number of named substrings */
- &amp;namecount); /* where to put the answer */
-
-if (namecount &lt;= 0) printf("No named substrings\n"); else
- {
- unsigned char *tabptr;
- printf("Named substrings\n");
-
- /* Before we can access the substrings, we must extract the table for
- translating names to numbers, and the size of each entry in the table. */
-
- (void)pcre_fullinfo(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- PCRE_INFO_NAMETABLE, /* address of the table */
- &amp;name_table); /* where to put the answer */
-
- (void)pcre_fullinfo(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- PCRE_INFO_NAMEENTRYSIZE, /* size of each entry in the table */
- &amp;name_entry_size); /* where to put the answer */
-
- /* Now we can scan the table and, for each entry, print the number, the name,
- and the substring itself. */
-
- tabptr = name_table;
- for (i = 0; i &lt; namecount; i++)
- {
- int n = (tabptr[0] &lt;&lt; 8) | tabptr[1];
- printf("(%d) %*s: %.*s\n", n, name_entry_size - 3, tabptr + 2,
- ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
- tabptr += name_entry_size;
- }
- }
-
-
-/*************************************************************************
-* If the "-g" option was given on the command line, we want to continue *
-* to search for additional matches in the subject string, in a similar *
-* way to the /g option in Perl. This turns out to be trickier than you *
-* might think because of the possibility of matching an empty string. *
-* What happens is as follows: *
-* *
-* If the previous match was NOT for an empty string, we can just start *
-* the next match at the end of the previous one. *
-* *
-* If the previous match WAS for an empty string, we can't do that, as it *
-* would lead to an infinite loop. Instead, a special call of pcre_exec() *
-* is made with the PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED flags set. *
-* The first of these tells PCRE that an empty string at the start of the *
-* subject is not a valid match; other possibilities must be tried. The *
-* second flag restricts PCRE to one match attempt at the initial string *
-* position. If this match succeeds, an alternative to the empty string *
-* match has been found, and we can print it and proceed round the loop, *
-* advancing by the length of whatever was found. If this match does not *
-* succeed, we still stay in the loop, advancing by just one character. *
-* In UTF-8 mode, which can be set by (*UTF8) in the pattern, this may be *
-* more than one byte. *
-* *
-* However, there is a complication concerned with newlines. When the *
-* newline convention is such that CRLF is a valid newline, we want must *
-* advance by two characters rather than one. The newline convention can *
-* be set in the regex by (*CR), etc.; if not, we must find the default. *
-*************************************************************************/
-
-if (!find_all) /* Check for -g */
- {
- pcre_free(re); /* Release the memory used for the compiled pattern */
- return 0; /* Finish unless -g was given */
- }
-
-/* Before running the loop, check for UTF-8 and whether CRLF is a valid newline
-sequence. First, find the options with which the regex was compiled; extract
-the UTF-8 state, and mask off all but the newline options. */
-
-(void)pcre_fullinfo(re, NULL, PCRE_INFO_OPTIONS, &amp;option_bits);
-utf8 = option_bits &amp; PCRE_UTF8;
-option_bits &amp;= PCRE_NEWLINE_CR|PCRE_NEWLINE_LF|PCRE_NEWLINE_CRLF|
- PCRE_NEWLINE_ANY|PCRE_NEWLINE_ANYCRLF;
-
-/* If no newline options were set, find the default newline convention from the
-build configuration. */
-
-if (option_bits == 0)
- {
- int d;
- (void)pcre_config(PCRE_CONFIG_NEWLINE, &amp;d);
- /* Note that these values are always the ASCII ones, even in
- EBCDIC environments. CR = 13, NL = 10. */
- option_bits = (d == 13)? PCRE_NEWLINE_CR :
- (d == 10)? PCRE_NEWLINE_LF :
- (d == (13&lt;&lt;8 | 10))? PCRE_NEWLINE_CRLF :
- (d == -2)? PCRE_NEWLINE_ANYCRLF :
- (d == -1)? PCRE_NEWLINE_ANY : 0;
- }
-
-/* See if CRLF is a valid newline sequence. */
-
-crlf_is_newline =
- option_bits == PCRE_NEWLINE_ANY ||
- option_bits == PCRE_NEWLINE_CRLF ||
- option_bits == PCRE_NEWLINE_ANYCRLF;
-
-/* Loop for second and subsequent matches */
-
-for (;;)
- {
- int options = 0; /* Normally no options */
- int start_offset = ovector[1]; /* Start at end of previous match */
-
- /* If the previous match was for an empty string, we are finished if we are
- at the end of the subject. Otherwise, arrange to run another match at the
- same point to see if a non-empty match can be found. */
-
- if (ovector[0] == ovector[1])
- {
- if (ovector[0] == subject_length) break;
- options = PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED;
- }
-
- /* Run the next matching operation */
-
- rc = pcre_exec(
- re, /* the compiled pattern */
- NULL, /* no extra data - we didn't study the pattern */
- subject, /* the subject string */
- subject_length, /* the length of the subject */
- start_offset, /* starting offset in the subject */
- options, /* options */
- ovector, /* output vector for substring information */
- OVECCOUNT); /* number of elements in the output vector */
-
- /* This time, a result of NOMATCH isn't an error. If the value in "options"
- is zero, it just means we have found all possible matches, so the loop ends.
- Otherwise, it means we have failed to find a non-empty-string match at a
- point where there was a previous empty-string match. In this case, we do what
- Perl does: advance the matching position by one character, and continue. We
- do this by setting the "end of previous match" offset, because that is picked
- up at the top of the loop as the point at which to start again.
-
- There are two complications: (a) When CRLF is a valid newline sequence, and
- the current position is just before it, advance by an extra byte. (b)
- Otherwise we must ensure that we skip an entire UTF-8 character if we are in
- UTF-8 mode. */
-
- if (rc == PCRE_ERROR_NOMATCH)
- {
- if (options == 0) break; /* All matches found */
- ovector[1] = start_offset + 1; /* Advance one byte */
- if (crlf_is_newline &amp;&amp; /* If CRLF is newline &amp; */
- start_offset &lt; subject_length - 1 &amp;&amp; /* we are at CRLF, */
- subject[start_offset] == '\r' &amp;&amp;
- subject[start_offset + 1] == '\n')
- ovector[1] += 1; /* Advance by one more. */
- else if (utf8) /* Otherwise, ensure we */
- { /* advance a whole UTF-8 */
- while (ovector[1] &lt; subject_length) /* character. */
- {
- if ((subject[ovector[1]] &amp; 0xc0) != 0x80) break;
- ovector[1] += 1;
- }
- }
- continue; /* Go round the loop again */
- }
-
- /* Other matching errors are not recoverable. */
-
- if (rc &lt; 0)
- {
- printf("Matching error %d\n", rc);
- pcre_free(re); /* Release memory used for the compiled pattern */
- return 1;
- }
-
- /* Match succeded */
-
- printf("\nMatch succeeded again at offset %d\n", ovector[0]);
-
- /* The match succeeded, but the output vector wasn't big enough. */
-
- if (rc == 0)
- {
- rc = OVECCOUNT/3;
- printf("ovector only has room for %d captured substrings\n", rc - 1);
- }
-
- /* As before, show substrings stored in the output vector by number, and then
- also any named substrings. */
-
- for (i = 0; i &lt; rc; i++)
- {
- char *substring_start = subject + ovector[2*i];
- int substring_length = ovector[2*i+1] - ovector[2*i];
- printf("%2d: %.*s\n", i, substring_length, substring_start);
- }
-
- if (namecount &lt;= 0) printf("No named substrings\n"); else
- {
- unsigned char *tabptr = name_table;
- printf("Named substrings\n");
- for (i = 0; i &lt; namecount; i++)
- {
- int n = (tabptr[0] &lt;&lt; 8) | tabptr[1];
- printf("(%d) %*s: %.*s\n", n, name_entry_size - 3, tabptr + 2,
- ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
- tabptr += name_entry_size;
- }
- }
- } /* End of loop to find second and subsequent matches */
-
-printf("\n");
-pcre_free(re); /* Release memory used for the compiled pattern */
-return 0;
-}
-
-/* End of pcredemo.c */
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcregrep.html b/src/third_party/pcre-8.30/doc/html/pcregrep.html
deleted file mode 100644
index 4d88c6784c7..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcregrep.html
+++ /dev/null
@@ -1,651 +0,0 @@
-<html>
-<head>
-<title>pcregrep specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcregrep man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
-<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
-<li><a name="TOC3" href="#SEC3">SUPPORT FOR COMPRESSED FILES</a>
-<li><a name="TOC4" href="#SEC4">OPTIONS</a>
-<li><a name="TOC5" href="#SEC5">ENVIRONMENT VARIABLES</a>
-<li><a name="TOC6" href="#SEC6">NEWLINES</a>
-<li><a name="TOC7" href="#SEC7">OPTIONS COMPATIBILITY</a>
-<li><a name="TOC8" href="#SEC8">OPTIONS WITH DATA</a>
-<li><a name="TOC9" href="#SEC9">MATCHING ERRORS</a>
-<li><a name="TOC10" href="#SEC10">DIAGNOSTICS</a>
-<li><a name="TOC11" href="#SEC11">SEE ALSO</a>
-<li><a name="TOC12" href="#SEC12">AUTHOR</a>
-<li><a name="TOC13" href="#SEC13">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
-<P>
-<b>pcregrep [options] [long options] [pattern] [path1 path2 ...]</b>
-</P>
-<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
-<P>
-<b>pcregrep</b> searches files for character patterns, in the same way as other
-grep commands do, but it uses the PCRE regular expression library to support
-patterns that are compatible with the regular expressions of Perl 5. See
-<a href="pcrepattern.html"><b>pcrepattern</b>(3)</a>
-for a full description of syntax and semantics of the regular expressions
-that PCRE supports.
-</P>
-<P>
-Patterns, whether supplied on the command line or in a separate file, are given
-without delimiters. For example:
-<pre>
- pcregrep Thursday /etc/motd
-</pre>
-If you attempt to use delimiters (for example, by surrounding a pattern with
-slashes, as is common in Perl scripts), they are interpreted as part of the
-pattern. Quotes can of course be used to delimit patterns on the command line
-because they are interpreted by the shell, and indeed they are required if a
-pattern contains white space or shell metacharacters.
-</P>
-<P>
-The first argument that follows any option settings is treated as the single
-pattern to be matched when neither <b>-e</b> nor <b>-f</b> is present.
-Conversely, when one or both of these options are used to specify patterns, all
-arguments are treated as path names. At least one of <b>-e</b>, <b>-f</b>, or an
-argument pattern must be provided.
-</P>
-<P>
-If no files are specified, <b>pcregrep</b> reads the standard input. The
-standard input can also be referenced by a name consisting of a single hyphen.
-For example:
-<pre>
- pcregrep some-pattern /file1 - /file3
-</pre>
-By default, each line that matches a pattern is copied to the standard
-output, and if there is more than one file, the file name is output at the
-start of each line, followed by a colon. However, there are options that can
-change how <b>pcregrep</b> behaves. In particular, the <b>-M</b> option makes it
-possible to search for patterns that span line boundaries. What defines a line
-boundary is controlled by the <b>-N</b> (<b>--newline</b>) option.
-</P>
-<P>
-The amount of memory used for buffering files that are being scanned is
-controlled by a parameter that can be set by the <b>--buffer-size</b> option.
-The default value for this parameter is specified when <b>pcregrep</b> is built,
-with the default default being 20K. A block of memory three times this size is
-used (to allow for buffering "before" and "after" lines). An error occurs if a
-line overflows the buffer.
-</P>
-<P>
-Patterns are limited to 8K or BUFSIZ bytes, whichever is the greater. BUFSIZ is
-defined in <b>&#60;stdio.h&#62;</b>. When there is more than one pattern (specified by
-the use of <b>-e</b> and/or <b>-f</b>), each pattern is applied to each line in
-the order in which they are defined, except that all the <b>-e</b> patterns are
-tried before the <b>-f</b> patterns.
-</P>
-<P>
-By default, as soon as one pattern matches (or fails to match when <b>-v</b> is
-used), no further patterns are considered. However, if <b>--colour</b> (or
-<b>--color</b>) is used to colour the matching substrings, or if
-<b>--only-matching</b>, <b>--file-offsets</b>, or <b>--line-offsets</b> is used to
-output only the part of the line that matched (either shown literally, or as an
-offset), scanning resumes immediately following the match, so that further
-matches on the same line can be found. If there are multiple patterns, they are
-all tried on the remainder of the line, but patterns that follow the one that
-matched are not tried on the earlier part of the line.
-</P>
-<P>
-This is the same behaviour as GNU grep, but it does mean that the order in
-which multiple patterns are specified can affect the output when one of the
-above options is used.
-</P>
-<P>
-Patterns that can match an empty string are accepted, but empty string
-matches are never recognized. An example is the pattern "(super)?(man)?", in
-which all components are optional. This pattern finds all occurrences of both
-"super" and "man"; the output differs from matching with "super|man" when only
-the matching substrings are being shown.
-</P>
-<P>
-If the <b>LC_ALL</b> or <b>LC_CTYPE</b> environment variable is set,
-<b>pcregrep</b> uses the value to set a locale when calling the PCRE library.
-The <b>--locale</b> option can be used to override this.
-</P>
-<br><a name="SEC3" href="#TOC1">SUPPORT FOR COMPRESSED FILES</a><br>
-<P>
-It is possible to compile <b>pcregrep</b> so that it uses <b>libz</b> or
-<b>libbz2</b> to read files whose names end in <b>.gz</b> or <b>.bz2</b>,
-respectively. You can find out whether your binary has support for one or both
-of these file types by running it with the <b>--help</b> option. If the
-appropriate support is not present, files are treated as plain text. The
-standard input is always so treated.
-</P>
-<br><a name="SEC4" href="#TOC1">OPTIONS</a><br>
-<P>
-The order in which some of the options appear can affect the output. For
-example, both the <b>-h</b> and <b>-l</b> options affect the printing of file
-names. Whichever comes later in the command line will be the one that takes
-effect. Numerical values for options may be followed by K or M, to signify
-multiplication by 1024 or 1024*1024 respectively.
-</P>
-<P>
-<b>--</b>
-This terminates the list of options. It is useful if the next item on the
-command line starts with a hyphen but is not an option. This allows for the
-processing of patterns and filenames that start with hyphens.
-</P>
-<P>
-<b>-A</b> <i>number</i>, <b>--after-context=</b><i>number</i>
-Output <i>number</i> lines of context after each matching line. If filenames
-and/or line numbers are being output, a hyphen separator is used instead of a
-colon for the context lines. A line containing "--" is output between each
-group of lines, unless they are in fact contiguous in the input file. The value
-of <i>number</i> is expected to be relatively small. However, <b>pcregrep</b>
-guarantees to have up to 8K of following text available for context output.
-</P>
-<P>
-<b>-B</b> <i>number</i>, <b>--before-context=</b><i>number</i>
-Output <i>number</i> lines of context before each matching line. If filenames
-and/or line numbers are being output, a hyphen separator is used instead of a
-colon for the context lines. A line containing "--" is output between each
-group of lines, unless they are in fact contiguous in the input file. The value
-of <i>number</i> is expected to be relatively small. However, <b>pcregrep</b>
-guarantees to have up to 8K of preceding text available for context output.
-</P>
-<P>
-<b>--buffer-size=</b><i>number</i>
-Set the parameter that controls how much memory is used for buffering files
-that are being scanned.
-</P>
-<P>
-<b>-C</b> <i>number</i>, <b>--context=</b><i>number</i>
-Output <i>number</i> lines of context both before and after each matching line.
-This is equivalent to setting both <b>-A</b> and <b>-B</b> to the same value.
-</P>
-<P>
-<b>-c</b>, <b>--count</b>
-Do not output individual lines from the files that are being scanned; instead
-output the number of lines that would otherwise have been shown. If no lines
-are selected, the number zero is output. If several files are are being
-scanned, a count is output for each of them. However, if the
-<b>--files-with-matches</b> option is also used, only those files whose counts
-are greater than zero are listed. When <b>-c</b> is used, the <b>-A</b>,
-<b>-B</b>, and <b>-C</b> options are ignored.
-</P>
-<P>
-<b>--colour</b>, <b>--color</b>
-If this option is given without any data, it is equivalent to "--colour=auto".
-If data is required, it must be given in the same shell item, separated by an
-equals sign.
-</P>
-<P>
-<b>--colour=</b><i>value</i>, <b>--color=</b><i>value</i>
-This option specifies under what circumstances the parts of a line that matched
-a pattern should be coloured in the output. By default, the output is not
-coloured. The value (which is optional, see above) may be "never", "always", or
-"auto". In the latter case, colouring happens only if the standard output is
-connected to a terminal. More resources are used when colouring is enabled,
-because <b>pcregrep</b> has to search for all possible matches in a line, not
-just one, in order to colour them all.
-<br>
-<br>
-The colour that is used can be specified by setting the environment variable
-PCREGREP_COLOUR or PCREGREP_COLOR. The value of this variable should be a
-string of two numbers, separated by a semicolon. They are copied directly into
-the control string for setting colour on a terminal, so it is your
-responsibility to ensure that they make sense. If neither of the environment
-variables is set, the default is "1;31", which gives red.
-</P>
-<P>
-<b>-D</b> <i>action</i>, <b>--devices=</b><i>action</i>
-If an input path is not a regular file or a directory, "action" specifies how
-it is to be processed. Valid values are "read" (the default) or "skip"
-(silently skip the path).
-</P>
-<P>
-<b>-d</b> <i>action</i>, <b>--directories=</b><i>action</i>
-If an input path is a directory, "action" specifies how it is to be processed.
-Valid values are "read" (the default), "recurse" (equivalent to the <b>-r</b>
-option), or "skip" (silently skip the path). In the default case, directories
-are read as if they were ordinary files. In some operating systems the effect
-of reading a directory like this is an immediate end-of-file.
-</P>
-<P>
-<b>-e</b> <i>pattern</i>, <b>--regex=</b><i>pattern</i>, <b>--regexp=</b><i>pattern</i>
-Specify a pattern to be matched. This option can be used multiple times in
-order to specify several patterns. It can also be used as a way of specifying a
-single pattern that starts with a hyphen. When <b>-e</b> is used, no argument
-pattern is taken from the command line; all arguments are treated as file
-names. There is an overall maximum of 100 patterns. They are applied to each
-line in the order in which they are defined until one matches (or fails to
-match if <b>-v</b> is used). If <b>-f</b> is used with <b>-e</b>, the command line
-patterns are matched first, followed by the patterns from the file, independent
-of the order in which these options are specified. Note that multiple use of
-<b>-e</b> is not the same as a single pattern with alternatives. For example,
-X|Y finds the first character in a line that is X or Y, whereas if the two
-patterns are given separately, <b>pcregrep</b> finds X if it is present, even if
-it follows Y in the line. It finds Y only if there is no X in the line. This
-really matters only if you are using <b>-o</b> to show the part(s) of the line
-that matched.
-</P>
-<P>
-<b>--exclude</b>=<i>pattern</i>
-When <b>pcregrep</b> is searching the files in a directory as a consequence of
-the <b>-r</b> (recursive search) option, any regular files whose names match the
-pattern are excluded. Subdirectories are not excluded by this option; they are
-searched recursively, subject to the <b>--exclude-dir</b> and
-<b>--include_dir</b> options. The pattern is a PCRE regular expression, and is
-matched against the final component of the file name (not the entire path). If
-a file name matches both <b>--include</b> and <b>--exclude</b>, it is excluded.
-There is no short form for this option.
-</P>
-<P>
-<b>--exclude-dir</b>=<i>pattern</i>
-When <b>pcregrep</b> is searching the contents of a directory as a consequence
-of the <b>-r</b> (recursive search) option, any subdirectories whose names match
-the pattern are excluded. (Note that the \fP--exclude\fP option does not affect
-subdirectories.) The pattern is a PCRE regular expression, and is matched
-against the final component of the name (not the entire path). If a
-subdirectory name matches both <b>--include-dir</b> and <b>--exclude-dir</b>, it
-is excluded. There is no short form for this option.
-</P>
-<P>
-<b>-F</b>, <b>--fixed-strings</b>
-Interpret each pattern as a list of fixed strings, separated by newlines,
-instead of as a regular expression. The <b>-w</b> (match as a word) and <b>-x</b>
-(match whole line) options can be used with <b>-F</b>. They apply to each of the
-fixed strings. A line is selected if any of the fixed strings are found in it
-(subject to <b>-w</b> or <b>-x</b>, if present).
-</P>
-<P>
-<b>-f</b> <i>filename</i>, <b>--file=</b><i>filename</i>
-Read a number of patterns from the file, one per line, and match them against
-each line of input. A data line is output if any of the patterns match it. The
-filename can be given as "-" to refer to the standard input. When <b>-f</b> is
-used, patterns specified on the command line using <b>-e</b> may also be
-present; they are tested before the file's patterns. However, no other pattern
-is taken from the command line; all arguments are treated as file names. There
-is an overall maximum of 100 patterns. Trailing white space is removed from
-each line, and blank lines are ignored. An empty file contains no patterns and
-therefore matches nothing. See also the comments about multiple patterns versus
-a single pattern with alternatives in the description of <b>-e</b> above.
-</P>
-<P>
-<b>--file-offsets</b>
-Instead of showing lines or parts of lines that match, show each match as an
-offset from the start of the file and a length, separated by a comma. In this
-mode, no context is shown. That is, the <b>-A</b>, <b>-B</b>, and <b>-C</b>
-options are ignored. If there is more than one match in a line, each of them is
-shown separately. This option is mutually exclusive with <b>--line-offsets</b>
-and <b>--only-matching</b>.
-</P>
-<P>
-<b>-H</b>, <b>--with-filename</b>
-Force the inclusion of the filename at the start of output lines when searching
-a single file. By default, the filename is not shown in this case. For matching
-lines, the filename is followed by a colon; for context lines, a hyphen
-separator is used. If a line number is also being output, it follows the file
-name.
-</P>
-<P>
-<b>-h</b>, <b>--no-filename</b>
-Suppress the output filenames when searching multiple files. By default,
-filenames are shown when multiple files are searched. For matching lines, the
-filename is followed by a colon; for context lines, a hyphen separator is used.
-If a line number is also being output, it follows the file name.
-</P>
-<P>
-<b>--help</b>
-Output a help message, giving brief details of the command options and file
-type support, and then exit.
-</P>
-<P>
-<b>-i</b>, <b>--ignore-case</b>
-Ignore upper/lower case distinctions during comparisons.
-</P>
-<P>
-<b>--include</b>=<i>pattern</i>
-When <b>pcregrep</b> is searching the files in a directory as a consequence of
-the <b>-r</b> (recursive search) option, only those regular files whose names
-match the pattern are included. Subdirectories are always included and searched
-recursively, subject to the \fP--include-dir\fP and <b>--exclude-dir</b>
-options. The pattern is a PCRE regular expression, and is matched against the
-final component of the file name (not the entire path). If a file name matches
-both <b>--include</b> and <b>--exclude</b>, it is excluded. There is no short
-form for this option.
-</P>
-<P>
-<b>--include-dir</b>=<i>pattern</i>
-When <b>pcregrep</b> is searching the contents of a directory as a consequence
-of the <b>-r</b> (recursive search) option, only those subdirectories whose
-names match the pattern are included. (Note that the <b>--include</b> option
-does not affect subdirectories.) The pattern is a PCRE regular expression, and
-is matched against the final component of the name (not the entire path). If a
-subdirectory name matches both <b>--include-dir</b> and <b>--exclude-dir</b>, it
-is excluded. There is no short form for this option.
-</P>
-<P>
-<b>-L</b>, <b>--files-without-match</b>
-Instead of outputting lines from the files, just output the names of the files
-that do not contain any lines that would have been output. Each file name is
-output once, on a separate line.
-</P>
-<P>
-<b>-l</b>, <b>--files-with-matches</b>
-Instead of outputting lines from the files, just output the names of the files
-containing lines that would have been output. Each file name is output
-once, on a separate line. Searching normally stops as soon as a matching line
-is found in a file. However, if the <b>-c</b> (count) option is also used,
-matching continues in order to obtain the correct count, and those files that
-have at least one match are listed along with their counts. Using this option
-with <b>-c</b> is a way of suppressing the listing of files with no matches.
-</P>
-<P>
-<b>--label</b>=<i>name</i>
-This option supplies a name to be used for the standard input when file names
-are being output. If not supplied, "(standard input)" is used. There is no
-short form for this option.
-</P>
-<P>
-<b>--line-buffered</b>
-When this option is given, input is read and processed line by line, and the
-output is flushed after each write. By default, input is read in large chunks,
-unless <b>pcregrep</b> can determine that it is reading from a terminal (which
-is currently possible only in Unix environments). Output to terminal is
-normally automatically flushed by the operating system. This option can be
-useful when the input or output is attached to a pipe and you do not want
-<b>pcregrep</b> to buffer up large amounts of data. However, its use will affect
-performance, and the <b>-M</b> (multiline) option ceases to work.
-</P>
-<P>
-<b>--line-offsets</b>
-Instead of showing lines or parts of lines that match, show each match as a
-line number, the offset from the start of the line, and a length. The line
-number is terminated by a colon (as usual; see the <b>-n</b> option), and the
-offset and length are separated by a comma. In this mode, no context is shown.
-That is, the <b>-A</b>, <b>-B</b>, and <b>-C</b> options are ignored. If there is
-more than one match in a line, each of them is shown separately. This option is
-mutually exclusive with <b>--file-offsets</b> and <b>--only-matching</b>.
-</P>
-<P>
-<b>--locale</b>=<i>locale-name</i>
-This option specifies a locale to be used for pattern matching. It overrides
-the value in the <b>LC_ALL</b> or <b>LC_CTYPE</b> environment variables. If no
-locale is specified, the PCRE library's default (usually the "C" locale) is
-used. There is no short form for this option.
-</P>
-<P>
-<b>--match-limit</b>=<i>number</i>
-Processing some regular expression patterns can require a very large amount of
-memory, leading in some cases to a program crash if not enough is available.
-Other patterns may take a very long time to search for all possible matching
-strings. The <b>pcre_exec()</b> function that is called by <b>pcregrep</b> to do
-the matching has two parameters that can limit the resources that it uses.
-<br>
-<br>
-The <b>--match-limit</b> option provides a means of limiting resource usage
-when processing patterns that are not going to match, but which have a very
-large number of possibilities in their search trees. The classic example is a
-pattern that uses nested unlimited repeats. Internally, PCRE uses a function
-called <b>match()</b> which it calls repeatedly (sometimes recursively). The
-limit set by <b>--match-limit</b> is imposed on the number of times this
-function is called during a match, which has the effect of limiting the amount
-of backtracking that can take place.
-<br>
-<br>
-The <b>--recursion-limit</b> option is similar to <b>--match-limit</b>, but
-instead of limiting the total number of times that <b>match()</b> is called, it
-limits the depth of recursive calls, which in turn limits the amount of memory
-that can be used. The recursion depth is a smaller number than the total number
-of calls, because not all calls to <b>match()</b> are recursive. This limit is
-of use only if it is set smaller than <b>--match-limit</b>.
-<br>
-<br>
-There are no short forms for these options. The default settings are specified
-when the PCRE library is compiled, with the default default being 10 million.
-</P>
-<P>
-<b>-M</b>, <b>--multiline</b>
-Allow patterns to match more than one line. When this option is given, patterns
-may usefully contain literal newline characters and internal occurrences of ^
-and $ characters. The output for a successful match may consist of more than
-one line, the last of which is the one in which the match ended. If the matched
-string ends with a newline sequence the output ends at the end of that line.
-<br>
-<br>
-When this option is set, the PCRE library is called in "multiline" mode.
-There is a limit to the number of lines that can be matched, imposed by the way
-that <b>pcregrep</b> buffers the input file as it scans it. However,
-<b>pcregrep</b> ensures that at least 8K characters or the rest of the document
-(whichever is the shorter) are available for forward matching, and similarly
-the previous 8K characters (or all the previous characters, if fewer than 8K)
-are guaranteed to be available for lookbehind assertions. This option does not
-work when input is read line by line (see \fP--line-buffered\fP.)
-</P>
-<P>
-<b>-N</b> <i>newline-type</i>, <b>--newline</b>=<i>newline-type</i>
-The PCRE library supports five different conventions for indicating
-the ends of lines. They are the single-character sequences CR (carriage return)
-and LF (linefeed), the two-character sequence CRLF, an "anycrlf" convention,
-which recognizes any of the preceding three types, and an "any" convention, in
-which any Unicode line ending sequence is assumed to end a line. The Unicode
-sequences are the three just mentioned, plus VT (vertical tab, U+000B), FF
-(form feed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and
-PS (paragraph separator, U+2029).
-<br>
-<br>
-When the PCRE library is built, a default line-ending sequence is specified.
-This is normally the standard sequence for the operating system. Unless
-otherwise specified by this option, <b>pcregrep</b> uses the library's default.
-The possible values for this option are CR, LF, CRLF, ANYCRLF, or ANY. This
-makes it possible to use <b>pcregrep</b> on files that have come from other
-environments without having to modify their line endings. If the data that is
-being scanned does not agree with the convention set by this option,
-<b>pcregrep</b> may behave in strange ways.
-</P>
-<P>
-<b>-n</b>, <b>--line-number</b>
-Precede each output line by its line number in the file, followed by a colon
-for matching lines or a hyphen for context lines. If the filename is also being
-output, it precedes the line number. This option is forced if
-<b>--line-offsets</b> is used.
-</P>
-<P>
-<b>--no-jit</b>
-If the PCRE library is built with support for just-in-time compiling (which
-speeds up matching), <b>pcregrep</b> automatically makes use of this, unless it
-was explicitly disabled at build time. This option can be used to disable the
-use of JIT at run time. It is provided for testing and working round problems.
-It should never be needed in normal use.
-</P>
-<P>
-<b>-o</b>, <b>--only-matching</b>
-Show only the part of the line that matched a pattern instead of the whole
-line. In this mode, no context is shown. That is, the <b>-A</b>, <b>-B</b>, and
-<b>-C</b> options are ignored. If there is more than one match in a line, each
-of them is shown separately. If <b>-o</b> is combined with <b>-v</b> (invert the
-sense of the match to find non-matching lines), no output is generated, but the
-return code is set appropriately. If the matched portion of the line is empty,
-nothing is output unless the file name or line number are being printed, in
-which case they are shown on an otherwise empty line. This option is mutually
-exclusive with <b>--file-offsets</b> and <b>--line-offsets</b>.
-</P>
-<P>
-<b>-o</b><i>number</i>, <b>--only-matching</b>=<i>number</i>
-Show only the part of the line that matched the capturing parentheses of the
-given number. Up to 32 capturing parentheses are supported. Because these
-options can be given without an argument (see above), if an argument is
-present, it must be given in the same shell item, for example, -o3 or
---only-matching=2. The comments given for the non-argument case above also
-apply to this case. If the specified capturing parentheses do not exist in the
-pattern, or were not set in the match, nothing is output unless the file name
-or line number are being printed.
-</P>
-<P>
-<b>-q</b>, <b>--quiet</b>
-Work quietly, that is, display nothing except error messages. The exit
-status indicates whether or not any matches were found.
-</P>
-<P>
-<b>-r</b>, <b>--recursive</b>
-If any given path is a directory, recursively scan the files it contains,
-taking note of any <b>--include</b> and <b>--exclude</b> settings. By default, a
-directory is read as a normal file; in some operating systems this gives an
-immediate end-of-file. This option is a shorthand for setting the <b>-d</b>
-option to "recurse".
-</P>
-<P>
-<b>--recursion-limit</b>=<i>number</i>
-See <b>--match-limit</b> above.
-</P>
-<P>
-<b>-s</b>, <b>--no-messages</b>
-Suppress error messages about non-existent or unreadable files. Such files are
-quietly skipped. However, the return code is still 2, even if matches were
-found in other files.
-</P>
-<P>
-<b>-u</b>, <b>--utf-8</b>
-Operate in UTF-8 mode. This option is available only if PCRE has been compiled
-with UTF-8 support. Both patterns and subject lines must be valid strings of
-UTF-8 characters.
-</P>
-<P>
-<b>-V</b>, <b>--version</b>
-Write the version numbers of <b>pcregrep</b> and the PCRE library that is being
-used to the standard error stream.
-</P>
-<P>
-<b>-v</b>, <b>--invert-match</b>
-Invert the sense of the match, so that lines which do <i>not</i> match any of
-the patterns are the ones that are found.
-</P>
-<P>
-<b>-w</b>, <b>--word-regex</b>, <b>--word-regexp</b>
-Force the patterns to match only whole words. This is equivalent to having \b
-at the start and end of the pattern.
-</P>
-<P>
-<b>-x</b>, <b>--line-regex</b>, <b>--line-regexp</b>
-Force the patterns to be anchored (each must start matching at the beginning of
-a line) and in addition, require them to match entire lines. This is
-equivalent to having ^ and $ characters at the start and end of each
-alternative branch in every pattern.
-</P>
-<br><a name="SEC5" href="#TOC1">ENVIRONMENT VARIABLES</a><br>
-<P>
-The environment variables <b>LC_ALL</b> and <b>LC_CTYPE</b> are examined, in that
-order, for a locale. The first one that is set is used. This can be overridden
-by the <b>--locale</b> option. If no locale is set, the PCRE library's default
-(usually the "C" locale) is used.
-</P>
-<br><a name="SEC6" href="#TOC1">NEWLINES</a><br>
-<P>
-The <b>-N</b> (<b>--newline</b>) option allows <b>pcregrep</b> to scan files with
-different newline conventions from the default. However, the setting of this
-option does not affect the way in which <b>pcregrep</b> writes information to
-the standard error and output streams. It uses the string "\n" in C
-<b>printf()</b> calls to indicate newlines, relying on the C I/O library to
-convert this to an appropriate sequence if the output is sent to a file.
-</P>
-<br><a name="SEC7" href="#TOC1">OPTIONS COMPATIBILITY</a><br>
-<P>
-Many of the short and long forms of <b>pcregrep</b>'s options are the same
-as in the GNU <b>grep</b> program (version 2.5.4). Any long option of the form
-<b>--xxx-regexp</b> (GNU terminology) is also available as <b>--xxx-regex</b>
-(PCRE terminology). However, the <b>--file-offsets</b>, <b>--include-dir</b>,
-<b>--line-offsets</b>, <b>--locale</b>, <b>--match-limit</b>, <b>-M</b>,
-<b>--multiline</b>, <b>-N</b>, <b>--newline</b>, <b>--recursion-limit</b>,
-<b>-u</b>, and <b>--utf-8</b> options are specific to <b>pcregrep</b>, as is the
-use of the <b>--only-matching</b> option with a capturing parentheses number.
-</P>
-<P>
-Although most of the common options work the same way, a few are different in
-<b>pcregrep</b>. For example, the <b>--include</b> option's argument is a glob
-for GNU <b>grep</b>, but a regular expression for <b>pcregrep</b>. If both the
-<b>-c</b> and <b>-l</b> options are given, GNU grep lists only file names,
-without counts, but <b>pcregrep</b> gives the counts.
-</P>
-<br><a name="SEC8" href="#TOC1">OPTIONS WITH DATA</a><br>
-<P>
-There are four different ways in which an option with data can be specified.
-If a short form option is used, the data may follow immediately, or (with one
-exception) in the next command line item. For example:
-<pre>
- -f/some/file
- -f /some/file
-</pre>
-The exception is the <b>-o</b> option, which may appear with or without data.
-Because of this, if data is present, it must follow immediately in the same
-item, for example -o3.
-</P>
-<P>
-If a long form option is used, the data may appear in the same command line
-item, separated by an equals character, or (with two exceptions) it may appear
-in the next command line item. For example:
-<pre>
- --file=/some/file
- --file /some/file
-</pre>
-Note, however, that if you want to supply a file name beginning with ~ as data
-in a shell command, and have the shell expand ~ to a home directory, you must
-separate the file name from the option, because the shell does not treat ~
-specially unless it is at the start of an item.
-</P>
-<P>
-The exceptions to the above are the <b>--colour</b> (or <b>--color</b>) and
-<b>--only-matching</b> options, for which the data is optional. If one of these
-options does have data, it must be given in the first form, using an equals
-character. Otherwise <b>pcregrep</b> will assume that it has no data.
-</P>
-<br><a name="SEC9" href="#TOC1">MATCHING ERRORS</a><br>
-<P>
-It is possible to supply a regular expression that takes a very long time to
-fail to match certain lines. Such patterns normally involve nested indefinite
-repeats, for example: (a+)*\d when matched against a line of a's with no final
-digit. The PCRE matching function has a resource limit that causes it to abort
-in these circumstances. If this happens, <b>pcregrep</b> outputs an error
-message and the line that caused the problem to the standard error stream. If
-there are more than 20 such errors, <b>pcregrep</b> gives up.
-</P>
-<P>
-The <b>--match-limit</b> option of <b>pcregrep</b> can be used to set the overall
-resource limit; there is a second option called <b>--recursion-limit</b> that
-sets a limit on the amount of memory (usually stack) that is used (see the
-discussion of these options above).
-</P>
-<br><a name="SEC10" href="#TOC1">DIAGNOSTICS</a><br>
-<P>
-Exit status is 0 if any matches were found, 1 if no matches were found, and 2
-for syntax errors, overlong lines, non-existent or inaccessible files (even if
-matches were found in other files) or too many matching errors. Using the
-<b>-s</b> option to suppress error messages about inaccessible files does not
-affect the return code.
-</P>
-<br><a name="SEC11" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcrepattern</b>(3), <b>pcretest</b>(1).
-</P>
-<br><a name="SEC12" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC13" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 06 September 2011
-<br>
-Copyright &copy; 1997-2011 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrejit.html b/src/third_party/pcre-8.30/doc/html/pcrejit.html
deleted file mode 100644
index 7b23edb51d5..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrejit.html
+++ /dev/null
@@ -1,392 +0,0 @@
-<html>
-<head>
-<title>pcrejit specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrejit man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE JUST-IN-TIME COMPILER SUPPORT</a>
-<li><a name="TOC2" href="#SEC2">8-BIT and 16-BIT SUPPORT</a>
-<li><a name="TOC3" href="#SEC3">AVAILABILITY OF JIT SUPPORT</a>
-<li><a name="TOC4" href="#SEC4">SIMPLE USE OF JIT</a>
-<li><a name="TOC5" href="#SEC5">UNSUPPORTED OPTIONS AND PATTERN ITEMS</a>
-<li><a name="TOC6" href="#SEC6">RETURN VALUES FROM JIT EXECUTION</a>
-<li><a name="TOC7" href="#SEC7">SAVING AND RESTORING COMPILED PATTERNS</a>
-<li><a name="TOC8" href="#SEC8">CONTROLLING THE JIT STACK</a>
-<li><a name="TOC9" href="#SEC9">JIT STACK FAQ</a>
-<li><a name="TOC10" href="#SEC10">EXAMPLE CODE</a>
-<li><a name="TOC11" href="#SEC11">SEE ALSO</a>
-<li><a name="TOC12" href="#SEC12">AUTHOR</a>
-<li><a name="TOC13" href="#SEC13">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE JUST-IN-TIME COMPILER SUPPORT</a><br>
-<P>
-Just-in-time compiling is a heavyweight optimization that can greatly speed up
-pattern matching. However, it comes at the cost of extra processing before the
-match is performed. Therefore, it is of most benefit when the same pattern is
-going to be matched many times. This does not necessarily mean many calls of a
-matching function; if the pattern is not anchored, matching attempts may take
-place many times at various positions in the subject, even for a single call.
-Therefore, if the subject string is very long, it may still pay to use JIT for
-one-off matches.
-</P>
-<P>
-JIT support applies only to the traditional Perl-compatible matching function.
-It does not apply when the DFA matching function is being used. The code for
-this support was written by Zoltan Herczeg.
-</P>
-<br><a name="SEC2" href="#TOC1">8-BIT and 16-BIT SUPPORT</a><br>
-<P>
-JIT support is available for both the 8-bit and 16-bit PCRE libraries. To keep
-this documentation simple, only the 8-bit interface is described in what
-follows. If you are using the 16-bit library, substitute the 16-bit functions
-and 16-bit structures (for example, <i>pcre16_jit_stack</i> instead of
-<i>pcre_jit_stack</i>).
-</P>
-<br><a name="SEC3" href="#TOC1">AVAILABILITY OF JIT SUPPORT</a><br>
-<P>
-JIT support is an optional feature of PCRE. The "configure" option --enable-jit
-(or equivalent CMake option) must be set when PCRE is built if you want to use
-JIT. The support is limited to the following hardware platforms:
-<pre>
- ARM v5, v7, and Thumb2
- Intel x86 32-bit and 64-bit
- MIPS 32-bit
- Power PC 32-bit and 64-bit
-</pre>
-The Power PC support is designated as experimental because it has not been
-fully tested. If --enable-jit is set on an unsupported platform, compilation
-fails.
-</P>
-<P>
-A program that is linked with PCRE 8.20 or later can tell if JIT support is
-available by calling <b>pcre_config()</b> with the PCRE_CONFIG_JIT option. The
-result is 1 when JIT is available, and 0 otherwise. However, a simple program
-does not need to check this in order to use JIT. The API is implemented in a
-way that falls back to the ordinary PCRE code if JIT is not available.
-</P>
-<P>
-If your program may sometimes be linked with versions of PCRE that are older
-than 8.20, but you want to use JIT when it is available, you can test
-the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such
-as PCRE_CONFIG_JIT, for compile-time control of your code.
-</P>
-<br><a name="SEC4" href="#TOC1">SIMPLE USE OF JIT</a><br>
-<P>
-You have to do two things to make use of the JIT support in the simplest way:
-<pre>
- (1) Call <b>pcre_study()</b> with the PCRE_STUDY_JIT_COMPILE option for
- each compiled pattern, and pass the resulting <b>pcre_extra</b> block to
- <b>pcre_exec()</b>.
-
- (2) Use <b>pcre_free_study()</b> to free the <b>pcre_extra</b> block when it is
- no longer needed instead of just freeing it yourself. This
- ensures that any JIT data is also freed.
-</pre>
-For a program that may be linked with pre-8.20 versions of PCRE, you can insert
-<pre>
- #ifndef PCRE_STUDY_JIT_COMPILE
- #define PCRE_STUDY_JIT_COMPILE 0
- #endif
-</pre>
-so that no option is passed to <b>pcre_study()</b>, and then use something like
-this to free the study data:
-<pre>
- #ifdef PCRE_CONFIG_JIT
- pcre_free_study(study_ptr);
- #else
- pcre_free(study_ptr);
- #endif
-</pre>
-In some circumstances you may need to call additional functions. These are
-described in the section entitled
-<a href="#stackcontrol">"Controlling the JIT stack"</a>
-below.
-</P>
-<P>
-If JIT support is not available, PCRE_STUDY_JIT_COMPILE is ignored, and no JIT
-data is set up. Otherwise, the compiled pattern is passed to the JIT compiler,
-which turns it into machine code that executes much faster than the normal
-interpretive code. When <b>pcre_exec()</b> is passed a <b>pcre_extra</b> block
-containing a pointer to JIT code, it obeys that instead of the normal code. The
-result is identical, but the code runs much faster.
-</P>
-<P>
-There are some <b>pcre_exec()</b> options that are not supported for JIT
-execution. There are also some pattern items that JIT cannot handle. Details
-are given below. In both cases, execution automatically falls back to the
-interpretive code.
-</P>
-<P>
-If the JIT compiler finds an unsupported item, no JIT data is generated. You
-can find out if JIT execution is available after studying a pattern by calling
-<b>pcre_fullinfo()</b> with the PCRE_INFO_JIT option. A result of 1 means that
-JIT compilation was successful. A result of 0 means that JIT support is not
-available, or the pattern was not studied with PCRE_STUDY_JIT_COMPILE, or the
-JIT compiler was not able to handle the pattern.
-</P>
-<P>
-Once a pattern has been studied, with or without JIT, it can be used as many
-times as you like for matching different subject strings.
-</P>
-<br><a name="SEC5" href="#TOC1">UNSUPPORTED OPTIONS AND PATTERN ITEMS</a><br>
-<P>
-The only <b>pcre_exec()</b> options that are supported for JIT execution are
-PCRE_NO_UTF8_CHECK, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and
-PCRE_NOTEMPTY_ATSTART. Note in particular that partial matching is not
-supported.
-</P>
-<P>
-The unsupported pattern items are:
-<pre>
- \C match a single byte; not supported in UTF-8 mode
- (?Cn) callouts
- (*COMMIT) )
- (*MARK) )
- (*PRUNE) ) the backtracking control verbs
- (*SKIP) )
- (*THEN) )
-</pre>
-Support for some of these may be added in future.
-</P>
-<br><a name="SEC6" href="#TOC1">RETURN VALUES FROM JIT EXECUTION</a><br>
-<P>
-When a pattern is matched using JIT execution, the return values are the same
-as those given by the interpretive <b>pcre_exec()</b> code, with the addition of
-one new error code: PCRE_ERROR_JIT_STACKLIMIT. This means that the memory used
-for the JIT stack was insufficient. See
-<a href="#stackcontrol">"Controlling the JIT stack"</a>
-below for a discussion of JIT stack usage. For compatibility with the
-interpretive <b>pcre_exec()</b> code, no more than two-thirds of the
-<i>ovector</i> argument is used for passing back captured substrings.
-</P>
-<P>
-The error code PCRE_ERROR_MATCHLIMIT is returned by the JIT code if searching a
-very large pattern tree goes on for too long, as it is in the same circumstance
-when JIT is not used, but the details of exactly what is counted are not the
-same. The PCRE_ERROR_RECURSIONLIMIT error code is never returned by JIT
-execution.
-</P>
-<br><a name="SEC7" href="#TOC1">SAVING AND RESTORING COMPILED PATTERNS</a><br>
-<P>
-The code that is generated by the JIT compiler is architecture-specific, and is
-also position dependent. For those reasons it cannot be saved (in a file or
-database) and restored later like the bytecode and other data of a compiled
-pattern. Saving and restoring compiled patterns is not something many people
-do. More detail about this facility is given in the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation. It should be possible to run <b>pcre_study()</b> on a saved and
-restored pattern, and thereby recreate the JIT data, but because JIT
-compilation uses significant resources, it is probably not worth doing this;
-you might as well recompile the original pattern.
-<a name="stackcontrol"></a></P>
-<br><a name="SEC8" href="#TOC1">CONTROLLING THE JIT STACK</a><br>
-<P>
-When the compiled JIT code runs, it needs a block of memory to use as a stack.
-By default, it uses 32K on the machine stack. However, some large or
-complicated patterns need more than this. The error PCRE_ERROR_JIT_STACKLIMIT
-is given when there is not enough stack. Three functions are provided for
-managing blocks of memory for use as JIT stacks. There is further discussion
-about the use of JIT stacks in the section entitled
-<a href="#stackcontrol">"JIT stack FAQ"</a>
-below.
-</P>
-<P>
-The <b>pcre_jit_stack_alloc()</b> function creates a JIT stack. Its arguments
-are a starting size and a maximum size, and it returns a pointer to an opaque
-structure of type <b>pcre_jit_stack</b>, or NULL if there is an error. The
-<b>pcre_jit_stack_free()</b> function can be used to free a stack that is no
-longer needed. (For the technically minded: the address space is allocated by
-mmap or VirtualAlloc.)
-</P>
-<P>
-JIT uses far less memory for recursion than the interpretive code,
-and a maximum stack size of 512K to 1M should be more than enough for any
-pattern.
-</P>
-<P>
-The <b>pcre_assign_jit_stack()</b> function specifies which stack JIT code
-should use. Its arguments are as follows:
-<pre>
- pcre_extra *extra
- pcre_jit_callback callback
- void *data
-</pre>
-The <i>extra</i> argument must be the result of studying a pattern with
-PCRE_STUDY_JIT_COMPILE. There are three cases for the values of the other two
-options:
-<pre>
- (1) If <i>callback</i> is NULL and <i>data</i> is NULL, an internal 32K block
- on the machine stack is used.
-
- (2) If <i>callback</i> is NULL and <i>data</i> is not NULL, <i>data</i> must be
- a valid JIT stack, the result of calling <b>pcre_jit_stack_alloc()</b>.
-
- (3) If <i>callback</i> not NULL, it must point to a function that is called
- with <i>data</i> as an argument at the start of matching, in order to
- set up a JIT stack. If the result is NULL, the internal 32K stack
- is used; otherwise the return value must be a valid JIT stack,
- the result of calling <b>pcre_jit_stack_alloc()</b>.
-</pre>
-You may safely assign the same JIT stack to more than one pattern, as long as
-they are all matched sequentially in the same thread. In a multithread
-application, each thread must use its own JIT stack.
-</P>
-<P>
-Strictly speaking, even more is allowed. You can assign the same stack to any
-number of patterns as long as they are not used for matching by multiple
-threads at the same time. For example, you can assign the same stack to all
-compiled patterns, and use a global mutex in the callback to wait until the
-stack is available for use. However, this is an inefficient solution, and
-not recommended.
-</P>
-<P>
-This is a suggestion for how a typical multithreaded program might operate:
-<pre>
- During thread initalization
- thread_local_var = pcre_jit_stack_alloc(...)
-
- During thread exit
- pcre_jit_stack_free(thread_local_var)
-
- Use a one-line callback function
- return thread_local_var
-</pre>
-All the functions described in this section do nothing if JIT is not available,
-and <b>pcre_assign_jit_stack()</b> does nothing unless the <b>extra</b> argument
-is non-NULL and points to a <b>pcre_extra</b> block that is the result of a
-successful study with PCRE_STUDY_JIT_COMPILE.
-<a name="stackfaq"></a></P>
-<br><a name="SEC9" href="#TOC1">JIT STACK FAQ</a><br>
-<P>
-(1) Why do we need JIT stacks?
-<br>
-<br>
-PCRE (and JIT) is a recursive, depth-first engine, so it needs a stack where
-the local data of the current node is pushed before checking its child nodes.
-Allocating real machine stack on some platforms is difficult. For example, the
-stack chain needs to be updated every time if we extend the stack on PowerPC.
-Although it is possible, its updating time overhead decreases performance. So
-we do the recursion in memory.
-</P>
-<P>
-(2) Why don't we simply allocate blocks of memory with <b>malloc()</b>?
-<br>
-<br>
-Modern operating systems have a nice feature: they can reserve an address space
-instead of allocating memory. We can safely allocate memory pages inside this
-address space, so the stack could grow without moving memory data (this is
-important because of pointers). Thus we can allocate 1M address space, and use
-only a single memory page (usually 4K) if that is enough. However, we can still
-grow up to 1M anytime if needed.
-</P>
-<P>
-(3) Who "owns" a JIT stack?
-<br>
-<br>
-The owner of the stack is the user program, not the JIT studied pattern or
-anything else. The user program must ensure that if a stack is used by
-<b>pcre_exec()</b>, (that is, it is assigned to the pattern currently running),
-that stack must not be used by any other threads (to avoid overwriting the same
-memory area). The best practice for multithreaded programs is to allocate a
-stack for each thread, and return this stack through the JIT callback function.
-</P>
-<P>
-(4) When should a JIT stack be freed?
-<br>
-<br>
-You can free a JIT stack at any time, as long as it will not be used by
-<b>pcre_exec()</b> again. When you assign the stack to a pattern, only a pointer
-is set. There is no reference counting or any other magic. You can free the
-patterns and stacks in any order, anytime. Just <i>do not</i> call
-<b>pcre_exec()</b> with a pattern pointing to an already freed stack, as that
-will cause SEGFAULT. (Also, do not free a stack currently used by
-<b>pcre_exec()</b> in another thread). You can also replace the stack for a
-pattern at any time. You can even free the previous stack before assigning a
-replacement.
-</P>
-<P>
-(5) Should I allocate/free a stack every time before/after calling
-<b>pcre_exec()</b>?
-<br>
-<br>
-No, because this is too costly in terms of resources. However, you could
-implement some clever idea which release the stack if it is not used in let's
-say two minutes. The JIT callback can help to achive this without keeping a
-list of the currently JIT studied patterns.
-</P>
-<P>
-(6) OK, the stack is for long term memory allocation. But what happens if a
-pattern causes stack overflow with a stack of 1M? Is that 1M kept until the
-stack is freed?
-<br>
-<br>
-Especially on embedded sytems, it might be a good idea to release
-memory sometimes without freeing the stack. There is no API for this at the
-moment. Probably a function call which returns with the currently allocated
-memory for any stack and another which allows releasing memory (shrinking the
-stack) would be a good idea if someone needs this.
-</P>
-<P>
-(7) This is too much of a headache. Isn't there any better solution for JIT
-stack handling?
-<br>
-<br>
-No, thanks to Windows. If POSIX threads were used everywhere, we could throw
-out this complicated API.
-</P>
-<br><a name="SEC10" href="#TOC1">EXAMPLE CODE</a><br>
-<P>
-This is a single-threaded example that specifies a JIT stack without using a
-callback.
-<pre>
- int rc;
- int ovector[30];
- pcre *re;
- pcre_extra *extra;
- pcre_jit_stack *jit_stack;
-
- re = pcre_compile(pattern, 0, &error, &erroffset, NULL);
- /* Check for errors */
- extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
- jit_stack = pcre_jit_stack_alloc(32*1024, 512*1024);
- /* Check for error (NULL) */
- pcre_assign_jit_stack(extra, NULL, jit_stack);
- rc = pcre_exec(re, extra, subject, length, 0, 0, ovector, 30);
- /* Check results */
- pcre_free(re);
- pcre_free_study(extra);
- pcre_jit_stack_free(jit_stack);
-
-</PRE>
-</P>
-<br><a name="SEC11" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcreapi</b>(3)
-</P>
-<br><a name="SEC12" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel (FAQ by Zoltan Herczeg)
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC13" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 08 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrelimits.html b/src/third_party/pcre-8.30/doc/html/pcrelimits.html
deleted file mode 100644
index 94c554e4267..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrelimits.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<html>
-<head>
-<title>pcrelimits specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrelimits man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-SIZE AND OTHER LIMITATIONS
-</b><br>
-<P>
-There are some size limitations in PCRE but it is hoped that they will never in
-practice be relevant.
-</P>
-<P>
-The maximum length of a compiled pattern is approximately 64K data units (bytes
-for the 8-bit library, 16-bit units for the 16-bit library) if PCRE is compiled
-with the default internal linkage size of 2 bytes. If you want to process
-regular expressions that are truly enormous, you can compile PCRE with an
-internal linkage size of 3 or 4 (when building the 16-bit library, 3 is rounded
-up to 4). See the <b>README</b> file in the source distribution and the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation for details. In these cases the limit is substantially larger.
-However, the speed of execution is slower.
-</P>
-<P>
-All values in repeating quantifiers must be less than 65536.
-</P>
-<P>
-There is no limit to the number of parenthesized subpatterns, but there can be
-no more than 65535 capturing subpatterns.
-</P>
-<P>
-There is a limit to the number of forward references to subsequent subpatterns
-of around 200,000. Repeated forward references with fixed upper limits, for
-example, (?2){0,100} when subpattern number 2 is to the right, are included in
-the count. There is no limit to the number of backward references.
-</P>
-<P>
-The maximum length of name for a named subpattern is 32 characters, and the
-maximum number of named subpatterns is 10000.
-</P>
-<P>
-The maximum length of a subject string is the largest positive number that an
-integer variable can hold. However, when using the traditional matching
-function, PCRE uses recursion to handle subpatterns and indefinite repetition.
-This means that the available stack space may limit the size of a subject
-string that can be processed by certain patterns. For a discussion of stack
-issues, see the
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 08 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrematching.html b/src/third_party/pcre-8.30/doc/html/pcrematching.html
deleted file mode 100644
index 6abd17e9c26..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrematching.html
+++ /dev/null
@@ -1,232 +0,0 @@
-<html>
-<head>
-<title>pcrematching specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrematching man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE MATCHING ALGORITHMS</a>
-<li><a name="TOC2" href="#SEC2">REGULAR EXPRESSIONS AS TREES</a>
-<li><a name="TOC3" href="#SEC3">THE STANDARD MATCHING ALGORITHM</a>
-<li><a name="TOC4" href="#SEC4">THE ALTERNATIVE MATCHING ALGORITHM</a>
-<li><a name="TOC5" href="#SEC5">ADVANTAGES OF THE ALTERNATIVE ALGORITHM</a>
-<li><a name="TOC6" href="#SEC6">DISADVANTAGES OF THE ALTERNATIVE ALGORITHM</a>
-<li><a name="TOC7" href="#SEC7">AUTHOR</a>
-<li><a name="TOC8" href="#SEC8">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE MATCHING ALGORITHMS</a><br>
-<P>
-This document describes the two different algorithms that are available in PCRE
-for matching a compiled regular expression against a given subject string. The
-"standard" algorithm is the one provided by the <b>pcre_exec()</b> and
-<b>pcre16_exec()</b> functions. These work in the same was as Perl's matching
-function, and provide a Perl-compatible matching operation. The just-in-time
-(JIT) optimization that is described in the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation is compatible with these functions.
-</P>
-<P>
-An alternative algorithm is provided by the <b>pcre_dfa_exec()</b> and
-<b>pcre16_dfa_exec()</b> functions; they operate in a different way, and are not
-Perl-compatible. This alternative has advantages and disadvantages compared
-with the standard algorithm, and these are described below.
-</P>
-<P>
-When there is only one possible way in which a given subject string can match a
-pattern, the two algorithms give the same answer. A difference arises, however,
-when there are multiple possibilities. For example, if the pattern
-<pre>
- ^&#60;.*&#62;
-</pre>
-is matched against the string
-<pre>
- &#60;something&#62; &#60;something else&#62; &#60;something further&#62;
-</pre>
-there are three possible answers. The standard algorithm finds only one of
-them, whereas the alternative algorithm finds all three.
-</P>
-<br><a name="SEC2" href="#TOC1">REGULAR EXPRESSIONS AS TREES</a><br>
-<P>
-The set of strings that are matched by a regular expression can be represented
-as a tree structure. An unlimited repetition in the pattern makes the tree of
-infinite size, but it is still a tree. Matching the pattern to a given subject
-string (from a given starting point) can be thought of as a search of the tree.
-There are two ways to search a tree: depth-first and breadth-first, and these
-correspond to the two matching algorithms provided by PCRE.
-</P>
-<br><a name="SEC3" href="#TOC1">THE STANDARD MATCHING ALGORITHM</a><br>
-<P>
-In the terminology of Jeffrey Friedl's book "Mastering Regular
-Expressions", the standard algorithm is an "NFA algorithm". It conducts a
-depth-first search of the pattern tree. That is, it proceeds along a single
-path through the tree, checking that the subject matches what is required. When
-there is a mismatch, the algorithm tries any alternatives at the current point,
-and if they all fail, it backs up to the previous branch point in the tree, and
-tries the next alternative branch at that level. This often involves backing up
-(moving to the left) in the subject string as well. The order in which
-repetition branches are tried is controlled by the greedy or ungreedy nature of
-the quantifier.
-</P>
-<P>
-If a leaf node is reached, a matching string has been found, and at that point
-the algorithm stops. Thus, if there is more than one possible match, this
-algorithm returns the first one that it finds. Whether this is the shortest,
-the longest, or some intermediate length depends on the way the greedy and
-ungreedy repetition quantifiers are specified in the pattern.
-</P>
-<P>
-Because it ends up with a single path through the tree, it is relatively
-straightforward for this algorithm to keep track of the substrings that are
-matched by portions of the pattern in parentheses. This provides support for
-capturing parentheses and back references.
-</P>
-<br><a name="SEC4" href="#TOC1">THE ALTERNATIVE MATCHING ALGORITHM</a><br>
-<P>
-This algorithm conducts a breadth-first search of the tree. Starting from the
-first matching point in the subject, it scans the subject string from left to
-right, once, character by character, and as it does this, it remembers all the
-paths through the tree that represent valid matches. In Friedl's terminology,
-this is a kind of "DFA algorithm", though it is not implemented as a
-traditional finite state machine (it keeps multiple states active
-simultaneously).
-</P>
-<P>
-Although the general principle of this matching algorithm is that it scans the
-subject string only once, without backtracking, there is one exception: when a
-lookaround assertion is encountered, the characters following or preceding the
-current point have to be independently inspected.
-</P>
-<P>
-The scan continues until either the end of the subject is reached, or there are
-no more unterminated paths. At this point, terminated paths represent the
-different matching possibilities (if there are none, the match has failed).
-Thus, if there is more than one possible match, this algorithm finds all of
-them, and in particular, it finds the longest. The matches are returned in
-decreasing order of length. There is an option to stop the algorithm after the
-first match (which is necessarily the shortest) is found.
-</P>
-<P>
-Note that all the matches that are found start at the same point in the
-subject. If the pattern
-<pre>
- cat(er(pillar)?)?
-</pre>
-is matched against the string "the caterpillar catchment", the result will be
-the three strings "caterpillar", "cater", and "cat" that start at the fifth
-character of the subject. The algorithm does not automatically move on to find
-matches that start at later positions.
-</P>
-<P>
-There are a number of features of PCRE regular expressions that are not
-supported by the alternative matching algorithm. They are as follows:
-</P>
-<P>
-1. Because the algorithm finds all possible matches, the greedy or ungreedy
-nature of repetition quantifiers is not relevant. Greedy and ungreedy
-quantifiers are treated in exactly the same way. However, possessive
-quantifiers can make a difference when what follows could also match what is
-quantified, for example in a pattern like this:
-<pre>
- ^a++\w!
-</pre>
-This pattern matches "aaab!" but not "aaa!", which would be matched by a
-non-possessive quantifier. Similarly, if an atomic group is present, it is
-matched as if it were a standalone pattern at the current point, and the
-longest match is then "locked in" for the rest of the overall pattern.
-</P>
-<P>
-2. When dealing with multiple paths through the tree simultaneously, it is not
-straightforward to keep track of captured substrings for the different matching
-possibilities, and PCRE's implementation of this algorithm does not attempt to
-do this. This means that no captured substrings are available.
-</P>
-<P>
-3. Because no substrings are captured, back references within the pattern are
-not supported, and cause errors if encountered.
-</P>
-<P>
-4. For the same reason, conditional expressions that use a backreference as the
-condition or test for a specific group recursion are not supported.
-</P>
-<P>
-5. Because many paths through the tree may be active, the \K escape sequence,
-which resets the start of the match when encountered (but may be on some paths
-and not on others), is not supported. It causes an error if encountered.
-</P>
-<P>
-6. Callouts are supported, but the value of the <i>capture_top</i> field is
-always 1, and the value of the <i>capture_last</i> field is always -1.
-</P>
-<P>
-7. The \C escape sequence, which (in the standard algorithm) always matches a
-single data unit, even in UTF-8 or UTF-16 modes, is not supported in these
-modes, because the alternative algorithm moves through the subject string one
-character (not data unit) at a time, for all active paths through the tree.
-</P>
-<P>
-8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE) are not
-supported. (*FAIL) is supported, and behaves like a failing negative assertion.
-</P>
-<br><a name="SEC5" href="#TOC1">ADVANTAGES OF THE ALTERNATIVE ALGORITHM</a><br>
-<P>
-Using the alternative matching algorithm provides the following advantages:
-</P>
-<P>
-1. All possible matches (at a single point in the subject) are automatically
-found, and in particular, the longest match is found. To find more than one
-match using the standard algorithm, you have to do kludgy things with
-callouts.
-</P>
-<P>
-2. Because the alternative algorithm scans the subject string just once, and
-never needs to backtrack (except for lookbehinds), it is possible to pass very
-long subject strings to the matching function in several pieces, checking for
-partial matching each time. Although it is possible to do multi-segment
-matching using the standard algorithm by retaining partially matched
-substrings, it is more complicated. The
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation gives details of partial matching and discusses multi-segment
-matching.
-</P>
-<br><a name="SEC6" href="#TOC1">DISADVANTAGES OF THE ALTERNATIVE ALGORITHM</a><br>
-<P>
-The alternative algorithm suffers from a number of disadvantages:
-</P>
-<P>
-1. It is substantially slower than the standard algorithm. This is partly
-because it has to search for all possible matches, but is also because it is
-less susceptible to optimization.
-</P>
-<P>
-2. Capturing parentheses and back references are not supported.
-</P>
-<P>
-3. Although atomic groups are supported, their use does not provide the
-performance advantage that it does for the standard algorithm.
-</P>
-<br><a name="SEC7" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC8" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 08 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrepartial.html b/src/third_party/pcre-8.30/doc/html/pcrepartial.html
deleted file mode 100644
index 989ce382ce1..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrepartial.html
+++ /dev/null
@@ -1,444 +0,0 @@
-<html>
-<head>
-<title>pcrepartial specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrepartial man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PARTIAL MATCHING IN PCRE</a>
-<li><a name="TOC2" href="#SEC2">PARTIAL MATCHING USING pcre_exec() OR pcre16_exec()</a>
-<li><a name="TOC3" href="#SEC3">PARTIAL MATCHING USING pcre_dfa_exec() OR pcre16_dfa_exec()</a>
-<li><a name="TOC4" href="#SEC4">PARTIAL MATCHING AND WORD BOUNDARIES</a>
-<li><a name="TOC5" href="#SEC5">FORMERLY RESTRICTED PATTERNS</a>
-<li><a name="TOC6" href="#SEC6">EXAMPLE OF PARTIAL MATCHING USING PCRETEST</a>
-<li><a name="TOC7" href="#SEC7">MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre16_dfa_exec()</a>
-<li><a name="TOC8" href="#SEC8">MULTI-SEGMENT MATCHING WITH pcre_exec() OR pcre16_exec()</a>
-<li><a name="TOC9" href="#SEC9">ISSUES WITH MULTI-SEGMENT MATCHING</a>
-<li><a name="TOC10" href="#SEC10">AUTHOR</a>
-<li><a name="TOC11" href="#SEC11">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PARTIAL MATCHING IN PCRE</a><br>
-<P>
-In normal use of PCRE, if the subject string that is passed to a matching
-function matches as far as it goes, but is too short to match the entire
-pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances where it might
-be helpful to distinguish this case from other cases in which there is no
-match.
-</P>
-<P>
-Consider, for example, an application where a human is required to type in data
-for a field with specific formatting requirements. An example might be a date
-in the form <i>ddmmmyy</i>, defined by this pattern:
-<pre>
- ^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$
-</pre>
-If the application sees the user's keystrokes one by one, and can check that
-what has been typed so far is potentially valid, it is able to raise an error
-as soon as a mistake is made, by beeping and not reflecting the character that
-has been typed, for example. This immediate feedback is likely to be a better
-user interface than a check that is delayed until the entire string has been
-entered. Partial matching can also be useful when the subject string is very
-long and is not all available at once.
-</P>
-<P>
-PCRE supports partial matching by means of the PCRE_PARTIAL_SOFT and
-PCRE_PARTIAL_HARD options, which can be set when calling any of the matching
-functions. For backwards compatibility, PCRE_PARTIAL is a synonym for
-PCRE_PARTIAL_SOFT. The essential difference between the two options is whether
-or not a partial match is preferred to an alternative complete match, though
-the details differ between the two types of matching function. If both options
-are set, PCRE_PARTIAL_HARD takes precedence.
-</P>
-<P>
-Setting a partial matching option disables the use of any just-in-time code
-that was set up by studying the compiled pattern with the
-PCRE_STUDY_JIT_COMPILE option. It also disables two of PCRE's standard
-optimizations. PCRE remembers the last literal data unit in a pattern, and
-abandons matching immediately if it is not present in the subject string. This
-optimization cannot be used for a subject string that might match only
-partially. If the pattern was studied, PCRE knows the minimum length of a
-matching string, and does not bother to run the matching function on shorter
-strings. This optimization is also disabled for partial matching.
-</P>
-<br><a name="SEC2" href="#TOC1">PARTIAL MATCHING USING pcre_exec() OR pcre16_exec()</a><br>
-<P>
-A partial match occurs during a call to <b>pcre_exec()</b> or
-<b>pcre16_exec()</b> when the end of the subject string is reached successfully,
-but matching cannot continue because more characters are needed. However, at
-least one character in the subject must have been inspected. This character
-need not form part of the final matched string; lookbehind assertions and the
-\K escape sequence provide ways of inspecting characters before the start of a
-matched substring. The requirement for inspecting at least one character exists
-because an empty string can always be matched; without such a restriction there
-would always be a partial match of an empty string at the end of the subject.
-</P>
-<P>
-If there are at least two slots in the offsets vector when a partial match is
-returned, the first slot is set to the offset of the earliest character that
-was inspected. For convenience, the second offset points to the end of the
-subject so that a substring can easily be identified.
-</P>
-<P>
-For the majority of patterns, the first offset identifies the start of the
-partially matched string. However, for patterns that contain lookbehind
-assertions, or \K, or begin with \b or \B, earlier characters have been
-inspected while carrying out the match. For example:
-<pre>
- /(?&#60;=abc)123/
-</pre>
-This pattern matches "123", but only if it is preceded by "abc". If the subject
-string is "xyzabc12", the offsets after a partial match are for the substring
-"abc12", because all these characters are needed if another match is tried
-with extra characters added to the subject.
-</P>
-<P>
-What happens when a partial match is identified depends on which of the two
-partial matching options are set.
-</P>
-<br><b>
-PCRE_PARTIAL_SOFT WITH pcre_exec() OR pcre16_exec()
-</b><br>
-<P>
-If PCRE_PARTIAL_SOFT is set when <b>pcre_exec()</b> or <b>pcre16_exec()</b>
-identifies a partial match, the partial match is remembered, but matching
-continues as normal, and other alternatives in the pattern are tried. If no
-complete match can be found, PCRE_ERROR_PARTIAL is returned instead of
-PCRE_ERROR_NOMATCH.
-</P>
-<P>
-This option is "soft" because it prefers a complete match over a partial match.
-All the various matching items in a pattern behave as if the subject string is
-potentially complete. For example, \z, \Z, and $ match at the end of the
-subject, as normal, and for \b and \B the end of the subject is treated as a
-non-alphanumeric.
-</P>
-<P>
-If there is more than one partial match, the first one that was found provides
-the data that is returned. Consider this pattern:
-<pre>
- /123\w+X|dogY/
-</pre>
-If this is matched against the subject string "abc123dog", both
-alternatives fail to match, but the end of the subject is reached during
-matching, so PCRE_ERROR_PARTIAL is returned. The offsets are set to 3 and 9,
-identifying "123dog" as the first partial match that was found. (In this
-example, there are two partial matches, because "dog" on its own partially
-matches the second alternative.)
-</P>
-<br><b>
-PCRE_PARTIAL_HARD WITH pcre_exec() OR pcre16_exec()
-</b><br>
-<P>
-If PCRE_PARTIAL_HARD is set for <b>pcre_exec()</b> or <b>pcre16_exec()</b>,
-PCRE_ERROR_PARTIAL is returned as soon as a partial match is found, without
-continuing to search for possible complete matches. This option is "hard"
-because it prefers an earlier partial match over a later complete match. For
-this reason, the assumption is made that the end of the supplied subject string
-may not be the true end of the available data, and so, if \z, \Z, \b, \B,
-or $ are encountered at the end of the subject, the result is
-PCRE_ERROR_PARTIAL, provided that at least one character in the subject has
-been inspected.
-</P>
-<P>
-Setting PCRE_PARTIAL_HARD also affects the way UTF-8 and UTF-16
-subject strings are checked for validity. Normally, an invalid sequence
-causes the error PCRE_ERROR_BADUTF8 or PCRE_ERROR_BADUTF16. However, in the
-special case of a truncated character at the end of the subject,
-PCRE_ERROR_SHORTUTF8 or PCRE_ERROR_SHORTUTF16 is returned when
-PCRE_PARTIAL_HARD is set.
-</P>
-<br><b>
-Comparing hard and soft partial matching
-</b><br>
-<P>
-The difference between the two partial matching options can be illustrated by a
-pattern such as:
-<pre>
- /dog(sbody)?/
-</pre>
-This matches either "dog" or "dogsbody", greedily (that is, it prefers the
-longer string if possible). If it is matched against the string "dog" with
-PCRE_PARTIAL_SOFT, it yields a complete match for "dog". However, if
-PCRE_PARTIAL_HARD is set, the result is PCRE_ERROR_PARTIAL. On the other hand,
-if the pattern is made ungreedy the result is different:
-<pre>
- /dog(sbody)??/
-</pre>
-In this case the result is always a complete match because that is found first,
-and matching never continues after finding a complete match. It might be easier
-to follow this explanation by thinking of the two patterns like this:
-<pre>
- /dog(sbody)?/ is the same as /dogsbody|dog/
- /dog(sbody)??/ is the same as /dog|dogsbody/
-</pre>
-The second pattern will never match "dogsbody", because it will always find the
-shorter match first.
-</P>
-<br><a name="SEC3" href="#TOC1">PARTIAL MATCHING USING pcre_dfa_exec() OR pcre16_dfa_exec()</a><br>
-<P>
-The DFA functions move along the subject string character by character, without
-backtracking, searching for all possible matches simultaneously. If the end of
-the subject is reached before the end of the pattern, there is the possibility
-of a partial match, again provided that at least one character has been
-inspected.
-</P>
-<P>
-When PCRE_PARTIAL_SOFT is set, PCRE_ERROR_PARTIAL is returned only if there
-have been no complete matches. Otherwise, the complete matches are returned.
-However, if PCRE_PARTIAL_HARD is set, a partial match takes precedence over any
-complete matches. The portion of the string that was inspected when the longest
-partial match was found is set as the first matching string, provided there are
-at least two slots in the offsets vector.
-</P>
-<P>
-Because the DFA functions always search for all possible matches, and there is
-no difference between greedy and ungreedy repetition, their behaviour is
-different from the standard functions when PCRE_PARTIAL_HARD is set. Consider
-the string "dog" matched against the ungreedy pattern shown above:
-<pre>
- /dog(sbody)??/
-</pre>
-Whereas the standard functions stop as soon as they find the complete match for
-"dog", the DFA functions also find the partial match for "dogsbody", and so
-return that when PCRE_PARTIAL_HARD is set.
-</P>
-<br><a name="SEC4" href="#TOC1">PARTIAL MATCHING AND WORD BOUNDARIES</a><br>
-<P>
-If a pattern ends with one of sequences \b or \B, which test for word
-boundaries, partial matching with PCRE_PARTIAL_SOFT can give counter-intuitive
-results. Consider this pattern:
-<pre>
- /\bcat\b/
-</pre>
-This matches "cat", provided there is a word boundary at either end. If the
-subject string is "the cat", the comparison of the final "t" with a following
-character cannot take place, so a partial match is found. However, normal
-matching carries on, and \b matches at the end of the subject when the last
-character is a letter, so a complete match is found. The result, therefore, is
-<i>not</i> PCRE_ERROR_PARTIAL. Using PCRE_PARTIAL_HARD in this case does yield
-PCRE_ERROR_PARTIAL, because then the partial match takes precedence.
-</P>
-<br><a name="SEC5" href="#TOC1">FORMERLY RESTRICTED PATTERNS</a><br>
-<P>
-For releases of PCRE prior to 8.00, because of the way certain internal
-optimizations were implemented in the <b>pcre_exec()</b> function, the
-PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be used with
-all patterns. From release 8.00 onwards, the restrictions no longer apply, and
-partial matching with can be requested for any pattern.
-</P>
-<P>
-Items that were formerly restricted were repeated single characters and
-repeated metasequences. If PCRE_PARTIAL was set for a pattern that did not
-conform to the restrictions, <b>pcre_exec()</b> returned the error code
-PCRE_ERROR_BADPARTIAL (-13). This error code is no longer in use. The
-PCRE_INFO_OKPARTIAL call to <b>pcre_fullinfo()</b> to find out if a compiled
-pattern can be used for partial matching now always returns 1.
-</P>
-<br><a name="SEC6" href="#TOC1">EXAMPLE OF PARTIAL MATCHING USING PCRETEST</a><br>
-<P>
-If the escape sequence \P is present in a <b>pcretest</b> data line, the
-PCRE_PARTIAL_SOFT option is used for the match. Here is a run of <b>pcretest</b>
-that uses the date example quoted above:
-<pre>
- re&#62; /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data&#62; 25jun04\P
- 0: 25jun04
- 1: jun
- data&#62; 25dec3\P
- Partial match: 23dec3
- data&#62; 3ju\P
- Partial match: 3ju
- data&#62; 3juj\P
- No match
- data&#62; j\P
- No match
-</pre>
-The first data string is matched completely, so <b>pcretest</b> shows the
-matched substrings. The remaining four strings do not match the complete
-pattern, but the first two are partial matches. Similar output is obtained
-if DFA matching is used.
-</P>
-<P>
-If the escape sequence \P is present more than once in a <b>pcretest</b> data
-line, the PCRE_PARTIAL_HARD option is set for the match.
-</P>
-<br><a name="SEC7" href="#TOC1">MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre16_dfa_exec()</a><br>
-<P>
-When a partial match has been found using a DFA matching function, it is
-possible to continue the match by providing additional subject data and calling
-the function again with the same compiled regular expression, this time setting
-the PCRE_DFA_RESTART option. You must pass the same working space as before,
-because this is where details of the previous partial match are stored. Here is
-an example using <b>pcretest</b>, using the \R escape sequence to set the
-PCRE_DFA_RESTART option (\D specifies the use of the DFA matching function):
-<pre>
- re&#62; /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data&#62; 23ja\P\D
- Partial match: 23ja
- data&#62; n05\R\D
- 0: n05
-</pre>
-The first call has "23ja" as the subject, and requests partial matching; the
-second call has "n05" as the subject for the continued (restarted) match.
-Notice that when the match is complete, only the last part is shown; PCRE does
-not retain the previously partially-matched string. It is up to the calling
-program to do that if it needs to.
-</P>
-<P>
-You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with
-PCRE_DFA_RESTART to continue partial matching over multiple segments. This
-facility can be used to pass very long subject strings to the DFA matching
-functions.
-</P>
-<br><a name="SEC8" href="#TOC1">MULTI-SEGMENT MATCHING WITH pcre_exec() OR pcre16_exec()</a><br>
-<P>
-From release 8.00, the standard matching functions can also be used to do
-multi-segment matching. Unlike the DFA functions, it is not possible to
-restart the previous match with a new segment of data. Instead, new data must
-be added to the previous subject string, and the entire match re-run, starting
-from the point where the partial match occurred. Earlier data can be discarded.
-</P>
-<P>
-It is best to use PCRE_PARTIAL_HARD in this situation, because it does not
-treat the end of a segment as the end of the subject when matching \z, \Z,
-\b, \B, and $. Consider an unanchored pattern that matches dates:
-<pre>
- re&#62; /\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d/
- data&#62; The date is 23ja\P\P
- Partial match: 23ja
-</pre>
-At this stage, an application could discard the text preceding "23ja", add on
-text from the next segment, and call the matching function again. Unlike the
-DFA matching functions the entire matching string must always be available, and
-the complete matching process occurs for each call, so more memory and more
-processing time is needed.
-</P>
-<P>
-<b>Note:</b> If the pattern contains lookbehind assertions, or \K, or starts
-with \b or \B, the string that is returned for a partial match includes
-characters that precede the partially matched string itself, because these must
-be retained when adding on more characters for a subsequent matching attempt.
-</P>
-<br><a name="SEC9" href="#TOC1">ISSUES WITH MULTI-SEGMENT MATCHING</a><br>
-<P>
-Certain types of pattern may give problems with multi-segment matching,
-whichever matching function is used.
-</P>
-<P>
-1. If the pattern contains a test for the beginning of a line, you need to pass
-the PCRE_NOTBOL option when the subject string for any call does start at the
-beginning of a line. There is also a PCRE_NOTEOL option, but in practice when
-doing multi-segment matching you should be using PCRE_PARTIAL_HARD, which
-includes the effect of PCRE_NOTEOL.
-</P>
-<P>
-2. Lookbehind assertions at the start of a pattern are catered for in the
-offsets that are returned for a partial match. However, in theory, a lookbehind
-assertion later in the pattern could require even earlier characters to be
-inspected, and it might not have been reached when a partial match occurs. This
-is probably an extremely unlikely case; you could guard against it to a certain
-extent by always including extra characters at the start.
-</P>
-<P>
-3. Matching a subject string that is split into multiple segments may not
-always produce exactly the same result as matching over one single long string,
-especially when PCRE_PARTIAL_SOFT is used. The section "Partial Matching and
-Word Boundaries" above describes an issue that arises if the pattern ends with
-\b or \B. Another kind of difference may occur when there are multiple
-matching possibilities, because (for PCRE_PARTIAL_SOFT) a partial match result
-is given only when there are no completed matches. This means that as soon as
-the shortest match has been found, continuation to a new subject segment is no
-longer possible. Consider again this <b>pcretest</b> example:
-<pre>
- re&#62; /dog(sbody)?/
- data&#62; dogsb\P
- 0: dog
- data&#62; do\P\D
- Partial match: do
- data&#62; gsb\R\P\D
- 0: g
- data&#62; dogsbody\D
- 0: dogsbody
- 1: dog
-</pre>
-The first data line passes the string "dogsb" to a standard matching function,
-setting the PCRE_PARTIAL_SOFT option. Although the string is a partial match
-for "dogsbody", the result is not PCRE_ERROR_PARTIAL, because the shorter
-string "dog" is a complete match. Similarly, when the subject is presented to
-a DFA matching function in several parts ("do" and "gsb" being the first two)
-the match stops when "dog" has been found, and it is not possible to continue.
-On the other hand, if "dogsbody" is presented as a single string, a DFA
-matching function finds both matches.
-</P>
-<P>
-Because of these problems, it is best to use PCRE_PARTIAL_HARD when matching
-multi-segment data. The example above then behaves differently:
-<pre>
- re&#62; /dog(sbody)?/
- data&#62; dogsb\P\P
- Partial match: dogsb
- data&#62; do\P\D
- Partial match: do
- data&#62; gsb\R\P\P\D
- Partial match: gsb
-</pre>
-4. Patterns that contain alternatives at the top level which do not all start
-with the same pattern item may not work as expected when PCRE_DFA_RESTART is
-used. For example, consider this pattern:
-<pre>
- 1234|3789
-</pre>
-If the first part of the subject is "ABC123", a partial match of the first
-alternative is found at offset 3. There is no partial match for the second
-alternative, because such a match does not start at the same point in the
-subject string. Attempting to continue with the string "7890" does not yield a
-match because only those alternatives that match at one point in the subject
-are remembered. The problem arises because the start of the second alternative
-matches within the first alternative. There is no problem with anchored
-patterns or patterns such as:
-<pre>
- 1234|ABCD
-</pre>
-where no string can be a partial match for both alternatives. This is not a
-problem if a standard matching function is used, because the entire match has
-to be rerun each time:
-<pre>
- re&#62; /1234|3789/
- data&#62; ABC123\P\P
- Partial match: 123
- data&#62; 1237890
- 0: 3789
-</pre>
-Of course, instead of using PCRE_DFA_RESTART, the same technique of re-running
-the entire match can also be used with the DFA matching functions. Another
-possibility is to work with two buffers. If a partial match at offset <i>n</i>
-in the first buffer is followed by "no match" when PCRE_DFA_RESTART is used on
-the second buffer, you can then try a new match starting at offset <i>n+1</i> in
-the first buffer.
-</P>
-<br><a name="SEC10" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC11" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 21 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrepattern.html b/src/third_party/pcre-8.30/doc/html/pcrepattern.html
deleted file mode 100644
index 1dca37a79f7..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrepattern.html
+++ /dev/null
@@ -1,2852 +0,0 @@
-<html>
-<head>
-<title>pcrepattern specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrepattern man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE REGULAR EXPRESSION DETAILS</a>
-<li><a name="TOC2" href="#SEC2">NEWLINE CONVENTIONS</a>
-<li><a name="TOC3" href="#SEC3">CHARACTERS AND METACHARACTERS</a>
-<li><a name="TOC4" href="#SEC4">BACKSLASH</a>
-<li><a name="TOC5" href="#SEC5">CIRCUMFLEX AND DOLLAR</a>
-<li><a name="TOC6" href="#SEC6">FULL STOP (PERIOD, DOT) AND \N</a>
-<li><a name="TOC7" href="#SEC7">MATCHING A SINGLE DATA UNIT</a>
-<li><a name="TOC8" href="#SEC8">SQUARE BRACKETS AND CHARACTER CLASSES</a>
-<li><a name="TOC9" href="#SEC9">POSIX CHARACTER CLASSES</a>
-<li><a name="TOC10" href="#SEC10">VERTICAL BAR</a>
-<li><a name="TOC11" href="#SEC11">INTERNAL OPTION SETTING</a>
-<li><a name="TOC12" href="#SEC12">SUBPATTERNS</a>
-<li><a name="TOC13" href="#SEC13">DUPLICATE SUBPATTERN NUMBERS</a>
-<li><a name="TOC14" href="#SEC14">NAMED SUBPATTERNS</a>
-<li><a name="TOC15" href="#SEC15">REPETITION</a>
-<li><a name="TOC16" href="#SEC16">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a>
-<li><a name="TOC17" href="#SEC17">BACK REFERENCES</a>
-<li><a name="TOC18" href="#SEC18">ASSERTIONS</a>
-<li><a name="TOC19" href="#SEC19">CONDITIONAL SUBPATTERNS</a>
-<li><a name="TOC20" href="#SEC20">COMMENTS</a>
-<li><a name="TOC21" href="#SEC21">RECURSIVE PATTERNS</a>
-<li><a name="TOC22" href="#SEC22">SUBPATTERNS AS SUBROUTINES</a>
-<li><a name="TOC23" href="#SEC23">ONIGURUMA SUBROUTINE SYNTAX</a>
-<li><a name="TOC24" href="#SEC24">CALLOUTS</a>
-<li><a name="TOC25" href="#SEC25">BACKTRACKING CONTROL</a>
-<li><a name="TOC26" href="#SEC26">SEE ALSO</a>
-<li><a name="TOC27" href="#SEC27">AUTHOR</a>
-<li><a name="TOC28" href="#SEC28">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE REGULAR EXPRESSION DETAILS</a><br>
-<P>
-The syntax and semantics of the regular expressions that are supported by PCRE
-are described in detail below. There is a quick-reference syntax summary in the
-<a href="pcresyntax.html"><b>pcresyntax</b></a>
-page. PCRE tries to match Perl syntax and semantics as closely as it can. PCRE
-also supports some alternative regular expression syntax (which does not
-conflict with the Perl syntax) in order to provide some compatibility with
-regular expressions in Python, .NET, and Oniguruma.
-</P>
-<P>
-Perl's regular expressions are described in its own documentation, and
-regular expressions in general are covered in a number of books, some of which
-have copious examples. Jeffrey Friedl's "Mastering Regular Expressions",
-published by O'Reilly, covers regular expressions in great detail. This
-description of PCRE's regular expressions is intended as reference material.
-</P>
-<P>
-The original operation of PCRE was on strings of one-byte characters. However,
-there is now also support for UTF-8 strings in the original library, and a
-second library that supports 16-bit and UTF-16 character strings. To use these
-features, PCRE must be built to include appropriate support. When using UTF
-strings you must either call the compiling function with the PCRE_UTF8 or
-PCRE_UTF16 option, or the pattern must start with one of these special
-sequences:
-<pre>
- (*UTF8)
- (*UTF16)
-</pre>
-Starting a pattern with such a sequence is equivalent to setting the relevant
-option. This feature is not Perl-compatible. How setting a UTF mode affects
-pattern matching is mentioned in several places below. There is also a summary
-of features in the
-<a href="pcreunicode.html"><b>pcreunicode</b></a>
-page.
-</P>
-<P>
-Another special sequence that may appear at the start of a pattern or in
-combination with (*UTF8) or (*UTF16) is:
-<pre>
- (*UCP)
-</pre>
-This has the same effect as setting the PCRE_UCP option: it causes sequences
-such as \d and \w to use Unicode properties to determine character types,
-instead of recognizing only characters with codes less than 128 via a lookup
-table.
-</P>
-<P>
-If a pattern starts with (*NO_START_OPT), it has the same effect as setting the
-PCRE_NO_START_OPTIMIZE option either at compile or matching time. There are
-also some more of these special sequences that are concerned with the handling
-of newlines; they are described below.
-</P>
-<P>
-The remainder of this document discusses the patterns that are supported by
-PCRE when one its main matching functions, <b>pcre_exec()</b> (8-bit) or
-<b>pcre16_exec()</b> (16-bit), is used. PCRE also has alternative matching
-functions, <b>pcre_dfa_exec()</b> and <b>pcre16_dfa_exec()</b>, which match using
-a different algorithm that is not Perl-compatible. Some of the features
-discussed below are not available when DFA matching is used. The advantages and
-disadvantages of the alternative functions, and how they differ from the normal
-functions, are discussed in the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-page.
-<a name="newlines"></a></P>
-<br><a name="SEC2" href="#TOC1">NEWLINE CONVENTIONS</a><br>
-<P>
-PCRE supports five different conventions for indicating line breaks in
-strings: a single CR (carriage return) character, a single LF (linefeed)
-character, the two-character sequence CRLF, any of the three preceding, or any
-Unicode newline sequence. The
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page has
-<a href="pcreapi.html#newlines">further discussion</a>
-about newlines, and shows how to set the newline convention in the
-<i>options</i> arguments for the compiling and matching functions.
-</P>
-<P>
-It is also possible to specify a newline convention by starting a pattern
-string with one of the following five sequences:
-<pre>
- (*CR) carriage return
- (*LF) linefeed
- (*CRLF) carriage return, followed by linefeed
- (*ANYCRLF) any of the three above
- (*ANY) all Unicode newline sequences
-</pre>
-These override the default and the options given to the compiling function. For
-example, on a Unix system where LF is the default newline sequence, the pattern
-<pre>
- (*CR)a.b
-</pre>
-changes the convention to CR. That pattern matches "a\nb" because LF is no
-longer a newline. Note that these special settings, which are not
-Perl-compatible, are recognized only at the very start of a pattern, and that
-they must be in upper case. If more than one of them is present, the last one
-is used.
-</P>
-<P>
-The newline convention affects the interpretation of the dot metacharacter when
-PCRE_DOTALL is not set, and also the behaviour of \N. However, it does not
-affect what the \R escape sequence matches. By default, this is any Unicode
-newline sequence, for Perl compatibility. However, this can be changed; see the
-description of \R in the section entitled
-<a href="#newlineseq">"Newline sequences"</a>
-below. A change of \R setting can be combined with a change of newline
-convention.
-</P>
-<br><a name="SEC3" href="#TOC1">CHARACTERS AND METACHARACTERS</a><br>
-<P>
-A regular expression is a pattern that is matched against a subject string from
-left to right. Most characters stand for themselves in a pattern, and match the
-corresponding characters in the subject. As a trivial example, the pattern
-<pre>
- The quick brown fox
-</pre>
-matches a portion of a subject string that is identical to itself. When
-caseless matching is specified (the PCRE_CASELESS option), letters are matched
-independently of case. In a UTF mode, PCRE always understands the concept of
-case for characters whose values are less than 128, so caseless matching is
-always possible. For characters with higher values, the concept of case is
-supported if PCRE is compiled with Unicode property support, but not otherwise.
-If you want to use caseless matching for characters 128 and above, you must
-ensure that PCRE is compiled with Unicode property support as well as with
-UTF support.
-</P>
-<P>
-The power of regular expressions comes from the ability to include alternatives
-and repetitions in the pattern. These are encoded in the pattern by the use of
-<i>metacharacters</i>, which do not stand for themselves but instead are
-interpreted in some special way.
-</P>
-<P>
-There are two different sets of metacharacters: those that are recognized
-anywhere in the pattern except within square brackets, and those that are
-recognized within square brackets. Outside square brackets, the metacharacters
-are as follows:
-<pre>
- \ general escape character with several uses
- ^ assert start of string (or line, in multiline mode)
- $ assert end of string (or line, in multiline mode)
- . match any character except newline (by default)
- [ start character class definition
- | start of alternative branch
- ( start subpattern
- ) end subpattern
- ? extends the meaning of (
- also 0 or 1 quantifier
- also quantifier minimizer
- * 0 or more quantifier
- + 1 or more quantifier
- also "possessive quantifier"
- { start min/max quantifier
-</pre>
-Part of a pattern that is in square brackets is called a "character class". In
-a character class the only metacharacters are:
-<pre>
- \ general escape character
- ^ negate the class, but only if the first character
- - indicates character range
- [ POSIX character class (only if followed by POSIX syntax)
- ] terminates the character class
-</pre>
-The following sections describe the use of each of the metacharacters.
-</P>
-<br><a name="SEC4" href="#TOC1">BACKSLASH</a><br>
-<P>
-The backslash character has several uses. Firstly, if it is followed by a
-character that is not a number or a letter, it takes away any special meaning
-that character may have. This use of backslash as an escape character applies
-both inside and outside character classes.
-</P>
-<P>
-For example, if you want to match a * character, you write \* in the pattern.
-This escaping action applies whether or not the following character would
-otherwise be interpreted as a metacharacter, so it is always safe to precede a
-non-alphanumeric with backslash to specify that it stands for itself. In
-particular, if you want to match a backslash, you write \\.
-</P>
-<P>
-In a UTF mode, only ASCII numbers and letters have any special meaning after a
-backslash. All other characters (in particular, those whose codepoints are
-greater than 127) are treated as literals.
-</P>
-<P>
-If a pattern is compiled with the PCRE_EXTENDED option, whitespace in the
-pattern (other than in a character class) and characters between a # outside
-a character class and the next newline are ignored. An escaping backslash can
-be used to include a whitespace or # character as part of the pattern.
-</P>
-<P>
-If you want to remove the special meaning from a sequence of characters, you
-can do so by putting them between \Q and \E. This is different from Perl in
-that $ and @ are handled as literals in \Q...\E sequences in PCRE, whereas in
-Perl, $ and @ cause variable interpolation. Note the following examples:
-<pre>
- Pattern PCRE matches Perl matches
-
- \Qabc$xyz\E abc$xyz abc followed by the contents of $xyz
- \Qabc\$xyz\E abc\$xyz abc\$xyz
- \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
-</pre>
-The \Q...\E sequence is recognized both inside and outside character classes.
-An isolated \E that is not preceded by \Q is ignored. If \Q is not followed
-by \E later in the pattern, the literal interpretation continues to the end of
-the pattern (that is, \E is assumed at the end). If the isolated \Q is inside
-a character class, this causes an error, because the character class is not
-terminated.
-<a name="digitsafterbackslash"></a></P>
-<br><b>
-Non-printing characters
-</b><br>
-<P>
-A second use of backslash provides a way of encoding non-printing characters
-in patterns in a visible manner. There is no restriction on the appearance of
-non-printing characters, apart from the binary zero that terminates a pattern,
-but when a pattern is being prepared by text editing, it is often easier to use
-one of the following escape sequences than the binary character it represents:
-<pre>
- \a alarm, that is, the BEL character (hex 07)
- \cx "control-x", where x is any ASCII character
- \e escape (hex 1B)
- \f formfeed (hex 0C)
- \n linefeed (hex 0A)
- \r carriage return (hex 0D)
- \t tab (hex 09)
- \ddd character with octal code ddd, or back reference
- \xhh character with hex code hh
- \x{hhh..} character with hex code hhh.. (non-JavaScript mode)
- \uhhhh character with hex code hhhh (JavaScript mode only)
-</pre>
-The precise effect of \cx is as follows: if x is a lower case letter, it
-is converted to upper case. Then bit 6 of the character (hex 40) is inverted.
-Thus \cz becomes hex 1A (z is 7A), but \c{ becomes hex 3B ({ is 7B), while
-\c; becomes hex 7B (; is 3B). If the byte following \c has a value greater
-than 127, a compile-time error occurs. This locks out non-ASCII characters in
-all modes. (When PCRE is compiled in EBCDIC mode, all byte values are valid. A
-lower case letter is converted to upper case, and then the 0xc0 bits are
-flipped.)
-</P>
-<P>
-By default, after \x, from zero to two hexadecimal digits are read (letters
-can be in upper or lower case). Any number of hexadecimal digits may appear
-between \x{ and }, but the character code is constrained as follows:
-<pre>
- 8-bit non-UTF mode less than 0x100
- 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint
- 16-bit non-UTF mode less than 0x10000
- 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint
-</pre>
-Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called
-"surrogate" codepoints).
-</P>
-<P>
-If characters other than hexadecimal digits appear between \x{ and }, or if
-there is no terminating }, this form of escape is not recognized. Instead, the
-initial \x will be interpreted as a basic hexadecimal escape, with no
-following digits, giving a character whose value is zero.
-</P>
-<P>
-If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x is
-as just described only when it is followed by two hexadecimal digits.
-Otherwise, it matches a literal "x" character. In JavaScript mode, support for
-code points greater than 256 is provided by \u, which must be followed by
-four hexadecimal digits; otherwise it matches a literal "u" character.
-</P>
-<P>
-Characters whose value is less than 256 can be defined by either of the two
-syntaxes for \x (or by \u in JavaScript mode). There is no difference in the
-way they are handled. For example, \xdc is exactly the same as \x{dc} (or
-\u00dc in JavaScript mode).
-</P>
-<P>
-After \0 up to two further octal digits are read. If there are fewer than two
-digits, just those that are present are used. Thus the sequence \0\x\07
-specifies two binary zeros followed by a BEL character (code value 7). Make
-sure you supply two digits after the initial zero if the pattern character that
-follows is itself an octal digit.
-</P>
-<P>
-The handling of a backslash followed by a digit other than 0 is complicated.
-Outside a character class, PCRE reads it and any following digits as a decimal
-number. If the number is less than 10, or if there have been at least that many
-previous capturing left parentheses in the expression, the entire sequence is
-taken as a <i>back reference</i>. A description of how this works is given
-<a href="#backreferences">later,</a>
-following the discussion of
-<a href="#subpattern">parenthesized subpatterns.</a>
-</P>
-<P>
-Inside a character class, or if the decimal number is greater than 9 and there
-have not been that many capturing subpatterns, PCRE re-reads up to three octal
-digits following the backslash, and uses them to generate a data character. Any
-subsequent digits stand for themselves. The value of the character is
-constrained in the same way as characters specified in hexadecimal.
-For example:
-<pre>
- \040 is another way of writing a space
- \40 is the same, provided there are fewer than 40 previous capturing subpatterns
- \7 is always a back reference
- \11 might be a back reference, or another way of writing a tab
- \011 is always a tab
- \0113 is a tab followed by the character "3"
- \113 might be a back reference, otherwise the character with octal code 113
- \377 might be a back reference, otherwise the value 255 (decimal)
- \81 is either a back reference, or a binary zero followed by the two characters "8" and "1"
-</pre>
-Note that octal values of 100 or greater must not be introduced by a leading
-zero, because no more than three octal digits are ever read.
-</P>
-<P>
-All the sequences that define a single character value can be used both inside
-and outside character classes. In addition, inside a character class, \b is
-interpreted as the backspace character (hex 08).
-</P>
-<P>
-\N is not allowed in a character class. \B, \R, and \X are not special
-inside a character class. Like other unrecognized escape sequences, they are
-treated as the literal characters "B", "R", and "X" by default, but cause an
-error if the PCRE_EXTRA option is set. Outside a character class, these
-sequences have different meanings.
-</P>
-<br><b>
-Unsupported escape sequences
-</b><br>
-<P>
-In Perl, the sequences \l, \L, \u, and \U are recognized by its string
-handler and used to modify the case of following characters. By default, PCRE
-does not support these escape sequences. However, if the PCRE_JAVASCRIPT_COMPAT
-option is set, \U matches a "U" character, and \u can be used to define a
-character by code point, as described in the previous section.
-</P>
-<br><b>
-Absolute and relative back references
-</b><br>
-<P>
-The sequence \g followed by an unsigned or a negative number, optionally
-enclosed in braces, is an absolute or relative back reference. A named back
-reference can be coded as \g{name}. Back references are discussed
-<a href="#backreferences">later,</a>
-following the discussion of
-<a href="#subpattern">parenthesized subpatterns.</a>
-</P>
-<br><b>
-Absolute and relative subroutine calls
-</b><br>
-<P>
-For compatibility with Oniguruma, the non-Perl syntax \g followed by a name or
-a number enclosed either in angle brackets or single quotes, is an alternative
-syntax for referencing a subpattern as a "subroutine". Details are discussed
-<a href="#onigurumasubroutines">later.</a>
-Note that \g{...} (Perl syntax) and \g&#60;...&#62; (Oniguruma syntax) are <i>not</i>
-synonymous. The former is a back reference; the latter is a
-<a href="#subpatternsassubroutines">subroutine</a>
-call.
-<a name="genericchartypes"></a></P>
-<br><b>
-Generic character types
-</b><br>
-<P>
-Another use of backslash is for specifying generic character types:
-<pre>
- \d any decimal digit
- \D any character that is not a decimal digit
- \h any horizontal whitespace character
- \H any character that is not a horizontal whitespace character
- \s any whitespace character
- \S any character that is not a whitespace character
- \v any vertical whitespace character
- \V any character that is not a vertical whitespace character
- \w any "word" character
- \W any "non-word" character
-</pre>
-There is also the single sequence \N, which matches a non-newline character.
-This is the same as
-<a href="#fullstopdot">the "." metacharacter</a>
-when PCRE_DOTALL is not set. Perl also uses \N to match characters by name;
-PCRE does not support this.
-</P>
-<P>
-Each pair of lower and upper case escape sequences partitions the complete set
-of characters into two disjoint sets. Any given character matches one, and only
-one, of each pair. The sequences can appear both inside and outside character
-classes. They each match one character of the appropriate type. If the current
-matching point is at the end of the subject string, all of them fail, because
-there is no character to match.
-</P>
-<P>
-For compatibility with Perl, \s does not match the VT character (code 11).
-This makes it different from the the POSIX "space" class. The \s characters
-are HT (9), LF (10), FF (12), CR (13), and space (32). If "use locale;" is
-included in a Perl script, \s may match the VT character. In PCRE, it never
-does.
-</P>
-<P>
-A "word" character is an underscore or any character that is a letter or digit.
-By default, the definition of letters and digits is controlled by PCRE's
-low-valued character tables, and may vary if locale-specific matching is taking
-place (see
-<a href="pcreapi.html#localesupport">"Locale support"</a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page). For example, in a French locale such as "fr_FR" in Unix-like systems,
-or "french" in Windows, some character codes greater than 128 are used for
-accented letters, and these are then matched by \w. The use of locales with
-Unicode is discouraged.
-</P>
-<P>
-By default, in a UTF mode, characters with values greater than 128 never match
-\d, \s, or \w, and always match \D, \S, and \W. These sequences retain
-their original meanings from before UTF support was available, mainly for
-efficiency reasons. However, if PCRE is compiled with Unicode property support,
-and the PCRE_UCP option is set, the behaviour is changed so that Unicode
-properties are used to determine character types, as follows:
-<pre>
- \d any character that \p{Nd} matches (decimal digit)
- \s any character that \p{Z} matches, plus HT, LF, FF, CR
- \w any character that \p{L} or \p{N} matches, plus underscore
-</pre>
-The upper case escapes match the inverse sets of characters. Note that \d
-matches only decimal digits, whereas \w matches any Unicode digit, as well as
-any Unicode letter, and underscore. Note also that PCRE_UCP affects \b, and
-\B because they are defined in terms of \w and \W. Matching these sequences
-is noticeably slower when PCRE_UCP is set.
-</P>
-<P>
-The sequences \h, \H, \v, and \V are features that were added to Perl at
-release 5.10. In contrast to the other sequences, which match only ASCII
-characters by default, these always match certain high-valued codepoints,
-whether or not PCRE_UCP is set. The horizontal space characters are:
-<pre>
- U+0009 Horizontal tab
- U+0020 Space
- U+00A0 Non-break space
- U+1680 Ogham space mark
- U+180E Mongolian vowel separator
- U+2000 En quad
- U+2001 Em quad
- U+2002 En space
- U+2003 Em space
- U+2004 Three-per-em space
- U+2005 Four-per-em space
- U+2006 Six-per-em space
- U+2007 Figure space
- U+2008 Punctuation space
- U+2009 Thin space
- U+200A Hair space
- U+202F Narrow no-break space
- U+205F Medium mathematical space
- U+3000 Ideographic space
-</pre>
-The vertical space characters are:
-<pre>
- U+000A Linefeed
- U+000B Vertical tab
- U+000C Formfeed
- U+000D Carriage return
- U+0085 Next line
- U+2028 Line separator
- U+2029 Paragraph separator
-</pre>
-In 8-bit, non-UTF-8 mode, only the characters with codepoints less than 256 are
-relevant.
-<a name="newlineseq"></a></P>
-<br><b>
-Newline sequences
-</b><br>
-<P>
-Outside a character class, by default, the escape sequence \R matches any
-Unicode newline sequence. In 8-bit non-UTF-8 mode \R is equivalent to the
-following:
-<pre>
- (?&#62;\r\n|\n|\x0b|\f|\r|\x85)
-</pre>
-This is an example of an "atomic group", details of which are given
-<a href="#atomicgroup">below.</a>
-This particular group matches either the two-character sequence CR followed by
-LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab,
-U+000B), FF (formfeed, U+000C), CR (carriage return, U+000D), or NEL (next
-line, U+0085). The two-character sequence is treated as a single unit that
-cannot be split.
-</P>
-<P>
-In other modes, two additional characters whose codepoints are greater than 255
-are added: LS (line separator, U+2028) and PS (paragraph separator, U+2029).
-Unicode character property support is not needed for these characters to be
-recognized.
-</P>
-<P>
-It is possible to restrict \R to match only CR, LF, or CRLF (instead of the
-complete set of Unicode line endings) by setting the option PCRE_BSR_ANYCRLF
-either at compile time or when the pattern is matched. (BSR is an abbrevation
-for "backslash R".) This can be made the default when PCRE is built; if this is
-the case, the other behaviour can be requested via the PCRE_BSR_UNICODE option.
-It is also possible to specify these settings by starting a pattern string with
-one of the following sequences:
-<pre>
- (*BSR_ANYCRLF) CR, LF, or CRLF only
- (*BSR_UNICODE) any Unicode newline sequence
-</pre>
-These override the default and the options given to the compiling function, but
-they can themselves be overridden by options given to a matching function. Note
-that these special settings, which are not Perl-compatible, are recognized only
-at the very start of a pattern, and that they must be in upper case. If more
-than one of them is present, the last one is used. They can be combined with a
-change of newline convention; for example, a pattern can start with:
-<pre>
- (*ANY)(*BSR_ANYCRLF)
-</pre>
-They can also be combined with the (*UTF8), (*UTF16), or (*UCP) special
-sequences. Inside a character class, \R is treated as an unrecognized escape
-sequence, and so matches the letter "R" by default, but causes an error if
-PCRE_EXTRA is set.
-<a name="uniextseq"></a></P>
-<br><b>
-Unicode character properties
-</b><br>
-<P>
-When PCRE is built with Unicode character property support, three additional
-escape sequences that match characters with specific properties are available.
-When in 8-bit non-UTF-8 mode, these sequences are of course limited to testing
-characters whose codepoints are less than 256, but they do work in this mode.
-The extra escape sequences are:
-<pre>
- \p{<i>xx</i>} a character with the <i>xx</i> property
- \P{<i>xx</i>} a character without the <i>xx</i> property
- \X an extended Unicode sequence
-</pre>
-The property names represented by <i>xx</i> above are limited to the Unicode
-script names, the general category properties, "Any", which matches any
-character (including newline), and some special PCRE properties (described
-in the
-<a href="#extraprops">next section).</a>
-Other Perl properties such as "InMusicalSymbols" are not currently supported by
-PCRE. Note that \P{Any} does not match any characters, so always causes a
-match failure.
-</P>
-<P>
-Sets of Unicode characters are defined as belonging to certain scripts. A
-character from one of these sets can be matched using a script name. For
-example:
-<pre>
- \p{Greek}
- \P{Han}
-</pre>
-Those that are not part of an identified script are lumped together as
-"Common". The current list of scripts is:
-</P>
-<P>
-Arabic,
-Armenian,
-Avestan,
-Balinese,
-Bamum,
-Bengali,
-Bopomofo,
-Braille,
-Buginese,
-Buhid,
-Canadian_Aboriginal,
-Carian,
-Cham,
-Cherokee,
-Common,
-Coptic,
-Cuneiform,
-Cypriot,
-Cyrillic,
-Deseret,
-Devanagari,
-Egyptian_Hieroglyphs,
-Ethiopic,
-Georgian,
-Glagolitic,
-Gothic,
-Greek,
-Gujarati,
-Gurmukhi,
-Han,
-Hangul,
-Hanunoo,
-Hebrew,
-Hiragana,
-Imperial_Aramaic,
-Inherited,
-Inscriptional_Pahlavi,
-Inscriptional_Parthian,
-Javanese,
-Kaithi,
-Kannada,
-Katakana,
-Kayah_Li,
-Kharoshthi,
-Khmer,
-Lao,
-Latin,
-Lepcha,
-Limbu,
-Linear_B,
-Lisu,
-Lycian,
-Lydian,
-Malayalam,
-Meetei_Mayek,
-Mongolian,
-Myanmar,
-New_Tai_Lue,
-Nko,
-Ogham,
-Old_Italic,
-Old_Persian,
-Old_South_Arabian,
-Old_Turkic,
-Ol_Chiki,
-Oriya,
-Osmanya,
-Phags_Pa,
-Phoenician,
-Rejang,
-Runic,
-Samaritan,
-Saurashtra,
-Shavian,
-Sinhala,
-Sundanese,
-Syloti_Nagri,
-Syriac,
-Tagalog,
-Tagbanwa,
-Tai_Le,
-Tai_Tham,
-Tai_Viet,
-Tamil,
-Telugu,
-Thaana,
-Thai,
-Tibetan,
-Tifinagh,
-Ugaritic,
-Vai,
-Yi.
-</P>
-<P>
-Each character has exactly one Unicode general category property, specified by
-a two-letter abbreviation. For compatibility with Perl, negation can be
-specified by including a circumflex between the opening brace and the property
-name. For example, \p{^Lu} is the same as \P{Lu}.
-</P>
-<P>
-If only one letter is specified with \p or \P, it includes all the general
-category properties that start with that letter. In this case, in the absence
-of negation, the curly brackets in the escape sequence are optional; these two
-examples have the same effect:
-<pre>
- \p{L}
- \pL
-</pre>
-The following general category property codes are supported:
-<pre>
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
-
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-</pre>
-The special property L& is also supported: it matches a character that has
-the Lu, Ll, or Lt property, in other words, a letter that is not classified as
-a modifier or "other".
-</P>
-<P>
-The Cs (Surrogate) property applies only to characters in the range U+D800 to
-U+DFFF. Such characters are not valid in Unicode strings and so
-cannot be tested by PCRE, unless UTF validity checking has been turned off
-(see the discussion of PCRE_NO_UTF8_CHECK and PCRE_NO_UTF16_CHECK in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-page). Perl does not support the Cs property.
-</P>
-<P>
-The long synonyms for property names that Perl supports (such as \p{Letter})
-are not supported by PCRE, nor is it permitted to prefix any of these
-properties with "Is".
-</P>
-<P>
-No character that is in the Unicode table has the Cn (unassigned) property.
-Instead, this property is assumed for any code point that is not in the
-Unicode table.
-</P>
-<P>
-Specifying caseless matching does not affect these escape sequences. For
-example, \p{Lu} always matches only upper case letters.
-</P>
-<P>
-The \X escape matches any number of Unicode characters that form an extended
-Unicode sequence. \X is equivalent to
-<pre>
- (?&#62;\PM\pM*)
-</pre>
-That is, it matches a character without the "mark" property, followed by zero
-or more characters with the "mark" property, and treats the sequence as an
-atomic group
-<a href="#atomicgroup">(see below).</a>
-Characters with the "mark" property are typically accents that affect the
-preceding character. None of them have codepoints less than 256, so in
-8-bit non-UTF-8 mode \X matches any one character.
-</P>
-<P>
-Note that recent versions of Perl have changed \X to match what Unicode calls
-an "extended grapheme cluster", which has a more complicated definition.
-</P>
-<P>
-Matching characters by Unicode property is not fast, because PCRE has to search
-a structure that contains data for over fifteen thousand characters. That is
-why the traditional escape sequences such as \d and \w do not use Unicode
-properties in PCRE by default, though you can make them do so by setting the
-PCRE_UCP option or by starting the pattern with (*UCP).
-<a name="extraprops"></a></P>
-<br><b>
-PCRE's additional properties
-</b><br>
-<P>
-As well as the standard Unicode properties described in the previous
-section, PCRE supports four more that make it possible to convert traditional
-escape sequences such as \w and \s and POSIX character classes to use Unicode
-properties. PCRE uses these non-standard, non-Perl properties internally when
-PCRE_UCP is set. They are:
-<pre>
- Xan Any alphanumeric character
- Xps Any POSIX space character
- Xsp Any Perl space character
- Xwd Any Perl "word" character
-</pre>
-Xan matches characters that have either the L (letter) or the N (number)
-property. Xps matches the characters tab, linefeed, vertical tab, formfeed, or
-carriage return, and any other character that has the Z (separator) property.
-Xsp is the same as Xps, except that vertical tab is excluded. Xwd matches the
-same characters as Xan, plus underscore.
-<a name="resetmatchstart"></a></P>
-<br><b>
-Resetting the match start
-</b><br>
-<P>
-The escape sequence \K causes any previously matched characters not to be
-included in the final matched sequence. For example, the pattern:
-<pre>
- foo\Kbar
-</pre>
-matches "foobar", but reports that it has matched "bar". This feature is
-similar to a lookbehind assertion
-<a href="#lookbehind">(described below).</a>
-However, in this case, the part of the subject before the real match does not
-have to be of fixed length, as lookbehind assertions do. The use of \K does
-not interfere with the setting of
-<a href="#subpattern">captured substrings.</a>
-For example, when the pattern
-<pre>
- (foo)\Kbar
-</pre>
-matches "foobar", the first substring is still set to "foo".
-</P>
-<P>
-Perl documents that the use of \K within assertions is "not well defined". In
-PCRE, \K is acted upon when it occurs inside positive assertions, but is
-ignored in negative assertions.
-<a name="smallassertions"></a></P>
-<br><b>
-Simple assertions
-</b><br>
-<P>
-The final use of backslash is for certain simple assertions. An assertion
-specifies a condition that has to be met at a particular point in a match,
-without consuming any characters from the subject string. The use of
-subpatterns for more complicated assertions is described
-<a href="#bigassertions">below.</a>
-The backslashed assertions are:
-<pre>
- \b matches at a word boundary
- \B matches when not at a word boundary
- \A matches at the start of the subject
- \Z matches at the end of the subject
- also matches before a newline at the end of the subject
- \z matches only at the end of the subject
- \G matches at the first matching position in the subject
-</pre>
-Inside a character class, \b has a different meaning; it matches the backspace
-character. If any other of these assertions appears in a character class, by
-default it matches the corresponding literal character (for example, \B
-matches the letter B). However, if the PCRE_EXTRA option is set, an "invalid
-escape sequence" error is generated instead.
-</P>
-<P>
-A word boundary is a position in the subject string where the current character
-and the previous character do not both match \w or \W (i.e. one matches
-\w and the other matches \W), or the start or end of the string if the
-first or last character matches \w, respectively. In a UTF mode, the meanings
-of \w and \W can be changed by setting the PCRE_UCP option. When this is
-done, it also affects \b and \B. Neither PCRE nor Perl has a separate "start
-of word" or "end of word" metasequence. However, whatever follows \b normally
-determines which it is. For example, the fragment \ba matches "a" at the start
-of a word.
-</P>
-<P>
-The \A, \Z, and \z assertions differ from the traditional circumflex and
-dollar (described in the next section) in that they only ever match at the very
-start and end of the subject string, whatever options are set. Thus, they are
-independent of multiline mode. These three assertions are not affected by the
-PCRE_NOTBOL or PCRE_NOTEOL options, which affect only the behaviour of the
-circumflex and dollar metacharacters. However, if the <i>startoffset</i>
-argument of <b>pcre_exec()</b> is non-zero, indicating that matching is to start
-at a point other than the beginning of the subject, \A can never match. The
-difference between \Z and \z is that \Z matches before a newline at the end
-of the string as well as at the very end, whereas \z matches only at the end.
-</P>
-<P>
-The \G assertion is true only when the current matching position is at the
-start point of the match, as specified by the <i>startoffset</i> argument of
-<b>pcre_exec()</b>. It differs from \A when the value of <i>startoffset</i> is
-non-zero. By calling <b>pcre_exec()</b> multiple times with appropriate
-arguments, you can mimic Perl's /g option, and it is in this kind of
-implementation where \G can be useful.
-</P>
-<P>
-Note, however, that PCRE's interpretation of \G, as the start of the current
-match, is subtly different from Perl's, which defines it as the end of the
-previous match. In Perl, these can be different when the previously matched
-string was empty. Because PCRE does just one match at a time, it cannot
-reproduce this behaviour.
-</P>
-<P>
-If all the alternatives of a pattern begin with \G, the expression is anchored
-to the starting match position, and the "anchored" flag is set in the compiled
-regular expression.
-</P>
-<br><a name="SEC5" href="#TOC1">CIRCUMFLEX AND DOLLAR</a><br>
-<P>
-Outside a character class, in the default matching mode, the circumflex
-character is an assertion that is true only if the current matching point is
-at the start of the subject string. If the <i>startoffset</i> argument of
-<b>pcre_exec()</b> is non-zero, circumflex can never match if the PCRE_MULTILINE
-option is unset. Inside a character class, circumflex has an entirely different
-meaning
-<a href="#characterclass">(see below).</a>
-</P>
-<P>
-Circumflex need not be the first character of the pattern if a number of
-alternatives are involved, but it should be the first thing in each alternative
-in which it appears if the pattern is ever to match that branch. If all
-possible alternatives start with a circumflex, that is, if the pattern is
-constrained to match only at the start of the subject, it is said to be an
-"anchored" pattern. (There are also other constructs that can cause a pattern
-to be anchored.)
-</P>
-<P>
-A dollar character is an assertion that is true only if the current matching
-point is at the end of the subject string, or immediately before a newline
-at the end of the string (by default). Dollar need not be the last character of
-the pattern if a number of alternatives are involved, but it should be the last
-item in any branch in which it appears. Dollar has no special meaning in a
-character class.
-</P>
-<P>
-The meaning of dollar can be changed so that it matches only at the very end of
-the string, by setting the PCRE_DOLLAR_ENDONLY option at compile time. This
-does not affect the \Z assertion.
-</P>
-<P>
-The meanings of the circumflex and dollar characters are changed if the
-PCRE_MULTILINE option is set. When this is the case, a circumflex matches
-immediately after internal newlines as well as at the start of the subject
-string. It does not match after a newline that ends the string. A dollar
-matches before any newlines in the string, as well as at the very end, when
-PCRE_MULTILINE is set. When newline is specified as the two-character
-sequence CRLF, isolated CR and LF characters do not indicate newlines.
-</P>
-<P>
-For example, the pattern /^abc$/ matches the subject string "def\nabc" (where
-\n represents a newline) in multiline mode, but not otherwise. Consequently,
-patterns that are anchored in single line mode because all branches start with
-^ are not anchored in multiline mode, and a match for circumflex is possible
-when the <i>startoffset</i> argument of <b>pcre_exec()</b> is non-zero. The
-PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set.
-</P>
-<P>
-Note that the sequences \A, \Z, and \z can be used to match the start and
-end of the subject in both modes, and if all branches of a pattern start with
-\A it is always anchored, whether or not PCRE_MULTILINE is set.
-<a name="fullstopdot"></a></P>
-<br><a name="SEC6" href="#TOC1">FULL STOP (PERIOD, DOT) AND \N</a><br>
-<P>
-Outside a character class, a dot in the pattern matches any one character in
-the subject string except (by default) a character that signifies the end of a
-line.
-</P>
-<P>
-When a line ending is defined as a single character, dot never matches that
-character; when the two-character sequence CRLF is used, dot does not match CR
-if it is immediately followed by LF, but otherwise it matches all characters
-(including isolated CRs and LFs). When any Unicode line endings are being
-recognized, dot does not match CR or LF or any of the other line ending
-characters.
-</P>
-<P>
-The behaviour of dot with regard to newlines can be changed. If the PCRE_DOTALL
-option is set, a dot matches any one character, without exception. If the
-two-character sequence CRLF is present in the subject string, it takes two dots
-to match it.
-</P>
-<P>
-The handling of dot is entirely independent of the handling of circumflex and
-dollar, the only relationship being that they both involve newlines. Dot has no
-special meaning in a character class.
-</P>
-<P>
-The escape sequence \N behaves like a dot, except that it is not affected by
-the PCRE_DOTALL option. In other words, it matches any character except one
-that signifies the end of a line. Perl also uses \N to match characters by
-name; PCRE does not support this.
-</P>
-<br><a name="SEC7" href="#TOC1">MATCHING A SINGLE DATA UNIT</a><br>
-<P>
-Outside a character class, the escape sequence \C matches any one data unit,
-whether or not a UTF mode is set. In the 8-bit library, one data unit is one
-byte; in the 16-bit library it is a 16-bit unit. Unlike a dot, \C always
-matches line-ending characters. The feature is provided in Perl in order to
-match individual bytes in UTF-8 mode, but it is unclear how it can usefully be
-used. Because \C breaks up characters into individual data units, matching one
-unit with \C in a UTF mode means that the rest of the string may start with a
-malformed UTF character. This has undefined results, because PCRE assumes that
-it is dealing with valid UTF strings (and by default it checks this at the
-start of processing unless the PCRE_NO_UTF8_CHECK option is used).
-</P>
-<P>
-PCRE does not allow \C to appear in lookbehind assertions
-<a href="#lookbehind">(described below)</a>
-in a UTF mode, because this would make it impossible to calculate the length of
-the lookbehind.
-</P>
-<P>
-In general, the \C escape sequence is best avoided. However, one
-way of using it that avoids the problem of malformed UTF characters is to use a
-lookahead to check the length of the next character, as in this pattern, which
-could be used with a UTF-8 string (ignore white space and line breaks):
-<pre>
- (?| (?=[\x00-\x7f])(\C) |
- (?=[\x80-\x{7ff}])(\C)(\C) |
- (?=[\x{800}-\x{ffff}])(\C)(\C)(\C) |
- (?=[\x{10000}-\x{1fffff}])(\C)(\C)(\C)(\C))
-</pre>
-A group that starts with (?| resets the capturing parentheses numbers in each
-alternative (see
-<a href="#dupsubpatternnumber">"Duplicate Subpattern Numbers"</a>
-below). The assertions at the start of each branch check the next UTF-8
-character for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
-character's individual bytes are then captured by the appropriate number of
-groups.
-<a name="characterclass"></a></P>
-<br><a name="SEC8" href="#TOC1">SQUARE BRACKETS AND CHARACTER CLASSES</a><br>
-<P>
-An opening square bracket introduces a character class, terminated by a closing
-square bracket. A closing square bracket on its own is not special by default.
-However, if the PCRE_JAVASCRIPT_COMPAT option is set, a lone closing square
-bracket causes a compile-time error. If a closing square bracket is required as
-a member of the class, it should be the first data character in the class
-(after an initial circumflex, if present) or escaped with a backslash.
-</P>
-<P>
-A character class matches a single character in the subject. In a UTF mode, the
-character may be more than one data unit long. A matched character must be in
-the set of characters defined by the class, unless the first character in the
-class definition is a circumflex, in which case the subject character must not
-be in the set defined by the class. If a circumflex is actually required as a
-member of the class, ensure it is not the first character, or escape it with a
-backslash.
-</P>
-<P>
-For example, the character class [aeiou] matches any lower case vowel, while
-[^aeiou] matches any character that is not a lower case vowel. Note that a
-circumflex is just a convenient notation for specifying the characters that
-are in the class by enumerating those that are not. A class that starts with a
-circumflex is not an assertion; it still consumes a character from the subject
-string, and therefore it fails if the current pointer is at the end of the
-string.
-</P>
-<P>
-In UTF-8 (UTF-16) mode, characters with values greater than 255 (0xffff) can be
-included in a class as a literal string of data units, or by using the \x{
-escaping mechanism.
-</P>
-<P>
-When caseless matching is set, any letters in a class represent both their
-upper case and lower case versions, so for example, a caseless [aeiou] matches
-"A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a
-caseful version would. In a UTF mode, PCRE always understands the concept of
-case for characters whose values are less than 128, so caseless matching is
-always possible. For characters with higher values, the concept of case is
-supported if PCRE is compiled with Unicode property support, but not otherwise.
-If you want to use caseless matching in a UTF mode for characters 128 and
-above, you must ensure that PCRE is compiled with Unicode property support as
-well as with UTF support.
-</P>
-<P>
-Characters that might indicate line breaks are never treated in any special way
-when matching character classes, whatever line-ending sequence is in use, and
-whatever setting of the PCRE_DOTALL and PCRE_MULTILINE options is used. A class
-such as [^a] always matches one of these characters.
-</P>
-<P>
-The minus (hyphen) character can be used to specify a range of characters in a
-character class. For example, [d-m] matches any letter between d and m,
-inclusive. If a minus character is required in a class, it must be escaped with
-a backslash or appear in a position where it cannot be interpreted as
-indicating a range, typically as the first or last character in the class.
-</P>
-<P>
-It is not possible to have the literal character "]" as the end character of a
-range. A pattern such as [W-]46] is interpreted as a class of two characters
-("W" and "-") followed by a literal string "46]", so it would match "W46]" or
-"-46]". However, if the "]" is escaped with a backslash it is interpreted as
-the end of range, so [W-\]46] is interpreted as a class containing a range
-followed by two other characters. The octal or hexadecimal representation of
-"]" can also be used to end a range.
-</P>
-<P>
-Ranges operate in the collating sequence of character values. They can also be
-used for characters specified numerically, for example [\000-\037]. Ranges
-can include any characters that are valid for the current mode.
-</P>
-<P>
-If a range that includes letters is used when caseless matching is set, it
-matches the letters in either case. For example, [W-c] is equivalent to
-[][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if character
-tables for a French locale are in use, [\xc8-\xcb] matches accented E
-characters in both cases. In UTF modes, PCRE supports the concept of case for
-characters with values greater than 128 only when it is compiled with Unicode
-property support.
-</P>
-<P>
-The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v,
-\V, \w, and \W may appear in a character class, and add the characters that
-they match to the class. For example, [\dABCDEF] matches any hexadecimal
-digit. In UTF modes, the PCRE_UCP option affects the meanings of \d, \s, \w
-and their upper case partners, just as it does when they appear outside a
-character class, as described in the section entitled
-<a href="#genericchartypes">"Generic character types"</a>
-above. The escape sequence \b has a different meaning inside a character
-class; it matches the backspace character. The sequences \B, \N, \R, and \X
-are not special inside a character class. Like any other unrecognized escape
-sequences, they are treated as the literal characters "B", "N", "R", and "X" by
-default, but cause an error if the PCRE_EXTRA option is set.
-</P>
-<P>
-A circumflex can conveniently be used with the upper case character types to
-specify a more restricted set of characters than the matching lower case type.
-For example, the class [^\W_] matches any letter or digit, but not underscore,
-whereas [\w] includes underscore. A positive character class should be read as
-"something OR something OR ..." and a negative class as "NOT something AND NOT
-something AND NOT ...".
-</P>
-<P>
-The only metacharacters that are recognized in character classes are backslash,
-hyphen (only where it can be interpreted as specifying a range), circumflex
-(only at the start), opening square bracket (only when it can be interpreted as
-introducing a POSIX class name - see the next section), and the terminating
-closing square bracket. However, escaping other non-alphanumeric characters
-does no harm.
-</P>
-<br><a name="SEC9" href="#TOC1">POSIX CHARACTER CLASSES</a><br>
-<P>
-Perl supports the POSIX notation for character classes. This uses names
-enclosed by [: and :] within the enclosing square brackets. PCRE also supports
-this notation. For example,
-<pre>
- [01[:alpha:]%]
-</pre>
-matches "0", "1", any alphabetic character, or "%". The supported class names
-are:
-<pre>
- alnum letters and digits
- alpha letters
- ascii character codes 0 - 127
- blank space or tab only
- cntrl control characters
- digit decimal digits (same as \d)
- graph printing characters, excluding space
- lower lower case letters
- print printing characters, including space
- punct printing characters, excluding letters and digits and space
- space white space (not quite the same as \s)
- upper upper case letters
- word "word" characters (same as \w)
- xdigit hexadecimal digits
-</pre>
-The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), and
-space (32). Notice that this list includes the VT character (code 11). This
-makes "space" different to \s, which does not include VT (for Perl
-compatibility).
-</P>
-<P>
-The name "word" is a Perl extension, and "blank" is a GNU extension from Perl
-5.8. Another Perl extension is negation, which is indicated by a ^ character
-after the colon. For example,
-<pre>
- [12[:^digit:]]
-</pre>
-matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the POSIX
-syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not
-supported, and an error is given if they are encountered.
-</P>
-<P>
-By default, in UTF modes, characters with values greater than 128 do not match
-any of the POSIX character classes. However, if the PCRE_UCP option is passed
-to <b>pcre_compile()</b>, some of the classes are changed so that Unicode
-character properties are used. This is achieved by replacing the POSIX classes
-by other sequences, as follows:
-<pre>
- [:alnum:] becomes \p{Xan}
- [:alpha:] becomes \p{L}
- [:blank:] becomes \h
- [:digit:] becomes \p{Nd}
- [:lower:] becomes \p{Ll}
- [:space:] becomes \p{Xps}
- [:upper:] becomes \p{Lu}
- [:word:] becomes \p{Xwd}
-</pre>
-Negated versions, such as [:^alpha:] use \P instead of \p. The other POSIX
-classes are unchanged, and match only characters with code points less than
-128.
-</P>
-<br><a name="SEC10" href="#TOC1">VERTICAL BAR</a><br>
-<P>
-Vertical bar characters are used to separate alternative patterns. For example,
-the pattern
-<pre>
- gilbert|sullivan
-</pre>
-matches either "gilbert" or "sullivan". Any number of alternatives may appear,
-and an empty alternative is permitted (matching the empty string). The matching
-process tries each alternative in turn, from left to right, and the first one
-that succeeds is used. If the alternatives are within a subpattern
-<a href="#subpattern">(defined below),</a>
-"succeeds" means matching the rest of the main pattern as well as the
-alternative in the subpattern.
-</P>
-<br><a name="SEC11" href="#TOC1">INTERNAL OPTION SETTING</a><br>
-<P>
-The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
-PCRE_EXTENDED options (which are Perl-compatible) can be changed from within
-the pattern by a sequence of Perl option letters enclosed between "(?" and ")".
-The option letters are
-<pre>
- i for PCRE_CASELESS
- m for PCRE_MULTILINE
- s for PCRE_DOTALL
- x for PCRE_EXTENDED
-</pre>
-For example, (?im) sets caseless, multiline matching. It is also possible to
-unset these options by preceding the letter with a hyphen, and a combined
-setting and unsetting such as (?im-sx), which sets PCRE_CASELESS and
-PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, is also
-permitted. If a letter appears both before and after the hyphen, the option is
-unset.
-</P>
-<P>
-The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA can be
-changed in the same way as the Perl-compatible options by using the characters
-J, U and X respectively.
-</P>
-<P>
-When one of these option changes occurs at top level (that is, not inside
-subpattern parentheses), the change applies to the remainder of the pattern
-that follows. If the change is placed right at the start of a pattern, PCRE
-extracts it into the global options (and it will therefore show up in data
-extracted by the <b>pcre_fullinfo()</b> function).
-</P>
-<P>
-An option change within a subpattern (see below for a description of
-subpatterns) affects only that part of the subpattern that follows it, so
-<pre>
- (a(?i)b)c
-</pre>
-matches abc and aBc and no other strings (assuming PCRE_CASELESS is not used).
-By this means, options can be made to have different settings in different
-parts of the pattern. Any changes made in one alternative do carry on
-into subsequent branches within the same subpattern. For example,
-<pre>
- (a(?i)b|c)
-</pre>
-matches "ab", "aB", "c", and "C", even though when matching "C" the first
-branch is abandoned before the option setting. This is because the effects of
-option settings happen at compile time. There would be some very weird
-behaviour otherwise.
-</P>
-<P>
-<b>Note:</b> There are other PCRE-specific options that can be set by the
-application when the compiling or matching functions are called. In some cases
-the pattern can contain special leading sequences such as (*CRLF) to override
-what the application has set or what has been defaulted. Details are given in
-the section entitled
-<a href="#newlineseq">"Newline sequences"</a>
-above. There are also the (*UTF8), (*UTF16), and (*UCP) leading sequences that
-can be used to set UTF and Unicode property modes; they are equivalent to
-setting the PCRE_UTF8, PCRE_UTF16, and the PCRE_UCP options, respectively.
-<a name="subpattern"></a></P>
-<br><a name="SEC12" href="#TOC1">SUBPATTERNS</a><br>
-<P>
-Subpatterns are delimited by parentheses (round brackets), which can be nested.
-Turning part of a pattern into a subpattern does two things:
-<br>
-<br>
-1. It localizes a set of alternatives. For example, the pattern
-<pre>
- cat(aract|erpillar|)
-</pre>
-matches "cataract", "caterpillar", or "cat". Without the parentheses, it would
-match "cataract", "erpillar" or an empty string.
-<br>
-<br>
-2. It sets up the subpattern as a capturing subpattern. This means that, when
-the whole pattern matches, that portion of the subject string that matched the
-subpattern is passed back to the caller via the <i>ovector</i> argument of the
-matching function. (This applies only to the traditional matching functions;
-the DFA matching functions do not support capturing.)
-</P>
-<P>
-Opening parentheses are counted from left to right (starting from 1) to obtain
-numbers for the capturing subpatterns. For example, if the string "the red
-king" is matched against the pattern
-<pre>
- the ((red|white) (king|queen))
-</pre>
-the captured substrings are "red king", "red", and "king", and are numbered 1,
-2, and 3, respectively.
-</P>
-<P>
-The fact that plain parentheses fulfil two functions is not always helpful.
-There are often times when a grouping subpattern is required without a
-capturing requirement. If an opening parenthesis is followed by a question mark
-and a colon, the subpattern does not do any capturing, and is not counted when
-computing the number of any subsequent capturing subpatterns. For example, if
-the string "the white queen" is matched against the pattern
-<pre>
- the ((?:red|white) (king|queen))
-</pre>
-the captured substrings are "white queen" and "queen", and are numbered 1 and
-2. The maximum number of capturing subpatterns is 65535.
-</P>
-<P>
-As a convenient shorthand, if any option settings are required at the start of
-a non-capturing subpattern, the option letters may appear between the "?" and
-the ":". Thus the two patterns
-<pre>
- (?i:saturday|sunday)
- (?:(?i)saturday|sunday)
-</pre>
-match exactly the same set of strings. Because alternative branches are tried
-from left to right, and options are not reset until the end of the subpattern
-is reached, an option setting in one branch does affect subsequent branches, so
-the above patterns match "SUNDAY" as well as "Saturday".
-<a name="dupsubpatternnumber"></a></P>
-<br><a name="SEC13" href="#TOC1">DUPLICATE SUBPATTERN NUMBERS</a><br>
-<P>
-Perl 5.10 introduced a feature whereby each alternative in a subpattern uses
-the same numbers for its capturing parentheses. Such a subpattern starts with
-(?| and is itself a non-capturing subpattern. For example, consider this
-pattern:
-<pre>
- (?|(Sat)ur|(Sun))day
-</pre>
-Because the two alternatives are inside a (?| group, both sets of capturing
-parentheses are numbered one. Thus, when the pattern matches, you can look
-at captured substring number one, whichever alternative matched. This construct
-is useful when you want to capture part, but not all, of one of a number of
-alternatives. Inside a (?| group, parentheses are numbered as usual, but the
-number is reset at the start of each branch. The numbers of any capturing
-parentheses that follow the subpattern start after the highest number used in
-any branch. The following example is taken from the Perl documentation. The
-numbers underneath show in which buffer the captured content will be stored.
-<pre>
- # before ---------------branch-reset----------- after
- / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
- # 1 2 2 3 2 3 4
-</pre>
-A back reference to a numbered subpattern uses the most recent value that is
-set for that number by any subpattern. The following pattern matches "abcabc"
-or "defdef":
-<pre>
- /(?|(abc)|(def))\1/
-</pre>
-In contrast, a subroutine call to a numbered subpattern always refers to the
-first one in the pattern with the given number. The following pattern matches
-"abcabc" or "defabc":
-<pre>
- /(?|(abc)|(def))(?1)/
-</pre>
-If a
-<a href="#conditions">condition test</a>
-for a subpattern's having matched refers to a non-unique number, the test is
-true if any of the subpatterns of that number have matched.
-</P>
-<P>
-An alternative approach to using this "branch reset" feature is to use
-duplicate named subpatterns, as described in the next section.
-</P>
-<br><a name="SEC14" href="#TOC1">NAMED SUBPATTERNS</a><br>
-<P>
-Identifying capturing parentheses by number is simple, but it can be very hard
-to keep track of the numbers in complicated regular expressions. Furthermore,
-if an expression is modified, the numbers may change. To help with this
-difficulty, PCRE supports the naming of subpatterns. This feature was not
-added to Perl until release 5.10. Python had the feature earlier, and PCRE
-introduced it at release 4.0, using the Python syntax. PCRE now supports both
-the Perl and the Python syntax. Perl allows identically numbered subpatterns to
-have different names, but PCRE does not.
-</P>
-<P>
-In PCRE, a subpattern can be named in one of three ways: (?&#60;name&#62;...) or
-(?'name'...) as in Perl, or (?P&#60;name&#62;...) as in Python. References to capturing
-parentheses from other parts of the pattern, such as
-<a href="#backreferences">back references,</a>
-<a href="#recursion">recursion,</a>
-and
-<a href="#conditions">conditions,</a>
-can be made by name as well as by number.
-</P>
-<P>
-Names consist of up to 32 alphanumeric characters and underscores. Named
-capturing parentheses are still allocated numbers as well as names, exactly as
-if the names were not present. The PCRE API provides function calls for
-extracting the name-to-number translation table from a compiled pattern. There
-is also a convenience function for extracting a captured substring by name.
-</P>
-<P>
-By default, a name must be unique within a pattern, but it is possible to relax
-this constraint by setting the PCRE_DUPNAMES option at compile time. (Duplicate
-names are also always permitted for subpatterns with the same number, set up as
-described in the previous section.) Duplicate names can be useful for patterns
-where only one instance of the named parentheses can match. Suppose you want to
-match the name of a weekday, either as a 3-letter abbreviation or as the full
-name, and in both cases you want to extract the abbreviation. This pattern
-(ignoring the line breaks) does the job:
-<pre>
- (?&#60;DN&#62;Mon|Fri|Sun)(?:day)?|
- (?&#60;DN&#62;Tue)(?:sday)?|
- (?&#60;DN&#62;Wed)(?:nesday)?|
- (?&#60;DN&#62;Thu)(?:rsday)?|
- (?&#60;DN&#62;Sat)(?:urday)?
-</pre>
-There are five capturing substrings, but only one is ever set after a match.
-(An alternative way of solving this problem is to use a "branch reset"
-subpattern, as described in the previous section.)
-</P>
-<P>
-The convenience function for extracting the data by name returns the substring
-for the first (and in this example, the only) subpattern of that name that
-matched. This saves searching to find which numbered subpattern it was.
-</P>
-<P>
-If you make a back reference to a non-unique named subpattern from elsewhere in
-the pattern, the one that corresponds to the first occurrence of the name is
-used. In the absence of duplicate numbers (see the previous section) this is
-the one with the lowest number. If you use a named reference in a condition
-test (see the
-<a href="#conditions">section about conditions</a>
-below), either to check whether a subpattern has matched, or to check for
-recursion, all subpatterns with the same name are tested. If the condition is
-true for any one of them, the overall condition is true. This is the same
-behaviour as testing by number. For further details of the interfaces for
-handling named subpatterns, see the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<P>
-<b>Warning:</b> You cannot use different names to distinguish between two
-subpatterns with the same number because PCRE uses only the numbers when
-matching. For this reason, an error is given at compile time if different names
-are given to subpatterns with the same number. However, you can give the same
-name to subpatterns with the same number, even when PCRE_DUPNAMES is not set.
-</P>
-<br><a name="SEC15" href="#TOC1">REPETITION</a><br>
-<P>
-Repetition is specified by quantifiers, which can follow any of the following
-items:
-<pre>
- a literal data character
- the dot metacharacter
- the \C escape sequence
- the \X escape sequence
- the \R escape sequence
- an escape such as \d or \pL that matches a single character
- a character class
- a back reference (see next section)
- a parenthesized subpattern (including assertions)
- a subroutine call to a subpattern (recursive or otherwise)
-</pre>
-The general repetition quantifier specifies a minimum and maximum number of
-permitted matches, by giving the two numbers in curly brackets (braces),
-separated by a comma. The numbers must be less than 65536, and the first must
-be less than or equal to the second. For example:
-<pre>
- z{2,4}
-</pre>
-matches "zz", "zzz", or "zzzz". A closing brace on its own is not a special
-character. If the second number is omitted, but the comma is present, there is
-no upper limit; if the second number and the comma are both omitted, the
-quantifier specifies an exact number of required matches. Thus
-<pre>
- [aeiou]{3,}
-</pre>
-matches at least 3 successive vowels, but may match many more, while
-<pre>
- \d{8}
-</pre>
-matches exactly 8 digits. An opening curly bracket that appears in a position
-where a quantifier is not allowed, or one that does not match the syntax of a
-quantifier, is taken as a literal character. For example, {,6} is not a
-quantifier, but a literal string of four characters.
-</P>
-<P>
-In UTF modes, quantifiers apply to characters rather than to individual data
-units. Thus, for example, \x{100}{2} matches two characters, each of
-which is represented by a two-byte sequence in a UTF-8 string. Similarly,
-\X{3} matches three Unicode extended sequences, each of which may be several
-data units long (and they may be of different lengths).
-</P>
-<P>
-The quantifier {0} is permitted, causing the expression to behave as if the
-previous item and the quantifier were not present. This may be useful for
-subpatterns that are referenced as
-<a href="#subpatternsassubroutines">subroutines</a>
-from elsewhere in the pattern (but see also the section entitled
-<a href="#subdefine">"Defining subpatterns for use by reference only"</a>
-below). Items other than subpatterns that have a {0} quantifier are omitted
-from the compiled pattern.
-</P>
-<P>
-For convenience, the three most common quantifiers have single-character
-abbreviations:
-<pre>
- * is equivalent to {0,}
- + is equivalent to {1,}
- ? is equivalent to {0,1}
-</pre>
-It is possible to construct infinite loops by following a subpattern that can
-match no characters with a quantifier that has no upper limit, for example:
-<pre>
- (a?)*
-</pre>
-Earlier versions of Perl and PCRE used to give an error at compile time for
-such patterns. However, because there are cases where this can be useful, such
-patterns are now accepted, but if any repetition of the subpattern does in fact
-match no characters, the loop is forcibly broken.
-</P>
-<P>
-By default, the quantifiers are "greedy", that is, they match as much as
-possible (up to the maximum number of permitted times), without causing the
-rest of the pattern to fail. The classic example of where this gives problems
-is in trying to match comments in C programs. These appear between /* and */
-and within the comment, individual * and / characters may appear. An attempt to
-match C comments by applying the pattern
-<pre>
- /\*.*\*/
-</pre>
-to the string
-<pre>
- /* first comment */ not comment /* second comment */
-</pre>
-fails, because it matches the entire string owing to the greediness of the .*
-item.
-</P>
-<P>
-However, if a quantifier is followed by a question mark, it ceases to be
-greedy, and instead matches the minimum number of times possible, so the
-pattern
-<pre>
- /\*.*?\*/
-</pre>
-does the right thing with the C comments. The meaning of the various
-quantifiers is not otherwise changed, just the preferred number of matches.
-Do not confuse this use of question mark with its use as a quantifier in its
-own right. Because it has two uses, it can sometimes appear doubled, as in
-<pre>
- \d??\d
-</pre>
-which matches one digit by preference, but can match two if that is the only
-way the rest of the pattern matches.
-</P>
-<P>
-If the PCRE_UNGREEDY option is set (an option that is not available in Perl),
-the quantifiers are not greedy by default, but individual ones can be made
-greedy by following them with a question mark. In other words, it inverts the
-default behaviour.
-</P>
-<P>
-When a parenthesized subpattern is quantified with a minimum repeat count that
-is greater than 1 or with a limited maximum, more memory is required for the
-compiled pattern, in proportion to the size of the minimum or maximum.
-</P>
-<P>
-If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equivalent
-to Perl's /s) is set, thus allowing the dot to match newlines, the pattern is
-implicitly anchored, because whatever follows will be tried against every
-character position in the subject string, so there is no point in retrying the
-overall match at any position after the first. PCRE normally treats such a
-pattern as though it were preceded by \A.
-</P>
-<P>
-In cases where it is known that the subject string contains no newlines, it is
-worth setting PCRE_DOTALL in order to obtain this optimization, or
-alternatively using ^ to indicate anchoring explicitly.
-</P>
-<P>
-However, there is one situation where the optimization cannot be used. When .*
-is inside capturing parentheses that are the subject of a back reference
-elsewhere in the pattern, a match at the start may fail where a later one
-succeeds. Consider, for example:
-<pre>
- (.*)abc\1
-</pre>
-If the subject is "xyz123abc123" the match point is the fourth character. For
-this reason, such a pattern is not implicitly anchored.
-</P>
-<P>
-When a capturing subpattern is repeated, the value captured is the substring
-that matched the final iteration. For example, after
-<pre>
- (tweedle[dume]{3}\s*)+
-</pre>
-has matched "tweedledum tweedledee" the value of the captured substring is
-"tweedledee". However, if there are nested capturing subpatterns, the
-corresponding captured values may have been set in previous iterations. For
-example, after
-<pre>
- /(a|(b))+/
-</pre>
-matches "aba" the value of the second captured substring is "b".
-<a name="atomicgroup"></a></P>
-<br><a name="SEC16" href="#TOC1">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a><br>
-<P>
-With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy")
-repetition, failure of what follows normally causes the repeated item to be
-re-evaluated to see if a different number of repeats allows the rest of the
-pattern to match. Sometimes it is useful to prevent this, either to change the
-nature of the match, or to cause it fail earlier than it otherwise might, when
-the author of the pattern knows there is no point in carrying on.
-</P>
-<P>
-Consider, for example, the pattern \d+foo when applied to the subject line
-<pre>
- 123456bar
-</pre>
-After matching all 6 digits and then failing to match "foo", the normal
-action of the matcher is to try again with only 5 digits matching the \d+
-item, and then with 4, and so on, before ultimately failing. "Atomic grouping"
-(a term taken from Jeffrey Friedl's book) provides the means for specifying
-that once a subpattern has matched, it is not to be re-evaluated in this way.
-</P>
-<P>
-If we use atomic grouping for the previous example, the matcher gives up
-immediately on failing to match "foo" the first time. The notation is a kind of
-special parenthesis, starting with (?&#62; as in this example:
-<pre>
- (?&#62;\d+)foo
-</pre>
-This kind of parenthesis "locks up" the part of the pattern it contains once
-it has matched, and a failure further into the pattern is prevented from
-backtracking into it. Backtracking past it to previous items, however, works as
-normal.
-</P>
-<P>
-An alternative description is that a subpattern of this type matches the string
-of characters that an identical standalone pattern would match, if anchored at
-the current point in the subject string.
-</P>
-<P>
-Atomic grouping subpatterns are not capturing subpatterns. Simple cases such as
-the above example can be thought of as a maximizing repeat that must swallow
-everything it can. So, while both \d+ and \d+? are prepared to adjust the
-number of digits they match in order to make the rest of the pattern match,
-(?&#62;\d+) can only match an entire sequence of digits.
-</P>
-<P>
-Atomic groups in general can of course contain arbitrarily complicated
-subpatterns, and can be nested. However, when the subpattern for an atomic
-group is just a single repeated item, as in the example above, a simpler
-notation, called a "possessive quantifier" can be used. This consists of an
-additional + character following a quantifier. Using this notation, the
-previous example can be rewritten as
-<pre>
- \d++foo
-</pre>
-Note that a possessive quantifier can be used with an entire group, for
-example:
-<pre>
- (abc|xyz){2,3}+
-</pre>
-Possessive quantifiers are always greedy; the setting of the PCRE_UNGREEDY
-option is ignored. They are a convenient notation for the simpler forms of
-atomic group. However, there is no difference in the meaning of a possessive
-quantifier and the equivalent atomic group, though there may be a performance
-difference; possessive quantifiers should be slightly faster.
-</P>
-<P>
-The possessive quantifier syntax is an extension to the Perl 5.8 syntax.
-Jeffrey Friedl originated the idea (and the name) in the first edition of his
-book. Mike McCloskey liked it, so implemented it when he built Sun's Java
-package, and PCRE copied it from there. It ultimately found its way into Perl
-at release 5.10.
-</P>
-<P>
-PCRE has an optimization that automatically "possessifies" certain simple
-pattern constructs. For example, the sequence A+B is treated as A++B because
-there is no point in backtracking into a sequence of A's when B must follow.
-</P>
-<P>
-When a pattern contains an unlimited repeat inside a subpattern that can itself
-be repeated an unlimited number of times, the use of an atomic group is the
-only way to avoid some failing matches taking a very long time indeed. The
-pattern
-<pre>
- (\D+|&#60;\d+&#62;)*[!?]
-</pre>
-matches an unlimited number of substrings that either consist of non-digits, or
-digits enclosed in &#60;&#62;, followed by either ! or ?. When it matches, it runs
-quickly. However, if it is applied to
-<pre>
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-</pre>
-it takes a long time before reporting failure. This is because the string can
-be divided between the internal \D+ repeat and the external * repeat in a
-large number of ways, and all have to be tried. (The example uses [!?] rather
-than a single character at the end, because both PCRE and Perl have an
-optimization that allows for fast failure when a single character is used. They
-remember the last single character that is required for a match, and fail early
-if it is not present in the string.) If the pattern is changed so that it uses
-an atomic group, like this:
-<pre>
- ((?&#62;\D+)|&#60;\d+&#62;)*[!?]
-</pre>
-sequences of non-digits cannot be broken, and failure happens quickly.
-<a name="backreferences"></a></P>
-<br><a name="SEC17" href="#TOC1">BACK REFERENCES</a><br>
-<P>
-Outside a character class, a backslash followed by a digit greater than 0 (and
-possibly further digits) is a back reference to a capturing subpattern earlier
-(that is, to its left) in the pattern, provided there have been that many
-previous capturing left parentheses.
-</P>
-<P>
-However, if the decimal number following the backslash is less than 10, it is
-always taken as a back reference, and causes an error only if there are not
-that many capturing left parentheses in the entire pattern. In other words, the
-parentheses that are referenced need not be to the left of the reference for
-numbers less than 10. A "forward back reference" of this type can make sense
-when a repetition is involved and the subpattern to the right has participated
-in an earlier iteration.
-</P>
-<P>
-It is not possible to have a numerical "forward back reference" to a subpattern
-whose number is 10 or more using this syntax because a sequence such as \50 is
-interpreted as a character defined in octal. See the subsection entitled
-"Non-printing characters"
-<a href="#digitsafterbackslash">above</a>
-for further details of the handling of digits following a backslash. There is
-no such problem when named parentheses are used. A back reference to any
-subpattern is possible using named parentheses (see below).
-</P>
-<P>
-Another way of avoiding the ambiguity inherent in the use of digits following a
-backslash is to use the \g escape sequence. This escape must be followed by an
-unsigned number or a negative number, optionally enclosed in braces. These
-examples are all identical:
-<pre>
- (ring), \1
- (ring), \g1
- (ring), \g{1}
-</pre>
-An unsigned number specifies an absolute reference without the ambiguity that
-is present in the older syntax. It is also useful when literal digits follow
-the reference. A negative number is a relative reference. Consider this
-example:
-<pre>
- (abc(def)ghi)\g{-1}
-</pre>
-The sequence \g{-1} is a reference to the most recently started capturing
-subpattern before \g, that is, is it equivalent to \2 in this example.
-Similarly, \g{-2} would be equivalent to \1. The use of relative references
-can be helpful in long patterns, and also in patterns that are created by
-joining together fragments that contain references within themselves.
-</P>
-<P>
-A back reference matches whatever actually matched the capturing subpattern in
-the current subject string, rather than anything matching the subpattern
-itself (see
-<a href="#subpatternsassubroutines">"Subpatterns as subroutines"</a>
-below for a way of doing that). So the pattern
-<pre>
- (sens|respons)e and \1ibility
-</pre>
-matches "sense and sensibility" and "response and responsibility", but not
-"sense and responsibility". If caseful matching is in force at the time of the
-back reference, the case of letters is relevant. For example,
-<pre>
- ((?i)rah)\s+\1
-</pre>
-matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original
-capturing subpattern is matched caselessly.
-</P>
-<P>
-There are several different ways of writing back references to named
-subpatterns. The .NET syntax \k{name} and the Perl syntax \k&#60;name&#62; or
-\k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's unified
-back reference syntax, in which \g can be used for both numeric and named
-references, is also supported. We could rewrite the above example in any of
-the following ways:
-<pre>
- (?&#60;p1&#62;(?i)rah)\s+\k&#60;p1&#62;
- (?'p1'(?i)rah)\s+\k{p1}
- (?P&#60;p1&#62;(?i)rah)\s+(?P=p1)
- (?&#60;p1&#62;(?i)rah)\s+\g{p1}
-</pre>
-A subpattern that is referenced by name may appear in the pattern before or
-after the reference.
-</P>
-<P>
-There may be more than one back reference to the same subpattern. If a
-subpattern has not actually been used in a particular match, any back
-references to it always fail by default. For example, the pattern
-<pre>
- (a|(bc))\2
-</pre>
-always fails if it starts to match "a" rather than "bc". However, if the
-PCRE_JAVASCRIPT_COMPAT option is set at compile time, a back reference to an
-unset value matches an empty string.
-</P>
-<P>
-Because there may be many capturing parentheses in a pattern, all digits
-following a backslash are taken as part of a potential back reference number.
-If the pattern continues with a digit character, some delimiter must be used to
-terminate the back reference. If the PCRE_EXTENDED option is set, this can be
-whitespace. Otherwise, the \g{ syntax or an empty comment (see
-<a href="#comments">"Comments"</a>
-below) can be used.
-</P>
-<br><b>
-Recursive back references
-</b><br>
-<P>
-A back reference that occurs inside the parentheses to which it refers fails
-when the subpattern is first used, so, for example, (a\1) never matches.
-However, such references can be useful inside repeated subpatterns. For
-example, the pattern
-<pre>
- (a|b\1)+
-</pre>
-matches any number of "a"s and also "aba", "ababbaa" etc. At each iteration of
-the subpattern, the back reference matches the character string corresponding
-to the previous iteration. In order for this to work, the pattern must be such
-that the first iteration does not need to match the back reference. This can be
-done using alternation, as in the example above, or by a quantifier with a
-minimum of zero.
-</P>
-<P>
-Back references of this type cause the group that they reference to be treated
-as an
-<a href="#atomicgroup">atomic group.</a>
-Once the whole group has been matched, a subsequent matching failure cannot
-cause backtracking into the middle of the group.
-<a name="bigassertions"></a></P>
-<br><a name="SEC18" href="#TOC1">ASSERTIONS</a><br>
-<P>
-An assertion is a test on the characters following or preceding the current
-matching point that does not actually consume any characters. The simple
-assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are described
-<a href="#smallassertions">above.</a>
-</P>
-<P>
-More complicated assertions are coded as subpatterns. There are two kinds:
-those that look ahead of the current position in the subject string, and those
-that look behind it. An assertion subpattern is matched in the normal way,
-except that it does not cause the current matching position to be changed.
-</P>
-<P>
-Assertion subpatterns are not capturing subpatterns. If such an assertion
-contains capturing subpatterns within it, these are counted for the purposes of
-numbering the capturing subpatterns in the whole pattern. However, substring
-capturing is carried out only for positive assertions, because it does not make
-sense for negative assertions.
-</P>
-<P>
-For compatibility with Perl, assertion subpatterns may be repeated; though
-it makes no sense to assert the same thing several times, the side effect of
-capturing parentheses may occasionally be useful. In practice, there only three
-cases:
-<br>
-<br>
-(1) If the quantifier is {0}, the assertion is never obeyed during matching.
-However, it may contain internal capturing parenthesized groups that are called
-from elsewhere via the
-<a href="#subpatternsassubroutines">subroutine mechanism.</a>
-<br>
-<br>
-(2) If quantifier is {0,n} where n is greater than zero, it is treated as if it
-were {0,1}. At run time, the rest of the pattern match is tried with and
-without the assertion, the order depending on the greediness of the quantifier.
-<br>
-<br>
-(3) If the minimum repetition is greater than zero, the quantifier is ignored.
-The assertion is obeyed just once when encountered during matching.
-</P>
-<br><b>
-Lookahead assertions
-</b><br>
-<P>
-Lookahead assertions start with (?= for positive assertions and (?! for
-negative assertions. For example,
-<pre>
- \w+(?=;)
-</pre>
-matches a word followed by a semicolon, but does not include the semicolon in
-the match, and
-<pre>
- foo(?!bar)
-</pre>
-matches any occurrence of "foo" that is not followed by "bar". Note that the
-apparently similar pattern
-<pre>
- (?!foo)bar
-</pre>
-does not find an occurrence of "bar" that is preceded by something other than
-"foo"; it finds any occurrence of "bar" whatsoever, because the assertion
-(?!foo) is always true when the next three characters are "bar". A
-lookbehind assertion is needed to achieve the other effect.
-</P>
-<P>
-If you want to force a matching failure at some point in a pattern, the most
-convenient way to do it is with (?!) because an empty string always matches, so
-an assertion that requires there not to be an empty string must always fail.
-The backtracking control verb (*FAIL) or (*F) is a synonym for (?!).
-<a name="lookbehind"></a></P>
-<br><b>
-Lookbehind assertions
-</b><br>
-<P>
-Lookbehind assertions start with (?&#60;= for positive assertions and (?&#60;! for
-negative assertions. For example,
-<pre>
- (?&#60;!foo)bar
-</pre>
-does find an occurrence of "bar" that is not preceded by "foo". The contents of
-a lookbehind assertion are restricted such that all the strings it matches must
-have a fixed length. However, if there are several top-level alternatives, they
-do not all have to have the same fixed length. Thus
-<pre>
- (?&#60;=bullock|donkey)
-</pre>
-is permitted, but
-<pre>
- (?&#60;!dogs?|cats?)
-</pre>
-causes an error at compile time. Branches that match different length strings
-are permitted only at the top level of a lookbehind assertion. This is an
-extension compared with Perl, which requires all branches to match the same
-length of string. An assertion such as
-<pre>
- (?&#60;=ab(c|de))
-</pre>
-is not permitted, because its single top-level branch can match two different
-lengths, but it is acceptable to PCRE if rewritten to use two top-level
-branches:
-<pre>
- (?&#60;=abc|abde)
-</pre>
-In some cases, the escape sequence \K
-<a href="#resetmatchstart">(see above)</a>
-can be used instead of a lookbehind assertion to get round the fixed-length
-restriction.
-</P>
-<P>
-The implementation of lookbehind assertions is, for each alternative, to
-temporarily move the current position back by the fixed length and then try to
-match. If there are insufficient characters before the current position, the
-assertion fails.
-</P>
-<P>
-In a UTF mode, PCRE does not allow the \C escape (which matches a single data
-unit even in a UTF mode) to appear in lookbehind assertions, because it makes
-it impossible to calculate the length of the lookbehind. The \X and \R
-escapes, which can match different numbers of data units, are also not
-permitted.
-</P>
-<P>
-<a href="#subpatternsassubroutines">"Subroutine"</a>
-calls (see below) such as (?2) or (?&X) are permitted in lookbehinds, as long
-as the subpattern matches a fixed-length string.
-<a href="#recursion">Recursion,</a>
-however, is not supported.
-</P>
-<P>
-Possessive quantifiers can be used in conjunction with lookbehind assertions to
-specify efficient matching of fixed-length strings at the end of subject
-strings. Consider a simple pattern such as
-<pre>
- abcd$
-</pre>
-when applied to a long string that does not match. Because matching proceeds
-from left to right, PCRE will look for each "a" in the subject and then see if
-what follows matches the rest of the pattern. If the pattern is specified as
-<pre>
- ^.*abcd$
-</pre>
-the initial .* matches the entire string at first, but when this fails (because
-there is no following "a"), it backtracks to match all but the last character,
-then all but the last two characters, and so on. Once again the search for "a"
-covers the entire string, from right to left, so we are no better off. However,
-if the pattern is written as
-<pre>
- ^.*+(?&#60;=abcd)
-</pre>
-there can be no backtracking for the .*+ item; it can match only the entire
-string. The subsequent lookbehind assertion does a single test on the last four
-characters. If it fails, the match fails immediately. For long strings, this
-approach makes a significant difference to the processing time.
-</P>
-<br><b>
-Using multiple assertions
-</b><br>
-<P>
-Several assertions (of any sort) may occur in succession. For example,
-<pre>
- (?&#60;=\d{3})(?&#60;!999)foo
-</pre>
-matches "foo" preceded by three digits that are not "999". Notice that each of
-the assertions is applied independently at the same point in the subject
-string. First there is a check that the previous three characters are all
-digits, and then there is a check that the same three characters are not "999".
-This pattern does <i>not</i> match "foo" preceded by six characters, the first
-of which are digits and the last three of which are not "999". For example, it
-doesn't match "123abcfoo". A pattern to do that is
-<pre>
- (?&#60;=\d{3}...)(?&#60;!999)foo
-</pre>
-This time the first assertion looks at the preceding six characters, checking
-that the first three are digits, and then the second assertion checks that the
-preceding three characters are not "999".
-</P>
-<P>
-Assertions can be nested in any combination. For example,
-<pre>
- (?&#60;=(?&#60;!foo)bar)baz
-</pre>
-matches an occurrence of "baz" that is preceded by "bar" which in turn is not
-preceded by "foo", while
-<pre>
- (?&#60;=\d{3}(?!999)...)foo
-</pre>
-is another pattern that matches "foo" preceded by three digits and any three
-characters that are not "999".
-<a name="conditions"></a></P>
-<br><a name="SEC19" href="#TOC1">CONDITIONAL SUBPATTERNS</a><br>
-<P>
-It is possible to cause the matching process to obey a subpattern
-conditionally or to choose between two alternative subpatterns, depending on
-the result of an assertion, or whether a specific capturing subpattern has
-already been matched. The two possible forms of conditional subpattern are:
-<pre>
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-</pre>
-If the condition is satisfied, the yes-pattern is used; otherwise the
-no-pattern (if present) is used. If there are more than two alternatives in the
-subpattern, a compile-time error occurs. Each of the two alternatives may
-itself contain nested subpatterns of any form, including conditional
-subpatterns; the restriction to two alternatives applies only at the level of
-the condition. This pattern fragment is an example where the alternatives are
-complex:
-<pre>
- (?(1) (A|B|C) | (D | (?(2)E|F) | E) )
-
-</PRE>
-</P>
-<P>
-There are four kinds of condition: references to subpatterns, references to
-recursion, a pseudo-condition called DEFINE, and assertions.
-</P>
-<br><b>
-Checking for a used subpattern by number
-</b><br>
-<P>
-If the text between the parentheses consists of a sequence of digits, the
-condition is true if a capturing subpattern of that number has previously
-matched. If there is more than one capturing subpattern with the same number
-(see the earlier
-<a href="#recursion">section about duplicate subpattern numbers),</a>
-the condition is true if any of them have matched. An alternative notation is
-to precede the digits with a plus or minus sign. In this case, the subpattern
-number is relative rather than absolute. The most recently opened parentheses
-can be referenced by (?(-1), the next most recent by (?(-2), and so on. Inside
-loops it can also make sense to refer to subsequent groups. The next
-parentheses to be opened can be referenced as (?(+1), and so on. (The value
-zero in any of these forms is not used; it provokes a compile-time error.)
-</P>
-<P>
-Consider the following pattern, which contains non-significant white space to
-make it more readable (assume the PCRE_EXTENDED option) and to divide it into
-three parts for ease of discussion:
-<pre>
- ( \( )? [^()]+ (?(1) \) )
-</pre>
-The first part matches an optional opening parenthesis, and if that
-character is present, sets it as the first captured substring. The second part
-matches one or more characters that are not parentheses. The third part is a
-conditional subpattern that tests whether or not the first set of parentheses
-matched. If they did, that is, if subject started with an opening parenthesis,
-the condition is true, and so the yes-pattern is executed and a closing
-parenthesis is required. Otherwise, since no-pattern is not present, the
-subpattern matches nothing. In other words, this pattern matches a sequence of
-non-parentheses, optionally enclosed in parentheses.
-</P>
-<P>
-If you were embedding this pattern in a larger one, you could use a relative
-reference:
-<pre>
- ...other stuff... ( \( )? [^()]+ (?(-1) \) ) ...
-</pre>
-This makes the fragment independent of the parentheses in the larger pattern.
-</P>
-<br><b>
-Checking for a used subpattern by name
-</b><br>
-<P>
-Perl uses the syntax (?(&#60;name&#62;)...) or (?('name')...) to test for a used
-subpattern by name. For compatibility with earlier versions of PCRE, which had
-this facility before Perl, the syntax (?(name)...) is also recognized. However,
-there is a possible ambiguity with this syntax, because subpattern names may
-consist entirely of digits. PCRE looks first for a named subpattern; if it
-cannot find one and the name consists entirely of digits, PCRE looks for a
-subpattern of that number, which must be greater than zero. Using subpattern
-names that consist entirely of digits is not recommended.
-</P>
-<P>
-Rewriting the above example to use a named subpattern gives this:
-<pre>
- (?&#60;OPEN&#62; \( )? [^()]+ (?(&#60;OPEN&#62;) \) )
-</pre>
-If the name used in a condition of this kind is a duplicate, the test is
-applied to all subpatterns of the same name, and is true if any one of them has
-matched.
-</P>
-<br><b>
-Checking for pattern recursion
-</b><br>
-<P>
-If the condition is the string (R), and there is no subpattern with the name R,
-the condition is true if a recursive call to the whole pattern or any
-subpattern has been made. If digits or a name preceded by ampersand follow the
-letter R, for example:
-<pre>
- (?(R3)...) or (?(R&name)...)
-</pre>
-the condition is true if the most recent recursion is into a subpattern whose
-number or name is given. This condition does not check the entire recursion
-stack. If the name used in a condition of this kind is a duplicate, the test is
-applied to all subpatterns of the same name, and is true if any one of them is
-the most recent recursion.
-</P>
-<P>
-At "top level", all these recursion test conditions are false.
-<a href="#recursion">The syntax for recursive patterns</a>
-is described below.
-<a name="subdefine"></a></P>
-<br><b>
-Defining subpatterns for use by reference only
-</b><br>
-<P>
-If the condition is the string (DEFINE), and there is no subpattern with the
-name DEFINE, the condition is always false. In this case, there may be only one
-alternative in the subpattern. It is always skipped if control reaches this
-point in the pattern; the idea of DEFINE is that it can be used to define
-subroutines that can be referenced from elsewhere. (The use of
-<a href="#subpatternsassubroutines">subroutines</a>
-is described below.) For example, a pattern to match an IPv4 address such as
-"192.168.23.245" could be written like this (ignore whitespace and line
-breaks):
-<pre>
- (?(DEFINE) (?&#60;byte&#62; 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )
- \b (?&byte) (\.(?&byte)){3} \b
-</pre>
-The first part of the pattern is a DEFINE group inside which a another group
-named "byte" is defined. This matches an individual component of an IPv4
-address (a number less than 256). When matching takes place, this part of the
-pattern is skipped because DEFINE acts like a false condition. The rest of the
-pattern uses references to the named group to match the four dot-separated
-components of an IPv4 address, insisting on a word boundary at each end.
-</P>
-<br><b>
-Assertion conditions
-</b><br>
-<P>
-If the condition is not in any of the above formats, it must be an assertion.
-This may be a positive or negative lookahead or lookbehind assertion. Consider
-this pattern, again containing non-significant white space, and with the two
-alternatives on the second line:
-<pre>
- (?(?=[^a-z]*[a-z])
- \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} )
-</pre>
-The condition is a positive lookahead assertion that matches an optional
-sequence of non-letters followed by a letter. In other words, it tests for the
-presence of at least one letter in the subject. If a letter is found, the
-subject is matched against the first alternative; otherwise it is matched
-against the second. This pattern matches strings in one of the two forms
-dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.
-<a name="comments"></a></P>
-<br><a name="SEC20" href="#TOC1">COMMENTS</a><br>
-<P>
-There are two ways of including comments in patterns that are processed by
-PCRE. In both cases, the start of the comment must not be in a character class,
-nor in the middle of any other sequence of related characters such as (?: or a
-subpattern name or number. The characters that make up a comment play no part
-in the pattern matching.
-</P>
-<P>
-The sequence (?# marks the start of a comment that continues up to the next
-closing parenthesis. Nested parentheses are not permitted. If the PCRE_EXTENDED
-option is set, an unescaped # character also introduces a comment, which in
-this case continues to immediately after the next newline character or
-character sequence in the pattern. Which characters are interpreted as newlines
-is controlled by the options passed to a compiling function or by a special
-sequence at the start of the pattern, as described in the section entitled
-<a href="#newlines">"Newline conventions"</a>
-above. Note that the end of this type of comment is a literal newline sequence
-in the pattern; escape sequences that happen to represent a newline do not
-count. For example, consider this pattern when PCRE_EXTENDED is set, and the
-default newline convention is in force:
-<pre>
- abc #comment \n still comment
-</pre>
-On encountering the # character, <b>pcre_compile()</b> skips along, looking for
-a newline in the pattern. The sequence \n is still literal at this stage, so
-it does not terminate the comment. Only an actual character with the code value
-0x0a (the default newline) does so.
-<a name="recursion"></a></P>
-<br><a name="SEC21" href="#TOC1">RECURSIVE PATTERNS</a><br>
-<P>
-Consider the problem of matching a string in parentheses, allowing for
-unlimited nested parentheses. Without the use of recursion, the best that can
-be done is to use a pattern that matches up to some fixed depth of nesting. It
-is not possible to handle an arbitrary nesting depth.
-</P>
-<P>
-For some time, Perl has provided a facility that allows regular expressions to
-recurse (amongst other things). It does this by interpolating Perl code in the
-expression at run time, and the code can refer to the expression itself. A Perl
-pattern using code interpolation to solve the parentheses problem can be
-created like this:
-<pre>
- $re = qr{\( (?: (?&#62;[^()]+) | (?p{$re}) )* \)}x;
-</pre>
-The (?p{...}) item interpolates Perl code at run time, and in this case refers
-recursively to the pattern in which it appears.
-</P>
-<P>
-Obviously, PCRE cannot support the interpolation of Perl code. Instead, it
-supports special syntax for recursion of the entire pattern, and also for
-individual subpattern recursion. After its introduction in PCRE and Python,
-this kind of recursion was subsequently introduced into Perl at release 5.10.
-</P>
-<P>
-A special item that consists of (? followed by a number greater than zero and a
-closing parenthesis is a recursive subroutine call of the subpattern of the
-given number, provided that it occurs inside that subpattern. (If not, it is a
-<a href="#subpatternsassubroutines">non-recursive subroutine</a>
-call, which is described in the next section.) The special item (?R) or (?0) is
-a recursive call of the entire regular expression.
-</P>
-<P>
-This PCRE pattern solves the nested parentheses problem (assume the
-PCRE_EXTENDED option is set so that white space is ignored):
-<pre>
- \( ( [^()]++ | (?R) )* \)
-</pre>
-First it matches an opening parenthesis. Then it matches any number of
-substrings which can either be a sequence of non-parentheses, or a recursive
-match of the pattern itself (that is, a correctly parenthesized substring).
-Finally there is a closing parenthesis. Note the use of a possessive quantifier
-to avoid backtracking into sequences of non-parentheses.
-</P>
-<P>
-If this were part of a larger pattern, you would not want to recurse the entire
-pattern, so instead you could use this:
-<pre>
- ( \( ( [^()]++ | (?1) )* \) )
-</pre>
-We have put the pattern into parentheses, and caused the recursion to refer to
-them instead of the whole pattern.
-</P>
-<P>
-In a larger pattern, keeping track of parenthesis numbers can be tricky. This
-is made easier by the use of relative references. Instead of (?1) in the
-pattern above you can write (?-2) to refer to the second most recently opened
-parentheses preceding the recursion. In other words, a negative number counts
-capturing parentheses leftwards from the point at which it is encountered.
-</P>
-<P>
-It is also possible to refer to subsequently opened parentheses, by writing
-references such as (?+2). However, these cannot be recursive because the
-reference is not inside the parentheses that are referenced. They are always
-<a href="#subpatternsassubroutines">non-recursive subroutine</a>
-calls, as described in the next section.
-</P>
-<P>
-An alternative approach is to use named parentheses instead. The Perl syntax
-for this is (?&name); PCRE's earlier syntax (?P&#62;name) is also supported. We
-could rewrite the above example as follows:
-<pre>
- (?&#60;pn&#62; \( ( [^()]++ | (?&pn) )* \) )
-</pre>
-If there is more than one subpattern with the same name, the earliest one is
-used.
-</P>
-<P>
-This particular example pattern that we have been looking at contains nested
-unlimited repeats, and so the use of a possessive quantifier for matching
-strings of non-parentheses is important when applying the pattern to strings
-that do not match. For example, when this pattern is applied to
-<pre>
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-</pre>
-it yields "no match" quickly. However, if a possessive quantifier is not used,
-the match runs for a very long time indeed because there are so many different
-ways the + and * repeats can carve up the subject, and all have to be tested
-before failure can be reported.
-</P>
-<P>
-At the end of a match, the values of capturing parentheses are those from
-the outermost level. If you want to obtain intermediate values, a callout
-function can be used (see below and the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation). If the pattern above is matched against
-<pre>
- (ab(cd)ef)
-</pre>
-the value for the inner capturing parentheses (numbered 2) is "ef", which is
-the last value taken on at the top level. If a capturing subpattern is not
-matched at the top level, its final captured value is unset, even if it was
-(temporarily) set at a deeper level during the matching process.
-</P>
-<P>
-If there are more than 15 capturing parentheses in a pattern, PCRE has to
-obtain extra memory to store data during a recursion, which it does by using
-<b>pcre_malloc</b>, freeing it via <b>pcre_free</b> afterwards. If no memory can
-be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
-</P>
-<P>
-Do not confuse the (?R) item with the condition (R), which tests for recursion.
-Consider this pattern, which matches text in angle brackets, allowing for
-arbitrary nesting. Only digits are allowed in nested brackets (that is, when
-recursing), whereas any characters are permitted at the outer level.
-<pre>
- &#60; (?: (?(R) \d++ | [^&#60;&#62;]*+) | (?R)) * &#62;
-</pre>
-In this pattern, (?(R) is the start of a conditional subpattern, with two
-different alternatives for the recursive and non-recursive cases. The (?R) item
-is the actual recursive call.
-<a name="recursiondifference"></a></P>
-<br><b>
-Differences in recursion processing between PCRE and Perl
-</b><br>
-<P>
-Recursion processing in PCRE differs from Perl in two important ways. In PCRE
-(like Python, but unlike Perl), a recursive subpattern call is always treated
-as an atomic group. That is, once it has matched some of the subject string, it
-is never re-entered, even if it contains untried alternatives and there is a
-subsequent matching failure. This can be illustrated by the following pattern,
-which purports to match a palindromic string that contains an odd number of
-characters (for example, "a", "aba", "abcba", "abcdcba"):
-<pre>
- ^(.|(.)(?1)\2)$
-</pre>
-The idea is that it either matches a single character, or two identical
-characters surrounding a sub-palindrome. In Perl, this pattern works; in PCRE
-it does not if the pattern is longer than three characters. Consider the
-subject string "abcba":
-</P>
-<P>
-At the top level, the first character is matched, but as it is not at the end
-of the string, the first alternative fails; the second alternative is taken
-and the recursion kicks in. The recursive call to subpattern 1 successfully
-matches the next character ("b"). (Note that the beginning and end of line
-tests are not part of the recursion).
-</P>
-<P>
-Back at the top level, the next character ("c") is compared with what
-subpattern 2 matched, which was "a". This fails. Because the recursion is
-treated as an atomic group, there are now no backtracking points, and so the
-entire match fails. (Perl is able, at this point, to re-enter the recursion and
-try the second alternative.) However, if the pattern is written with the
-alternatives in the other order, things are different:
-<pre>
- ^((.)(?1)\2|.)$
-</pre>
-This time, the recursing alternative is tried first, and continues to recurse
-until it runs out of characters, at which point the recursion fails. But this
-time we do have another alternative to try at the higher level. That is the big
-difference: in the previous case the remaining alternative is at a deeper
-recursion level, which PCRE cannot use.
-</P>
-<P>
-To change the pattern so that it matches all palindromic strings, not just
-those with an odd number of characters, it is tempting to change the pattern to
-this:
-<pre>
- ^((.)(?1)\2|.?)$
-</pre>
-Again, this works in Perl, but not in PCRE, and for the same reason. When a
-deeper recursion has matched a single character, it cannot be entered again in
-order to match an empty string. The solution is to separate the two cases, and
-write out the odd and even cases as alternatives at the higher level:
-<pre>
- ^(?:((.)(?1)\2|)|((.)(?3)\4|.))
-</pre>
-If you want to match typical palindromic phrases, the pattern has to ignore all
-non-word characters, which can be done like this:
-<pre>
- ^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$
-</pre>
-If run with the PCRE_CASELESS option, this pattern matches phrases such as "A
-man, a plan, a canal: Panama!" and it works well in both PCRE and Perl. Note
-the use of the possessive quantifier *+ to avoid backtracking into sequences of
-non-word characters. Without this, PCRE takes a great deal longer (ten times or
-more) to match typical phrases, and Perl takes so long that you think it has
-gone into a loop.
-</P>
-<P>
-<b>WARNING</b>: The palindrome-matching patterns above work only if the subject
-string does not start with a palindrome that is shorter than the entire string.
-For example, although "abcba" is correctly matched, if the subject is "ababa",
-PCRE finds the palindrome "aba" at the start, then fails at top level because
-the end of the string does not follow. Once again, it cannot jump back into the
-recursion to try other alternatives, so the entire match fails.
-</P>
-<P>
-The second way in which PCRE and Perl differ in their recursion processing is
-in the handling of captured values. In Perl, when a subpattern is called
-recursively or as a subpattern (see the next section), it has no access to any
-values that were captured outside the recursion, whereas in PCRE these values
-can be referenced. Consider this pattern:
-<pre>
- ^(.)(\1|a(?2))
-</pre>
-In PCRE, this pattern matches "bab". The first capturing parentheses match "b",
-then in the second group, when the back reference \1 fails to match "b", the
-second alternative matches "a" and then recurses. In the recursion, \1 does
-now match "b" and so the whole match succeeds. In Perl, the pattern fails to
-match because inside the recursive call \1 cannot access the externally set
-value.
-<a name="subpatternsassubroutines"></a></P>
-<br><a name="SEC22" href="#TOC1">SUBPATTERNS AS SUBROUTINES</a><br>
-<P>
-If the syntax for a recursive subpattern call (either by number or by
-name) is used outside the parentheses to which it refers, it operates like a
-subroutine in a programming language. The called subpattern may be defined
-before or after the reference. A numbered reference can be absolute or
-relative, as in these examples:
-<pre>
- (...(absolute)...)...(?2)...
- (...(relative)...)...(?-1)...
- (...(?+1)...(relative)...
-</pre>
-An earlier example pointed out that the pattern
-<pre>
- (sens|respons)e and \1ibility
-</pre>
-matches "sense and sensibility" and "response and responsibility", but not
-"sense and responsibility". If instead the pattern
-<pre>
- (sens|respons)e and (?1)ibility
-</pre>
-is used, it does match "sense and responsibility" as well as the other two
-strings. Another example is given in the discussion of DEFINE above.
-</P>
-<P>
-All subroutine calls, whether recursive or not, are always treated as atomic
-groups. That is, once a subroutine has matched some of the subject string, it
-is never re-entered, even if it contains untried alternatives and there is a
-subsequent matching failure. Any capturing parentheses that are set during the
-subroutine call revert to their previous values afterwards.
-</P>
-<P>
-Processing options such as case-independence are fixed when a subpattern is
-defined, so if it is used as a subroutine, such options cannot be changed for
-different calls. For example, consider this pattern:
-<pre>
- (abc)(?i:(?-1))
-</pre>
-It matches "abcabc". It does not match "abcABC" because the change of
-processing option does not affect the called subpattern.
-<a name="onigurumasubroutines"></a></P>
-<br><a name="SEC23" href="#TOC1">ONIGURUMA SUBROUTINE SYNTAX</a><br>
-<P>
-For compatibility with Oniguruma, the non-Perl syntax \g followed by a name or
-a number enclosed either in angle brackets or single quotes, is an alternative
-syntax for referencing a subpattern as a subroutine, possibly recursively. Here
-are two of the examples used above, rewritten using this syntax:
-<pre>
- (?&#60;pn&#62; \( ( (?&#62;[^()]+) | \g&#60;pn&#62; )* \) )
- (sens|respons)e and \g'1'ibility
-</pre>
-PCRE supports an extension to Oniguruma: if a number is preceded by a
-plus or a minus sign it is taken as a relative reference. For example:
-<pre>
- (abc)(?i:\g&#60;-1&#62;)
-</pre>
-Note that \g{...} (Perl syntax) and \g&#60;...&#62; (Oniguruma syntax) are <i>not</i>
-synonymous. The former is a back reference; the latter is a subroutine call.
-</P>
-<br><a name="SEC24" href="#TOC1">CALLOUTS</a><br>
-<P>
-Perl has a feature whereby using the sequence (?{...}) causes arbitrary Perl
-code to be obeyed in the middle of matching a regular expression. This makes it
-possible, amongst other things, to extract different substrings that match the
-same pair of parentheses when there is a repetition.
-</P>
-<P>
-PCRE provides a similar feature, but of course it cannot obey arbitrary Perl
-code. The feature is called "callout". The caller of PCRE provides an external
-function by putting its entry point in the global variable <i>pcre_callout</i>
-(8-bit library) or <i>pcre16_callout</i> (16-bit library). By default, this
-variable contains NULL, which disables all calling out.
-</P>
-<P>
-Within a regular expression, (?C) indicates the points at which the external
-function is to be called. If you want to identify different callout points, you
-can put a number less than 256 after the letter C. The default value is zero.
-For example, this pattern has two callout points:
-<pre>
- (?C1)abc(?C2)def
-</pre>
-If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, callouts are
-automatically installed before each item in the pattern. They are all numbered
-255.
-</P>
-<P>
-During matching, when PCRE reaches a callout point, the external function is
-called. It is provided with the number of the callout, the position in the
-pattern, and, optionally, one item of data originally supplied by the caller of
-the matching function. The callout function may cause matching to proceed, to
-backtrack, or to fail altogether. A complete description of the interface to
-the callout function is given in the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-<a name="backtrackcontrol"></a></P>
-<br><a name="SEC25" href="#TOC1">BACKTRACKING CONTROL</a><br>
-<P>
-Perl 5.10 introduced a number of "Special Backtracking Control Verbs", which
-are described in the Perl documentation as "experimental and subject to change
-or removal in a future version of Perl". It goes on to say: "Their usage in
-production code should be noted to avoid problems during upgrades." The same
-remarks apply to the PCRE features described in this section.
-</P>
-<P>
-Since these verbs are specifically related to backtracking, most of them can be
-used only when the pattern is to be matched using one of the traditional
-matching functions, which use a backtracking algorithm. With the exception of
-(*FAIL), which behaves like a failing negative assertion, they cause an error
-if encountered by a DFA matching function.
-</P>
-<P>
-If any of these verbs are used in an assertion or in a subpattern that is
-called as a subroutine (whether or not recursively), their effect is confined
-to that subpattern; it does not extend to the surrounding pattern, with one
-exception: the name from a *(MARK), (*PRUNE), or (*THEN) that is encountered in
-a successful positive assertion <i>is</i> passed back when a match succeeds
-(compare capturing parentheses in assertions). Note that such subpatterns are
-processed as anchored at the point where they are tested. Note also that Perl's
-treatment of subroutines is different in some cases.
-</P>
-<P>
-The new verbs make use of what was previously invalid syntax: an opening
-parenthesis followed by an asterisk. They are generally of the form
-(*VERB) or (*VERB:NAME). Some may take either form, with differing behaviour,
-depending on whether or not an argument is present. A name is any sequence of
-characters that does not include a closing parenthesis. If the name is empty,
-that is, if the closing parenthesis immediately follows the colon, the effect
-is as if the colon were not there. Any number of these verbs may occur in a
-pattern.
-</P>
-<P>
-PCRE contains some optimizations that are used to speed up matching by running
-some checks at the start of each match attempt. For example, it may know the
-minimum length of matching subject, or that a particular character must be
-present. When one of these optimizations suppresses the running of a match, any
-included backtracking verbs will not, of course, be processed. You can suppress
-the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option
-when calling <b>pcre_compile()</b> or <b>pcre_exec()</b>, or by starting the
-pattern with (*NO_START_OPT).
-</P>
-<P>
-Experiments with Perl suggest that it too has similar optimizations, sometimes
-leading to anomalous results.
-</P>
-<br><b>
-Verbs that act immediately
-</b><br>
-<P>
-The following verbs act as soon as they are encountered. They may not be
-followed by a name.
-<pre>
- (*ACCEPT)
-</pre>
-This verb causes the match to end successfully, skipping the remainder of the
-pattern. However, when it is inside a subpattern that is called as a
-subroutine, only that subpattern is ended successfully. Matching then continues
-at the outer level. If (*ACCEPT) is inside capturing parentheses, the data so
-far is captured. For example:
-<pre>
- A((?:A|B(*ACCEPT)|C)D)
-</pre>
-This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is captured by
-the outer parentheses.
-<pre>
- (*FAIL) or (*F)
-</pre>
-This verb causes a matching failure, forcing backtracking to occur. It is
-equivalent to (?!) but easier to read. The Perl documentation notes that it is
-probably useful only when combined with (?{}) or (??{}). Those are, of course,
-Perl features that are not present in PCRE. The nearest equivalent is the
-callout feature, as for example in this pattern:
-<pre>
- a+(?C)(*FAIL)
-</pre>
-A match with the string "aaaa" always fails, but the callout is taken before
-each backtrack happens (in this example, 10 times).
-</P>
-<br><b>
-Recording which path was taken
-</b><br>
-<P>
-There is one verb whose main purpose is to track how a match was arrived at,
-though it also has a secondary use in conjunction with advancing the match
-starting point (see (*SKIP) below).
-<pre>
- (*MARK:NAME) or (*:NAME)
-</pre>
-A name is always required with this verb. There may be as many instances of
-(*MARK) as you like in a pattern, and their names do not have to be unique.
-</P>
-<P>
-When a match succeeds, the name of the last-encountered (*MARK) on the matching
-path is passed back to the caller as described in the section entitled
-<a href="pcreapi.html#extradata">"Extra data for <b>pcre_exec()</b>"</a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation. Here is an example of <b>pcretest</b> output, where the /K
-modifier requests the retrieval and outputting of (*MARK) data:
-<pre>
- re&#62; /X(*MARK:A)Y|X(*MARK:B)Z/K
- data&#62; XY
- 0: XY
- MK: A
- XZ
- 0: XZ
- MK: B
-</pre>
-The (*MARK) name is tagged with "MK:" in this output, and in this example it
-indicates which of the two alternatives matched. This is a more efficient way
-of obtaining this information than putting each alternative in its own
-capturing parentheses.
-</P>
-<P>
-If (*MARK) is encountered in a positive assertion, its name is recorded and
-passed back if it is the last-encountered. This does not happen for negative
-assertions.
-</P>
-<P>
-After a partial match or a failed match, the name of the last encountered
-(*MARK) in the entire match process is returned. For example:
-<pre>
- re&#62; /X(*MARK:A)Y|X(*MARK:B)Z/K
- data&#62; XP
- No match, mark = B
-</pre>
-Note that in this unanchored example the mark is retained from the match
-attempt that started at the letter "X". Subsequent match attempts starting at
-"P" and then with an empty string do not get as far as the (*MARK) item, but
-nevertheless do not reset it.
-</P>
-<br><b>
-Verbs that act after backtracking
-</b><br>
-<P>
-The following verbs do nothing when they are encountered. Matching continues
-with what follows, but if there is no subsequent match, causing a backtrack to
-the verb, a failure is forced. That is, backtracking cannot pass to the left of
-the verb. However, when one of these verbs appears inside an atomic group, its
-effect is confined to that group, because once the group has been matched,
-there is never any backtracking into it. In this situation, backtracking can
-"jump back" to the left of the entire atomic group. (Remember also, as stated
-above, that this localization also applies in subroutine calls and assertions.)
-</P>
-<P>
-These verbs differ in exactly what kind of failure occurs when backtracking
-reaches them.
-<pre>
- (*COMMIT)
-</pre>
-This verb, which may not be followed by a name, causes the whole match to fail
-outright if the rest of the pattern does not match. Even if the pattern is
-unanchored, no further attempts to find a match by advancing the starting point
-take place. Once (*COMMIT) has been passed, <b>pcre_exec()</b> is committed to
-finding a match at the current starting point, or not at all. For example:
-<pre>
- a+(*COMMIT)b
-</pre>
-This matches "xxaab" but not "aacaab". It can be thought of as a kind of
-dynamic anchor, or "I've started, so I must finish." The name of the most
-recently passed (*MARK) in the path is passed back when (*COMMIT) forces a
-match failure.
-</P>
-<P>
-Note that (*COMMIT) at the start of a pattern is not the same as an anchor,
-unless PCRE's start-of-match optimizations are turned off, as shown in this
-<b>pcretest</b> example:
-<pre>
- re&#62; /(*COMMIT)abc/
- data&#62; xyzabc
- 0: abc
- xyzabc\Y
- No match
-</pre>
-PCRE knows that any match must start with "a", so the optimization skips along
-the subject to "a" before running the first match attempt, which succeeds. When
-the optimization is disabled by the \Y escape in the second subject, the match
-starts at "x" and so the (*COMMIT) causes it to fail without trying any other
-starting points.
-<pre>
- (*PRUNE) or (*PRUNE:NAME)
-</pre>
-This verb causes the match to fail at the current starting position in the
-subject if the rest of the pattern does not match. If the pattern is
-unanchored, the normal "bumpalong" advance to the next starting character then
-happens. Backtracking can occur as usual to the left of (*PRUNE), before it is
-reached, or when matching to the right of (*PRUNE), but if there is no match to
-the right, backtracking cannot cross (*PRUNE). In simple cases, the use of
-(*PRUNE) is just an alternative to an atomic group or possessive quantifier,
-but there are some uses of (*PRUNE) that cannot be expressed in any other way.
-The behaviour of (*PRUNE:NAME) is the same as (*MARK:NAME)(*PRUNE). In an
-anchored pattern (*PRUNE) has the same effect as (*COMMIT).
-<pre>
- (*SKIP)
-</pre>
-This verb, when given without a name, is like (*PRUNE), except that if the
-pattern is unanchored, the "bumpalong" advance is not to the next character,
-but to the position in the subject where (*SKIP) was encountered. (*SKIP)
-signifies that whatever text was matched leading up to it cannot be part of a
-successful match. Consider:
-<pre>
- a+(*SKIP)b
-</pre>
-If the subject is "aaaac...", after the first match attempt fails (starting at
-the first character in the string), the starting point skips on to start the
-next attempt at "c". Note that a possessive quantifer does not have the same
-effect as this example; although it would suppress backtracking during the
-first match attempt, the second attempt would start at the second character
-instead of skipping on to "c".
-<pre>
- (*SKIP:NAME)
-</pre>
-When (*SKIP) has an associated name, its behaviour is modified. If the
-following pattern fails to match, the previous path through the pattern is
-searched for the most recent (*MARK) that has the same name. If one is found,
-the "bumpalong" advance is to the subject position that corresponds to that
-(*MARK) instead of to where (*SKIP) was encountered. If no (*MARK) with a
-matching name is found, the (*SKIP) is ignored.
-<pre>
- (*THEN) or (*THEN:NAME)
-</pre>
-This verb causes a skip to the next innermost alternative if the rest of the
-pattern does not match. That is, it cancels pending backtracking, but only
-within the current alternative. Its name comes from the observation that it can
-be used for a pattern-based if-then-else block:
-<pre>
- ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...
-</pre>
-If the COND1 pattern matches, FOO is tried (and possibly further items after
-the end of the group if FOO succeeds); on failure, the matcher skips to the
-second alternative and tries COND2, without backtracking into COND1. The
-behaviour of (*THEN:NAME) is exactly the same as (*MARK:NAME)(*THEN).
-If (*THEN) is not inside an alternation, it acts like (*PRUNE).
-</P>
-<P>
-Note that a subpattern that does not contain a | character is just a part of
-the enclosing alternative; it is not a nested alternation with only one
-alternative. The effect of (*THEN) extends beyond such a subpattern to the
-enclosing alternative. Consider this pattern, where A, B, etc. are complex
-pattern fragments that do not contain any | characters at this level:
-<pre>
- A (B(*THEN)C) | D
-</pre>
-If A and B are matched, but there is a failure in C, matching does not
-backtrack into A; instead it moves to the next alternative, that is, D.
-However, if the subpattern containing (*THEN) is given an alternative, it
-behaves differently:
-<pre>
- A (B(*THEN)C | (*FAIL)) | D
-</pre>
-The effect of (*THEN) is now confined to the inner subpattern. After a failure
-in C, matching moves to (*FAIL), which causes the whole subpattern to fail
-because there are no more alternatives to try. In this case, matching does now
-backtrack into A.
-</P>
-<P>
-Note also that a conditional subpattern is not considered as having two
-alternatives, because only one is ever used. In other words, the | character in
-a conditional subpattern has a different meaning. Ignoring white space,
-consider:
-<pre>
- ^.*? (?(?=a) a | b(*THEN)c )
-</pre>
-If the subject is "ba", this pattern does not match. Because .*? is ungreedy,
-it initially matches zero characters. The condition (?=a) then fails, the
-character "b" is matched, but "c" is not. At this point, matching does not
-backtrack to .*? as might perhaps be expected from the presence of the |
-character. The conditional subpattern is part of the single alternative that
-comprises the whole pattern, and so the match fails. (If there was a backtrack
-into .*?, allowing it to match "b", the match would succeed.)
-</P>
-<P>
-The verbs just described provide four different "strengths" of control when
-subsequent matching fails. (*THEN) is the weakest, carrying on the match at the
-next alternative. (*PRUNE) comes next, failing the match at the current
-starting position, but allowing an advance to the next character (for an
-unanchored pattern). (*SKIP) is similar, except that the advance may be more
-than one character. (*COMMIT) is the strongest, causing the entire match to
-fail.
-</P>
-<P>
-If more than one such verb is present in a pattern, the "strongest" one wins.
-For example, consider this pattern, where A, B, etc. are complex pattern
-fragments:
-<pre>
- (A(*COMMIT)B(*THEN)C|D)
-</pre>
-Once A has matched, PCRE is committed to this match, at the current starting
-position. If subsequently B matches, but C does not, the normal (*THEN) action
-of trying the next alternative (that is, D) does not happen because (*COMMIT)
-overrides.
-</P>
-<br><a name="SEC26" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcreapi</b>(3), <b>pcrecallout</b>(3), <b>pcrematching</b>(3),
-<b>pcresyntax</b>(3), <b>pcre</b>(3), <b>pcre16(3)</b>.
-</P>
-<br><a name="SEC27" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC28" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 09 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcreperform.html b/src/third_party/pcre-8.30/doc/html/pcreperform.html
deleted file mode 100644
index f7c8595c051..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcreperform.html
+++ /dev/null
@@ -1,196 +0,0 @@
-<html>
-<head>
-<title>pcreperform specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreperform man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-PCRE PERFORMANCE
-</b><br>
-<P>
-Two aspects of performance are discussed below: memory usage and processing
-time. The way you express your pattern as a regular expression can affect both
-of them.
-</P>
-<br><b>
-COMPILED PATTERN MEMORY USAGE
-</b><br>
-<P>
-Patterns are compiled by PCRE into a reasonably efficient interpretive code, so
-that most simple patterns do not use much memory. However, there is one case
-where the memory usage of a compiled pattern can be unexpectedly large. If a
-parenthesized subpattern has a quantifier with a minimum greater than 1 and/or
-a limited maximum, the whole subpattern is repeated in the compiled code. For
-example, the pattern
-<pre>
- (abc|def){2,4}
-</pre>
-is compiled as if it were
-<pre>
- (abc|def)(abc|def)((abc|def)(abc|def)?)?
-</pre>
-(Technical aside: It is done this way so that backtrack points within each of
-the repetitions can be independently maintained.)
-</P>
-<P>
-For regular expressions whose quantifiers use only small numbers, this is not
-usually a problem. However, if the numbers are large, and particularly if such
-repetitions are nested, the memory usage can become an embarrassment. For
-example, the very simple pattern
-<pre>
- ((ab){1,1000}c){1,3}
-</pre>
-uses 51K bytes when compiled using the 8-bit library. When PCRE is compiled
-with its default internal pointer size of two bytes, the size limit on a
-compiled pattern is 64K data units, and this is reached with the above pattern
-if the outer repetition is increased from 3 to 4. PCRE can be compiled to use
-larger internal pointers and thus handle larger compiled patterns, but it is
-better to try to rewrite your pattern to use less memory if you can.
-</P>
-<P>
-One way of reducing the memory usage for such patterns is to make use of PCRE's
-<a href="pcrepattern.html#subpatternsassubroutines">"subroutine"</a>
-facility. Re-writing the above pattern as
-<pre>
- ((ab)(?2){0,999}c)(?1){0,2}
-</pre>
-reduces the memory requirements to 18K, and indeed it remains under 20K even
-with the outer repetition increased to 100. However, this pattern is not
-exactly equivalent, because the "subroutine" calls are treated as
-<a href="pcrepattern.html#atomicgroup">atomic groups</a>
-into which there can be no backtracking if there is a subsequent matching
-failure. Therefore, PCRE cannot do this kind of rewriting automatically.
-Furthermore, there is a noticeable loss of speed when executing the modified
-pattern. Nevertheless, if the atomic grouping is not a problem and the loss of
-speed is acceptable, this kind of rewriting will allow you to process patterns
-that PCRE cannot otherwise handle.
-</P>
-<br><b>
-STACK USAGE AT RUN TIME
-</b><br>
-<P>
-When <b>pcre_exec()</b> or <b>pcre16_exec()</b> is used for matching, certain
-kinds of pattern can cause it to use large amounts of the process stack. In
-some environments the default process stack is quite small, and if it runs out
-the result is often SIGSEGV. This issue is probably the most frequently raised
-problem with PCRE. Rewriting your pattern can often help. The
-<a href="pcrestack.html"><b>pcrestack</b></a>
-documentation discusses this issue in detail.
-</P>
-<br><b>
-PROCESSING TIME
-</b><br>
-<P>
-Certain items in regular expression patterns are processed more efficiently
-than others. It is more efficient to use a character class like [aeiou] than a
-set of single-character alternatives such as (a|e|i|o|u). In general, the
-simplest construction that provides the required behaviour is usually the most
-efficient. Jeffrey Friedl's book contains a lot of useful general discussion
-about optimizing regular expressions for efficient performance. This document
-contains a few observations about PCRE.
-</P>
-<P>
-Using Unicode character properties (the \p, \P, and \X escapes) is slow,
-because PCRE has to scan a structure that contains data for over fifteen
-thousand characters whenever it needs a character's property. If you can find
-an alternative pattern that does not use character properties, it will probably
-be faster.
-</P>
-<P>
-By default, the escape sequences \b, \d, \s, and \w, and the POSIX
-character classes such as [:alpha:] do not use Unicode properties, partly for
-backwards compatibility, and partly for performance reasons. However, you can
-set PCRE_UCP if you want Unicode character properties to be used. This can
-double the matching time for items such as \d, when matched with
-a traditional matching function; the performance loss is less with
-a DFA matching function, and in both cases there is not much difference for
-\b.
-</P>
-<P>
-When a pattern begins with .* not in parentheses, or in parentheses that are
-not the subject of a backreference, and the PCRE_DOTALL option is set, the
-pattern is implicitly anchored by PCRE, since it can match only at the start of
-a subject string. However, if PCRE_DOTALL is not set, PCRE cannot make this
-optimization, because the . metacharacter does not then match a newline, and if
-the subject string contains newlines, the pattern may match from the character
-immediately following one of them instead of from the very start. For example,
-the pattern
-<pre>
- .*second
-</pre>
-matches the subject "first\nand second" (where \n stands for a newline
-character), with the match starting at the seventh character. In order to do
-this, PCRE has to retry the match starting after every newline in the subject.
-</P>
-<P>
-If you are using such a pattern with subject strings that do not contain
-newlines, the best performance is obtained by setting PCRE_DOTALL, or starting
-the pattern with ^.* or ^.*? to indicate explicit anchoring. That saves PCRE
-from having to scan along the subject looking for a newline to restart at.
-</P>
-<P>
-Beware of patterns that contain nested indefinite repeats. These can take a
-long time to run when applied to a string that does not match. Consider the
-pattern fragment
-<pre>
- ^(a+)*
-</pre>
-This can match "aaaa" in 16 different ways, and this number increases very
-rapidly as the string gets longer. (The * repeat can match 0, 1, 2, 3, or 4
-times, and for each of those cases other than 0 or 4, the + repeats can match
-different numbers of times.) When the remainder of the pattern is such that the
-entire match is going to fail, PCRE has in principle to try every possible
-variation, and this can take an extremely long time, even for relatively short
-strings.
-</P>
-<P>
-An optimization catches some of the more simple cases such as
-<pre>
- (a+)*b
-</pre>
-where a literal character follows. Before embarking on the standard matching
-procedure, PCRE checks that there is a "b" later in the subject string, and if
-there is not, it fails the match immediately. However, when there is no
-following literal this optimization cannot be used. You can see the difference
-by comparing the behaviour of
-<pre>
- (a+)*\d
-</pre>
-with the pattern above. The former gives a failure almost instantly when
-applied to a whole line of "a" characters, whereas the latter takes an
-appreciable time with strings longer than about 20 characters.
-</P>
-<P>
-In many cases, the solution to this kind of performance issue is to use an
-atomic group or a possessive quantifier.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 09 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcreposix.html b/src/third_party/pcre-8.30/doc/html/pcreposix.html
deleted file mode 100644
index 9aa699aff00..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcreposix.html
+++ /dev/null
@@ -1,292 +0,0 @@
-<html>
-<head>
-<title>pcreposix specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreposix man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS OF POSIX API</a>
-<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
-<li><a name="TOC3" href="#SEC3">COMPILING A PATTERN</a>
-<li><a name="TOC4" href="#SEC4">MATCHING NEWLINE CHARACTERS</a>
-<li><a name="TOC5" href="#SEC5">MATCHING A PATTERN</a>
-<li><a name="TOC6" href="#SEC6">ERROR MESSAGES</a>
-<li><a name="TOC7" href="#SEC7">MEMORY USAGE</a>
-<li><a name="TOC8" href="#SEC8">AUTHOR</a>
-<li><a name="TOC9" href="#SEC9">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS OF POSIX API</a><br>
-<P>
-<b>#include &#60;pcreposix.h&#62;</b>
-</P>
-<P>
-<b>int regcomp(regex_t *<i>preg</i>, const char *<i>pattern</i>,</b>
-<b>int <i>cflags</i>);</b>
-</P>
-<P>
-<b>int regexec(regex_t *<i>preg</i>, const char *<i>string</i>,</b>
-<b>size_t <i>nmatch</i>, regmatch_t <i>pmatch</i>[], int <i>eflags</i>);</b>
-</P>
-<P>
-<b>size_t regerror(int <i>errcode</i>, const regex_t *<i>preg</i>,</b>
-<b>char *<i>errbuf</i>, size_t <i>errbuf_size</i>);</b>
-</P>
-<P>
-<b>void regfree(regex_t *<i>preg</i>);</b>
-</P>
-<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
-<P>
-This set of functions provides a POSIX-style API for the PCRE regular
-expression 8-bit library. See the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation for a description of PCRE's native API, which contains much
-additional functionality. There is no POSIX-style wrapper for PCRE's 16-bit
-library.
-</P>
-<P>
-The functions described here are just wrapper functions that ultimately call
-the PCRE native API. Their prototypes are defined in the <b>pcreposix.h</b>
-header file, and on Unix systems the library itself is called
-<b>pcreposix.a</b>, so can be accessed by adding <b>-lpcreposix</b> to the
-command for linking an application that uses them. Because the POSIX functions
-call the native ones, it is also necessary to add <b>-lpcre</b>.
-</P>
-<P>
-I have implemented only those POSIX option bits that can be reasonably mapped
-to PCRE native options. In addition, the option REG_EXTENDED is defined with
-the value zero. This has no effect, but since programs that are written to the
-POSIX interface often use it, this makes it easier to slot in PCRE as a
-replacement library. Other POSIX options are not even defined.
-</P>
-<P>
-There are also some other options that are not defined by POSIX. These have
-been added at the request of users who want to make use of certain
-PCRE-specific features via the POSIX calling interface.
-</P>
-<P>
-When PCRE is called via these functions, it is only the API that is POSIX-like
-in style. The syntax and semantics of the regular expressions themselves are
-still those of Perl, subject to the setting of various PCRE options, as
-described below. "POSIX-like in style" means that the API approximates to the
-POSIX definition; it is not fully POSIX-compatible, and in multi-byte encoding
-domains it is probably even less compatible.
-</P>
-<P>
-The header for these functions is supplied as <b>pcreposix.h</b> to avoid any
-potential clash with other POSIX libraries. It can, of course, be renamed or
-aliased as <b>regex.h</b>, which is the "correct" name. It provides two
-structure types, <i>regex_t</i> for compiled internal forms, and
-<i>regmatch_t</i> for returning captured substrings. It also defines some
-constants whose names start with "REG_"; these are used for setting options and
-identifying error codes.
-</P>
-<br><a name="SEC3" href="#TOC1">COMPILING A PATTERN</a><br>
-<P>
-The function <b>regcomp()</b> is called to compile a pattern into an
-internal form. The pattern is a C string terminated by a binary zero, and
-is passed in the argument <i>pattern</i>. The <i>preg</i> argument is a pointer
-to a <b>regex_t</b> structure that is used as a base for storing information
-about the compiled regular expression.
-</P>
-<P>
-The argument <i>cflags</i> is either zero, or contains one or more of the bits
-defined by the following macros:
-<pre>
- REG_DOTALL
-</pre>
-The PCRE_DOTALL option is set when the regular expression is passed for
-compilation to the native function. Note that REG_DOTALL is not part of the
-POSIX standard.
-<pre>
- REG_ICASE
-</pre>
-The PCRE_CASELESS option is set when the regular expression is passed for
-compilation to the native function.
-<pre>
- REG_NEWLINE
-</pre>
-The PCRE_MULTILINE option is set when the regular expression is passed for
-compilation to the native function. Note that this does <i>not</i> mimic the
-defined POSIX behaviour for REG_NEWLINE (see the following section).
-<pre>
- REG_NOSUB
-</pre>
-The PCRE_NO_AUTO_CAPTURE option is set when the regular expression is passed
-for compilation to the native function. In addition, when a pattern that is
-compiled with this flag is passed to <b>regexec()</b> for matching, the
-<i>nmatch</i> and <i>pmatch</i> arguments are ignored, and no captured strings
-are returned.
-<pre>
- REG_UCP
-</pre>
-The PCRE_UCP option is set when the regular expression is passed for
-compilation to the native function. This causes PCRE to use Unicode properties
-when matchine \d, \w, etc., instead of just recognizing ASCII values. Note
-that REG_UTF8 is not part of the POSIX standard.
-<pre>
- REG_UNGREEDY
-</pre>
-The PCRE_UNGREEDY option is set when the regular expression is passed for
-compilation to the native function. Note that REG_UNGREEDY is not part of the
-POSIX standard.
-<pre>
- REG_UTF8
-</pre>
-The PCRE_UTF8 option is set when the regular expression is passed for
-compilation to the native function. This causes the pattern itself and all data
-strings used for matching it to be treated as UTF-8 strings. Note that REG_UTF8
-is not part of the POSIX standard.
-</P>
-<P>
-In the absence of these flags, no options are passed to the native function.
-This means the the regex is compiled with PCRE default semantics. In
-particular, the way it handles newline characters in the subject string is the
-Perl way, not the POSIX way. Note that setting PCRE_MULTILINE has only
-<i>some</i> of the effects specified for REG_NEWLINE. It does not affect the way
-newlines are matched by . (they are not) or by a negative class such as [^a]
-(they are).
-</P>
-<P>
-The yield of <b>regcomp()</b> is zero on success, and non-zero otherwise. The
-<i>preg</i> structure is filled in on success, and one member of the structure
-is public: <i>re_nsub</i> contains the number of capturing subpatterns in
-the regular expression. Various error codes are defined in the header file.
-</P>
-<P>
-NOTE: If the yield of <b>regcomp()</b> is non-zero, you must not attempt to
-use the contents of the <i>preg</i> structure. If, for example, you pass it to
-<b>regexec()</b>, the result is undefined and your program is likely to crash.
-</P>
-<br><a name="SEC4" href="#TOC1">MATCHING NEWLINE CHARACTERS</a><br>
-<P>
-This area is not simple, because POSIX and Perl take different views of things.
-It is not possible to get PCRE to obey POSIX semantics, but then PCRE was never
-intended to be a POSIX engine. The following table lists the different
-possibilities for matching newline characters in PCRE:
-<pre>
- Default Change with
-
- . matches newline no PCRE_DOTALL
- newline matches [^a] yes not changeable
- $ matches \n at end yes PCRE_DOLLARENDONLY
- $ matches \n in middle no PCRE_MULTILINE
- ^ matches \n in middle no PCRE_MULTILINE
-</pre>
-This is the equivalent table for POSIX:
-<pre>
- Default Change with
-
- . matches newline yes REG_NEWLINE
- newline matches [^a] yes REG_NEWLINE
- $ matches \n at end no REG_NEWLINE
- $ matches \n in middle no REG_NEWLINE
- ^ matches \n in middle no REG_NEWLINE
-</pre>
-PCRE's behaviour is the same as Perl's, except that there is no equivalent for
-PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is no way to stop
-newline from matching [^a].
-</P>
-<P>
-The default POSIX newline handling can be obtained by setting PCRE_DOTALL and
-PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE behave exactly as for the
-REG_NEWLINE action.
-</P>
-<br><a name="SEC5" href="#TOC1">MATCHING A PATTERN</a><br>
-<P>
-The function <b>regexec()</b> is called to match a compiled pattern <i>preg</i>
-against a given <i>string</i>, which is by default terminated by a zero byte
-(but see REG_STARTEND below), subject to the options in <i>eflags</i>. These can
-be:
-<pre>
- REG_NOTBOL
-</pre>
-The PCRE_NOTBOL option is set when calling the underlying PCRE matching
-function.
-<pre>
- REG_NOTEMPTY
-</pre>
-The PCRE_NOTEMPTY option is set when calling the underlying PCRE matching
-function. Note that REG_NOTEMPTY is not part of the POSIX standard. However,
-setting this option can give more POSIX-like behaviour in some situations.
-<pre>
- REG_NOTEOL
-</pre>
-The PCRE_NOTEOL option is set when calling the underlying PCRE matching
-function.
-<pre>
- REG_STARTEND
-</pre>
-The string is considered to start at <i>string</i> + <i>pmatch[0].rm_so</i> and
-to have a terminating NUL located at <i>string</i> + <i>pmatch[0].rm_eo</i>
-(there need not actually be a NUL at that location), regardless of the value of
-<i>nmatch</i>. This is a BSD extension, compatible with but not specified by
-IEEE Standard 1003.2 (POSIX.2), and should be used with caution in software
-intended to be portable to other systems. Note that a non-zero <i>rm_so</i> does
-not imply REG_NOTBOL; REG_STARTEND affects only the location of the string, not
-how it is matched.
-</P>
-<P>
-If the pattern was compiled with the REG_NOSUB flag, no data about any matched
-strings is returned. The <i>nmatch</i> and <i>pmatch</i> arguments of
-<b>regexec()</b> are ignored.
-</P>
-<P>
-If the value of <i>nmatch</i> is zero, or if the value <i>pmatch</i> is NULL,
-no data about any matched strings is returned.
-</P>
-<P>
-Otherwise,the portion of the string that was matched, and also any captured
-substrings, are returned via the <i>pmatch</i> argument, which points to an
-array of <i>nmatch</i> structures of type <i>regmatch_t</i>, containing the
-members <i>rm_so</i> and <i>rm_eo</i>. These contain the offset to the first
-character of each substring and the offset to the first character after the end
-of each substring, respectively. The 0th element of the vector relates to the
-entire portion of <i>string</i> that was matched; subsequent elements relate to
-the capturing subpatterns of the regular expression. Unused entries in the
-array have both structure members set to -1.
-</P>
-<P>
-A successful match yields a zero return; various error codes are defined in the
-header file, of which REG_NOMATCH is the "expected" failure code.
-</P>
-<br><a name="SEC6" href="#TOC1">ERROR MESSAGES</a><br>
-<P>
-The <b>regerror()</b> function maps a non-zero errorcode from either
-<b>regcomp()</b> or <b>regexec()</b> to a printable message. If <i>preg</i> is not
-NULL, the error should have arisen from the use of that structure. A message
-terminated by a binary zero is placed in <i>errbuf</i>. The length of the
-message, including the zero, is limited to <i>errbuf_size</i>. The yield of the
-function is the size of buffer needed to hold the whole message.
-</P>
-<br><a name="SEC7" href="#TOC1">MEMORY USAGE</a><br>
-<P>
-Compiling a regular expression causes memory to be allocated and associated
-with the <i>preg</i> structure. The function <b>regfree()</b> frees all such
-memory, after which <i>preg</i> may no longer be used as a compiled expression.
-</P>
-<br><a name="SEC8" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC9" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 09 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcreprecompile.html b/src/third_party/pcre-8.30/doc/html/pcreprecompile.html
deleted file mode 100644
index 8361b7a5d07..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcreprecompile.html
+++ /dev/null
@@ -1,158 +0,0 @@
-<html>
-<head>
-<title>pcreprecompile specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreprecompile man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SAVING AND RE-USING PRECOMPILED PCRE PATTERNS</a>
-<li><a name="TOC2" href="#SEC2">SAVING A COMPILED PATTERN</a>
-<li><a name="TOC3" href="#SEC3">RE-USING A PRECOMPILED PATTERN</a>
-<li><a name="TOC4" href="#SEC4">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a>
-<li><a name="TOC5" href="#SEC5">AUTHOR</a>
-<li><a name="TOC6" href="#SEC6">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SAVING AND RE-USING PRECOMPILED PCRE PATTERNS</a><br>
-<P>
-If you are running an application that uses a large number of regular
-expression patterns, it may be useful to store them in a precompiled form
-instead of having to compile them every time the application is run.
-If you are not using any private character tables (see the
-<a href="pcre_maketables.html"><b>pcre_maketables()</b></a>
-documentation), this is relatively straightforward. If you are using private
-tables, it is a little bit more complicated. However, if you are using the
-just-in-time optimization feature, it is not possible to save and reload the
-JIT data.
-</P>
-<P>
-If you save compiled patterns to a file, you can copy them to a different host
-and run them there. If the two hosts have different endianness (byte order),
-you should run the <b>pcre[16]_pattern_to_host_byte_order()</b> function on the
-new host before trying to match the pattern. The matching functions return
-PCRE_ERROR_BADENDIANNESS if they detect a pattern with the wrong endianness.
-</P>
-<P>
-Compiling regular expressions with one version of PCRE for use with a different
-version is not guaranteed to work and may cause crashes, and saving and
-restoring a compiled pattern loses any JIT optimization data.
-</P>
-<br><a name="SEC2" href="#TOC1">SAVING A COMPILED PATTERN</a><br>
-<P>
-The value returned by <b>pcre[16]_compile()</b> points to a single block of
-memory that holds the compiled pattern and associated data. You can find the
-length of this block in bytes by calling <b>pcre[16]_fullinfo()</b> with an
-argument of PCRE_INFO_SIZE. You can then save the data in any appropriate
-manner. Here is sample code for the 8-bit library that compiles a pattern and
-writes it to a file. It assumes that the variable <i>fd</i> refers to a file
-that is open for output:
-<pre>
- int erroroffset, rc, size;
- char *error;
- pcre *re;
-
- re = pcre_compile("my pattern", 0, &error, &erroroffset, NULL);
- if (re == NULL) { ... handle errors ... }
- rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
- if (rc &#60; 0) { ... handle errors ... }
- rc = fwrite(re, 1, size, fd);
- if (rc != size) { ... handle errors ... }
-</pre>
-In this example, the bytes that comprise the compiled pattern are copied
-exactly. Note that this is binary data that may contain any of the 256 possible
-byte values. On systems that make a distinction between binary and non-binary
-data, be sure that the file is opened for binary output.
-</P>
-<P>
-If you want to write more than one pattern to a file, you will have to devise a
-way of separating them. For binary data, preceding each pattern with its length
-is probably the most straightforward approach. Another possibility is to write
-out the data in hexadecimal instead of binary, one pattern to a line.
-</P>
-<P>
-Saving compiled patterns in a file is only one possible way of storing them for
-later use. They could equally well be saved in a database, or in the memory of
-some daemon process that passes them via sockets to the processes that want
-them.
-</P>
-<P>
-If the pattern has been studied, it is also possible to save the normal study
-data in a similar way to the compiled pattern itself. However, if the
-PCRE_STUDY_JIT_COMPILE was used, the just-in-time data that is created cannot
-be saved because it is too dependent on the current environment. When studying
-generates additional information, <b>pcre[16]_study()</b> returns a pointer to a
-<b>pcre[16]_extra</b> data block. Its format is defined in the
-<a href="pcreapi.html#extradata">section on matching a pattern</a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation. The <i>study_data</i> field points to the binary study data, and
-this is what you must save (not the <b>pcre[16]_extra</b> block itself). The
-length of the study data can be obtained by calling <b>pcre[16]_fullinfo()</b>
-with an argument of PCRE_INFO_STUDYSIZE. Remember to check that
-<b>pcre[16]_study()</b> did return a non-NULL value before trying to save the
-study data.
-</P>
-<br><a name="SEC3" href="#TOC1">RE-USING A PRECOMPILED PATTERN</a><br>
-<P>
-Re-using a precompiled pattern is straightforward. Having reloaded it into main
-memory, called <b>pcre[16]_pattern_to_host_byte_order()</b> if necessary,
-you pass its pointer to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b> in
-the usual way.
-</P>
-<P>
-However, if you passed a pointer to custom character tables when the pattern
-was compiled (the <i>tableptr</i> argument of <b>pcre[16]_compile()</b>), you
-must now pass a similar pointer to <b>pcre[16]_exec()</b> or
-<b>pcre[16]_dfa_exec()</b>, because the value saved with the compiled pattern
-will obviously be nonsense. A field in a <b>pcre[16]_extra()</b> block is used
-to pass this data, as described in the
-<a href="pcreapi.html#extradata">section on matching a pattern</a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<P>
-If you did not provide custom character tables when the pattern was compiled,
-the pointer in the compiled pattern is NULL, which causes the matching
-functions to use PCRE's internal tables. Thus, you do not need to take any
-special action at run time in this case.
-</P>
-<P>
-If you saved study data with the compiled pattern, you need to create your own
-<b>pcre[16]_extra</b> data block and set the <i>study_data</i> field to point to the
-reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the
-<i>flags</i> field to indicate that study data is present. Then pass the
-<b>pcre[16]_extra</b> block to the matching function in the usual way. If the
-pattern was studied for just-in-time optimization, that data cannot be saved,
-and so is lost by a save/restore cycle.
-</P>
-<br><a name="SEC4" href="#TOC1">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a><br>
-<P>
-In general, it is safest to recompile all saved patterns when you update to a
-new PCRE release, though not all updates actually require this.
-</P>
-<br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC6" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 10 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcresample.html b/src/third_party/pcre-8.30/doc/html/pcresample.html
deleted file mode 100644
index aca9184e00e..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcresample.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<html>
-<head>
-<title>pcresample specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcresample man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-PCRE SAMPLE PROGRAM
-</b><br>
-<P>
-A simple, complete demonstration program, to get you started with using PCRE,
-is supplied in the file <i>pcredemo.c</i> in the PCRE distribution. A listing of
-this program is given in the
-<a href="pcredemo.html"><b>pcredemo</b></a>
-documentation. If you do not have a copy of the PCRE distribution, you can save
-this listing to re-create <i>pcredemo.c</i>.
-</P>
-<P>
-The demonstration program, which uses the original PCRE 8-bit library, compiles
-the regular expression that is its first argument, and matches it against the
-subject string in its second argument. No PCRE options are set, and default
-character tables are used. If matching succeeds, the program outputs the
-portion of the subject that matched, together with the contents of any captured
-substrings.
-</P>
-<P>
-If the -g option is given on the command line, the program then goes on to
-check for further matches of the same regular expression in the same subject
-string. The logic is a little bit tricky because of the possibility of matching
-an empty string. Comments in the code explain what is going on.
-</P>
-<P>
-If PCRE is installed in the standard include and library directories for your
-operating system, you should be able to compile the demonstration program using
-this command:
-<pre>
- gcc -o pcredemo pcredemo.c -lpcre
-</pre>
-If PCRE is installed elsewhere, you may need to add additional options to the
-command line. For example, on a Unix-like system that has PCRE installed in
-<i>/usr/local</i>, you can compile the demonstration program using a command
-like this:
-<pre>
- gcc -o pcredemo -I/usr/local/include pcredemo.c -L/usr/local/lib -lpcre
-</pre>
-In a Windows environment, if you want to statically link the program against a
-non-dll <b>pcre.a</b> file, you must uncomment the line that defines PCRE_STATIC
-before including <b>pcre.h</b>, because otherwise the <b>pcre_malloc()</b> and
-<b>pcre_free()</b> exported functions will be declared
-<b>__declspec(dllimport)</b>, with unwanted results.
-</P>
-<P>
-Once you have compiled and linked the demonstration program, you can run simple
-tests like this:
-<pre>
- ./pcredemo 'cat|dog' 'the cat sat on the mat'
- ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
-</pre>
-Note that there is a much more comprehensive test program, called
-<a href="pcretest.html"><b>pcretest</b>,</a>
-which supports many more facilities for testing regular expressions and both
-PCRE libraries. The
-<a href="pcredemo.html"><b>pcredemo</b></a>
-program is provided as a simple coding example.
-</P>
-<P>
-If you try to run
-<a href="pcredemo.html"><b>pcredemo</b></a>
-when PCRE is not installed in the standard library directory, you may get an
-error like this on some operating systems (e.g. Solaris):
-<pre>
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
-</pre>
-This is caused by the way shared library support works on those systems. You
-need to add
-<pre>
- -R/usr/local/lib
-</pre>
-(for example) to the compile command to get round this problem.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 10 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcrestack.html b/src/third_party/pcre-8.30/doc/html/pcrestack.html
deleted file mode 100644
index 76101b3a400..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcrestack.html
+++ /dev/null
@@ -1,225 +0,0 @@
-<html>
-<head>
-<title>pcrestack specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcrestack man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-PCRE DISCUSSION OF STACK USAGE
-</b><br>
-<P>
-When you call <b>pcre[16]_exec()</b>, it makes use of an internal function
-called <b>match()</b>. This calls itself recursively at branch points in the
-pattern, in order to remember the state of the match so that it can back up and
-try a different alternative if the first one fails. As matching proceeds deeper
-and deeper into the tree of possibilities, the recursion depth increases. The
-<b>match()</b> function is also called in other circumstances, for example,
-whenever a parenthesized sub-pattern is entered, and in certain cases of
-repetition.
-</P>
-<P>
-Not all calls of <b>match()</b> increase the recursion depth; for an item such
-as a* it may be called several times at the same level, after matching
-different numbers of a's. Furthermore, in a number of cases where the result of
-the recursive call would immediately be passed back as the result of the
-current call (a "tail recursion"), the function is just restarted instead.
-</P>
-<P>
-The above comments apply when <b>pcre[16]_exec()</b> is run in its normal
-interpretive manner. If the pattern was studied with the
-PCRE_STUDY_JIT_COMPILE option, and just-in-time compiling was successful, and
-the options passed to <b>pcre[16]_exec()</b> were not incompatible, the matching
-process uses the JIT-compiled code instead of the <b>match()</b> function. In
-this case, the memory requirements are handled entirely differently. See the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation for details.
-</P>
-<P>
-The <b>pcre[16]_dfa_exec()</b> function operates in an entirely different way,
-and uses recursion only when there is a regular expression recursion or
-subroutine call in the pattern. This includes the processing of assertion and
-"once-only" subpatterns, which are handled like subroutine calls. Normally,
-these are never very deep, and the limit on the complexity of
-<b>pcre[16]_dfa_exec()</b> is controlled by the amount of workspace it is given.
-However, it is possible to write patterns with runaway infinite recursions;
-such patterns will cause <b>pcre[16]_dfa_exec()</b> to run out of stack. At
-present, there is no protection against this.
-</P>
-<P>
-The comments that follow do NOT apply to <b>pcre[16]_dfa_exec()</b>; they are
-relevant only for <b>pcre[16]_exec()</b> without the JIT optimization.
-</P>
-<br><b>
-Reducing <b>pcre[16]_exec()</b>'s stack usage
-</b><br>
-<P>
-Each time that <b>match()</b> is actually called recursively, it uses memory
-from the process stack. For certain kinds of pattern and data, very large
-amounts of stack may be needed, despite the recognition of "tail recursion".
-You can often reduce the amount of recursion, and therefore the amount of stack
-used, by modifying the pattern that is being matched. Consider, for example,
-this pattern:
-<pre>
- ([^&#60;]|&#60;(?!inet))+
-</pre>
-It matches from wherever it starts until it encounters "&#60;inet" or the end of
-the data, and is the kind of pattern that might be used when processing an XML
-file. Each iteration of the outer parentheses matches either one character that
-is not "&#60;" or a "&#60;" that is not followed by "inet". However, each time a
-parenthesis is processed, a recursion occurs, so this formulation uses a stack
-frame for each matched character. For a long string, a lot of stack is
-required. Consider now this rewritten pattern, which matches exactly the same
-strings:
-<pre>
- ([^&#60;]++|&#60;(?!inet))+
-</pre>
-This uses very much less stack, because runs of characters that do not contain
-"&#60;" are "swallowed" in one item inside the parentheses. Recursion happens only
-when a "&#60;" character that is not followed by "inet" is encountered (and we
-assume this is relatively rare). A possessive quantifier is used to stop any
-backtracking into the runs of non-"&#60;" characters, but that is not related to
-stack usage.
-</P>
-<P>
-This example shows that one way of avoiding stack problems when matching long
-subject strings is to write repeated parenthesized subpatterns to match more
-than one character whenever possible.
-</P>
-<br><b>
-Compiling PCRE to use heap instead of stack for <b>pcre[16]_exec()</b>
-</b><br>
-<P>
-In environments where stack memory is constrained, you might want to compile
-PCRE to use heap memory instead of stack for remembering back-up points when
-<b>pcre[16]_exec()</b> is running. This makes it run a lot more slowly, however.
-Details of how to do this are given in the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation. When built in this way, instead of using the stack, PCRE obtains
-and frees memory by calling the functions that are pointed to by the
-<b>pcre[16]_stack_malloc</b> and <b>pcre[16]_stack_free</b> variables. By
-default, these point to <b>malloc()</b> and <b>free()</b>, but you can replace
-the pointers to cause PCRE to use your own functions. Since the block sizes are
-always the same, and are always freed in reverse order, it may be possible to
-implement customized memory handlers that are more efficient than the standard
-functions.
-</P>
-<br><b>
-Limiting <b>pcre[16]_exec()</b>'s stack usage
-</b><br>
-<P>
-You can set limits on the number of times that <b>match()</b> is called, both in
-total and recursively. If a limit is exceeded, <b>pcre[16]_exec()</b> returns an
-error code. Setting suitable limits should prevent it from running out of
-stack. The default values of the limits are very large, and unlikely ever to
-operate. They can be changed when PCRE is built, and they can also be set when
-<b>pcre[16]_exec()</b> is called. For details of these interfaces, see the
-<a href="pcrebuild.html"><b>pcrebuild</b></a>
-documentation and the
-<a href="pcreapi.html#extradata">section on extra data for <b>pcre[16]_exec()</b></a>
-in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<P>
-As a very rough rule of thumb, you should reckon on about 500 bytes per
-recursion. Thus, if you want to limit your stack usage to 8Mb, you should set
-the limit at 16000 recursions. A 64Mb stack, on the other hand, can support
-around 128000 recursions.
-</P>
-<P>
-In Unix-like environments, the <b>pcretest</b> test program has a command line
-option (<b>-S</b>) that can be used to increase the size of its stack. As long
-as the stack is large enough, another option (<b>-M</b>) can be used to find the
-smallest limits that allow a particular pattern to match a given subject
-string. This is done by calling <b>pcre[16]_exec()</b> repeatedly with different
-limits.
-</P>
-<br><b>
-Obtaining an estimate of stack usage
-</b><br>
-<P>
-The actual amount of stack used per recursion can vary quite a lot, depending
-on the compiler that was used to build PCRE and the optimization or debugging
-options that were set for it. The rule of thumb value of 500 bytes mentioned
-above may be larger or smaller than what is actually needed. A better
-approximation can be obtained by running this command:
-<pre>
- pcretest -m -C
-</pre>
-The <b>-C</b> option causes <b>pcretest</b> to output information about the
-options with which PCRE was compiled. When <b>-m</b> is also given (before
-<b>-C</b>), information about stack use is given in a line like this:
-<pre>
- Match recursion uses stack: approximate frame size = 640 bytes
-</pre>
-The value is approximate because some recursions need a bit more (up to perhaps
-16 more bytes).
-</P>
-<P>
-If the above command is given when PCRE is compiled to use the heap instead of
-the stack for recursion, the value that is output is the size of each block
-that is obtained from the heap.
-</P>
-<br><b>
-Changing stack size in Unix-like systems
-</b><br>
-<P>
-In Unix-like environments, there is not often a problem with the stack unless
-very long strings are involved, though the default limit on stack size varies
-from system to system. Values from 8Mb to 64Mb are common. You can find your
-default limit by running the command:
-<pre>
- ulimit -s
-</pre>
-Unfortunately, the effect of running out of stack is often SIGSEGV, though
-sometimes a more explicit error message is given. You can normally increase the
-limit on stack size by code such as this:
-<pre>
- struct rlimit rlim;
- getrlimit(RLIMIT_STACK, &rlim);
- rlim.rlim_cur = 100*1024*1024;
- setrlimit(RLIMIT_STACK, &rlim);
-</pre>
-This reads the current limits (soft and hard) using <b>getrlimit()</b>, then
-attempts to increase the soft limit to 100Mb using <b>setrlimit()</b>. You must
-do this before calling <b>pcre[16]_exec()</b>.
-</P>
-<br><b>
-Changing stack size in Mac OS X
-</b><br>
-<P>
-Using <b>setrlimit()</b>, as described above, should also work on Mac OS X. It
-is also possible to set a stack size when linking a program. There is a
-discussion about stack sizes in Mac OS X at this web site:
-<a href="http://developer.apple.com/qa/qa2005/qa1419.html">http://developer.apple.com/qa/qa2005/qa1419.html.</a>
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 21 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcresyntax.html b/src/third_party/pcre-8.30/doc/html/pcresyntax.html
deleted file mode 100644
index 5181d7ab1e0..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcresyntax.html
+++ /dev/null
@@ -1,509 +0,0 @@
-<html>
-<head>
-<title>pcresyntax specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcresyntax man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">PCRE REGULAR EXPRESSION SYNTAX SUMMARY</a>
-<li><a name="TOC2" href="#SEC2">QUOTING</a>
-<li><a name="TOC3" href="#SEC3">CHARACTERS</a>
-<li><a name="TOC4" href="#SEC4">CHARACTER TYPES</a>
-<li><a name="TOC5" href="#SEC5">GENERAL CATEGORY PROPERTIES FOR \p and \P</a>
-<li><a name="TOC6" href="#SEC6">PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P</a>
-<li><a name="TOC7" href="#SEC7">SCRIPT NAMES FOR \p AND \P</a>
-<li><a name="TOC8" href="#SEC8">CHARACTER CLASSES</a>
-<li><a name="TOC9" href="#SEC9">QUANTIFIERS</a>
-<li><a name="TOC10" href="#SEC10">ANCHORS AND SIMPLE ASSERTIONS</a>
-<li><a name="TOC11" href="#SEC11">MATCH POINT RESET</a>
-<li><a name="TOC12" href="#SEC12">ALTERNATION</a>
-<li><a name="TOC13" href="#SEC13">CAPTURING</a>
-<li><a name="TOC14" href="#SEC14">ATOMIC GROUPS</a>
-<li><a name="TOC15" href="#SEC15">COMMENT</a>
-<li><a name="TOC16" href="#SEC16">OPTION SETTING</a>
-<li><a name="TOC17" href="#SEC17">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a>
-<li><a name="TOC18" href="#SEC18">BACKREFERENCES</a>
-<li><a name="TOC19" href="#SEC19">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a>
-<li><a name="TOC20" href="#SEC20">CONDITIONAL PATTERNS</a>
-<li><a name="TOC21" href="#SEC21">BACKTRACKING CONTROL</a>
-<li><a name="TOC22" href="#SEC22">NEWLINE CONVENTIONS</a>
-<li><a name="TOC23" href="#SEC23">WHAT \R MATCHES</a>
-<li><a name="TOC24" href="#SEC24">CALLOUTS</a>
-<li><a name="TOC25" href="#SEC25">SEE ALSO</a>
-<li><a name="TOC26" href="#SEC26">AUTHOR</a>
-<li><a name="TOC27" href="#SEC27">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">PCRE REGULAR EXPRESSION SYNTAX SUMMARY</a><br>
-<P>
-The full syntax and semantics of the regular expressions that are supported by
-PCRE are described in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation. This document contains a quick-reference summary of the syntax.
-</P>
-<br><a name="SEC2" href="#TOC1">QUOTING</a><br>
-<P>
-<pre>
- \x where x is non-alphanumeric is a literal x
- \Q...\E treat enclosed characters as literal
-</PRE>
-</P>
-<br><a name="SEC3" href="#TOC1">CHARACTERS</a><br>
-<P>
-<pre>
- \a alarm, that is, the BEL character (hex 07)
- \cx "control-x", where x is any ASCII character
- \e escape (hex 1B)
- \f formfeed (hex 0C)
- \n newline (hex 0A)
- \r carriage return (hex 0D)
- \t tab (hex 09)
- \ddd character with octal code ddd, or backreference
- \xhh character with hex code hh
- \x{hhh..} character with hex code hhh..
-</PRE>
-</P>
-<br><a name="SEC4" href="#TOC1">CHARACTER TYPES</a><br>
-<P>
-<pre>
- . any character except newline;
- in dotall mode, any character whatsoever
- \C one data unit, even in UTF mode (best avoided)
- \d a decimal digit
- \D a character that is not a decimal digit
- \h a horizontal whitespace character
- \H a character that is not a horizontal whitespace character
- \N a character that is not a newline
- \p{<i>xx</i>} a character with the <i>xx</i> property
- \P{<i>xx</i>} a character without the <i>xx</i> property
- \R a newline sequence
- \s a whitespace character
- \S a character that is not a whitespace character
- \v a vertical whitespace character
- \V a character that is not a vertical whitespace character
- \w a "word" character
- \W a "non-word" character
- \X an extended Unicode sequence
-</pre>
-In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII
-characters, even in a UTF mode. However, this can be changed by setting the
-PCRE_UCP option.
-</P>
-<br><a name="SEC5" href="#TOC1">GENERAL CATEGORY PROPERTIES FOR \p and \P</a><br>
-<P>
-<pre>
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
- L& Ll, Lu, or Lt
-
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-</PRE>
-</P>
-<br><a name="SEC6" href="#TOC1">PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P</a><br>
-<P>
-<pre>
- Xan Alphanumeric: union of properties L and N
- Xps POSIX space: property Z or tab, NL, VT, FF, CR
- Xsp Perl space: property Z or tab, NL, FF, CR
- Xwd Perl word: property Xan or underscore
-</PRE>
-</P>
-<br><a name="SEC7" href="#TOC1">SCRIPT NAMES FOR \p AND \P</a><br>
-<P>
-Arabic,
-Armenian,
-Avestan,
-Balinese,
-Bamum,
-Bengali,
-Bopomofo,
-Braille,
-Buginese,
-Buhid,
-Canadian_Aboriginal,
-Carian,
-Cham,
-Cherokee,
-Common,
-Coptic,
-Cuneiform,
-Cypriot,
-Cyrillic,
-Deseret,
-Devanagari,
-Egyptian_Hieroglyphs,
-Ethiopic,
-Georgian,
-Glagolitic,
-Gothic,
-Greek,
-Gujarati,
-Gurmukhi,
-Han,
-Hangul,
-Hanunoo,
-Hebrew,
-Hiragana,
-Imperial_Aramaic,
-Inherited,
-Inscriptional_Pahlavi,
-Inscriptional_Parthian,
-Javanese,
-Kaithi,
-Kannada,
-Katakana,
-Kayah_Li,
-Kharoshthi,
-Khmer,
-Lao,
-Latin,
-Lepcha,
-Limbu,
-Linear_B,
-Lisu,
-Lycian,
-Lydian,
-Malayalam,
-Meetei_Mayek,
-Mongolian,
-Myanmar,
-New_Tai_Lue,
-Nko,
-Ogham,
-Old_Italic,
-Old_Persian,
-Old_South_Arabian,
-Old_Turkic,
-Ol_Chiki,
-Oriya,
-Osmanya,
-Phags_Pa,
-Phoenician,
-Rejang,
-Runic,
-Samaritan,
-Saurashtra,
-Shavian,
-Sinhala,
-Sundanese,
-Syloti_Nagri,
-Syriac,
-Tagalog,
-Tagbanwa,
-Tai_Le,
-Tai_Tham,
-Tai_Viet,
-Tamil,
-Telugu,
-Thaana,
-Thai,
-Tibetan,
-Tifinagh,
-Ugaritic,
-Vai,
-Yi.
-</P>
-<br><a name="SEC8" href="#TOC1">CHARACTER CLASSES</a><br>
-<P>
-<pre>
- [...] positive character class
- [^...] negative character class
- [x-y] range (can be used for hex characters)
- [[:xxx:]] positive POSIX named set
- [[:^xxx:]] negative POSIX named set
-
- alnum alphanumeric
- alpha alphabetic
- ascii 0-127
- blank space or tab
- cntrl control character
- digit decimal digit
- graph printing, excluding space
- lower lower case letter
- print printing, including space
- punct printing, excluding alphanumeric
- space whitespace
- upper upper case letter
- word same as \w
- xdigit hexadecimal digit
-</pre>
-In PCRE, POSIX character set names recognize only ASCII characters by default,
-but some of them use Unicode properties if PCRE_UCP is set. You can use
-\Q...\E inside a character class.
-</P>
-<br><a name="SEC9" href="#TOC1">QUANTIFIERS</a><br>
-<P>
-<pre>
- ? 0 or 1, greedy
- ?+ 0 or 1, possessive
- ?? 0 or 1, lazy
- * 0 or more, greedy
- *+ 0 or more, possessive
- *? 0 or more, lazy
- + 1 or more, greedy
- ++ 1 or more, possessive
- +? 1 or more, lazy
- {n} exactly n
- {n,m} at least n, no more than m, greedy
- {n,m}+ at least n, no more than m, possessive
- {n,m}? at least n, no more than m, lazy
- {n,} n or more, greedy
- {n,}+ n or more, possessive
- {n,}? n or more, lazy
-</PRE>
-</P>
-<br><a name="SEC10" href="#TOC1">ANCHORS AND SIMPLE ASSERTIONS</a><br>
-<P>
-<pre>
- \b word boundary
- \B not a word boundary
- ^ start of subject
- also after internal newline in multiline mode
- \A start of subject
- $ end of subject
- also before newline at end of subject
- also before internal newline in multiline mode
- \Z end of subject
- also before newline at end of subject
- \z end of subject
- \G first matching position in subject
-</PRE>
-</P>
-<br><a name="SEC11" href="#TOC1">MATCH POINT RESET</a><br>
-<P>
-<pre>
- \K reset start of match
-</PRE>
-</P>
-<br><a name="SEC12" href="#TOC1">ALTERNATION</a><br>
-<P>
-<pre>
- expr|expr|expr...
-</PRE>
-</P>
-<br><a name="SEC13" href="#TOC1">CAPTURING</a><br>
-<P>
-<pre>
- (...) capturing group
- (?&#60;name&#62;...) named capturing group (Perl)
- (?'name'...) named capturing group (Perl)
- (?P&#60;name&#62;...) named capturing group (Python)
- (?:...) non-capturing group
- (?|...) non-capturing group; reset group numbers for
- capturing groups in each alternative
-</PRE>
-</P>
-<br><a name="SEC14" href="#TOC1">ATOMIC GROUPS</a><br>
-<P>
-<pre>
- (?&#62;...) atomic, non-capturing group
-</PRE>
-</P>
-<br><a name="SEC15" href="#TOC1">COMMENT</a><br>
-<P>
-<pre>
- (?#....) comment (not nestable)
-</PRE>
-</P>
-<br><a name="SEC16" href="#TOC1">OPTION SETTING</a><br>
-<P>
-<pre>
- (?i) caseless
- (?J) allow duplicate names
- (?m) multiline
- (?s) single line (dotall)
- (?U) default ungreedy (lazy)
- (?x) extended (ignore white space)
- (?-...) unset option(s)
-</pre>
-The following are recognized only at the start of a pattern or after one of the
-newline-setting options with similar syntax:
-<pre>
- (*NO_START_OPT) no start-match optimization (PCRE_NO_START_OPTIMIZE)
- (*UTF8) set UTF-8 mode: 8-bit library (PCRE_UTF8)
- (*UTF16) set UTF-16 mode: 16-bit library (PCRE_UTF16)
- (*UCP) set PCRE_UCP (use Unicode properties for \d etc)
-</PRE>
-</P>
-<br><a name="SEC17" href="#TOC1">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a><br>
-<P>
-<pre>
- (?=...) positive look ahead
- (?!...) negative look ahead
- (?&#60;=...) positive look behind
- (?&#60;!...) negative look behind
-</pre>
-Each top-level branch of a look behind must be of a fixed length.
-</P>
-<br><a name="SEC18" href="#TOC1">BACKREFERENCES</a><br>
-<P>
-<pre>
- \n reference by number (can be ambiguous)
- \gn reference by number
- \g{n} reference by number
- \g{-n} relative reference by number
- \k&#60;name&#62; reference by name (Perl)
- \k'name' reference by name (Perl)
- \g{name} reference by name (Perl)
- \k{name} reference by name (.NET)
- (?P=name) reference by name (Python)
-</PRE>
-</P>
-<br><a name="SEC19" href="#TOC1">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a><br>
-<P>
-<pre>
- (?R) recurse whole pattern
- (?n) call subpattern by absolute number
- (?+n) call subpattern by relative number
- (?-n) call subpattern by relative number
- (?&name) call subpattern by name (Perl)
- (?P&#62;name) call subpattern by name (Python)
- \g&#60;name&#62; call subpattern by name (Oniguruma)
- \g'name' call subpattern by name (Oniguruma)
- \g&#60;n&#62; call subpattern by absolute number (Oniguruma)
- \g'n' call subpattern by absolute number (Oniguruma)
- \g&#60;+n&#62; call subpattern by relative number (PCRE extension)
- \g'+n' call subpattern by relative number (PCRE extension)
- \g&#60;-n&#62; call subpattern by relative number (PCRE extension)
- \g'-n' call subpattern by relative number (PCRE extension)
-</PRE>
-</P>
-<br><a name="SEC20" href="#TOC1">CONDITIONAL PATTERNS</a><br>
-<P>
-<pre>
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-
- (?(n)... absolute reference condition
- (?(+n)... relative reference condition
- (?(-n)... relative reference condition
- (?(&#60;name&#62;)... named reference condition (Perl)
- (?('name')... named reference condition (Perl)
- (?(name)... named reference condition (PCRE)
- (?(R)... overall recursion condition
- (?(Rn)... specific group recursion condition
- (?(R&name)... specific recursion condition
- (?(DEFINE)... define subpattern for reference
- (?(assert)... assertion condition
-</PRE>
-</P>
-<br><a name="SEC21" href="#TOC1">BACKTRACKING CONTROL</a><br>
-<P>
-The following act immediately they are reached:
-<pre>
- (*ACCEPT) force successful match
- (*FAIL) force backtrack; synonym (*F)
- (*MARK:NAME) set name to be passed back; synonym (*:NAME)
-</pre>
-The following act only when a subsequent match failure causes a backtrack to
-reach them. They all force a match failure, but they differ in what happens
-afterwards. Those that advance the start-of-match point do so only if the
-pattern is not anchored.
-<pre>
- (*COMMIT) overall failure, no advance of starting point
- (*PRUNE) advance to next starting character
- (*PRUNE:NAME) equivalent to (*MARK:NAME)(*PRUNE)
- (*SKIP) advance to current matching position
- (*SKIP:NAME) advance to position corresponding to an earlier
- (*MARK:NAME); if not found, the (*SKIP) is ignored
- (*THEN) local failure, backtrack to next alternation
- (*THEN:NAME) equivalent to (*MARK:NAME)(*THEN)
-</PRE>
-</P>
-<br><a name="SEC22" href="#TOC1">NEWLINE CONVENTIONS</a><br>
-<P>
-These are recognized only at the very start of the pattern or after a
-(*BSR_...), (*UTF8), (*UTF16) or (*UCP) option.
-<pre>
- (*CR) carriage return only
- (*LF) linefeed only
- (*CRLF) carriage return followed by linefeed
- (*ANYCRLF) all three of the above
- (*ANY) any Unicode newline sequence
-</PRE>
-</P>
-<br><a name="SEC23" href="#TOC1">WHAT \R MATCHES</a><br>
-<P>
-These are recognized only at the very start of the pattern or after a
-(*...) option that sets the newline convention or a UTF or UCP mode.
-<pre>
- (*BSR_ANYCRLF) CR, LF, or CRLF
- (*BSR_UNICODE) any Unicode newline sequence
-</PRE>
-</P>
-<br><a name="SEC24" href="#TOC1">CALLOUTS</a><br>
-<P>
-<pre>
- (?C) callout
- (?Cn) callout with data n
-</PRE>
-</P>
-<br><a name="SEC25" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcrepattern</b>(3), <b>pcreapi</b>(3), <b>pcrecallout</b>(3),
-<b>pcrematching</b>(3), <b>pcre</b>(3).
-</P>
-<br><a name="SEC26" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC27" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 10 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcretest.html b/src/third_party/pcre-8.30/doc/html/pcretest.html
deleted file mode 100644
index a88dbd051d3..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcretest.html
+++ /dev/null
@@ -1,932 +0,0 @@
-<html>
-<head>
-<title>pcretest specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcretest man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<ul>
-<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
-<li><a name="TOC2" href="#SEC2">PCRE's 8-BIT and 16-BIT LIBRARIES</a>
-<li><a name="TOC3" href="#SEC3">COMMAND LINE OPTIONS</a>
-<li><a name="TOC4" href="#SEC4">DESCRIPTION</a>
-<li><a name="TOC5" href="#SEC5">PATTERN MODIFIERS</a>
-<li><a name="TOC6" href="#SEC6">DATA LINES</a>
-<li><a name="TOC7" href="#SEC7">THE ALTERNATIVE MATCHING FUNCTION</a>
-<li><a name="TOC8" href="#SEC8">DEFAULT OUTPUT FROM PCRETEST</a>
-<li><a name="TOC9" href="#SEC9">OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION</a>
-<li><a name="TOC10" href="#SEC10">RESTARTING AFTER A PARTIAL MATCH</a>
-<li><a name="TOC11" href="#SEC11">CALLOUTS</a>
-<li><a name="TOC12" href="#SEC12">NON-PRINTING CHARACTERS</a>
-<li><a name="TOC13" href="#SEC13">SAVING AND RELOADING COMPILED PATTERNS</a>
-<li><a name="TOC14" href="#SEC14">SEE ALSO</a>
-<li><a name="TOC15" href="#SEC15">AUTHOR</a>
-<li><a name="TOC16" href="#SEC16">REVISION</a>
-</ul>
-<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
-<P>
-<b>pcretest [options] [input file [output file]]</b>
-<br>
-<br>
-<b>pcretest</b> was written as a test program for the PCRE regular expression
-library itself, but it can also be used for experimenting with regular
-expressions. This document describes the features of the test program; for
-details of the regular expressions themselves, see the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation. For details of the PCRE library function calls and their
-options, see the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-and
-<a href="pcre16.html"><b>pcre16</b></a>
-documentation. The input for <b>pcretest</b> is a sequence of regular expression
-patterns and strings to be matched, as described below. The output shows the
-result of each match. Options on the command line and the patterns control PCRE
-options and exactly what is output.
-</P>
-<br><a name="SEC2" href="#TOC1">PCRE's 8-BIT and 16-BIT LIBRARIES</a><br>
-<P>
-From release 8.30, two separate PCRE libraries can be built. The original one
-supports 8-bit character strings, whereas the newer 16-bit library supports
-character strings encoded in 16-bit units. The <b>pcretest</b> program can be
-used to test both libraries. However, it is itself still an 8-bit program,
-reading 8-bit input and writing 8-bit output. When testing the 16-bit library,
-the patterns and data strings are converted to 16-bit format before being
-passed to the PCRE library functions. Results are converted to 8-bit for
-output.
-</P>
-<P>
-References to functions and structures of the form <b>pcre[16]_xx</b> below
-mean "<b>pcre_xx</b> when using the 8-bit library or <b>pcre16_xx</b> when using
-the 16-bit library".
-</P>
-<br><a name="SEC3" href="#TOC1">COMMAND LINE OPTIONS</a><br>
-<P>
-<b>-16</b>
-If both the 8-bit and the 16-bit libraries have been built, this option causes
-the 16-bit library to be used. If only the 16-bit library has been built, this
-is the default (so has no effect). If only the 8-bit library has been built,
-this option causes an error.
-</P>
-<P>
-<b>-b</b>
-Behave as if each pattern has the <b>/B</b> (show byte code) modifier; the
-internal form is output after compilation.
-</P>
-<P>
-<b>-C</b>
-Output the version number of the PCRE library, and all available information
-about the optional features that are included, and then exit. All other options
-are ignored.
-</P>
-<P>
-<b>-C</b> <i>option</i>
-Output information about a specific build-time option, then exit. This
-functionality is intended for use in scripts such as <b>RunTest</b>. The
-following options output the value indicated:
-<pre>
- linksize the internal link size (2, 3, or 4)
- newline the default newline setting:
- CR, LF, CRLF, ANYCRLF, or ANY
-</pre>
-The following options output 1 for true or zero for false:
-<pre>
- jit just-in-time support is available
- pcre16 the 16-bit library was built
- pcre8 the 8-bit library was built
- ucp Unicode property support is available
- utf UTF-8 and/or UTF-16 support is available
-</PRE>
-</P>
-<P>
-<b>-d</b>
-Behave as if each pattern has the <b>/D</b> (debug) modifier; the internal
-form and information about the compiled pattern is output after compilation;
-<b>-d</b> is equivalent to <b>-b -i</b>.
-</P>
-<P>
-<b>-dfa</b>
-Behave as if each data line contains the \D escape sequence; this causes the
-alternative matching function, <b>pcre[16]_dfa_exec()</b>, to be used instead of
-the standard <b>pcre[16]_exec()</b> function (more detail is given below).
-</P>
-<P>
-<b>-help</b>
-Output a brief summary these options and then exit.
-</P>
-<P>
-<b>-i</b>
-Behave as if each pattern has the <b>/I</b> modifier; information about the
-compiled pattern is given after compilation.
-</P>
-<P>
-<b>-M</b>
-Behave as if each data line contains the \M escape sequence; this causes
-PCRE to discover the minimum MATCH_LIMIT and MATCH_LIMIT_RECURSION settings by
-calling <b>pcre[16]_exec()</b> repeatedly with different limits.
-</P>
-<P>
-<b>-m</b>
-Output the size of each compiled pattern after it has been compiled. This is
-equivalent to adding <b>/M</b> to each regular expression. The size is given in
-bytes for both libraries.
-</P>
-<P>
-<b>-o</b> <i>osize</i>
-Set the number of elements in the output vector that is used when calling
-<b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b> to be <i>osize</i>. The
-default value is 45, which is enough for 14 capturing subexpressions for
-<b>pcre[16]_exec()</b> or 22 different matches for <b>pcre[16]_dfa_exec()</b>.
-The vector size can be changed for individual matching calls by including \O
-in the data line (see below).
-</P>
-<P>
-<b>-p</b>
-Behave as if each pattern has the <b>/P</b> modifier; the POSIX wrapper API is
-used to call PCRE. None of the other options has any effect when <b>-p</b> is
-set. This option can be used only with the 8-bit library.
-</P>
-<P>
-<b>-q</b>
-Do not output the version number of <b>pcretest</b> at the start of execution.
-</P>
-<P>
-<b>-S</b> <i>size</i>
-On Unix-like systems, set the size of the run-time stack to <i>size</i>
-megabytes.
-</P>
-<P>
-<b>-s</b> or <b>-s+</b>
-Behave as if each pattern has the <b>/S</b> modifier; in other words, force each
-pattern to be studied. If <b>-s+</b> is used, the PCRE_STUDY_JIT_COMPILE flag is
-passed to <b>pcre[16]_study()</b>, causing just-in-time optimization to be set
-up if it is available. If the <b>/I</b> or <b>/D</b> option is present on a
-pattern (requesting output about the compiled pattern), information about the
-result of studying is not included when studying is caused only by <b>-s</b> and
-neither <b>-i</b> nor <b>-d</b> is present on the command line. This behaviour
-means that the output from tests that are run with and without <b>-s</b> should
-be identical, except when options that output information about the actual
-running of a match are set.
-<br>
-<br>
-The <b>-M</b>, <b>-t</b>, and <b>-tm</b> options, which give information about
-resources used, are likely to produce different output with and without
-<b>-s</b>. Output may also differ if the <b>/C</b> option is present on an
-individual pattern. This uses callouts to trace the the matching process, and
-this may be different between studied and non-studied patterns. If the pattern
-contains (*MARK) items there may also be differences, for the same reason. The
-<b>-s</b> command line option can be overridden for specific patterns that
-should never be studied (see the <b>/S</b> pattern modifier below).
-</P>
-<P>
-<b>-t</b>
-Run each compile, study, and match many times with a timer, and output
-resulting time per compile or match (in milliseconds). Do not set <b>-m</b> with
-<b>-t</b>, because you will then get the size output a zillion times, and the
-timing will be distorted. You can control the number of iterations that are
-used for timing by following <b>-t</b> with a number (as a separate item on the
-command line). For example, "-t 1000" would iterate 1000 times. The default is
-to iterate 500000 times.
-</P>
-<P>
-<b>-tm</b>
-This is like <b>-t</b> except that it times only the matching phase, not the
-compile or study phases.
-</P>
-<br><a name="SEC4" href="#TOC1">DESCRIPTION</a><br>
-<P>
-If <b>pcretest</b> is given two filename arguments, it reads from the first and
-writes to the second. If it is given only one filename argument, it reads from
-that file and writes to stdout. Otherwise, it reads from stdin and writes to
-stdout, and prompts for each line of input, using "re&#62;" to prompt for regular
-expressions, and "data&#62;" to prompt for data lines.
-</P>
-<P>
-When <b>pcretest</b> is built, a configuration option can specify that it should
-be linked with the <b>libreadline</b> library. When this is done, if the input
-is from a terminal, it is read using the <b>readline()</b> function. This
-provides line-editing and history facilities. The output from the <b>-help</b>
-option states whether or not <b>readline()</b> will be used.
-</P>
-<P>
-The program handles any number of sets of input on a single input file. Each
-set starts with a regular expression, and continues with any number of data
-lines to be matched against the pattern.
-</P>
-<P>
-Each data line is matched separately and independently. If you want to do
-multi-line matches, you have to use the \n escape sequence (or \r or \r\n,
-etc., depending on the newline setting) in a single line of input to encode the
-newline sequences. There is no limit on the length of data lines; the input
-buffer is automatically extended if it is too small.
-</P>
-<P>
-An empty line signals the end of the data lines, at which point a new regular
-expression is read. The regular expressions are given enclosed in any
-non-alphanumeric delimiters other than backslash, for example:
-<pre>
- /(a|bc)x+yz/
-</pre>
-White space before the initial delimiter is ignored. A regular expression may
-be continued over several input lines, in which case the newline characters are
-included within it. It is possible to include the delimiter within the pattern
-by escaping it, for example
-<pre>
- /abc\/def/
-</pre>
-If you do so, the escape and the delimiter form part of the pattern, but since
-delimiters are always non-alphanumeric, this does not affect its interpretation.
-If the terminating delimiter is immediately followed by a backslash, for
-example,
-<pre>
- /abc/\
-</pre>
-then a backslash is added to the end of the pattern. This is done to provide a
-way of testing the error condition that arises if a pattern finishes with a
-backslash, because
-<pre>
- /abc\/
-</pre>
-is interpreted as the first line of a pattern that starts with "abc/", causing
-pcretest to read the next line as a continuation of the regular expression.
-</P>
-<br><a name="SEC5" href="#TOC1">PATTERN MODIFIERS</a><br>
-<P>
-A pattern may be followed by any number of modifiers, which are mostly single
-characters. Following Perl usage, these are referred to below as, for example,
-"the <b>/i</b> modifier", even though the delimiter of the pattern need not
-always be a slash, and no slash is used when writing modifiers. White space may
-appear between the final pattern delimiter and the first modifier, and between
-the modifiers themselves.
-</P>
-<P>
-The <b>/i</b>, <b>/m</b>, <b>/s</b>, and <b>/x</b> modifiers set the PCRE_CASELESS,
-PCRE_MULTILINE, PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when
-<b>pcre[16]_compile()</b> is called. These four modifier letters have the same
-effect as they do in Perl. For example:
-<pre>
- /caseless/i
-</pre>
-The following table shows additional modifiers for setting PCRE compile-time
-options that do not correspond to anything in Perl:
-<pre>
- <b>/8</b> PCRE_UTF8 ) when using the 8-bit
- <b>/?</b> PCRE_NO_UTF8_CHECK ) library
-
- <b>/8</b> PCRE_UTF16 ) when using the 16-bit
- <b>/?</b> PCRE_NO_UTF16_CHECK ) library
-
- <b>/A</b> PCRE_ANCHORED
- <b>/C</b> PCRE_AUTO_CALLOUT
- <b>/E</b> PCRE_DOLLAR_ENDONLY
- <b>/f</b> PCRE_FIRSTLINE
- <b>/J</b> PCRE_DUPNAMES
- <b>/N</b> PCRE_NO_AUTO_CAPTURE
- <b>/U</b> PCRE_UNGREEDY
- <b>/W</b> PCRE_UCP
- <b>/X</b> PCRE_EXTRA
- <b>/Y</b> PCRE_NO_START_OPTIMIZE
- <b>/&#60;JS&#62;</b> PCRE_JAVASCRIPT_COMPAT
- <b>/&#60;cr&#62;</b> PCRE_NEWLINE_CR
- <b>/&#60;lf&#62;</b> PCRE_NEWLINE_LF
- <b>/&#60;crlf&#62;</b> PCRE_NEWLINE_CRLF
- <b>/&#60;anycrlf&#62;</b> PCRE_NEWLINE_ANYCRLF
- <b>/&#60;any&#62;</b> PCRE_NEWLINE_ANY
- <b>/&#60;bsr_anycrlf&#62;</b> PCRE_BSR_ANYCRLF
- <b>/&#60;bsr_unicode&#62;</b> PCRE_BSR_UNICODE
-</pre>
-The modifiers that are enclosed in angle brackets are literal strings as shown,
-including the angle brackets, but the letters within can be in either case.
-This example sets multiline matching with CRLF as the line ending sequence:
-<pre>
- /^abc/m&#60;CRLF&#62;
-</pre>
-As well as turning on the PCRE_UTF8/16 option, the <b>/8</b> modifier causes
-all non-printing characters in output strings to be printed using the
-\x{hh...} notation. Otherwise, those less than 0x100 are output in hex without
-the curly brackets.
-</P>
-<P>
-Full details of the PCRE options are given in the
-<a href="pcreapi.html"><b>pcreapi</b></a>
-documentation.
-</P>
-<br><b>
-Finding all matches in a string
-</b><br>
-<P>
-Searching for all possible matches within each subject string can be requested
-by the <b>/g</b> or <b>/G</b> modifier. After finding a match, PCRE is called
-again to search the remainder of the subject string. The difference between
-<b>/g</b> and <b>/G</b> is that the former uses the <i>startoffset</i> argument to
-<b>pcre[16]_exec()</b> to start searching at a new point within the entire
-string (which is in effect what Perl does), whereas the latter passes over a
-shortened substring. This makes a difference to the matching process if the
-pattern begins with a lookbehind assertion (including \b or \B).
-</P>
-<P>
-If any call to <b>pcre[16]_exec()</b> in a <b>/g</b> or <b>/G</b> sequence matches
-an empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and
-PCRE_ANCHORED flags set in order to search for another, non-empty, match at the
-same point. If this second match fails, the start offset is advanced, and the
-normal match is retried. This imitates the way Perl handles such cases when
-using the <b>/g</b> modifier or the <b>split()</b> function. Normally, the start
-offset is advanced by one character, but if the newline convention recognizes
-CRLF as a newline, and the current character is CR followed by LF, an advance
-of two is used.
-</P>
-<br><b>
-Other modifiers
-</b><br>
-<P>
-There are yet more modifiers for controlling the way <b>pcretest</b>
-operates.
-</P>
-<P>
-The <b>/+</b> modifier requests that as well as outputting the substring that
-matched the entire pattern, <b>pcretest</b> should in addition output the
-remainder of the subject string. This is useful for tests where the subject
-contains multiple copies of the same substring. If the <b>+</b> modifier appears
-twice, the same action is taken for captured substrings. In each case the
-remainder is output on the following line with a plus character following the
-capture number. Note that this modifier must not immediately follow the /S
-modifier because /S+ has another meaning.
-</P>
-<P>
-The <b>/=</b> modifier requests that the values of all potential captured
-parentheses be output after a match. By default, only those up to the highest
-one actually used in the match are output (corresponding to the return code
-from <b>pcre[16]_exec()</b>). Values in the offsets vector corresponding to
-higher numbers should be set to -1, and these are output as "&#60;unset&#62;". This
-modifier gives a way of checking that this is happening.
-</P>
-<P>
-The <b>/B</b> modifier is a debugging feature. It requests that <b>pcretest</b>
-output a representation of the compiled code after compilation. Normally this
-information contains length and offset values; however, if <b>/Z</b> is also
-present, this data is replaced by spaces. This is a special feature for use in
-the automatic test scripts; it ensures that the same output is generated for
-different internal link sizes.
-</P>
-<P>
-The <b>/D</b> modifier is a PCRE debugging feature, and is equivalent to
-<b>/BI</b>, that is, both the <b>/B</b> and the <b>/I</b> modifiers.
-</P>
-<P>
-The <b>/F</b> modifier causes <b>pcretest</b> to flip the byte order of the
-2-byte and 4-byte fields in the compiled pattern. This facility is for testing
-the feature in PCRE that allows it to execute patterns that were compiled on a
-host with a different endianness. This feature is not available when the POSIX
-interface to PCRE is being used, that is, when the <b>/P</b> pattern modifier is
-specified. See also the section about saving and reloading compiled patterns
-below.
-</P>
-<P>
-The <b>/I</b> modifier requests that <b>pcretest</b> output information about the
-compiled pattern (whether it is anchored, has a fixed first character, and
-so on). It does this by calling <b>pcre[16]_fullinfo()</b> after compiling a
-pattern. If the pattern is studied, the results of that are also output.
-</P>
-<P>
-The <b>/K</b> modifier requests <b>pcretest</b> to show names from backtracking
-control verbs that are returned from calls to <b>pcre[16]_exec()</b>. It causes
-<b>pcretest</b> to create a <b>pcre[16]_extra</b> block if one has not already
-been created by a call to <b>pcre[16]_study()</b>, and to set the
-PCRE_EXTRA_MARK flag and the <b>mark</b> field within it, every time that
-<b>pcre[16]_exec()</b> is called. If the variable that the <b>mark</b> field
-points to is non-NULL for a match, non-match, or partial match, <b>pcretest</b>
-prints the string to which it points. For a match, this is shown on a line by
-itself, tagged with "MK:". For a non-match it is added to the message.
-</P>
-<P>
-The <b>/L</b> modifier must be followed directly by the name of a locale, for
-example,
-<pre>
- /pattern/Lfr_FR
-</pre>
-For this reason, it must be the last modifier. The given locale is set,
-<b>pcre[16]_maketables()</b> is called to build a set of character tables for
-the locale, and this is then passed to <b>pcre[16]_compile()</b> when compiling
-the regular expression. Without an <b>/L</b> (or <b>/T</b>) modifier, NULL is
-passed as the tables pointer; that is, <b>/L</b> applies only to the expression
-on which it appears.
-</P>
-<P>
-The <b>/M</b> modifier causes the size in bytes of the memory block used to hold
-the compiled pattern to be output. This does not include the size of the
-<b>pcre[16]</b> block; it is just the actual compiled data. If the pattern is
-successfully studied with the PCRE_STUDY_JIT_COMPILE option, the size of the
-JIT compiled code is also output.
-</P>
-<P>
-If the <b>/S</b> modifier appears once, it causes <b>pcre[16]_study()</b> to be
-called after the expression has been compiled, and the results used when the
-expression is matched. If <b>/S</b> appears twice, it suppresses studying, even
-if it was requested externally by the <b>-s</b> command line option. This makes
-it possible to specify that certain patterns are always studied, and others are
-never studied, independently of <b>-s</b>. This feature is used in the test
-files in a few cases where the output is different when the pattern is studied.
-</P>
-<P>
-If the <b>/S</b> modifier is immediately followed by a + character, the call to
-<b>pcre[16]_study()</b> is made with the PCRE_STUDY_JIT_COMPILE option,
-requesting just-in-time optimization support if it is available. Note that
-there is also a <b>/+</b> modifier; it must not be given immediately after
-<b>/S</b> because this will be misinterpreted. If JIT studying is successful, it
-will automatically be used when <b>pcre[16]_exec()</b> is run, except when
-incompatible run-time options are specified. These include the partial matching
-options; a complete list is given in the
-<a href="pcrejit.html"><b>pcrejit</b></a>
-documentation. See also the <b>\J</b> escape sequence below for a way of
-setting the size of the JIT stack.
-</P>
-<P>
-The <b>/T</b> modifier must be followed by a single digit. It causes a specific
-set of built-in character tables to be passed to <b>pcre[16]_compile()</b>. It
-is used in the standard PCRE tests to check behaviour with different character
-tables. The digit specifies the tables as follows:
-<pre>
- 0 the default ASCII tables, as distributed in
- pcre_chartables.c.dist
- 1 a set of tables defining ISO 8859 characters
-</pre>
-In table 1, some characters whose codes are greater than 128 are identified as
-letters, digits, spaces, etc.
-</P>
-<br><b>
-Using the POSIX wrapper API
-</b><br>
-<P>
-The <b>/P</b> modifier causes <b>pcretest</b> to call PCRE via the POSIX wrapper
-API rather than its native API. This supports only the 8-bit library. When
-<b>/P</b> is set, the following modifiers set options for the <b>regcomp()</b>
-function:
-<pre>
- /i REG_ICASE
- /m REG_NEWLINE
- /N REG_NOSUB
- /s REG_DOTALL )
- /U REG_UNGREEDY ) These options are not part of
- /W REG_UCP ) the POSIX standard
- /8 REG_UTF8 )
-</pre>
-The <b>/+</b> modifier works as described above. All other modifiers are
-ignored.
-</P>
-<br><a name="SEC6" href="#TOC1">DATA LINES</a><br>
-<P>
-Before each data line is passed to <b>pcre[16]_exec()</b>, leading and trailing
-white space is removed, and it is then scanned for \ escapes. Some of these
-are pretty esoteric features, intended for checking out some of the more
-complicated features of PCRE. If you are just testing "ordinary" regular
-expressions, you probably don't need any of these. The following escapes are
-recognized:
-<pre>
- \a alarm (BEL, \x07)
- \b backspace (\x08)
- \e escape (\x27)
- \f form feed (\x0c)
- \n newline (\x0a)
- \qdd set the PCRE_MATCH_LIMIT limit to dd (any number of digits)
- \r carriage return (\x0d)
- \t tab (\x09)
- \v vertical tab (\x0b)
- \nnn octal character (up to 3 octal digits); always
- a byte unless &#62; 255 in UTF-8 or 16-bit mode
- \xhh hexadecimal byte (up to 2 hex digits)
- \x{hh...} hexadecimal character (any number of hex digits)
- \A pass the PCRE_ANCHORED option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \B pass the PCRE_NOTBOL option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \Cdd call pcre[16]_copy_substring() for substring dd after a successful match (number less than 32)
- \Cname call pcre[16]_copy_named_substring() for substring "name" after a successful match (name termin-
- ated by next non alphanumeric character)
- \C+ show the current captured substrings at callout time
- \C- do not supply a callout function
- \C!n return 1 instead of 0 when callout number n is reached
- \C!n!m return 1 instead of 0 when callout number n is reached for the nth time
- \C*n pass the number n (may be negative) as callout data; this is used as the callout return value
- \D use the <b>pcre[16]_dfa_exec()</b> match function
- \F only shortest match for <b>pcre[16]_dfa_exec()</b>
- \Gdd call pcre[16]_get_substring() for substring dd after a successful match (number less than 32)
- \Gname call pcre[16]_get_named_substring() for substring "name" after a successful match (name termin-
- ated by next non-alphanumeric character)
- \Jdd set up a JIT stack of dd kilobytes maximum (any number of digits)
- \L call pcre[16]_get_substringlist() after a successful match
- \M discover the minimum MATCH_LIMIT and MATCH_LIMIT_RECURSION settings
- \N pass the PCRE_NOTEMPTY option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>; if used twice, pass the
- PCRE_NOTEMPTY_ATSTART option
- \Odd set the size of the output vector passed to <b>pcre[16]_exec()</b> to dd (any number of digits)
- \P pass the PCRE_PARTIAL_SOFT option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>; if used twice, pass the
- PCRE_PARTIAL_HARD option
- \Qdd set the PCRE_MATCH_LIMIT_RECURSION limit to dd (any number of digits)
- \R pass the PCRE_DFA_RESTART option to <b>pcre[16]_dfa_exec()</b>
- \S output details of memory get/free calls during matching
- \Y pass the PCRE_NO_START_OPTIMIZE option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \Z pass the PCRE_NOTEOL option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \? pass the PCRE_NO_UTF[8|16]_CHECK option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \&#62;dd start the match at offset dd (optional "-"; then any number of digits); this sets the <i>startoffset</i>
- argument for <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \&#60;cr&#62; pass the PCRE_NEWLINE_CR option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \&#60;lf&#62; pass the PCRE_NEWLINE_LF option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \&#60;crlf&#62; pass the PCRE_NEWLINE_CRLF option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \&#60;anycrlf&#62; pass the PCRE_NEWLINE_ANYCRLF option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
- \&#60;any&#62; pass the PCRE_NEWLINE_ANY option to <b>pcre[16]_exec()</b> or <b>pcre[16]_dfa_exec()</b>
-</pre>
-The use of \x{hh...} is not dependent on the use of the <b>/8</b> modifier on
-the pattern. It is recognized always. There may be any number of hexadecimal
-digits inside the braces; invalid values provoke error messages.
-</P>
-<P>
-Note that \xhh specifies one byte rather than one character in UTF-8 mode;
-this makes it possible to construct invalid UTF-8 sequences for testing
-purposes. On the other hand, \x{hh} is interpreted as a UTF-8 character in
-UTF-8 mode, generating more than one byte if the value is greater than 127.
-When testing the 8-bit library not in UTF-8 mode, \x{hh} generates one byte
-for values less than 256, and causes an error for greater values.
-</P>
-<P>
-In UTF-16 mode, all 4-digit \x{hhhh} values are accepted. This makes it
-possible to construct invalid UTF-16 sequences for testing purposes.
-</P>
-<P>
-The escapes that specify line ending sequences are literal strings, exactly as
-shown. No more than one newline setting should be present in any data line.
-</P>
-<P>
-A backslash followed by anything else just escapes the anything else. If
-the very last character is a backslash, it is ignored. This gives a way of
-passing an empty line as data, since a real empty line terminates the data
-input.
-</P>
-<P>
-The <b>\J</b> escape provides a way of setting the maximum stack size that is
-used by the just-in-time optimization code. It is ignored if JIT optimization
-is not being used. Providing a stack that is larger than the default 32K is
-necessary only for very complicated patterns.
-</P>
-<P>
-If \M is present, <b>pcretest</b> calls <b>pcre[16]_exec()</b> several times,
-with different values in the <i>match_limit</i> and <i>match_limit_recursion</i>
-fields of the <b>pcre[16]_extra</b> data structure, until it finds the minimum
-numbers for each parameter that allow <b>pcre[16]_exec()</b> to complete without
-error. Because this is testing a specific feature of the normal interpretive
-<b>pcre[16]_exec()</b> execution, the use of any JIT optimization that might
-have been set up by the <b>/S+</b> qualifier of <b>-s+</b> option is disabled.
-</P>
-<P>
-The <i>match_limit</i> number is a measure of the amount of backtracking
-that takes place, and checking it out can be instructive. For most simple
-matches, the number is quite small, but for patterns with very large numbers of
-matching possibilities, it can become large very quickly with increasing length
-of subject string. The <i>match_limit_recursion</i> number is a measure of how
-much stack (or, if PCRE is compiled with NO_RECURSE, how much heap) memory is
-needed to complete the match attempt.
-</P>
-<P>
-When \O is used, the value specified may be higher or lower than the size set
-by the <b>-O</b> command line option (or defaulted to 45); \O applies only to
-the call of <b>pcre[16]_exec()</b> for the line in which it appears.
-</P>
-<P>
-If the <b>/P</b> modifier was present on the pattern, causing the POSIX wrapper
-API to be used, the only option-setting sequences that have any effect are \B,
-\N, and \Z, causing REG_NOTBOL, REG_NOTEMPTY, and REG_NOTEOL, respectively,
-to be passed to <b>regexec()</b>.
-</P>
-<br><a name="SEC7" href="#TOC1">THE ALTERNATIVE MATCHING FUNCTION</a><br>
-<P>
-By default, <b>pcretest</b> uses the standard PCRE matching function,
-<b>pcre[16]_exec()</b> to match each data line. PCRE also supports an
-alternative matching function, <b>pcre[16]_dfa_test()</b>, which operates in a
-different way, and has some restrictions. The differences between the two
-functions are described in the
-<a href="pcrematching.html"><b>pcrematching</b></a>
-documentation.
-</P>
-<P>
-If a data line contains the \D escape sequence, or if the command line
-contains the <b>-dfa</b> option, the alternative matching function is used.
-This function finds all possible matches at a given point. If, however, the \F
-escape sequence is present in the data line, it stops after the first match is
-found. This is always the shortest possible match.
-</P>
-<br><a name="SEC8" href="#TOC1">DEFAULT OUTPUT FROM PCRETEST</a><br>
-<P>
-This section describes the output when the normal matching function,
-<b>pcre[16]_exec()</b>, is being used.
-</P>
-<P>
-When a match succeeds, <b>pcretest</b> outputs the list of captured substrings
-that <b>pcre[16]_exec()</b> returns, starting with number 0 for the string that
-matched the whole pattern. Otherwise, it outputs "No match" when the return is
-PCRE_ERROR_NOMATCH, and "Partial match:" followed by the partially matching
-substring when <b>pcre[16]_exec()</b> returns PCRE_ERROR_PARTIAL. (Note that
-this is the entire substring that was inspected during the partial match; it
-may include characters before the actual match start if a lookbehind assertion,
-\K, \b, or \B was involved.) For any other return, <b>pcretest</b> outputs
-the PCRE negative error number and a short descriptive phrase. If the error is
-a failed UTF string check, the offset of the start of the failing character and
-the reason code are also output, provided that the size of the output vector is
-at least two. Here is an example of an interactive <b>pcretest</b> run.
-<pre>
- $ pcretest
- PCRE version 8.13 2011-04-30
-
- re&#62; /^abc(\d+)/
- data&#62; abc123
- 0: abc123
- 1: 123
- data&#62; xyz
- No match
-</pre>
-Unset capturing substrings that are not followed by one that is set are not
-returned by <b>pcre[16]_exec()</b>, and are not shown by <b>pcretest</b>. In the
-following example, there are two capturing substrings, but when the first data
-line is matched, the second, unset substring is not shown. An "internal" unset
-substring is shown as "&#60;unset&#62;", as for the second data line.
-<pre>
- re&#62; /(a)|(b)/
- data&#62; a
- 0: a
- 1: a
- data&#62; b
- 0: b
- 1: &#60;unset&#62;
- 2: b
-</pre>
-If the strings contain any non-printing characters, they are output as \xhh
-escapes if the value is less than 256 and UTF mode is not set. Otherwise they
-are output as \x{hh...} escapes. See below for the definition of non-printing
-characters. If the pattern has the <b>/+</b> modifier, the output for substring
-0 is followed by the the rest of the subject string, identified by "0+" like
-this:
-<pre>
- re&#62; /cat/+
- data&#62; cataract
- 0: cat
- 0+ aract
-</pre>
-If the pattern has the <b>/g</b> or <b>/G</b> modifier, the results of successive
-matching attempts are output in sequence, like this:
-<pre>
- re&#62; /\Bi(\w\w)/g
- data&#62; Mississippi
- 0: iss
- 1: ss
- 0: iss
- 1: ss
- 0: ipp
- 1: pp
-</pre>
-"No match" is output only if the first match attempt fails. Here is an example
-of a failure message (the offset 4 that is specified by \&#62;4 is past the end of
-the subject string):
-<pre>
- re&#62; /xyz/
- data&#62; xyz\&#62;4
- Error -24 (bad offset value)
-</PRE>
-</P>
-<P>
-If any of the sequences <b>\C</b>, <b>\G</b>, or <b>\L</b> are present in a
-data line that is successfully matched, the substrings extracted by the
-convenience functions are output with C, G, or L after the string number
-instead of a colon. This is in addition to the normal full list. The string
-length (that is, the return from the extraction function) is given in
-parentheses after each string for <b>\C</b> and <b>\G</b>.
-</P>
-<P>
-Note that whereas patterns can be continued over several lines (a plain "&#62;"
-prompt is used for continuations), data lines may not. However newlines can be
-included in data by means of the \n escape (or \r, \r\n, etc., depending on
-the newline sequence setting).
-</P>
-<br><a name="SEC9" href="#TOC1">OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION</a><br>
-<P>
-When the alternative matching function, <b>pcre[16]_dfa_exec()</b>, is used (by
-means of the \D escape sequence or the <b>-dfa</b> command line option), the
-output consists of a list of all the matches that start at the first point in
-the subject where there is at least one match. For example:
-<pre>
- re&#62; /(tang|tangerine|tan)/
- data&#62; yellow tangerine\D
- 0: tangerine
- 1: tang
- 2: tan
-</pre>
-(Using the normal matching function on this data finds only "tang".) The
-longest matching string is always given first (and numbered zero). After a
-PCRE_ERROR_PARTIAL return, the output is "Partial match:", followed by the
-partially matching substring. (Note that this is the entire substring that was
-inspected during the partial match; it may include characters before the actual
-match start if a lookbehind assertion, \K, \b, or \B was involved.)
-</P>
-<P>
-If <b>/g</b> is present on the pattern, the search for further matches resumes
-at the end of the longest match. For example:
-<pre>
- re&#62; /(tang|tangerine|tan)/g
- data&#62; yellow tangerine and tangy sultana\D
- 0: tangerine
- 1: tang
- 2: tan
- 0: tang
- 1: tan
- 0: tan
-</pre>
-Since the matching function does not support substring capture, the escape
-sequences that are concerned with captured substrings are not relevant.
-</P>
-<br><a name="SEC10" href="#TOC1">RESTARTING AFTER A PARTIAL MATCH</a><br>
-<P>
-When the alternative matching function has given the PCRE_ERROR_PARTIAL return,
-indicating that the subject partially matched the pattern, you can restart the
-match with additional subject data by means of the \R escape sequence. For
-example:
-<pre>
- re&#62; /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data&#62; 23ja\P\D
- Partial match: 23ja
- data&#62; n05\R\D
- 0: n05
-</pre>
-For further information about partial matching, see the
-<a href="pcrepartial.html"><b>pcrepartial</b></a>
-documentation.
-</P>
-<br><a name="SEC11" href="#TOC1">CALLOUTS</a><br>
-<P>
-If the pattern contains any callout requests, <b>pcretest</b>'s callout function
-is called during matching. This works with both matching functions. By default,
-the called function displays the callout number, the start and current
-positions in the text at the callout time, and the next pattern item to be
-tested. For example:
-<pre>
- ---&#62;pqrabcdef
- 0 ^ ^ \d
-</pre>
-This output indicates that callout number 0 occurred for a match attempt
-starting at the fourth character of the subject string, when the pointer was at
-the seventh character of the data, and when the next pattern item was \d. Just
-one circumflex is output if the start and current positions are the same.
-</P>
-<P>
-Callouts numbered 255 are assumed to be automatic callouts, inserted as a
-result of the <b>/C</b> pattern modifier. In this case, instead of showing the
-callout number, the offset in the pattern, preceded by a plus, is output. For
-example:
-<pre>
- re&#62; /\d?[A-E]\*/C
- data&#62; E*
- ---&#62;E*
- +0 ^ \d?
- +3 ^ [A-E]
- +8 ^^ \*
- +10 ^ ^
- 0: E*
-</pre>
-If a pattern contains (*MARK) items, an additional line is output whenever
-a change of latest mark is passed to the callout function. For example:
-<pre>
- re&#62; /a(*MARK:X)bc/C
- data&#62; abc
- ---&#62;abc
- +0 ^ a
- +1 ^^ (*MARK:X)
- +10 ^^ b
- Latest Mark: X
- +11 ^ ^ c
- +12 ^ ^
- 0: abc
-</pre>
-The mark changes between matching "a" and "b", but stays the same for the rest
-of the match, so nothing more is output. If, as a result of backtracking, the
-mark reverts to being unset, the text "&#60;unset&#62;" is output.
-</P>
-<P>
-The callout function in <b>pcretest</b> returns zero (carry on matching) by
-default, but you can use a \C item in a data line (as described above) to
-change this and other parameters of the callout.
-</P>
-<P>
-Inserting callouts can be helpful when using <b>pcretest</b> to check
-complicated regular expressions. For further information about callouts, see
-the
-<a href="pcrecallout.html"><b>pcrecallout</b></a>
-documentation.
-</P>
-<br><a name="SEC12" href="#TOC1">NON-PRINTING CHARACTERS</a><br>
-<P>
-When <b>pcretest</b> is outputting text in the compiled version of a pattern,
-bytes other than 32-126 are always treated as non-printing characters are are
-therefore shown as hex escapes.
-</P>
-<P>
-When <b>pcretest</b> is outputting text that is a matched part of a subject
-string, it behaves in the same way, unless a different locale has been set for
-the pattern (using the <b>/L</b> modifier). In this case, the <b>isprint()</b>
-function to distinguish printing and non-printing characters.
-</P>
-<br><a name="SEC13" href="#TOC1">SAVING AND RELOADING COMPILED PATTERNS</a><br>
-<P>
-The facilities described in this section are not available when the POSIX
-interface to PCRE is being used, that is, when the <b>/P</b> pattern modifier is
-specified.
-</P>
-<P>
-When the POSIX interface is not in use, you can cause <b>pcretest</b> to write a
-compiled pattern to a file, by following the modifiers with &#62; and a file name.
-For example:
-<pre>
- /pattern/im &#62;/some/file
-</pre>
-See the
-<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
-documentation for a discussion about saving and re-using compiled patterns.
-Note that if the pattern was successfully studied with JIT optimization, the
-JIT data cannot be saved.
-</P>
-<P>
-The data that is written is binary. The first eight bytes are the length of the
-compiled pattern data followed by the length of the optional study data, each
-written as four bytes in big-endian order (most significant byte first). If
-there is no study data (either the pattern was not studied, or studying did not
-return any data), the second length is zero. The lengths are followed by an
-exact copy of the compiled pattern. If there is additional study data, this
-(excluding any JIT data) follows immediately after the compiled pattern. After
-writing the file, <b>pcretest</b> expects to read a new pattern.
-</P>
-<P>
-A saved pattern can be reloaded into <b>pcretest</b> by specifying &#60; and a file
-name instead of a pattern. The name of the file must not contain a &#60; character,
-as otherwise <b>pcretest</b> will interpret the line as a pattern delimited by &#60;
-characters.
-For example:
-<pre>
- re&#62; &#60;/some/file
- Compiled pattern loaded from /some/file
- No study data
-</pre>
-If the pattern was previously studied with the JIT optimization, the JIT
-information cannot be saved and restored, and so is lost. When the pattern has
-been loaded, <b>pcretest</b> proceeds to read data lines in the usual way.
-</P>
-<P>
-You can copy a file written by <b>pcretest</b> to a different host and reload it
-there, even if the new host has opposite endianness to the one on which the
-pattern was compiled. For example, you can compile on an i86 machine and run on
-a SPARC machine. When a pattern is reloaded on a host with different
-endianness, the confirmation message is changed to:
-<pre>
- Compiled pattern (byte-inverted) loaded from /some/file
-</pre>
-The test suite contains some saved pre-compiled patterns with different
-endianness. These are reloaded using "&#60;!" instead of just "&#60;". This suppresses
-the "(byte-inverted)" text so that the output is the same on all hosts. It also
-forces debugging output once the pattern has been reloaded.
-</P>
-<P>
-File names for saving and reloading can be absolute or relative, but note that
-the shell facility of expanding a file name that starts with a tilde (~) is not
-available.
-</P>
-<P>
-The ability to save and reload files in <b>pcretest</b> is intended for testing
-and experimentation. It is not intended for production use because only a
-single pattern can be written to a file. Furthermore, there is no facility for
-supplying custom character tables for use with a reloaded pattern. If the
-original pattern was compiled with custom tables, an attempt to match a subject
-string using a reloaded pattern is likely to cause <b>pcretest</b> to crash.
-Finally, if you attempt to load a file that is not in the correct format, the
-result is undefined.
-</P>
-<br><a name="SEC14" href="#TOC1">SEE ALSO</a><br>
-<P>
-<b>pcre</b>(3), <b>pcre16</b>(3), <b>pcreapi</b>(3), <b>pcrecallout</b>(3),
-<b>pcrejit</b>, <b>pcrematching</b>(3), <b>pcrepartial</b>(d),
-<b>pcrepattern</b>(3), <b>pcreprecompile</b>(3).
-</P>
-<br><a name="SEC15" href="#TOC1">AUTHOR</a><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><a name="SEC16" href="#TOC1">REVISION</a><br>
-<P>
-Last updated: 14 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/html/pcreunicode.html b/src/third_party/pcre-8.30/doc/html/pcreunicode.html
deleted file mode 100644
index e3c6d587f82..00000000000
--- a/src/third_party/pcre-8.30/doc/html/pcreunicode.html
+++ /dev/null
@@ -1,237 +0,0 @@
-<html>
-<head>
-<title>pcreunicode specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>pcreunicode man page</h1>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
-<p>
-This page is part of the PCRE HTML documentation. It was generated automatically
-from the original man page. If there is any nonsense in it, please consult the
-man page, in case the conversion went wrong.
-<br>
-<br><b>
-UTF-8, UTF-16, AND UNICODE PROPERTY SUPPORT
-</b><br>
-<P>
-From Release 8.30, in addition to its previous UTF-8 support, PCRE also
-supports UTF-16 by means of a separate 16-bit library. This can be built as
-well as, or instead of, the 8-bit library.
-</P>
-<br><b>
-UTF-8 SUPPORT
-</b><br>
-<P>
-In order process UTF-8 strings, you must build PCRE's 8-bit library with UTF
-support, and, in addition, you must call
-<a href="pcre_compile.html"><b>pcre_compile()</b></a>
-with the PCRE_UTF8 option flag, or the pattern must start with the sequence
-(*UTF8). When either of these is the case, both the pattern and any subject
-strings that are matched against it are treated as UTF-8 strings instead of
-strings of 1-byte characters.
-</P>
-<br><b>
-UTF-16 SUPPORT
-</b><br>
-<P>
-In order process UTF-16 strings, you must build PCRE's 16-bit library with UTF
-support, and, in addition, you must call
-<a href="pcre_compile.html"><b>pcre16_compile()</b></a>
-with the PCRE_UTF16 option flag, or the pattern must start with the sequence
-(*UTF16). When either of these is the case, both the pattern and any subject
-strings that are matched against it are treated as UTF-16 strings instead of
-strings of 16-bit characters.
-</P>
-<br><b>
-UTF SUPPORT OVERHEAD
-</b><br>
-<P>
-If you compile PCRE with UTF support, but do not use it at run time, the
-library will be a bit bigger, but the additional run time overhead is limited
-to testing the PCRE_UTF8/16 flag occasionally, so should not be very big.
-</P>
-<br><b>
-UNICODE PROPERTY SUPPORT
-</b><br>
-<P>
-If PCRE is built with Unicode character property support (which implies UTF
-support), the escape sequences \p{..}, \P{..}, and \X can be used.
-The available properties that can be tested are limited to the general
-category properties such as Lu for an upper case letter or Nd for a decimal
-number, the Unicode script names such as Arabic or Han, and the derived
-properties Any and L&. A full list is given in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation. Only the short names for properties are supported. For example,
-\p{L} matches a letter. Its Perl synonym, \p{Letter}, is not supported.
-Furthermore, in Perl, many properties may optionally be prefixed by "Is", for
-compatibility with Perl 5.6. PCRE does not support this.
-<a name="utf8strings"></a></P>
-<br><b>
-Validity of UTF-8 strings
-</b><br>
-<P>
-When you set the PCRE_UTF8 flag, the byte strings passed as patterns and
-subjects are (by default) checked for validity on entry to the relevant
-functions. From release 7.3 of PCRE, the check is according the rules of RFC
-3629, which are themselves derived from the Unicode specification. Earlier
-releases of PCRE followed the rules of RFC 2279, which allows the full range of
-31-bit values (0 to 0x7FFFFFFF). The current check allows only values in the
-range U+0 to U+10FFFF, excluding U+D800 to U+DFFF.
-</P>
-<P>
-The excluded code points are the "Surrogate Area" of Unicode. They are reserved
-for use by UTF-16, where they are used in pairs to encode codepoints with
-values greater than 0xFFFF. The code points that are encoded by UTF-16 pairs
-are available independently in the UTF-8 encoding. (In other words, the whole
-surrogate thing is a fudge for UTF-16 which unfortunately messes up UTF-8.)
-</P>
-<P>
-If an invalid UTF-8 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first byte
-of the failing character. The runtime functions <b>pcre_exec()</b> and
-<b>pcre_dfa_exec()</b> also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-</P>
-<P>
-In some situations, you may already know that your strings are valid, and
-therefore want to skip these checks in order to improve performance. If you set
-the PCRE_NO_UTF8_CHECK flag at compile time or at run time, PCRE assumes that
-the pattern or subject it is given (respectively) contains only valid UTF-8
-codes. In this case, it does not diagnose an invalid UTF-8 string.
-</P>
-<P>
-If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set, what
-happens depends on why the string is invalid. If the string conforms to the
-"old" definition of UTF-8 (RFC 2279), it is processed as a string of characters
-in the range 0 to 0x7FFFFFFF by <b>pcre_dfa_exec()</b> and the interpreted
-version of <b>pcre_exec()</b>. In other words, apart from the initial validity
-test, these functions (when in UTF-8 mode) handle strings according to the more
-liberal rules of RFC 2279. However, the just-in-time (JIT) optimization for
-<b>pcre_exec()</b> supports only RFC 3629. If you are using JIT optimization, or
-if the string does not even conform to RFC 2279, the result is undefined. Your
-program may crash.
-</P>
-<P>
-If you want to process strings of values in the full range 0 to 0x7FFFFFFF,
-encoded in a UTF-8-like manner as per the old RFC, you can set
-PCRE_NO_UTF8_CHECK to bypass the more restrictive test. However, in this
-situation, you will have to apply your own validity check, and avoid the use of
-JIT optimization.
-<a name="utf16strings"></a></P>
-<br><b>
-Validity of UTF-16 strings
-</b><br>
-<P>
-When you set the PCRE_UTF16 flag, the strings of 16-bit data units that are
-passed as patterns and subjects are (by default) checked for validity on entry
-to the relevant functions. Values other than those in the surrogate range
-U+D800 to U+DFFF are independent code points. Values in the surrogate range
-must be used in pairs in the correct manner.
-</P>
-<P>
-If an invalid UTF-16 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first data
-unit of the failing character. The runtime functions <b>pcre16_exec()</b> and
-<b>pcre16_dfa_exec()</b> also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-</P>
-<P>
-In some situations, you may already know that your strings are valid, and
-therefore want to skip these checks in order to improve performance. If you set
-the PCRE_NO_UTF16_CHECK flag at compile time or at run time, PCRE assumes that
-the pattern or subject it is given (respectively) contains only valid UTF-16
-sequences. In this case, it does not diagnose an invalid UTF-16 string.
-</P>
-<br><b>
-General comments about UTF modes
-</b><br>
-<P>
-1. Codepoints less than 256 can be specified by either braced or unbraced
-hexadecimal escape sequences (for example, \x{b3} or \xb3). Larger values
-have to use braced sequences.
-</P>
-<P>
-2. Octal numbers up to \777 are recognized, and in UTF-8 mode, they match
-two-byte characters for values greater than \177.
-</P>
-<P>
-3. Repeat quantifiers apply to complete UTF characters, not to individual
-data units, for example: \x{100}{3}.
-</P>
-<P>
-4. The dot metacharacter matches one UTF character instead of a single data
-unit.
-</P>
-<P>
-5. The escape sequence \C can be used to match a single byte in UTF-8 mode, or
-a single 16-bit data unit in UTF-16 mode, but its use can lead to some strange
-effects because it breaks up multi-unit characters (see the description of \C
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation). The use of \C is not supported in the alternative matching
-function <b>pcre[16]_dfa_exec()</b>, nor is it supported in UTF mode by the JIT
-optimization of <b>pcre[16]_exec()</b>. If JIT optimization is requested for a
-UTF pattern that contains \C, it will not succeed, and so the matching will
-be carried out by the normal interpretive function.
-</P>
-<P>
-6. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly
-test characters of any code value, but, by default, the characters that PCRE
-recognizes as digits, spaces, or word characters remain the same set as in
-non-UTF mode, all with values less than 256. This remains true even when PCRE
-is built to include Unicode property support, because to do otherwise would
-slow down PCRE in many common cases. Note in particular that this applies to
-\b and \B, because they are defined in terms of \w and \W. If you really
-want to test for a wider sense of, say, "digit", you can use explicit Unicode
-property tests such as \p{Nd}. Alternatively, if you set the PCRE_UCP option,
-the way that the character escapes work is changed so that Unicode properties
-are used to determine which characters match. There are more details in the
-section on
-<a href="pcrepattern.html#genericchartypes">generic character types</a>
-in the
-<a href="pcrepattern.html"><b>pcrepattern</b></a>
-documentation.
-</P>
-<P>
-7. Similarly, characters that match the POSIX named character classes are all
-low-valued characters, unless the PCRE_UCP option is set.
-</P>
-<P>
-8. However, the horizontal and vertical whitespace matching escapes (\h, \H,
-\v, and \V) do match all the appropriate Unicode characters, whether or not
-PCRE_UCP is set.
-</P>
-<P>
-9. Case-insensitive matching applies only to characters whose values are less
-than 128, unless PCRE is built with Unicode property support. Even when Unicode
-property support is available, PCRE still uses its own character tables when
-checking the case of low-valued characters, so as not to degrade performance.
-The Unicode property information is used only for characters with higher
-values. Furthermore, PCRE supports case-insensitive matching only when there is
-a one-to-one mapping between a letter's cases. There are a small number of
-many-to-one mappings in Unicode; these are not supported by PCRE.
-</P>
-<br><b>
-AUTHOR
-</b><br>
-<P>
-Philip Hazel
-<br>
-University Computing Service
-<br>
-Cambridge CB2 3QH, England.
-<br>
-</P>
-<br><b>
-REVISION
-</b><br>
-<P>
-Last updated: 13 January 2012
-<br>
-Copyright &copy; 1997-2012 University of Cambridge.
-<br>
-<p>
-Return to the <a href="index.html">PCRE index page</a>.
-</p>
diff --git a/src/third_party/pcre-8.30/doc/index.html.src b/src/third_party/pcre-8.30/doc/index.html.src
deleted file mode 100644
index 20720df1bfa..00000000000
--- a/src/third_party/pcre-8.30/doc/index.html.src
+++ /dev/null
@@ -1,173 +0,0 @@
-<html>
-<!-- This is a manually maintained file that is the root of the HTML version of
- the PCRE documentation. When the HTML documents are built from the man
- page versions, the entire doc/html directory is emptied, this file is then
- copied into doc/html/index.html, and the remaining files therein are
- created by the 132html script.
--->
-<head>
-<title>PCRE specification</title>
-</head>
-<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
-<h1>Perl-compatible Regular Expressions (PCRE)</h1>
-<p>
-The HTML documentation for PCRE comprises the following pages:
-</p>
-
-<table>
-<tr><td><a href="pcre.html">pcre</a></td>
- <td>&nbsp;&nbsp;Introductory page</td></tr>
-
-<tr><td><a href="pcre16.html">pcre16</a></td>
- <td>&nbsp;&nbsp;Discussion of the 16-bit PCRE library</td></tr>
-
-<tr><td><a href="pcre-config.html">pcre-config</a></td>
- <td>&nbsp;&nbsp;Information about the installation configuration</td></tr>
-
-<tr><td><a href="pcreapi.html">pcreapi</a></td>
- <td>&nbsp;&nbsp;PCRE's native API</td></tr>
-
-<tr><td><a href="pcrebuild.html">pcrebuild</a></td>
- <td>&nbsp;&nbsp;Options for building PCRE</td></tr>
-
-<tr><td><a href="pcrecallout.html">pcrecallout</a></td>
- <td>&nbsp;&nbsp;The <i>callout</i> facility</td></tr>
-
-<tr><td><a href="pcrecompat.html">pcrecompat</a></td>
- <td>&nbsp;&nbsp;Compability with Perl</td></tr>
-
-<tr><td><a href="pcrecpp.html">pcrecpp</a></td>
- <td>&nbsp;&nbsp;The C++ wrapper for the PCRE library</td></tr>
-
-<tr><td><a href="pcredemo.html">pcredemo</a></td>
- <td>&nbsp;&nbsp;A demonstration C program that uses the PCRE library</td></tr>
-
-<tr><td><a href="pcregrep.html">pcregrep</a></td>
- <td>&nbsp;&nbsp;The <b>pcregrep</b> command</td></tr>
-
-<tr><td><a href="pcrejit.html">pcrejit</a></td>
- <td>&nbsp;&nbsp;Discussion of the just-in-time optimization support</td></tr>
-
-<tr><td><a href="pcrelimits.html">pcrelimits</a></td>
- <td>&nbsp;&nbsp;Details of size and other limits</td></tr>
-
-<tr><td><a href="pcrematching.html">pcrematching</a></td>
- <td>&nbsp;&nbsp;Discussion of the two matching algorithms</td></tr>
-
-<tr><td><a href="pcrepartial.html">pcrepartial</a></td>
- <td>&nbsp;&nbsp;Using PCRE for partial matching</td></tr>
-
-<tr><td><a href="pcrepattern.html">pcrepattern</a></td>
- <td>&nbsp;&nbsp;Specification of the regular expressions supported by PCRE</td></tr>
-
-<tr><td><a href="pcreperform.html">pcreperform</a></td>
- <td>&nbsp;&nbsp;Some comments on performance</td></tr>
-
-<tr><td><a href="pcreposix.html">pcreposix</a></td>
- <td>&nbsp;&nbsp;The POSIX API to the PCRE library</td></tr>
-
-<tr><td><a href="pcreprecompile.html">pcreprecompile</a></td>
- <td>&nbsp;&nbsp;How to save and re-use compiled patterns</td></tr>
-
-<tr><td><a href="pcresample.html">pcresample</a></td>
- <td>&nbsp;&nbsp;Discussion of the pcredemo program</td></tr>
-
-<tr><td><a href="pcrestack.html">pcrestack</a></td>
- <td>&nbsp;&nbsp;Discussion of PCRE's stack usage</td></tr>
-
-<tr><td><a href="pcresyntax.html">pcresyntax</a></td>
- <td>&nbsp;&nbsp;Syntax quick-reference summary</td></tr>
-
-<tr><td><a href="pcretest.html">pcretest</a></td>
- <td>&nbsp;&nbsp;The <b>pcretest</b> command for testing PCRE</td></tr>
-
-<tr><td><a href="pcreunicode.html">pcreunicode</a></td>
- <td>&nbsp;&nbsp;Discussion of Unicode and UTF-8 support</td></tr>
-</table>
-
-<p>
-There are also individual pages that summarize the interface for each function
-in the library. There is a single page for each pair of 8-bit/16-bit functions.
-</p>
-
-<table>
-
-<tr><td><a href="pcre_assign_jit_stack.html">pcre_assign_jit_stack</a></td>
- <td>&nbsp;&nbsp;Assign stack for JIT matching</td></tr>
-
-<tr><td><a href="pcre_compile.html">pcre_compile</a></td>
- <td>&nbsp;&nbsp;Compile a regular expression</td></tr>
-
-<tr><td><a href="pcre_compile2.html">pcre_compile2</a></td>
- <td>&nbsp;&nbsp;Compile a regular expression (alternate interface)</td></tr>
-
-<tr><td><a href="pcre_config.html">pcre_config</a></td>
- <td>&nbsp;&nbsp;Show build-time configuration options</td></tr>
-
-<tr><td><a href="pcre_copy_named_substring.html">pcre_copy_named_substring</a></td>
- <td>&nbsp;&nbsp;Extract named substring into given buffer</td></tr>
-
-<tr><td><a href="pcre_copy_substring.html">pcre_copy_substring</a></td>
- <td>&nbsp;&nbsp;Extract numbered substring into given buffer</td></tr>
-
-<tr><td><a href="pcre_dfa_exec.html">pcre_dfa_exec</a></td>
- <td>&nbsp;&nbsp;Match a compiled pattern to a subject string
- (DFA algorithm; <i>not</i> Perl compatible)</td></tr>
-
-<tr><td><a href="pcre_free_study.html">pcre_free_study</a></td>
- <td>&nbsp;&nbsp;Free study data</td></tr>
-
-<tr><td><a href="pcre_exec.html">pcre_exec</a></td>
- <td>&nbsp;&nbsp;Match a compiled pattern to a subject string
- (Perl compatible)</td></tr>
-
-<tr><td><a href="pcre_free_substring.html">pcre_free_substring</a></td>
- <td>&nbsp;&nbsp;Free extracted substring</td></tr>
-
-<tr><td><a href="pcre_free_substring_list.html">pcre_free_substring_list</a></td>
- <td>&nbsp;&nbsp;Free list of extracted substrings</td></tr>
-
-<tr><td><a href="pcre_fullinfo.html">pcre_fullinfo</a></td>
- <td>&nbsp;&nbsp;Extract information about a pattern</td></tr>
-
-<tr><td><a href="pcre_get_named_substring.html">pcre_get_named_substring</a></td>
- <td>&nbsp;&nbsp;Extract named substring into new memory</td></tr>
-
-<tr><td><a href="pcre_get_stringnumber.html">pcre_get_stringnumber</a></td>
- <td>&nbsp;&nbsp;Convert captured string name to number</td></tr>
-
-<tr><td><a href="pcre_get_substring.html">pcre_get_substring</a></td>
- <td>&nbsp;&nbsp;Extract numbered substring into new memory</td></tr>
-
-<tr><td><a href="pcre_get_substring_list.html">pcre_get_substring_list</a></td>
- <td>&nbsp;&nbsp;Extract all substrings into new memory</td></tr>
-
-<tr><td><a href="pcre_info.html">pcre_info</a></td>
- <td>&nbsp;&nbsp;Obsolete information extraction function</td></tr>
-
-<tr><td><a href="pcre_jit_stack_alloc.html">pcre_jit_stack_alloc</a></td>
- <td>&nbsp;&nbsp;Create a stack for JIT matching</td></tr>
-
-<tr><td><a href="pcre_jit_stack_free.html">pcre_jit_stack_free</a></td>
- <td>&nbsp;&nbsp;Free a JIT matching stack</td></tr>
-
-<tr><td><a href="pcre_maketables.html">pcre_maketables</a></td>
- <td>&nbsp;&nbsp;Build character tables in current locale</td></tr>
-
-<tr><td><a href="pcre_pattern_to_host_byte_order.html">pcre_pattern_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert compiled pattern to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_refcount.html">pcre_refcount</a></td>
- <td>&nbsp;&nbsp;Maintain reference count in compiled pattern</td></tr>
-
-<tr><td><a href="pcre_study.html">pcre_study</a></td>
- <td>&nbsp;&nbsp;Study a compiled pattern</td></tr>
-
-<tr><td><a href="pcre_utf16_to_host_byte_order.html">pcre_utf16_to_host_byte_order</a></td>
- <td>&nbsp;&nbsp;Convert UTF-16 string to host byte order if necessary</td></tr>
-
-<tr><td><a href="pcre_version.html">pcre_version</a></td>
- <td>&nbsp;&nbsp;Return PCRE version and release date</td></tr>
-</table>
-
-</html>
diff --git a/src/third_party/pcre-8.30/doc/pcre-config.1 b/src/third_party/pcre-8.30/doc/pcre-config.1
deleted file mode 100644
index 6f2c48fe6d6..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre-config.1
+++ /dev/null
@@ -1,87 +0,0 @@
-.TH PCRE-CONFIG 1
-.SH NAME
-pcre-config - program to return PCRE configuration
-.SH SYNOPSIS
-.rs
-.sp
-.B pcre-config [--prefix] [--exec-prefix] [--version] [--libs]
-.ti +5n
-.B [--libs16] [--libs-cpp] [--libs-posix] [--cflags]
-.ti +5n
-.B [--cflags-posix]
-.
-.
-.SH DESCRIPTION
-.rs
-.sp
-\fBpcre-config\fP returns the configuration of the installed PCRE
-libraries and the options required to compile a program to use them. Some of
-the options apply only to the 8-bit or 16-bit libraries, respectively, and are
-not available if only one of those libraries has been built. If an unavailable
-option is encountered, the "usage" information is output.
-.
-.
-.SH OPTIONS
-.rs
-.TP 10
-\fB--prefix\fP
-Writes the directory prefix used in the PCRE installation for architecture
-independent files (\fI/usr\fP on many systems, \fI/usr/local\fP on some
-systems) to the standard output.
-.TP 10
-\fB--exec-prefix\fP
-Writes the directory prefix used in the PCRE installation for architecture
-dependent files (normally the same as \fB--prefix\fP) to the standard output.
-.TP 10
-\fB--version\fP
-Writes the version number of the installed PCRE libraries to the standard
-output.
-.TP 10
-\fB--libs\fP
-Writes to the standard output the command line options required to link
-with the 8-bit PCRE library (\fB-lpcre\fP on many systems).
-.TP 10
-\fB--libs16\fP
-Writes to the standard output the command line options required to link
-with the 16-bit PCRE library (\fB-lpcre16\fP on many systems).
-.TP 10
-\fB--libs-cpp\fP
-Writes to the standard output the command line options required to link with
-PCRE's C++ wrapper library (\fB-lpcrecpp\fP \fB-lpcre\fP on many
-systems).
-.TP 10
-\fB--libs-posix\fP
-Writes to the standard output the command line options required to link with
-PCRE's POSIX API wrapper library (\fB-lpcreposix\fP \fB-lpcre\fP on many
-systems).
-.TP 10
-\fB--cflags\fP
-Writes to the standard output the command line options required to compile
-files that use PCRE (this may include some \fB-I\fP options, but is blank on
-many systems).
-.TP 10
-\fB--cflags-posix\fP
-Writes to the standard output the command line options required to compile
-files that use PCRE's POSIX API wrapper library (this may include some \fB-I\fP
-options, but is blank on many systems).
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcre(3)\fP
-.
-.
-.SH AUTHOR
-.rs
-.sp
-This manual page was originally written by Mark Baker for the Debian GNU/Linux
-system. It has been subsequently revised as a generic PCRE man page.
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 01 January 2012
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcre-config.txt b/src/third_party/pcre-8.30/doc/pcre-config.txt
deleted file mode 100644
index ec89b324a42..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre-config.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-PCRE-CONFIG(1) PCRE-CONFIG(1)
-
-
-
-NAME
- pcre-config - program to return PCRE configuration
-
-SYNOPSIS
-
- pcre-config [--prefix] [--exec-prefix] [--version] [--libs]
- [--libs16] [--libs-cpp] [--libs-posix] [--cflags]
- [--cflags-posix]
-
-
-DESCRIPTION
-
- pcre-config returns the configuration of the installed PCRE libraries
- and the options required to compile a program to use them. Some of the
- options apply only to the 8-bit or 16-bit libraries, respectively, and
- are not available if only one of those libraries has been built. If an
- unavailable option is encountered, the "usage" information is output.
-
-
-OPTIONS
-
- --prefix Writes the directory prefix used in the PCRE installation for
- architecture independent files (/usr on many systems,
- /usr/local on some systems) to the standard output.
-
- --exec-prefix
- Writes the directory prefix used in the PCRE installation for
- architecture dependent files (normally the same as --prefix)
- to the standard output.
-
- --version Writes the version number of the installed PCRE libraries to
- the standard output.
-
- --libs Writes to the standard output the command line options
- required to link with the 8-bit PCRE library (-lpcre on many
- systems).
-
- --libs16 Writes to the standard output the command line options
- required to link with the 16-bit PCRE library (-lpcre16 on
- many systems).
-
- --libs-cpp
- Writes to the standard output the command line options
- required to link with PCRE's C++ wrapper library (-lpcrecpp
- -lpcre on many systems).
-
- --libs-posix
- Writes to the standard output the command line options
- required to link with PCRE's POSIX API wrapper library
- (-lpcreposix -lpcre on many systems).
-
- --cflags Writes to the standard output the command line options
- required to compile files that use PCRE (this may include
- some -I options, but is blank on many systems).
-
- --cflags-posix
- Writes to the standard output the command line options
- required to compile files that use PCRE's POSIX API wrapper
- library (this may include some -I options, but is blank on
- many systems).
-
-
-SEE ALSO
-
- pcre(3)
-
-
-AUTHOR
-
- This manual page was originally written by Mark Baker for the Debian
- GNU/Linux system. It has been subsequently revised as a generic PCRE
- man page.
-
-
-REVISION
-
- Last updated: 01 January 2012
diff --git a/src/third_party/pcre-8.30/doc/pcre.3 b/src/third_party/pcre-8.30/doc/pcre.3
deleted file mode 100644
index e4551c84fba..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre.3
+++ /dev/null
@@ -1,158 +0,0 @@
-.TH PCRE 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH INTRODUCTION
-.rs
-.sp
-The PCRE library is a set of functions that implement regular expression
-pattern matching using the same syntax and semantics as Perl, with just a few
-differences. Some features that appeared in Python and PCRE before they
-appeared in Perl are also available using the Python syntax, there is some
-support for one or two .NET and Oniguruma syntax items, and there is an option
-for requesting some minor changes that give better JavaScript compatibility.
-.P
-Starting with release 8.30, it is possible to compile two separate PCRE
-libraries: the original, which supports 8-bit character strings (including
-UTF-8 strings), and a second library that supports 16-bit character strings
-(including UTF-16 strings). The build process allows either one or both to be
-built. The majority of the work to make this possible was done by Zoltan
-Herczeg.
-.P
-The two libraries contain identical sets of functions, except that the names in
-the 16-bit library start with \fBpcre16_\fP instead of \fBpcre_\fP. To avoid
-over-complication and reduce the documentation maintenance load, most of the
-documentation describes the 8-bit library, with the differences for the 16-bit
-library described separately in the
-.\" HREF
-\fBpcre16\fP
-.\"
-page. References to functions or structures of the form \fIpcre[16]_xxx\fP
-should be read as meaning "\fIpcre_xxx\fP when using the 8-bit library and
-\fIpcre16_xxx\fP when using the 16-bit library".
-.P
-The current implementation of PCRE corresponds approximately with Perl 5.12,
-including support for UTF-8/16 encoded strings and Unicode general category
-properties. However, UTF-8/16 and Unicode support has to be explicitly enabled;
-it is not the default. The Unicode tables correspond to Unicode release 6.0.0.
-.P
-In addition to the Perl-compatible matching function, PCRE contains an
-alternative function that matches the same compiled patterns in a different
-way. In certain circumstances, the alternative function has some advantages.
-For a discussion of the two matching algorithms, see the
-.\" HREF
-\fBpcrematching\fP
-.\"
-page.
-.P
-PCRE is written in C and released as a C library. A number of people have
-written wrappers and interfaces of various kinds. In particular, Google Inc.
-have provided a comprehensive C++ wrapper for the 8-bit library. This is now
-included as part of the PCRE distribution. The
-.\" HREF
-\fBpcrecpp\fP
-.\"
-page has details of this interface. Other people's contributions can be found
-in the \fIContrib\fP directory at the primary FTP site, which is:
-.sp
-.\" HTML <a href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre">
-.\" </a>
-ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
-.P
-Details of exactly which Perl regular expression features are and are not
-supported by PCRE are given in separate documents. See the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-and
-.\" HREF
-\fBpcrecompat\fP
-.\"
-pages. There is a syntax summary in the
-.\" HREF
-\fBpcresyntax\fP
-.\"
-page.
-.P
-Some features of PCRE can be included, excluded, or changed when the library is
-built. The
-.\" HREF
-\fBpcre_config()\fP
-.\"
-function makes it possible for a client to discover which features are
-available. The features themselves are described in the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-page. Documentation about building PCRE for various operating systems can be
-found in the \fBREADME\fP and \fBNON-UNIX-USE\fP files in the source
-distribution.
-.P
-The libraries contains a number of undocumented internal functions and data
-tables that are used by more than one of the exported external functions, but
-which are not intended for use by external callers. Their names all begin with
-"_pcre_" or "_pcre16_", which hopefully will not provoke any name clashes. In
-some environments, it is possible to control which external symbols are
-exported when a shared library is built, and in these cases the undocumented
-symbols are not exported.
-.
-.
-.SH "USER DOCUMENTATION"
-.rs
-.sp
-The user documentation for PCRE comprises a number of different sections. In
-the "man" format, each of these is a separate "man page". In the HTML format,
-each is a separate page, linked from the index page. In the plain text format,
-all the sections, except the \fBpcredemo\fP section, are concatenated, for ease
-of searching. The sections are as follows:
-.sp
- pcre this document
- pcre16 details of the 16-bit library
- pcre-config show PCRE installation configuration information
- pcreapi details of PCRE's native C API
- pcrebuild options for building PCRE
- pcrecallout details of the callout feature
- pcrecompat discussion of Perl compatibility
- pcrecpp details of the C++ wrapper for the 8-bit library
- pcredemo a demonstration C program that uses PCRE
- pcregrep description of the \fBpcregrep\fP command (8-bit only)
- pcrejit discussion of the just-in-time optimization support
- pcrelimits details of size and other limits
- pcrematching discussion of the two matching algorithms
- pcrepartial details of the partial matching facility
-.\" JOIN
- pcrepattern syntax and semantics of supported
- regular expressions
- pcreperform discussion of performance issues
- pcreposix the POSIX-compatible C API for the 8-bit library
- pcreprecompile details of saving and re-using precompiled patterns
- pcresample discussion of the pcredemo program
- pcrestack discussion of stack usage
- pcresyntax quick syntax reference
- pcretest description of the \fBpcretest\fP testing command
- pcreunicode discussion of Unicode and UTF-8/16 support
-.sp
-In addition, in the "man" and HTML formats, there is a short page for each
-8-bit C library function, listing its arguments and results.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.P
-Putting an actual email address here seems to have been a spam magnet, so I've
-taken it away. If you want to email me, use my two initials, followed by the
-two digits 10, at the domain cam.ac.uk.
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 10 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcre.txt b/src/third_party/pcre-8.30/doc/pcre.txt
deleted file mode 100644
index c9a7b2e57a0..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre.txt
+++ /dev/null
@@ -1,9048 +0,0 @@
------------------------------------------------------------------------------
-This file contains a concatenation of the PCRE man pages, converted to plain
-text format for ease of searching with a text editor, or for use on systems
-that do not have a man page processor. The small individual files that give
-synopses of each function in the library have not been included. Neither has
-the pcredemo program. There are separate text files for the pcregrep and
-pcretest commands.
------------------------------------------------------------------------------
-
-
-PCRE(3) PCRE(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-INTRODUCTION
-
- The PCRE library is a set of functions that implement regular expres-
- sion pattern matching using the same syntax and semantics as Perl, with
- just a few differences. Some features that appeared in Python and PCRE
- before they appeared in Perl are also available using the Python syn-
- tax, there is some support for one or two .NET and Oniguruma syntax
- items, and there is an option for requesting some minor changes that
- give better JavaScript compatibility.
-
- Starting with release 8.30, it is possible to compile two separate PCRE
- libraries: the original, which supports 8-bit character strings
- (including UTF-8 strings), and a second library that supports 16-bit
- character strings (including UTF-16 strings). The build process allows
- either one or both to be built. The majority of the work to make this
- possible was done by Zoltan Herczeg.
-
- The two libraries contain identical sets of functions, except that the
- names in the 16-bit library start with pcre16_ instead of pcre_. To
- avoid over-complication and reduce the documentation maintenance load,
- most of the documentation describes the 8-bit library, with the differ-
- ences for the 16-bit library described separately in the pcre16 page.
- References to functions or structures of the form pcre[16]_xxx should
- be read as meaning "pcre_xxx when using the 8-bit library and
- pcre16_xxx when using the 16-bit library".
-
- The current implementation of PCRE corresponds approximately with Perl
- 5.12, including support for UTF-8/16 encoded strings and Unicode gen-
- eral category properties. However, UTF-8/16 and Unicode support has to
- be explicitly enabled; it is not the default. The Unicode tables corre-
- spond to Unicode release 6.0.0.
-
- In addition to the Perl-compatible matching function, PCRE contains an
- alternative function that matches the same compiled patterns in a dif-
- ferent way. In certain circumstances, the alternative function has some
- advantages. For a discussion of the two matching algorithms, see the
- pcrematching page.
-
- PCRE is written in C and released as a C library. A number of people
- have written wrappers and interfaces of various kinds. In particular,
- Google Inc. have provided a comprehensive C++ wrapper for the 8-bit
- library. This is now included as part of the PCRE distribution. The
- pcrecpp page has details of this interface. Other people's contribu-
- tions can be found in the Contrib directory at the primary FTP site,
- which is:
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
-
- Details of exactly which Perl regular expression features are and are
- not supported by PCRE are given in separate documents. See the pcrepat-
- tern and pcrecompat pages. There is a syntax summary in the pcresyntax
- page.
-
- Some features of PCRE can be included, excluded, or changed when the
- library is built. The pcre_config() function makes it possible for a
- client to discover which features are available. The features them-
- selves are described in the pcrebuild page. Documentation about build-
- ing PCRE for various operating systems can be found in the README and
- NON-UNIX-USE files in the source distribution.
-
- The libraries contains a number of undocumented internal functions and
- data tables that are used by more than one of the exported external
- functions, but which are not intended for use by external callers.
- Their names all begin with "_pcre_" or "_pcre16_", which hopefully will
- not provoke any name clashes. In some environments, it is possible to
- control which external symbols are exported when a shared library is
- built, and in these cases the undocumented symbols are not exported.
-
-
-USER DOCUMENTATION
-
- The user documentation for PCRE comprises a number of different sec-
- tions. In the "man" format, each of these is a separate "man page". In
- the HTML format, each is a separate page, linked from the index page.
- In the plain text format, all the sections, except the pcredemo sec-
- tion, are concatenated, for ease of searching. The sections are as fol-
- lows:
-
- pcre this document
- pcre16 details of the 16-bit library
- pcre-config show PCRE installation configuration information
- pcreapi details of PCRE's native C API
- pcrebuild options for building PCRE
- pcrecallout details of the callout feature
- pcrecompat discussion of Perl compatibility
- pcrecpp details of the C++ wrapper for the 8-bit library
- pcredemo a demonstration C program that uses PCRE
- pcregrep description of the pcregrep command (8-bit only)
- pcrejit discussion of the just-in-time optimization support
- pcrelimits details of size and other limits
- pcrematching discussion of the two matching algorithms
- pcrepartial details of the partial matching facility
- pcrepattern syntax and semantics of supported
- regular expressions
- pcreperform discussion of performance issues
- pcreposix the POSIX-compatible C API for the 8-bit library
- pcreprecompile details of saving and re-using precompiled patterns
- pcresample discussion of the pcredemo program
- pcrestack discussion of stack usage
- pcresyntax quick syntax reference
- pcretest description of the pcretest testing command
- pcreunicode discussion of Unicode and UTF-8/16 support
-
- In addition, in the "man" and HTML formats, there is a short page for
- each 8-bit C library function, listing its arguments and results.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
- Putting an actual email address here seems to have been a spam magnet,
- so I've taken it away. If you want to email me, use my two initials,
- followed by the two digits 10, at the domain cam.ac.uk.
-
-
-REVISION
-
- Last updated: 10 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRE(3) PCRE(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
- #include <pcre.h>
-
-
-PCRE 16-BIT API BASIC FUNCTIONS
-
- pcre16 *pcre16_compile(PCRE_SPTR16 pattern, int options,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre16 *pcre16_compile2(PCRE_SPTR16 pattern, int options,
- int *errorcodeptr,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre16_extra *pcre16_study(const pcre16 *code, int options,
- const char **errptr);
-
- void pcre16_free_study(pcre16_extra *extra);
-
- int pcre16_exec(const pcre16 *code, const pcre16_extra *extra,
- PCRE_SPTR16 subject, int length, int startoffset,
- int options, int *ovector, int ovecsize);
-
- int pcre16_dfa_exec(const pcre16 *code, const pcre16_extra *extra,
- PCRE_SPTR16 subject, int length, int startoffset,
- int options, int *ovector, int ovecsize,
- int *workspace, int wscount);
-
-
-PCRE 16-BIT API STRING EXTRACTION FUNCTIONS
-
- int pcre16_copy_named_substring(const pcre16 *code,
- PCRE_SPTR16 subject, int *ovector,
- int stringcount, PCRE_SPTR16 stringname,
- PCRE_UCHAR16 *buffer, int buffersize);
-
- int pcre16_copy_substring(PCRE_SPTR16 subject, int *ovector,
- int stringcount, int stringnumber, PCRE_UCHAR16 *buffer,
- int buffersize);
-
- int pcre16_get_named_substring(const pcre16 *code,
- PCRE_SPTR16 subject, int *ovector,
- int stringcount, PCRE_SPTR16 stringname,
- PCRE_SPTR16 *stringptr);
-
- int pcre16_get_stringnumber(const pcre16 *code,
- PCRE_SPTR16 name);
-
- int pcre16_get_stringtable_entries(const pcre16 *code,
- PCRE_SPTR16 name, PCRE_UCHAR16 **first, PCRE_UCHAR16 **last);
-
- int pcre16_get_substring(PCRE_SPTR16 subject, int *ovector,
- int stringcount, int stringnumber,
- PCRE_SPTR16 *stringptr);
-
- int pcre16_get_substring_list(PCRE_SPTR16 subject,
- int *ovector, int stringcount, PCRE_SPTR16 **listptr);
-
- void pcre16_free_substring(PCRE_SPTR16 stringptr);
-
- void pcre16_free_substring_list(PCRE_SPTR16 *stringptr);
-
-
-PCRE 16-BIT API AUXILIARY FUNCTIONS
-
- pcre16_jit_stack *pcre16_jit_stack_alloc(int startsize, int maxsize);
-
- void pcre16_jit_stack_free(pcre16_jit_stack *stack);
-
- void pcre16_assign_jit_stack(pcre16_extra *extra,
- pcre16_jit_callback callback, void *data);
-
- const unsigned char *pcre16_maketables(void);
-
- int pcre16_fullinfo(const pcre16 *code, const pcre16_extra *extra,
- int what, void *where);
-
- int pcre16_refcount(pcre16 *code, int adjust);
-
- int pcre16_config(int what, void *where);
-
- const char *pcre16_version(void);
-
- int pcre16_pattern_to_host_byte_order(pcre16 *code,
- pcre16_extra *extra, const unsigned char *tables);
-
-
-PCRE 16-BIT API INDIRECTED FUNCTIONS
-
- void *(*pcre16_malloc)(size_t);
-
- void (*pcre16_free)(void *);
-
- void *(*pcre16_stack_malloc)(size_t);
-
- void (*pcre16_stack_free)(void *);
-
- int (*pcre16_callout)(pcre16_callout_block *);
-
-
-PCRE 16-BIT API 16-BIT-ONLY FUNCTION
-
- int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *output,
- PCRE_SPTR16 input, int length, int *byte_order,
- int keep_boms);
-
-
-THE PCRE 16-BIT LIBRARY
-
- Starting with release 8.30, it is possible to compile a PCRE library
- that supports 16-bit character strings, including UTF-16 strings, as
- well as or instead of the original 8-bit library. The majority of the
- work to make this possible was done by Zoltan Herczeg. The two
- libraries contain identical sets of functions, used in exactly the same
- way. Only the names of the functions and the data types of their argu-
- ments and results are different. To avoid over-complication and reduce
- the documentation maintenance load, most of the PCRE documentation
- describes the 8-bit library, with only occasional references to the
- 16-bit library. This page describes what is different when you use the
- 16-bit library.
-
- WARNING: A single application can be linked with both libraries, but
- you must take care when processing any particular pattern to use func-
- tions from just one library. For example, if you want to study a pat-
- tern that was compiled with pcre16_compile(), you must do so with
- pcre16_study(), not pcre_study(), and you must free the study data with
- pcre16_free_study().
-
-
-THE HEADER FILE
-
- There is only one header file, pcre.h. It contains prototypes for all
- the functions in both libraries, as well as definitions of flags,
- structures, error codes, etc.
-
-
-THE LIBRARY NAME
-
- In Unix-like systems, the 16-bit library is called libpcre16, and can
- normally be accesss by adding -lpcre16 to the command for linking an
- application that uses PCRE.
-
-
-STRING TYPES
-
- In the 8-bit library, strings are passed to PCRE library functions as
- vectors of bytes with the C type "char *". In the 16-bit library,
- strings are passed as vectors of unsigned 16-bit quantities. The macro
- PCRE_UCHAR16 specifies an appropriate data type, and PCRE_SPTR16 is
- defined as "const PCRE_UCHAR16 *". In very many environments, "short
- int" is a 16-bit data type. When PCRE is built, it defines PCRE_UCHAR16
- as "short int", but checks that it really is a 16-bit data type. If it
- is not, the build fails with an error message telling the maintainer to
- modify the definition appropriately.
-
-
-STRUCTURE TYPES
-
- The types of the opaque structures that are used for compiled 16-bit
- patterns and JIT stacks are pcre16 and pcre16_jit_stack respectively.
- The type of the user-accessible structure that is returned by
- pcre16_study() is pcre16_extra, and the type of the structure that is
- used for passing data to a callout function is pcre16_callout_block.
- These structures contain the same fields, with the same names, as their
- 8-bit counterparts. The only difference is that pointers to character
- strings are 16-bit instead of 8-bit types.
-
-
-16-BIT FUNCTIONS
-
- For every function in the 8-bit library there is a corresponding func-
- tion in the 16-bit library with a name that starts with pcre16_ instead
- of pcre_. The prototypes are listed above. In addition, there is one
- extra function, pcre16_utf16_to_host_byte_order(). This is a utility
- function that converts a UTF-16 character string to host byte order if
- necessary. The other 16-bit functions expect the strings they are
- passed to be in host byte order.
-
- The input and output arguments of pcre16_utf16_to_host_byte_order() may
- point to the same address, that is, conversion in place is supported.
- The output buffer must be at least as long as the input.
-
- The length argument specifies the number of 16-bit data units in the
- input string; a negative value specifies a zero-terminated string.
-
- If byte_order is NULL, it is assumed that the string starts off in host
- byte order. This may be changed by byte-order marks (BOMs) anywhere in
- the string (commonly as the first character).
-
- If byte_order is not NULL, a non-zero value of the integer to which it
- points means that the input starts off in host byte order, otherwise
- the opposite order is assumed. Again, BOMs in the string can change
- this. The final byte order is passed back at the end of processing.
-
- If keep_boms is not zero, byte-order mark characters (0xfeff) are
- copied into the output string. Otherwise they are discarded.
-
- The result of the function is the number of 16-bit units placed into
- the output buffer, including the zero terminator if the string was
- zero-terminated.
-
-
-SUBJECT STRING OFFSETS
-
- The offsets within subject strings that are returned by the matching
- functions are in 16-bit units rather than bytes.
-
-
-NAMED SUBPATTERNS
-
- The name-to-number translation table that is maintained for named sub-
- patterns uses 16-bit characters. The pcre16_get_stringtable_entries()
- function returns the length of each entry in the table as the number of
- 16-bit data units.
-
-
-OPTION NAMES
-
- There are two new general option names, PCRE_UTF16 and
- PCRE_NO_UTF16_CHECK, which correspond to PCRE_UTF8 and
- PCRE_NO_UTF8_CHECK in the 8-bit library. In fact, these new options
- define the same bits in the options word.
-
- For the pcre16_config() function there is an option PCRE_CONFIG_UTF16
- that returns 1 if UTF-16 support is configured, otherwise 0. If this
- option is given to pcre_config(), or if the PCRE_CONFIG_UTF8 option is
- given to pcre16_config(), the result is the PCRE_ERROR_BADOPTION error.
-
-
-CHARACTER CODES
-
- In 16-bit mode, when PCRE_UTF16 is not set, character values are
- treated in the same way as in 8-bit, non UTF-8 mode, except, of course,
- that they can range from 0 to 0xffff instead of 0 to 0xff. Character
- types for characters less than 0xff can therefore be influenced by the
- locale in the same way as before. Characters greater than 0xff have
- only one case, and no "type" (such as letter or digit).
-
- In UTF-16 mode, the character code is Unicode, in the range 0 to
- 0x10ffff, with the exception of values in the range 0xd800 to 0xdfff
- because those are "surrogate" values that are used in pairs to encode
- values greater than 0xffff.
-
- A UTF-16 string can indicate its endianness by special code knows as a
- byte-order mark (BOM). The PCRE functions do not handle this, expecting
- strings to be in host byte order. A utility function called
- pcre16_utf16_to_host_byte_order() is provided to help with this (see
- above).
-
-
-ERROR NAMES
-
- The errors PCRE_ERROR_BADUTF16_OFFSET and PCRE_ERROR_SHORTUTF16 corre-
- spond to their 8-bit counterparts. The error PCRE_ERROR_BADMODE is
- given when a compiled pattern is passed to a function that processes
- patterns in the other mode, for example, if a pattern compiled with
- pcre_compile() is passed to pcre16_exec().
-
- There are new error codes whose names begin with PCRE_UTF16_ERR for
- invalid UTF-16 strings, corresponding to the PCRE_UTF8_ERR codes for
- UTF-8 strings that are described in the section entitled "Reason codes
- for invalid UTF-8 strings" in the main pcreapi page. The UTF-16 errors
- are:
-
- PCRE_UTF16_ERR1 Missing low surrogate at end of string
- PCRE_UTF16_ERR2 Invalid low surrogate follows high surrogate
- PCRE_UTF16_ERR3 Isolated low surrogate
- PCRE_UTF16_ERR4 Invalid character 0xfffe
-
-
-ERROR TEXTS
-
- If there is an error while compiling a pattern, the error text that is
- passed back by pcre16_compile() or pcre16_compile2() is still an 8-bit
- character string, zero-terminated.
-
-
-CALLOUTS
-
- The subject and mark fields in the callout block that is passed to a
- callout function point to 16-bit vectors.
-
-
-TESTING
-
- The pcretest program continues to operate with 8-bit input and output
- files, but it can be used for testing the 16-bit library. If it is run
- with the command line option -16, patterns and subject strings are con-
- verted from 8-bit to 16-bit before being passed to PCRE, and the 16-bit
- library functions are used instead of the 8-bit ones. Returned 16-bit
- strings are converted to 8-bit for output. If the 8-bit library was not
- compiled, pcretest defaults to 16-bit and the -16 option is ignored.
-
- When PCRE is being built, the RunTest script that is called by "make
- check" uses the pcretest -C option to discover which of the 8-bit and
- 16-bit libraries has been built, and runs the tests appropriately.
-
-
-NOT SUPPORTED IN 16-BIT MODE
-
- Not all the features of the 8-bit library are available with the 16-bit
- library. The C++ and POSIX wrapper functions support only the 8-bit
- library, and the pcregrep program is at present 8-bit only.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 08 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREBUILD(3) PCREBUILD(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PCRE BUILD-TIME OPTIONS
-
- This document describes the optional features of PCRE that can be
- selected when the library is compiled. It assumes use of the configure
- script, where the optional features are selected or deselected by pro-
- viding options to configure before running the make command. However,
- the same options can be selected in both Unix-like and non-Unix-like
- environments using the GUI facility of cmake-gui if you are using CMake
- instead of configure to build PCRE.
-
- There is a lot more information about building PCRE in non-Unix-like
- environments in the file called NON_UNIX_USE, which is part of the PCRE
- distribution. You should consult this file as well as the README file
- if you are building in a non-Unix-like environment.
-
- The complete list of options for configure (which includes the standard
- ones such as the selection of the installation directory) can be
- obtained by running
-
- ./configure --help
-
- The following sections include descriptions of options whose names
- begin with --enable or --disable. These settings specify changes to the
- defaults for the configure command. Because of the way that configure
- works, --enable and --disable always come in pairs, so the complemen-
- tary option always exists as well, but as it specifies the default, it
- is not described.
-
-
-BUILDING 8-BIT and 16-BIT LIBRARIES
-
- By default, a library called libpcre is built, containing functions
- that take string arguments contained in vectors of bytes, either as
- single-byte characters, or interpreted as UTF-8 strings. You can also
- build a separate library, called libpcre16, in which strings are con-
- tained in vectors of 16-bit data units and interpreted either as sin-
- gle-unit characters or UTF-16 strings, by adding
-
- --enable-pcre16
-
- to the configure command. If you do not want the 8-bit library, add
-
- --disable-pcre8
-
- as well. At least one of the two libraries must be built. Note that the
- C++ and POSIX wrappers are for the 8-bit library only, and that pcre-
- grep is an 8-bit program. None of these are built if you select only
- the 16-bit library.
-
-
-BUILDING SHARED AND STATIC LIBRARIES
-
- The PCRE building process uses libtool to build both shared and static
- Unix libraries by default. You can suppress one of these by adding one
- of
-
- --disable-shared
- --disable-static
-
- to the configure command, as required.
-
-
-C++ SUPPORT
-
- By default, if the 8-bit library is being built, the configure script
- will search for a C++ compiler and C++ header files. If it finds them,
- it automatically builds the C++ wrapper library (which supports only
- 8-bit strings). You can disable this by adding
-
- --disable-cpp
-
- to the configure command.
-
-
-UTF-8 and UTF-16 SUPPORT
-
- To build PCRE with support for UTF Unicode character strings, add
-
- --enable-utf
-
- to the configure command. This setting applies to both libraries,
- adding support for UTF-8 to the 8-bit library and support for UTF-16 to
- the 16-bit library. There are no separate options for enabling UTF-8
- and UTF-16 independently because that would allow ridiculous settings
- such as requesting UTF-16 support while building only the 8-bit
- library. It is not possible to build one library with UTF support and
- the other without in the same configuration. (For backwards compatibil-
- ity, --enable-utf8 is a synonym of --enable-utf.)
-
- Of itself, this setting does not make PCRE treat strings as UTF-8 or
- UTF-16. As well as compiling PCRE with this option, you also have have
- to set the PCRE_UTF8 or PCRE_UTF16 option when you call one of the pat-
- tern compiling functions.
-
- If you set --enable-utf when compiling in an EBCDIC environment, PCRE
- expects its input to be either ASCII or UTF-8 (depending on the runtime
- option). It is not possible to support both EBCDIC and UTF-8 codes in
- the same version of the library. Consequently, --enable-utf and
- --enable-ebcdic are mutually exclusive.
-
-
-UNICODE CHARACTER PROPERTY SUPPORT
-
- UTF support allows the libraries to process character codepoints up to
- 0x10ffff in the strings that they handle. On its own, however, it does
- not provide any facilities for accessing the properties of such charac-
- ters. If you want to be able to use the pattern escapes \P, \p, and \X,
- which refer to Unicode character properties, you must add
-
- --enable-unicode-properties
-
- to the configure command. This implies UTF support, even if you have
- not explicitly requested it.
-
- Including Unicode property support adds around 30K of tables to the
- PCRE library. Only the general category properties such as Lu and Nd
- are supported. Details are given in the pcrepattern documentation.
-
-
-JUST-IN-TIME COMPILER SUPPORT
-
- Just-in-time compiler support is included in the build by specifying
-
- --enable-jit
-
- This support is available only for certain hardware architectures. If
- this option is set for an unsupported architecture, a compile time
- error occurs. See the pcrejit documentation for a discussion of JIT
- usage. When JIT support is enabled, pcregrep automatically makes use of
- it, unless you add
-
- --disable-pcregrep-jit
-
- to the "configure" command.
-
-
-CODE VALUE OF NEWLINE
-
- By default, PCRE interprets the linefeed (LF) character as indicating
- the end of a line. This is the normal newline character on Unix-like
- systems. You can compile PCRE to use carriage return (CR) instead, by
- adding
-
- --enable-newline-is-cr
-
- to the configure command. There is also a --enable-newline-is-lf
- option, which explicitly specifies linefeed as the newline character.
-
- Alternatively, you can specify that line endings are to be indicated by
- the two character sequence CRLF. If you want this, add
-
- --enable-newline-is-crlf
-
- to the configure command. There is a fourth option, specified by
-
- --enable-newline-is-anycrlf
-
- which causes PCRE to recognize any of the three sequences CR, LF, or
- CRLF as indicating a line ending. Finally, a fifth option, specified by
-
- --enable-newline-is-any
-
- causes PCRE to recognize any Unicode newline sequence.
-
- Whatever line ending convention is selected when PCRE is built can be
- overridden when the library functions are called. At build time it is
- conventional to use the standard for your operating system.
-
-
-WHAT \R MATCHES
-
- By default, the sequence \R in a pattern matches any Unicode newline
- sequence, whatever has been selected as the line ending sequence. If
- you specify
-
- --enable-bsr-anycrlf
-
- the default is changed so that \R matches only CR, LF, or CRLF. What-
- ever is selected when PCRE is built can be overridden when the library
- functions are called.
-
-
-POSIX MALLOC USAGE
-
- When the 8-bit library is called through the POSIX interface (see the
- pcreposix documentation), additional working storage is required for
- holding the pointers to capturing substrings, because PCRE requires
- three integers per substring, whereas the POSIX interface provides only
- two. If the number of expected substrings is small, the wrapper func-
- tion uses space on the stack, because this is faster than using mal-
- loc() for each call. The default threshold above which the stack is no
- longer used is 10; it can be changed by adding a setting such as
-
- --with-posix-malloc-threshold=20
-
- to the configure command.
-
-
-HANDLING VERY LARGE PATTERNS
-
- Within a compiled pattern, offset values are used to point from one
- part to another (for example, from an opening parenthesis to an alter-
- nation metacharacter). By default, two-byte values are used for these
- offsets, leading to a maximum size for a compiled pattern of around
- 64K. This is sufficient to handle all but the most gigantic patterns.
- Nevertheless, some people do want to process truly enormous patterns,
- so it is possible to compile PCRE to use three-byte or four-byte off-
- sets by adding a setting such as
-
- --with-link-size=3
-
- to the configure command. The value given must be 2, 3, or 4. For the
- 16-bit library, a value of 3 is rounded up to 4. Using longer offsets
- slows down the operation of PCRE because it has to load additional data
- when handling them.
-
-
-AVOIDING EXCESSIVE STACK USAGE
-
- When matching with the pcre_exec() function, PCRE implements backtrack-
- ing by making recursive calls to an internal function called match().
- In environments where the size of the stack is limited, this can se-
- verely limit PCRE's operation. (The Unix environment does not usually
- suffer from this problem, but it may sometimes be necessary to increase
- the maximum stack size. There is a discussion in the pcrestack docu-
- mentation.) An alternative approach to recursion that uses memory from
- the heap to remember data, instead of using recursive function calls,
- has been implemented to work round the problem of limited stack size.
- If you want to build a version of PCRE that works this way, add
-
- --disable-stack-for-recursion
-
- to the configure command. With this configuration, PCRE will use the
- pcre_stack_malloc and pcre_stack_free variables to call memory manage-
- ment functions. By default these point to malloc() and free(), but you
- can replace the pointers so that your own functions are used instead.
-
- Separate functions are provided rather than using pcre_malloc and
- pcre_free because the usage is very predictable: the block sizes
- requested are always the same, and the blocks are always freed in
- reverse order. A calling program might be able to implement optimized
- functions that perform better than malloc() and free(). PCRE runs
- noticeably more slowly when built in this way. This option affects only
- the pcre_exec() function; it is not relevant for pcre_dfa_exec().
-
-
-LIMITING PCRE RESOURCE USAGE
-
- Internally, PCRE has a function called match(), which it calls repeat-
- edly (sometimes recursively) when matching a pattern with the
- pcre_exec() function. By controlling the maximum number of times this
- function may be called during a single matching operation, a limit can
- be placed on the resources used by a single call to pcre_exec(). The
- limit can be changed at run time, as described in the pcreapi documen-
- tation. The default is 10 million, but this can be changed by adding a
- setting such as
-
- --with-match-limit=500000
-
- to the configure command. This setting has no effect on the
- pcre_dfa_exec() matching function.
-
- In some environments it is desirable to limit the depth of recursive
- calls of match() more strictly than the total number of calls, in order
- to restrict the maximum amount of stack (or heap, if --disable-stack-
- for-recursion is specified) that is used. A second limit controls this;
- it defaults to the value that is set for --with-match-limit, which
- imposes no additional constraints. However, you can set a lower limit
- by adding, for example,
-
- --with-match-limit-recursion=10000
-
- to the configure command. This value can also be overridden at run
- time.
-
-
-CREATING CHARACTER TABLES AT BUILD TIME
-
- PCRE uses fixed tables for processing characters whose code values are
- less than 256. By default, PCRE is built with a set of tables that are
- distributed in the file pcre_chartables.c.dist. These tables are for
- ASCII codes only. If you add
-
- --enable-rebuild-chartables
-
- to the configure command, the distributed tables are no longer used.
- Instead, a program called dftables is compiled and run. This outputs
- the source for new set of tables, created in the default locale of your
- C runtime system. (This method of replacing the tables does not work if
- you are cross compiling, because dftables is run on the local host. If
- you need to create alternative tables when cross compiling, you will
- have to do so "by hand".)
-
-
-USING EBCDIC CODE
-
- PCRE assumes by default that it will run in an environment where the
- character code is ASCII (or Unicode, which is a superset of ASCII).
- This is the case for most computer operating systems. PCRE can, how-
- ever, be compiled to run in an EBCDIC environment by adding
-
- --enable-ebcdic
-
- to the configure command. This setting implies --enable-rebuild-charta-
- bles. You should only use it if you know that you are in an EBCDIC
- environment (for example, an IBM mainframe operating system). The
- --enable-ebcdic option is incompatible with --enable-utf.
-
-
-PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT
-
- By default, pcregrep reads all files as plain text. You can build it so
- that it recognizes files whose names end in .gz or .bz2, and reads them
- with libz or libbz2, respectively, by adding one or both of
-
- --enable-pcregrep-libz
- --enable-pcregrep-libbz2
-
- to the configure command. These options naturally require that the rel-
- evant libraries are installed on your system. Configuration will fail
- if they are not.
-
-
-PCREGREP BUFFER SIZE
-
- pcregrep uses an internal buffer to hold a "window" on the file it is
- scanning, in order to be able to output "before" and "after" lines when
- it finds a match. The size of the buffer is controlled by a parameter
- whose default value is 20K. The buffer itself is three times this size,
- but because of the way it is used for holding "before" lines, the long-
- est line that is guaranteed to be processable is the parameter size.
- You can change the default parameter value by adding, for example,
-
- --with-pcregrep-bufsize=50K
-
- to the configure command. The caller of pcregrep can, however, override
- this value by specifying a run-time option.
-
-
-PCRETEST OPTION FOR LIBREADLINE SUPPORT
-
- If you add
-
- --enable-pcretest-libreadline
-
- to the configure command, pcretest is linked with the libreadline
- library, and when its input is from a terminal, it reads it using the
- readline() function. This provides line-editing and history facilities.
- Note that libreadline is GPL-licensed, so if you distribute a binary of
- pcretest linked in this way, there may be licensing issues.
-
- Setting this option causes the -lreadline option to be added to the
- pcretest build. In many operating environments with a sytem-installed
- libreadline this is sufficient. However, in some environments (e.g. if
- an unmodified distribution version of readline is in use), some extra
- configuration may be necessary. The INSTALL file for libreadline says
- this:
-
- "Readline uses the termcap functions, but does not link with the
- termcap or curses library itself, allowing applications which link
- with readline the to choose an appropriate library."
-
- If your environment has not been set up so that an appropriate library
- is automatically included, you may need to add something like
-
- LIBS="-ncurses"
-
- immediately before the configure command.
-
-
-SEE ALSO
-
- pcreapi(3), pcre16, pcre_config(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 07 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREMATCHING(3) PCREMATCHING(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PCRE MATCHING ALGORITHMS
-
- This document describes the two different algorithms that are available
- in PCRE for matching a compiled regular expression against a given sub-
- ject string. The "standard" algorithm is the one provided by the
- pcre_exec() and pcre16_exec() functions. These work in the same was as
- Perl's matching function, and provide a Perl-compatible matching opera-
- tion. The just-in-time (JIT) optimization that is described in the
- pcrejit documentation is compatible with these functions.
-
- An alternative algorithm is provided by the pcre_dfa_exec() and
- pcre16_dfa_exec() functions; they operate in a different way, and are
- not Perl-compatible. This alternative has advantages and disadvantages
- compared with the standard algorithm, and these are described below.
-
- When there is only one possible way in which a given subject string can
- match a pattern, the two algorithms give the same answer. A difference
- arises, however, when there are multiple possibilities. For example, if
- the pattern
-
- ^<.*>
-
- is matched against the string
-
- <something> <something else> <something further>
-
- there are three possible answers. The standard algorithm finds only one
- of them, whereas the alternative algorithm finds all three.
-
-
-REGULAR EXPRESSIONS AS TREES
-
- The set of strings that are matched by a regular expression can be rep-
- resented as a tree structure. An unlimited repetition in the pattern
- makes the tree of infinite size, but it is still a tree. Matching the
- pattern to a given subject string (from a given starting point) can be
- thought of as a search of the tree. There are two ways to search a
- tree: depth-first and breadth-first, and these correspond to the two
- matching algorithms provided by PCRE.
-
-
-THE STANDARD MATCHING ALGORITHM
-
- In the terminology of Jeffrey Friedl's book "Mastering Regular Expres-
- sions", the standard algorithm is an "NFA algorithm". It conducts a
- depth-first search of the pattern tree. That is, it proceeds along a
- single path through the tree, checking that the subject matches what is
- required. When there is a mismatch, the algorithm tries any alterna-
- tives at the current point, and if they all fail, it backs up to the
- previous branch point in the tree, and tries the next alternative
- branch at that level. This often involves backing up (moving to the
- left) in the subject string as well. The order in which repetition
- branches are tried is controlled by the greedy or ungreedy nature of
- the quantifier.
-
- If a leaf node is reached, a matching string has been found, and at
- that point the algorithm stops. Thus, if there is more than one possi-
- ble match, this algorithm returns the first one that it finds. Whether
- this is the shortest, the longest, or some intermediate length depends
- on the way the greedy and ungreedy repetition quantifiers are specified
- in the pattern.
-
- Because it ends up with a single path through the tree, it is rela-
- tively straightforward for this algorithm to keep track of the sub-
- strings that are matched by portions of the pattern in parentheses.
- This provides support for capturing parentheses and back references.
-
-
-THE ALTERNATIVE MATCHING ALGORITHM
-
- This algorithm conducts a breadth-first search of the tree. Starting
- from the first matching point in the subject, it scans the subject
- string from left to right, once, character by character, and as it does
- this, it remembers all the paths through the tree that represent valid
- matches. In Friedl's terminology, this is a kind of "DFA algorithm",
- though it is not implemented as a traditional finite state machine (it
- keeps multiple states active simultaneously).
-
- Although the general principle of this matching algorithm is that it
- scans the subject string only once, without backtracking, there is one
- exception: when a lookaround assertion is encountered, the characters
- following or preceding the current point have to be independently
- inspected.
-
- The scan continues until either the end of the subject is reached, or
- there are no more unterminated paths. At this point, terminated paths
- represent the different matching possibilities (if there are none, the
- match has failed). Thus, if there is more than one possible match,
- this algorithm finds all of them, and in particular, it finds the long-
- est. The matches are returned in decreasing order of length. There is
- an option to stop the algorithm after the first match (which is neces-
- sarily the shortest) is found.
-
- Note that all the matches that are found start at the same point in the
- subject. If the pattern
-
- cat(er(pillar)?)?
-
- is matched against the string "the caterpillar catchment", the result
- will be the three strings "caterpillar", "cater", and "cat" that start
- at the fifth character of the subject. The algorithm does not automati-
- cally move on to find matches that start at later positions.
-
- There are a number of features of PCRE regular expressions that are not
- supported by the alternative matching algorithm. They are as follows:
-
- 1. Because the algorithm finds all possible matches, the greedy or
- ungreedy nature of repetition quantifiers is not relevant. Greedy and
- ungreedy quantifiers are treated in exactly the same way. However, pos-
- sessive quantifiers can make a difference when what follows could also
- match what is quantified, for example in a pattern like this:
-
- ^a++\w!
-
- This pattern matches "aaab!" but not "aaa!", which would be matched by
- a non-possessive quantifier. Similarly, if an atomic group is present,
- it is matched as if it were a standalone pattern at the current point,
- and the longest match is then "locked in" for the rest of the overall
- pattern.
-
- 2. When dealing with multiple paths through the tree simultaneously, it
- is not straightforward to keep track of captured substrings for the
- different matching possibilities, and PCRE's implementation of this
- algorithm does not attempt to do this. This means that no captured sub-
- strings are available.
-
- 3. Because no substrings are captured, back references within the pat-
- tern are not supported, and cause errors if encountered.
-
- 4. For the same reason, conditional expressions that use a backrefer-
- ence as the condition or test for a specific group recursion are not
- supported.
-
- 5. Because many paths through the tree may be active, the \K escape
- sequence, which resets the start of the match when encountered (but may
- be on some paths and not on others), is not supported. It causes an
- error if encountered.
-
- 6. Callouts are supported, but the value of the capture_top field is
- always 1, and the value of the capture_last field is always -1.
-
- 7. The \C escape sequence, which (in the standard algorithm) always
- matches a single data unit, even in UTF-8 or UTF-16 modes, is not sup-
- ported in these modes, because the alternative algorithm moves through
- the subject string one character (not data unit) at a time, for all
- active paths through the tree.
-
- 8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE)
- are not supported. (*FAIL) is supported, and behaves like a failing
- negative assertion.
-
-
-ADVANTAGES OF THE ALTERNATIVE ALGORITHM
-
- Using the alternative matching algorithm provides the following advan-
- tages:
-
- 1. All possible matches (at a single point in the subject) are automat-
- ically found, and in particular, the longest match is found. To find
- more than one match using the standard algorithm, you have to do kludgy
- things with callouts.
-
- 2. Because the alternative algorithm scans the subject string just
- once, and never needs to backtrack (except for lookbehinds), it is pos-
- sible to pass very long subject strings to the matching function in
- several pieces, checking for partial matching each time. Although it is
- possible to do multi-segment matching using the standard algorithm by
- retaining partially matched substrings, it is more complicated. The
- pcrepartial documentation gives details of partial matching and dis-
- cusses multi-segment matching.
-
-
-DISADVANTAGES OF THE ALTERNATIVE ALGORITHM
-
- The alternative algorithm suffers from a number of disadvantages:
-
- 1. It is substantially slower than the standard algorithm. This is
- partly because it has to search for all possible matches, but is also
- because it is less susceptible to optimization.
-
- 2. Capturing parentheses and back references are not supported.
-
- 3. Although atomic groups are supported, their use does not provide the
- performance advantage that it does for the standard algorithm.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 08 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREAPI(3) PCREAPI(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
- #include <pcre.h>
-
-
-PCRE NATIVE API BASIC FUNCTIONS
-
- pcre *pcre_compile(const char *pattern, int options,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre *pcre_compile2(const char *pattern, int options,
- int *errorcodeptr,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre_extra *pcre_study(const pcre *code, int options,
- const char **errptr);
-
- void pcre_free_study(pcre_extra *extra);
-
- int pcre_exec(const pcre *code, const pcre_extra *extra,
- const char *subject, int length, int startoffset,
- int options, int *ovector, int ovecsize);
-
- int pcre_dfa_exec(const pcre *code, const pcre_extra *extra,
- const char *subject, int length, int startoffset,
- int options, int *ovector, int ovecsize,
- int *workspace, int wscount);
-
-
-PCRE NATIVE API STRING EXTRACTION FUNCTIONS
-
- int pcre_copy_named_substring(const pcre *code,
- const char *subject, int *ovector,
- int stringcount, const char *stringname,
- char *buffer, int buffersize);
-
- int pcre_copy_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber, char *buffer,
- int buffersize);
-
- int pcre_get_named_substring(const pcre *code,
- const char *subject, int *ovector,
- int stringcount, const char *stringname,
- const char **stringptr);
-
- int pcre_get_stringnumber(const pcre *code,
- const char *name);
-
- int pcre_get_stringtable_entries(const pcre *code,
- const char *name, char **first, char **last);
-
- int pcre_get_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber,
- const char **stringptr);
-
- int pcre_get_substring_list(const char *subject,
- int *ovector, int stringcount, const char ***listptr);
-
- void pcre_free_substring(const char *stringptr);
-
- void pcre_free_substring_list(const char **stringptr);
-
-
-PCRE NATIVE API AUXILIARY FUNCTIONS
-
- pcre_jit_stack *pcre_jit_stack_alloc(int startsize, int maxsize);
-
- void pcre_jit_stack_free(pcre_jit_stack *stack);
-
- void pcre_assign_jit_stack(pcre_extra *extra,
- pcre_jit_callback callback, void *data);
-
- const unsigned char *pcre_maketables(void);
-
- int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
- int what, void *where);
-
- int pcre_refcount(pcre *code, int adjust);
-
- int pcre_config(int what, void *where);
-
- const char *pcre_version(void);
-
- int pcre_pattern_to_host_byte_order(pcre *code,
- pcre_extra *extra, const unsigned char *tables);
-
-
-PCRE NATIVE API INDIRECTED FUNCTIONS
-
- void *(*pcre_malloc)(size_t);
-
- void (*pcre_free)(void *);
-
- void *(*pcre_stack_malloc)(size_t);
-
- void (*pcre_stack_free)(void *);
-
- int (*pcre_callout)(pcre_callout_block *);
-
-
-PCRE 8-BIT AND 16-BIT LIBRARIES
-
- From release 8.30, PCRE can be compiled as a library for handling
- 16-bit character strings as well as, or instead of, the original
- library that handles 8-bit character strings. To avoid too much compli-
- cation, this document describes the 8-bit versions of the functions,
- with only occasional references to the 16-bit library.
-
- The 16-bit functions operate in the same way as their 8-bit counter-
- parts; they just use different data types for their arguments and
- results, and their names start with pcre16_ instead of pcre_. For every
- option that has UTF8 in its name (for example, PCRE_UTF8), there is a
- corresponding 16-bit name with UTF8 replaced by UTF16. This facility is
- in fact just cosmetic; the 16-bit option names define the same bit val-
- ues.
-
- References to bytes and UTF-8 in this document should be read as refer-
- ences to 16-bit data quantities and UTF-16 when using the 16-bit
- library, unless specified otherwise. More details of the specific dif-
- ferences for the 16-bit library are given in the pcre16 page.
-
-
-PCRE API OVERVIEW
-
- PCRE has its own native API, which is described in this document. There
- are also some wrapper functions (for the 8-bit library only) that cor-
- respond to the POSIX regular expression API, but they do not give
- access to all the functionality. They are described in the pcreposix
- documentation. Both of these APIs define a set of C function calls. A
- C++ wrapper (again for the 8-bit library only) is also distributed with
- PCRE. It is documented in the pcrecpp page.
-
- The native API C function prototypes are defined in the header file
- pcre.h, and on Unix-like systems the (8-bit) library itself is called
- libpcre. It can normally be accessed by adding -lpcre to the command
- for linking an application that uses PCRE. The header file defines the
- macros PCRE_MAJOR and PCRE_MINOR to contain the major and minor release
- numbers for the library. Applications can use these to include support
- for different releases of PCRE.
-
- In a Windows environment, if you want to statically link an application
- program against a non-dll pcre.a file, you must define PCRE_STATIC
- before including pcre.h or pcrecpp.h, because otherwise the pcre_mal-
- loc() and pcre_free() exported functions will be declared
- __declspec(dllimport), with unwanted results.
-
- The functions pcre_compile(), pcre_compile2(), pcre_study(), and
- pcre_exec() are used for compiling and matching regular expressions in
- a Perl-compatible manner. A sample program that demonstrates the sim-
- plest way of using them is provided in the file called pcredemo.c in
- the PCRE source distribution. A listing of this program is given in the
- pcredemo documentation, and the pcresample documentation describes how
- to compile and run it.
-
- Just-in-time compiler support is an optional feature of PCRE that can
- be built in appropriate hardware environments. It greatly speeds up the
- matching performance of many patterns. Simple programs can easily
- request that it be used if available, by setting an option that is
- ignored when it is not relevant. More complicated programs might need
- to make use of the functions pcre_jit_stack_alloc(),
- pcre_jit_stack_free(), and pcre_assign_jit_stack() in order to control
- the JIT code's memory usage. These functions are discussed in the
- pcrejit documentation.
-
- A second matching function, pcre_dfa_exec(), which is not Perl-compati-
- ble, is also provided. This uses a different algorithm for the match-
- ing. The alternative algorithm finds all possible matches (at a given
- point in the subject), and scans the subject just once (unless there
- are lookbehind assertions). However, this algorithm does not return
- captured substrings. A description of the two matching algorithms and
- their advantages and disadvantages is given in the pcrematching docu-
- mentation.
-
- In addition to the main compiling and matching functions, there are
- convenience functions for extracting captured substrings from a subject
- string that is matched by pcre_exec(). They are:
-
- pcre_copy_substring()
- pcre_copy_named_substring()
- pcre_get_substring()
- pcre_get_named_substring()
- pcre_get_substring_list()
- pcre_get_stringnumber()
- pcre_get_stringtable_entries()
-
- pcre_free_substring() and pcre_free_substring_list() are also provided,
- to free the memory used for extracted strings.
-
- The function pcre_maketables() is used to build a set of character
- tables in the current locale for passing to pcre_compile(),
- pcre_exec(), or pcre_dfa_exec(). This is an optional facility that is
- provided for specialist use. Most commonly, no special tables are
- passed, in which case internal tables that are generated when PCRE is
- built are used.
-
- The function pcre_fullinfo() is used to find out information about a
- compiled pattern. The function pcre_version() returns a pointer to a
- string containing the version of PCRE and its date of release.
-
- The function pcre_refcount() maintains a reference count in a data
- block containing a compiled pattern. This is provided for the benefit
- of object-oriented applications.
-
- The global variables pcre_malloc and pcre_free initially contain the
- entry points of the standard malloc() and free() functions, respec-
- tively. PCRE calls the memory management functions via these variables,
- so a calling program can replace them if it wishes to intercept the
- calls. This should be done before calling any PCRE functions.
-
- The global variables pcre_stack_malloc and pcre_stack_free are also
- indirections to memory management functions. These special functions
- are used only when PCRE is compiled to use the heap for remembering
- data, instead of recursive function calls, when running the pcre_exec()
- function. See the pcrebuild documentation for details of how to do
- this. It is a non-standard way of building PCRE, for use in environ-
- ments that have limited stacks. Because of the greater use of memory
- management, it runs more slowly. Separate functions are provided so
- that special-purpose external code can be used for this case. When
- used, these functions are always called in a stack-like manner (last
- obtained, first freed), and always for memory blocks of the same size.
- There is a discussion about PCRE's stack usage in the pcrestack docu-
- mentation.
-
- The global variable pcre_callout initially contains NULL. It can be set
- by the caller to a "callout" function, which PCRE will then call at
- specified points during a matching operation. Details are given in the
- pcrecallout documentation.
-
-
-NEWLINES
-
- PCRE supports five different conventions for indicating line breaks in
- strings: a single CR (carriage return) character, a single LF (line-
- feed) character, the two-character sequence CRLF, any of the three pre-
- ceding, or any Unicode newline sequence. The Unicode newline sequences
- are the three just mentioned, plus the single characters VT (vertical
- tab, U+000B), FF (formfeed, U+000C), NEL (next line, U+0085), LS (line
- separator, U+2028), and PS (paragraph separator, U+2029).
-
- Each of the first three conventions is used by at least one operating
- system as its standard newline sequence. When PCRE is built, a default
- can be specified. The default default is LF, which is the Unix stan-
- dard. When PCRE is run, the default can be overridden, either when a
- pattern is compiled, or when it is matched.
-
- At compile time, the newline convention can be specified by the options
- argument of pcre_compile(), or it can be specified by special text at
- the start of the pattern itself; this overrides any other settings. See
- the pcrepattern page for details of the special character sequences.
-
- In the PCRE documentation the word "newline" is used to mean "the char-
- acter or pair of characters that indicate a line break". The choice of
- newline convention affects the handling of the dot, circumflex, and
- dollar metacharacters, the handling of #-comments in /x mode, and, when
- CRLF is a recognized line ending sequence, the match position advance-
- ment for a non-anchored pattern. There is more detail about this in the
- section on pcre_exec() options below.
-
- The choice of newline convention does not affect the interpretation of
- the \n or \r escape sequences, nor does it affect what \R matches,
- which is controlled in a similar way, but by separate options.
-
-
-MULTITHREADING
-
- The PCRE functions can be used in multi-threading applications, with
- the proviso that the memory management functions pointed to by
- pcre_malloc, pcre_free, pcre_stack_malloc, and pcre_stack_free, and the
- callout function pointed to by pcre_callout, are shared by all threads.
-
- The compiled form of a regular expression is not altered during match-
- ing, so the same compiled pattern can safely be used by several threads
- at once.
-
- If the just-in-time optimization feature is being used, it needs sepa-
- rate memory stack areas for each thread. See the pcrejit documentation
- for more details.
-
-
-SAVING PRECOMPILED PATTERNS FOR LATER USE
-
- The compiled form of a regular expression can be saved and re-used at a
- later time, possibly by a different program, and even on a host other
- than the one on which it was compiled. Details are given in the
- pcreprecompile documentation, which includes a description of the
- pcre_pattern_to_host_byte_order() function. However, compiling a regu-
- lar expression with one version of PCRE for use with a different ver-
- sion is not guaranteed to work and may cause crashes.
-
-
-CHECKING BUILD-TIME OPTIONS
-
- int pcre_config(int what, void *where);
-
- The function pcre_config() makes it possible for a PCRE client to dis-
- cover which optional features have been compiled into the PCRE library.
- The pcrebuild documentation has more details about these optional fea-
- tures.
-
- The first argument for pcre_config() is an integer, specifying which
- information is required; the second argument is a pointer to a variable
- into which the information is placed. The returned value is zero on
- success, or the negative error code PCRE_ERROR_BADOPTION if the value
- in the first argument is not recognized. The following information is
- available:
-
- PCRE_CONFIG_UTF8
-
- The output is an integer that is set to one if UTF-8 support is avail-
- able; otherwise it is set to zero. If this option is given to the
- 16-bit version of this function, pcre16_config(), the result is
- PCRE_ERROR_BADOPTION.
-
- PCRE_CONFIG_UTF16
-
- The output is an integer that is set to one if UTF-16 support is avail-
- able; otherwise it is set to zero. This value should normally be given
- to the 16-bit version of this function, pcre16_config(). If it is given
- to the 8-bit version of this function, the result is PCRE_ERROR_BADOP-
- TION.
-
- PCRE_CONFIG_UNICODE_PROPERTIES
-
- The output is an integer that is set to one if support for Unicode
- character properties is available; otherwise it is set to zero.
-
- PCRE_CONFIG_JIT
-
- The output is an integer that is set to one if support for just-in-time
- compiling is available; otherwise it is set to zero.
-
- PCRE_CONFIG_JITTARGET
-
- The output is a pointer to a zero-terminated "const char *" string. If
- JIT support is available, the string contains the name of the architec-
- ture for which the JIT compiler is configured, for example "x86 32bit
- (little endian + unaligned)". If JIT support is not available, the
- result is NULL.
-
- PCRE_CONFIG_NEWLINE
-
- The output is an integer whose value specifies the default character
- sequence that is recognized as meaning "newline". The four values that
- are supported are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF,
- and -1 for ANY. Though they are derived from ASCII, the same values
- are returned in EBCDIC environments. The default should normally corre-
- spond to the standard sequence for your operating system.
-
- PCRE_CONFIG_BSR
-
- The output is an integer whose value indicates what character sequences
- the \R escape sequence matches by default. A value of 0 means that \R
- matches any Unicode line ending sequence; a value of 1 means that \R
- matches only CR, LF, or CRLF. The default can be overridden when a pat-
- tern is compiled or matched.
-
- PCRE_CONFIG_LINK_SIZE
-
- The output is an integer that contains the number of bytes used for
- internal linkage in compiled regular expressions. For the 8-bit
- library, the value can be 2, 3, or 4. For the 16-bit library, the value
- is either 2 or 4 and is still a number of bytes. The default value of 2
- is sufficient for all but the most massive patterns, since it allows
- the compiled pattern to be up to 64K in size. Larger values allow
- larger regular expressions to be compiled, at the expense of slower
- matching.
-
- PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
-
- The output is an integer that contains the threshold above which the
- POSIX interface uses malloc() for output vectors. Further details are
- given in the pcreposix documentation.
-
- PCRE_CONFIG_MATCH_LIMIT
-
- The output is a long integer that gives the default limit for the num-
- ber of internal matching function calls in a pcre_exec() execution.
- Further details are given with pcre_exec() below.
-
- PCRE_CONFIG_MATCH_LIMIT_RECURSION
-
- The output is a long integer that gives the default limit for the depth
- of recursion when calling the internal matching function in a
- pcre_exec() execution. Further details are given with pcre_exec()
- below.
-
- PCRE_CONFIG_STACKRECURSE
-
- The output is an integer that is set to one if internal recursion when
- running pcre_exec() is implemented by recursive function calls that use
- the stack to remember their state. This is the usual way that PCRE is
- compiled. The output is zero if PCRE was compiled to use blocks of data
- on the heap instead of recursive function calls. In this case,
- pcre_stack_malloc and pcre_stack_free are called to manage memory
- blocks on the heap, thus avoiding the use of the stack.
-
-
-COMPILING A PATTERN
-
- pcre *pcre_compile(const char *pattern, int options,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- pcre *pcre_compile2(const char *pattern, int options,
- int *errorcodeptr,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
-
- Either of the functions pcre_compile() or pcre_compile2() can be called
- to compile a pattern into an internal form. The only difference between
- the two interfaces is that pcre_compile2() has an additional argument,
- errorcodeptr, via which a numerical error code can be returned. To
- avoid too much repetition, we refer just to pcre_compile() below, but
- the information applies equally to pcre_compile2().
-
- The pattern is a C string terminated by a binary zero, and is passed in
- the pattern argument. A pointer to a single block of memory that is
- obtained via pcre_malloc is returned. This contains the compiled code
- and related data. The pcre type is defined for the returned block; this
- is a typedef for a structure whose contents are not externally defined.
- It is up to the caller to free the memory (via pcre_free) when it is no
- longer required.
-
- Although the compiled code of a PCRE regex is relocatable, that is, it
- does not depend on memory location, the complete pcre data block is not
- fully relocatable, because it may contain a copy of the tableptr argu-
- ment, which is an address (see below).
-
- The options argument contains various bit settings that affect the com-
- pilation. It should be zero if no options are required. The available
- options are described below. Some of them (in particular, those that
- are compatible with Perl, but some others as well) can also be set and
- unset from within the pattern (see the detailed description in the
- pcrepattern documentation). For those options that can be different in
- different parts of the pattern, the contents of the options argument
- specifies their settings at the start of compilation and execution. The
- PCRE_ANCHORED, PCRE_BSR_xxx, PCRE_NEWLINE_xxx, PCRE_NO_UTF8_CHECK, and
- PCRE_NO_START_OPT options can be set at the time of matching as well as
- at compile time.
-
- If errptr is NULL, pcre_compile() returns NULL immediately. Otherwise,
- if compilation of a pattern fails, pcre_compile() returns NULL, and
- sets the variable pointed to by errptr to point to a textual error mes-
- sage. This is a static string that is part of the library. You must not
- try to free it. Normally, the offset from the start of the pattern to
- the byte that was being processed when the error was discovered is
- placed in the variable pointed to by erroffset, which must not be NULL
- (if it is, an immediate error is given). However, for an invalid UTF-8
- string, the offset is that of the first byte of the failing character.
-
- Some errors are not detected until the whole pattern has been scanned;
- in these cases, the offset passed back is the length of the pattern.
- Note that the offset is in bytes, not characters, even in UTF-8 mode.
- It may sometimes point into the middle of a UTF-8 character.
-
- If pcre_compile2() is used instead of pcre_compile(), and the error-
- codeptr argument is not NULL, a non-zero error code number is returned
- via this argument in the event of an error. This is in addition to the
- textual error message. Error codes and messages are listed below.
-
- If the final argument, tableptr, is NULL, PCRE uses a default set of
- character tables that are built when PCRE is compiled, using the
- default C locale. Otherwise, tableptr must be an address that is the
- result of a call to pcre_maketables(). This value is stored with the
- compiled pattern, and used again by pcre_exec(), unless another table
- pointer is passed to it. For more discussion, see the section on locale
- support below.
-
- This code fragment shows a typical straightforward call to pcre_com-
- pile():
-
- pcre *re;
- const char *error;
- int erroffset;
- re = pcre_compile(
- "^A.*Z", /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-
- The following names for option bits are defined in the pcre.h header
- file:
-
- PCRE_ANCHORED
-
- If this bit is set, the pattern is forced to be "anchored", that is, it
- is constrained to match only at the first matching point in the string
- that is being searched (the "subject string"). This effect can also be
- achieved by appropriate constructs in the pattern itself, which is the
- only way to do it in Perl.
-
- PCRE_AUTO_CALLOUT
-
- If this bit is set, pcre_compile() automatically inserts callout items,
- all with number 255, before each pattern item. For discussion of the
- callout facility, see the pcrecallout documentation.
-
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-
- These options (which are mutually exclusive) control what the \R escape
- sequence matches. The choice is either to match only CR, LF, or CRLF,
- or to match any Unicode newline sequence. The default is specified when
- PCRE is built. It can be overridden from within the pattern, or by set-
- ting an option when a compiled pattern is matched.
-
- PCRE_CASELESS
-
- If this bit is set, letters in the pattern match both upper and lower
- case letters. It is equivalent to Perl's /i option, and it can be
- changed within a pattern by a (?i) option setting. In UTF-8 mode, PCRE
- always understands the concept of case for characters whose values are
- less than 128, so caseless matching is always possible. For characters
- with higher values, the concept of case is supported if PCRE is com-
- piled with Unicode property support, but not otherwise. If you want to
- use caseless matching for characters 128 and above, you must ensure
- that PCRE is compiled with Unicode property support as well as with
- UTF-8 support.
-
- PCRE_DOLLAR_ENDONLY
-
- If this bit is set, a dollar metacharacter in the pattern matches only
- at the end of the subject string. Without this option, a dollar also
- matches immediately before a newline at the end of the string (but not
- before any other newlines). The PCRE_DOLLAR_ENDONLY option is ignored
- if PCRE_MULTILINE is set. There is no equivalent to this option in
- Perl, and no way to set it within a pattern.
-
- PCRE_DOTALL
-
- If this bit is set, a dot metacharacter in the pattern matches a char-
- acter of any value, including one that indicates a newline. However, it
- only ever matches one character, even if newlines are coded as CRLF.
- Without this option, a dot does not match when the current position is
- at a newline. This option is equivalent to Perl's /s option, and it can
- be changed within a pattern by a (?s) option setting. A negative class
- such as [^a] always matches newline characters, independent of the set-
- ting of this option.
-
- PCRE_DUPNAMES
-
- If this bit is set, names used to identify capturing subpatterns need
- not be unique. This can be helpful for certain types of pattern when it
- is known that only one instance of the named subpattern can ever be
- matched. There are more details of named subpatterns below; see also
- the pcrepattern documentation.
-
- PCRE_EXTENDED
-
- If this bit is set, whitespace data characters in the pattern are
- totally ignored except when escaped or inside a character class. White-
- space does not include the VT character (code 11). In addition, charac-
- ters between an unescaped # outside a character class and the next new-
- line, inclusive, are also ignored. This is equivalent to Perl's /x
- option, and it can be changed within a pattern by a (?x) option set-
- ting.
-
- Which characters are interpreted as newlines is controlled by the
- options passed to pcre_compile() or by a special sequence at the start
- of the pattern, as described in the section entitled "Newline conven-
- tions" in the pcrepattern documentation. Note that the end of this type
- of comment is a literal newline sequence in the pattern; escape
- sequences that happen to represent a newline do not count.
-
- This option makes it possible to include comments inside complicated
- patterns. Note, however, that this applies only to data characters.
- Whitespace characters may never appear within special character
- sequences in a pattern, for example within the sequence (?( that intro-
- duces a conditional subpattern.
-
- PCRE_EXTRA
-
- This option was invented in order to turn on additional functionality
- of PCRE that is incompatible with Perl, but it is currently of very
- little use. When set, any backslash in a pattern that is followed by a
- letter that has no special meaning causes an error, thus reserving
- these combinations for future expansion. By default, as in Perl, a
- backslash followed by a letter with no special meaning is treated as a
- literal. (Perl can, however, be persuaded to give an error for this, by
- running it with the -w option.) There are at present no other features
- controlled by this option. It can also be set by a (?X) option setting
- within a pattern.
-
- PCRE_FIRSTLINE
-
- If this option is set, an unanchored pattern is required to match
- before or at the first newline in the subject string, though the
- matched text may continue over the newline.
-
- PCRE_JAVASCRIPT_COMPAT
-
- If this option is set, PCRE's behaviour is changed in some ways so that
- it is compatible with JavaScript rather than Perl. The changes are as
- follows:
-
- (1) A lone closing square bracket in a pattern causes a compile-time
- error, because this is illegal in JavaScript (by default it is treated
- as a data character). Thus, the pattern AB]CD becomes illegal when this
- option is set.
-
- (2) At run time, a back reference to an unset subpattern group matches
- an empty string (by default this causes the current matching alterna-
- tive to fail). A pattern such as (\1)(a) succeeds when this option is
- set (assuming it can find an "a" in the subject), whereas it fails by
- default, for Perl compatibility.
-
- (3) \U matches an upper case "U" character; by default \U causes a com-
- pile time error (Perl uses \U to upper case subsequent characters).
-
- (4) \u matches a lower case "u" character unless it is followed by four
- hexadecimal digits, in which case the hexadecimal number defines the
- code point to match. By default, \u causes a compile time error (Perl
- uses it to upper case the following character).
-
- (5) \x matches a lower case "x" character unless it is followed by two
- hexadecimal digits, in which case the hexadecimal number defines the
- code point to match. By default, as in Perl, a hexadecimal number is
- always expected after \x, but it may have zero, one, or two digits (so,
- for example, \xz matches a binary zero character followed by z).
-
- PCRE_MULTILINE
-
- By default, PCRE treats the subject string as consisting of a single
- line of characters (even if it actually contains newlines). The "start
- of line" metacharacter (^) matches only at the start of the string,
- while the "end of line" metacharacter ($) matches only at the end of
- the string, or before a terminating newline (unless PCRE_DOLLAR_ENDONLY
- is set). This is the same as Perl.
-
- When PCRE_MULTILINE it is set, the "start of line" and "end of line"
- constructs match immediately following or immediately before internal
- newlines in the subject string, respectively, as well as at the very
- start and end. This is equivalent to Perl's /m option, and it can be
- changed within a pattern by a (?m) option setting. If there are no new-
- lines in a subject string, or no occurrences of ^ or $ in a pattern,
- setting PCRE_MULTILINE has no effect.
-
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-
- These options override the default newline definition that was chosen
- when PCRE was built. Setting the first or the second specifies that a
- newline is indicated by a single character (CR or LF, respectively).
- Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the
- two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies
- that any of the three preceding sequences should be recognized. Setting
- PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be
- recognized. The Unicode newline sequences are the three just mentioned,
- plus the single characters VT (vertical tab, U+000B), FF (formfeed,
- U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
- (paragraph separator, U+2029). For the 8-bit library, the last two are
- recognized only in UTF-8 mode.
-
- The newline setting in the options word uses three bits that are
- treated as a number, giving eight possibilities. Currently only six are
- used (default plus the five values above). This means that if you set
- more than one newline option, the combination may or may not be sensi-
- ble. For example, PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to
- PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and
- cause an error.
-
- The only time that a line break in a pattern is specially recognized
- when compiling is when PCRE_EXTENDED is set. CR and LF are whitespace
- characters, and so are ignored in this mode. Also, an unescaped # out-
- side a character class indicates a comment that lasts until after the
- next line break sequence. In other circumstances, line break sequences
- in patterns are treated as literal data.
-
- The newline option that is set at compile time becomes the default that
- is used for pcre_exec() and pcre_dfa_exec(), but it can be overridden.
-
- PCRE_NO_AUTO_CAPTURE
-
- If this option is set, it disables the use of numbered capturing paren-
- theses in the pattern. Any opening parenthesis that is not followed by
- ? behaves as if it were followed by ?: but named parentheses can still
- be used for capturing (and they acquire numbers in the usual way).
- There is no equivalent of this option in Perl.
-
- NO_START_OPTIMIZE
-
- This is an option that acts at matching time; that is, it is really an
- option for pcre_exec() or pcre_dfa_exec(). If it is set at compile
- time, it is remembered with the compiled pattern and assumed at match-
- ing time. For details see the discussion of PCRE_NO_START_OPTIMIZE
- below.
-
- PCRE_UCP
-
- This option changes the way PCRE processes \B, \b, \D, \d, \S, \s, \W,
- \w, and some of the POSIX character classes. By default, only ASCII
- characters are recognized, but if PCRE_UCP is set, Unicode properties
- are used instead to classify characters. More details are given in the
- section on generic character types in the pcrepattern page. If you set
- PCRE_UCP, matching one of the items it affects takes much longer. The
- option is available only if PCRE has been compiled with Unicode prop-
- erty support.
-
- PCRE_UNGREEDY
-
- This option inverts the "greediness" of the quantifiers so that they
- are not greedy by default, but become greedy if followed by "?". It is
- not compatible with Perl. It can also be set by a (?U) option setting
- within the pattern.
-
- PCRE_UTF8
-
- This option causes PCRE to regard both the pattern and the subject as
- strings of UTF-8 characters instead of single-byte strings. However, it
- is available only when PCRE is built to include UTF support. If not,
- the use of this option provokes an error. Details of how this option
- changes the behaviour of PCRE are given in the pcreunicode page.
-
- PCRE_NO_UTF8_CHECK
-
- When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is
- automatically checked. There is a discussion about the validity of
- UTF-8 strings in the pcreunicode page. If an invalid UTF-8 sequence is
- found, pcre_compile() returns an error. If you already know that your
- pattern is valid, and you want to skip this check for performance rea-
- sons, you can set the PCRE_NO_UTF8_CHECK option. When it is set, the
- effect of passing an invalid UTF-8 string as a pattern is undefined. It
- may cause your program to crash. Note that this option can also be
- passed to pcre_exec() and pcre_dfa_exec(), to suppress the validity
- checking of subject strings.
-
-
-COMPILATION ERROR CODES
-
- The following table lists the error codes than may be returned by
- pcre_compile2(), along with the error messages that may be returned by
- both compiling functions. Note that error messages are always 8-bit
- ASCII strings, even in 16-bit mode. As PCRE has developed, some error
- codes have fallen out of use. To avoid confusion, they have not been
- re-used.
-
- 0 no error
- 1 \ at end of pattern
- 2 \c at end of pattern
- 3 unrecognized character follows \
- 4 numbers out of order in {} quantifier
- 5 number too big in {} quantifier
- 6 missing terminating ] for character class
- 7 invalid escape sequence in character class
- 8 range out of order in character class
- 9 nothing to repeat
- 10 [this code is not in use]
- 11 internal error: unexpected repeat
- 12 unrecognized character after (? or (?-
- 13 POSIX named classes are supported only within a class
- 14 missing )
- 15 reference to non-existent subpattern
- 16 erroffset passed as NULL
- 17 unknown option bit(s) set
- 18 missing ) after comment
- 19 [this code is not in use]
- 20 regular expression is too large
- 21 failed to get memory
- 22 unmatched parentheses
- 23 internal error: code overflow
- 24 unrecognized character after (?<
- 25 lookbehind assertion is not fixed length
- 26 malformed number or name after (?(
- 27 conditional group contains more than two branches
- 28 assertion expected after (?(
- 29 (?R or (?[+-]digits must be followed by )
- 30 unknown POSIX class name
- 31 POSIX collating elements are not supported
- 32 this version of PCRE is compiled without UTF support
- 33 [this code is not in use]
- 34 character value in \x{...} sequence is too large
- 35 invalid condition (?(0)
- 36 \C not allowed in lookbehind assertion
- 37 PCRE does not support \L, \l, \N{name}, \U, or \u
- 38 number after (?C is > 255
- 39 closing ) for (?C expected
- 40 recursive call could loop indefinitely
- 41 unrecognized character after (?P
- 42 syntax error in subpattern name (missing terminator)
- 43 two named subpatterns have the same name
- 44 invalid UTF-8 string (specifically UTF-8)
- 45 support for \P, \p, and \X has not been compiled
- 46 malformed \P or \p sequence
- 47 unknown property name after \P or \p
- 48 subpattern name is too long (maximum 32 characters)
- 49 too many named subpatterns (maximum 10000)
- 50 [this code is not in use]
- 51 octal value is greater than \377 in 8-bit non-UTF-8 mode
- 52 internal error: overran compiling workspace
- 53 internal error: previously-checked referenced subpattern
- not found
- 54 DEFINE group contains more than one branch
- 55 repeating a DEFINE group is not allowed
- 56 inconsistent NEWLINE options
- 57 \g is not followed by a braced, angle-bracketed, or quoted
- name/number or by a plain number
- 58 a numbered reference must not be zero
- 59 an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)
- 60 (*VERB) not recognized
- 61 number is too big
- 62 subpattern name expected
- 63 digit expected after (?+
- 64 ] is an invalid data character in JavaScript compatibility mode
- 65 different names for subpatterns of the same number are
- not allowed
- 66 (*MARK) must have an argument
- 67 this version of PCRE is not compiled with Unicode property
- support
- 68 \c must be followed by an ASCII character
- 69 \k is not followed by a braced, angle-bracketed, or quoted name
- 70 internal error: unknown opcode in find_fixedlength()
- 71 \N is not supported in a class
- 72 too many forward references
- 73 disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
- 74 invalid UTF-16 string (specifically UTF-16)
-
- The numbers 32 and 10000 in errors 48 and 49 are defaults; different
- values may be used if the limits were changed when PCRE was built.
-
-
-STUDYING A PATTERN
-
- pcre_extra *pcre_study(const pcre *code, int options
- const char **errptr);
-
- If a compiled pattern is going to be used several times, it is worth
- spending more time analyzing it in order to speed up the time taken for
- matching. The function pcre_study() takes a pointer to a compiled pat-
- tern as its first argument. If studying the pattern produces additional
- information that will help speed up matching, pcre_study() returns a
- pointer to a pcre_extra block, in which the study_data field points to
- the results of the study.
-
- The returned value from pcre_study() can be passed directly to
- pcre_exec() or pcre_dfa_exec(). However, a pcre_extra block also con-
- tains other fields that can be set by the caller before the block is
- passed; these are described below in the section on matching a pattern.
-
- If studying the pattern does not produce any useful information,
- pcre_study() returns NULL. In that circumstance, if the calling program
- wants to pass any of the other fields to pcre_exec() or
- pcre_dfa_exec(), it must set up its own pcre_extra block.
-
- The second argument of pcre_study() contains option bits. There is only
- one option: PCRE_STUDY_JIT_COMPILE. If this is set, and the just-in-
- time compiler is available, the pattern is further compiled into
- machine code that executes much faster than the pcre_exec() matching
- function. If the just-in-time compiler is not available, this option is
- ignored. All other bits in the options argument must be zero.
-
- JIT compilation is a heavyweight optimization. It can take some time
- for patterns to be analyzed, and for one-off matches and simple pat-
- terns the benefit of faster execution might be offset by a much slower
- study time. Not all patterns can be optimized by the JIT compiler. For
- those that cannot be handled, matching automatically falls back to the
- pcre_exec() interpreter. For more details, see the pcrejit documenta-
- tion.
-
- The third argument for pcre_study() is a pointer for an error message.
- If studying succeeds (even if no data is returned), the variable it
- points to is set to NULL. Otherwise it is set to point to a textual
- error message. This is a static string that is part of the library. You
- must not try to free it. You should test the error pointer for NULL
- after calling pcre_study(), to be sure that it has run successfully.
-
- When you are finished with a pattern, you can free the memory used for
- the study data by calling pcre_free_study(). This function was added to
- the API for release 8.20. For earlier versions, the memory could be
- freed with pcre_free(), just like the pattern itself. This will still
- work in cases where PCRE_STUDY_JIT_COMPILE is not used, but it is
- advisable to change to the new function when convenient.
-
- This is a typical way in which pcre_study() is used (except that in a
- real application there should be tests for errors):
-
- int rc;
- pcre *re;
- pcre_extra *sd;
- re = pcre_compile("pattern", 0, &error, &erroroffset, NULL);
- sd = pcre_study(
- re, /* result of pcre_compile() */
- 0, /* no options */
- &error); /* set to NULL or points to a message */
- rc = pcre_exec( /* see below for details of pcre_exec() options */
- re, sd, "subject", 7, 0, 0, ovector, 30);
- ...
- pcre_free_study(sd);
- pcre_free(re);
-
- Studying a pattern does two things: first, a lower bound for the length
- of subject string that is needed to match the pattern is computed. This
- does not mean that there are any strings of that length that match, but
- it does guarantee that no shorter strings match. The value is used by
- pcre_exec() and pcre_dfa_exec() to avoid wasting time by trying to
- match strings that are shorter than the lower bound. You can find out
- the value in a calling program via the pcre_fullinfo() function.
-
- Studying a pattern is also useful for non-anchored patterns that do not
- have a single fixed starting character. A bitmap of possible starting
- bytes is created. This speeds up finding a position in the subject at
- which to start matching. (In 16-bit mode, the bitmap is used for 16-bit
- values less than 256.)
-
- These two optimizations apply to both pcre_exec() and pcre_dfa_exec().
- However, they are not used by pcre_exec() if pcre_study() is called
- with the PCRE_STUDY_JIT_COMPILE option, and just-in-time compiling is
- successful. The optimizations can be disabled by setting the
- PCRE_NO_START_OPTIMIZE option when calling pcre_exec() or
- pcre_dfa_exec(). You might want to do this if your pattern contains
- callouts or (*MARK) (which cannot be handled by the JIT compiler), and
- you want to make use of these facilities in cases where matching fails.
- See the discussion of PCRE_NO_START_OPTIMIZE below.
-
-
-LOCALE SUPPORT
-
- PCRE handles caseless matching, and determines whether characters are
- letters, digits, or whatever, by reference to a set of tables, indexed
- by character value. When running in UTF-8 mode, this applies only to
- characters with codes less than 128. By default, higher-valued codes
- never match escapes such as \w or \d, but they can be tested with \p if
- PCRE is built with Unicode character property support. Alternatively,
- the PCRE_UCP option can be set at compile time; this causes \w and
- friends to use Unicode property support instead of built-in tables. The
- use of locales with Unicode is discouraged. If you are handling charac-
- ters with codes greater than 128, you should either use UTF-8 and Uni-
- code, or use locales, but not try to mix the two.
-
- PCRE contains an internal set of tables that are used when the final
- argument of pcre_compile() is NULL. These are sufficient for many
- applications. Normally, the internal tables recognize only ASCII char-
- acters. However, when PCRE is built, it is possible to cause the inter-
- nal tables to be rebuilt in the default "C" locale of the local system,
- which may cause them to be different.
-
- The internal tables can always be overridden by tables supplied by the
- application that calls PCRE. These may be created in a different locale
- from the default. As more and more applications change to using Uni-
- code, the need for this locale support is expected to die away.
-
- External tables are built by calling the pcre_maketables() function,
- which has no arguments, in the relevant locale. The result can then be
- passed to pcre_compile() or pcre_exec() as often as necessary. For
- example, to build and use tables that are appropriate for the French
- locale (where accented characters with values greater than 128 are
- treated as letters), the following code could be used:
-
- setlocale(LC_CTYPE, "fr_FR");
- tables = pcre_maketables();
- re = pcre_compile(..., tables);
-
- The locale name "fr_FR" is used on Linux and other Unix-like systems;
- if you are using Windows, the name for the French locale is "french".
-
- When pcre_maketables() runs, the tables are built in memory that is
- obtained via pcre_malloc. It is the caller's responsibility to ensure
- that the memory containing the tables remains available for as long as
- it is needed.
-
- The pointer that is passed to pcre_compile() is saved with the compiled
- pattern, and the same tables are used via this pointer by pcre_study()
- and normally also by pcre_exec(). Thus, by default, for any single pat-
- tern, compilation, studying and matching all happen in the same locale,
- but different patterns can be compiled in different locales.
-
- It is possible to pass a table pointer or NULL (indicating the use of
- the internal tables) to pcre_exec(). Although not intended for this
- purpose, this facility could be used to match a pattern in a different
- locale from the one in which it was compiled. Passing table pointers at
- run time is discussed below in the section on matching a pattern.
-
-
-INFORMATION ABOUT A PATTERN
-
- int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
- int what, void *where);
-
- The pcre_fullinfo() function returns information about a compiled pat-
- tern. It replaces the pcre_info() function, which was removed from the
- library at version 8.30, after more than 10 years of obsolescence.
-
- The first argument for pcre_fullinfo() is a pointer to the compiled
- pattern. The second argument is the result of pcre_study(), or NULL if
- the pattern was not studied. The third argument specifies which piece
- of information is required, and the fourth argument is a pointer to a
- variable to receive the data. The yield of the function is zero for
- success, or one of the following negative numbers:
-
- PCRE_ERROR_NULL the argument code was NULL
- the argument where was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADENDIANNESS the pattern was compiled with different
- endianness
- PCRE_ERROR_BADOPTION the value of what was invalid
-
- The "magic number" is placed at the start of each compiled pattern as
- an simple check against passing an arbitrary memory pointer. The endi-
- anness error can occur if a compiled pattern is saved and reloaded on a
- different host. Here is a typical call of pcre_fullinfo(), to obtain
- the length of the compiled pattern:
-
- int rc;
- size_t length;
- rc = pcre_fullinfo(
- re, /* result of pcre_compile() */
- sd, /* result of pcre_study(), or NULL */
- PCRE_INFO_SIZE, /* what is required */
- &length); /* where to put the data */
-
- The possible values for the third argument are defined in pcre.h, and
- are as follows:
-
- PCRE_INFO_BACKREFMAX
-
- Return the number of the highest back reference in the pattern. The
- fourth argument should point to an int variable. Zero is returned if
- there are no back references.
-
- PCRE_INFO_CAPTURECOUNT
-
- Return the number of capturing subpatterns in the pattern. The fourth
- argument should point to an int variable.
-
- PCRE_INFO_DEFAULT_TABLES
-
- Return a pointer to the internal default character tables within PCRE.
- The fourth argument should point to an unsigned char * variable. This
- information call is provided for internal use by the pcre_study() func-
- tion. External callers can cause PCRE to use its internal tables by
- passing a NULL table pointer.
-
- PCRE_INFO_FIRSTBYTE
-
- Return information about the first data unit of any matched string, for
- a non-anchored pattern. (The name of this option refers to the 8-bit
- library, where data units are bytes.) The fourth argument should point
- to an int variable.
-
- If there is a fixed first value, for example, the letter "c" from a
- pattern such as (cat|cow|coyote), its value is returned. In the 8-bit
- library, the value is always less than 256; in the 16-bit library the
- value can be up to 0xffff.
-
- If there is no fixed first value, and if either
-
- (a) the pattern was compiled with the PCRE_MULTILINE option, and every
- branch starts with "^", or
-
- (b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not
- set (if it were set, the pattern would be anchored),
-
- -1 is returned, indicating that the pattern matches only at the start
- of a subject string or after any newline within the string. Otherwise
- -2 is returned. For anchored patterns, -2 is returned.
-
- PCRE_INFO_FIRSTTABLE
-
- If the pattern was studied, and this resulted in the construction of a
- 256-bit table indicating a fixed set of values for the first data unit
- in any matching string, a pointer to the table is returned. Otherwise
- NULL is returned. The fourth argument should point to an unsigned char
- * variable.
-
- PCRE_INFO_HASCRORLF
-
- Return 1 if the pattern contains any explicit matches for CR or LF
- characters, otherwise 0. The fourth argument should point to an int
- variable. An explicit match is either a literal CR or LF character, or
- \r or \n.
-
- PCRE_INFO_JCHANGED
-
- Return 1 if the (?J) or (?-J) option setting is used in the pattern,
- otherwise 0. The fourth argument should point to an int variable. (?J)
- and (?-J) set and unset the local PCRE_DUPNAMES option, respectively.
-
- PCRE_INFO_JIT
-
- Return 1 if the pattern was studied with the PCRE_STUDY_JIT_COMPILE
- option, and just-in-time compiling was successful. The fourth argument
- should point to an int variable. A return value of 0 means that JIT
- support is not available in this version of PCRE, or that the pattern
- was not studied with the PCRE_STUDY_JIT_COMPILE option, or that the JIT
- compiler could not handle this particular pattern. See the pcrejit doc-
- umentation for details of what can and cannot be handled.
-
- PCRE_INFO_JITSIZE
-
- If the pattern was successfully studied with the PCRE_STUDY_JIT_COMPILE
- option, return the size of the JIT compiled code, otherwise return
- zero. The fourth argument should point to a size_t variable.
-
- PCRE_INFO_LASTLITERAL
-
- Return the value of the rightmost literal data unit that must exist in
- any matched string, other than at its start, if such a value has been
- recorded. The fourth argument should point to an int variable. If there
- is no such value, -1 is returned. For anchored patterns, a last literal
- value is recorded only if it follows something of variable length. For
- example, for the pattern /^a\d+z\d+/ the returned value is "z", but for
- /^a\dz\d/ the returned value is -1.
-
- PCRE_INFO_MINLENGTH
-
- If the pattern was studied and a minimum length for matching subject
- strings was computed, its value is returned. Otherwise the returned
- value is -1. The value is a number of characters, which in UTF-8 mode
- may be different from the number of bytes. The fourth argument should
- point to an int variable. A non-negative value is a lower bound to the
- length of any matching string. There may not be any strings of that
- length that do actually match, but every string that does match is at
- least that long.
-
- PCRE_INFO_NAMECOUNT
- PCRE_INFO_NAMEENTRYSIZE
- PCRE_INFO_NAMETABLE
-
- PCRE supports the use of named as well as numbered capturing parenthe-
- ses. The names are just an additional way of identifying the parenthe-
- ses, which still acquire numbers. Several convenience functions such as
- pcre_get_named_substring() are provided for extracting captured sub-
- strings by name. It is also possible to extract the data directly, by
- first converting the name to a number in order to access the correct
- pointers in the output vector (described with pcre_exec() below). To do
- the conversion, you need to use the name-to-number map, which is
- described by these three values.
-
- The map consists of a number of fixed-size entries. PCRE_INFO_NAMECOUNT
- gives the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size
- of each entry; both of these return an int value. The entry size
- depends on the length of the longest name. PCRE_INFO_NAMETABLE returns
- a pointer to the first entry of the table. This is a pointer to char in
- the 8-bit library, where the first two bytes of each entry are the num-
- ber of the capturing parenthesis, most significant byte first. In the
- 16-bit library, the pointer points to 16-bit data units, the first of
- which contains the parenthesis number. The rest of the entry is the
- corresponding name, zero terminated.
-
- The names are in alphabetical order. Duplicate names may appear if (?|
- is used to create multiple groups with the same number, as described in
- the section on duplicate subpattern numbers in the pcrepattern page.
- Duplicate names for subpatterns with different numbers are permitted
- only if PCRE_DUPNAMES is set. In all cases of duplicate names, they
- appear in the table in the order in which they were found in the pat-
- tern. In the absence of (?| this is the order of increasing number;
- when (?| is used this is not necessarily the case because later subpat-
- terns may have lower numbers.
-
- As a simple example of the name/number table, consider the following
- pattern after compilation by the 8-bit library (assume PCRE_EXTENDED is
- set, so white space - including newlines - is ignored):
-
- (?<date> (?<year>(\d\d)?\d\d) -
- (?<month>\d\d) - (?<day>\d\d) )
-
- There are four named subpatterns, so the table has four entries, and
- each entry in the table is eight bytes long. The table is as follows,
- with non-printing bytes shows in hexadecimal, and undefined bytes shown
- as ??:
-
- 00 01 d a t e 00 ??
- 00 05 d a y 00 ?? ??
- 00 04 m o n t h 00
- 00 02 y e a r 00 ??
-
- When writing code to extract data from named subpatterns using the
- name-to-number map, remember that the length of the entries is likely
- to be different for each compiled pattern.
-
- PCRE_INFO_OKPARTIAL
-
- Return 1 if the pattern can be used for partial matching with
- pcre_exec(), otherwise 0. The fourth argument should point to an int
- variable. From release 8.00, this always returns 1, because the
- restrictions that previously applied to partial matching have been
- lifted. The pcrepartial documentation gives details of partial match-
- ing.
-
- PCRE_INFO_OPTIONS
-
- Return a copy of the options with which the pattern was compiled. The
- fourth argument should point to an unsigned long int variable. These
- option bits are those specified in the call to pcre_compile(), modified
- by any top-level option settings at the start of the pattern itself. In
- other words, they are the options that will be in force when matching
- starts. For example, if the pattern /(?im)abc(?-i)d/ is compiled with
- the PCRE_EXTENDED option, the result is PCRE_CASELESS, PCRE_MULTILINE,
- and PCRE_EXTENDED.
-
- A pattern is automatically anchored by PCRE if all of its top-level
- alternatives begin with one of the following:
-
- ^ unless PCRE_MULTILINE is set
- \A always
- \G always
- .* if PCRE_DOTALL is set and there are no back
- references to the subpattern in which .* appears
-
- For such patterns, the PCRE_ANCHORED bit is set in the options returned
- by pcre_fullinfo().
-
- PCRE_INFO_SIZE
-
- Return the size of the compiled pattern in bytes (for both libraries).
- The fourth argument should point to a size_t variable. This value does
- not include the size of the pcre structure that is returned by
- pcre_compile(). The value that is passed as the argument to pcre_mal-
- loc() when pcre_compile() is getting memory in which to place the com-
- piled data is the value returned by this option plus the size of the
- pcre structure. Studying a compiled pattern, with or without JIT, does
- not alter the value returned by this option.
-
- PCRE_INFO_STUDYSIZE
-
- Return the size in bytes of the data block pointed to by the study_data
- field in a pcre_extra block. If pcre_extra is NULL, or there is no
- study data, zero is returned. The fourth argument should point to a
- size_t variable. The study_data field is set by pcre_study() to record
- information that will speed up matching (see the section entitled
- "Studying a pattern" above). The format of the study_data block is pri-
- vate, but its length is made available via this option so that it can
- be saved and restored (see the pcreprecompile documentation for
- details).
-
-
-REFERENCE COUNTS
-
- int pcre_refcount(pcre *code, int adjust);
-
- The pcre_refcount() function is used to maintain a reference count in
- the data block that contains a compiled pattern. It is provided for the
- benefit of applications that operate in an object-oriented manner,
- where different parts of the application may be using the same compiled
- pattern, but you want to free the block when they are all done.
-
- When a pattern is compiled, the reference count field is initialized to
- zero. It is changed only by calling this function, whose action is to
- add the adjust value (which may be positive or negative) to it. The
- yield of the function is the new value. However, the value of the count
- is constrained to lie between 0 and 65535, inclusive. If the new value
- is outside these limits, it is forced to the appropriate limit value.
-
- Except when it is zero, the reference count is not correctly preserved
- if a pattern is compiled on one host and then transferred to a host
- whose byte-order is different. (This seems a highly unlikely scenario.)
-
-
-MATCHING A PATTERN: THE TRADITIONAL FUNCTION
-
- int pcre_exec(const pcre *code, const pcre_extra *extra,
- const char *subject, int length, int startoffset,
- int options, int *ovector, int ovecsize);
-
- The function pcre_exec() is called to match a subject string against a
- compiled pattern, which is passed in the code argument. If the pattern
- was studied, the result of the study should be passed in the extra
- argument. You can call pcre_exec() with the same code and extra argu-
- ments as many times as you like, in order to match different subject
- strings with the same pattern.
-
- This function is the main matching facility of the library, and it
- operates in a Perl-like manner. For specialist use there is also an
- alternative matching function, which is described below in the section
- about the pcre_dfa_exec() function.
-
- In most applications, the pattern will have been compiled (and option-
- ally studied) in the same process that calls pcre_exec(). However, it
- is possible to save compiled patterns and study data, and then use them
- later in different processes, possibly even on different hosts. For a
- discussion about this, see the pcreprecompile documentation.
-
- Here is an example of a simple call to pcre_exec():
-
- int rc;
- int ovector[30];
- rc = pcre_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 30); /* number of elements (NOT size in bytes) */
-
- Extra data for pcre_exec()
-
- If the extra argument is not NULL, it must point to a pcre_extra data
- block. The pcre_study() function returns such a block (when it doesn't
- return NULL), but you can also create one for yourself, and pass addi-
- tional information in it. The pcre_extra block contains the following
- fields (not necessarily in this order):
-
- unsigned long int flags;
- void *study_data;
- void *executable_jit;
- unsigned long int match_limit;
- unsigned long int match_limit_recursion;
- void *callout_data;
- const unsigned char *tables;
- unsigned char **mark;
-
- In the 16-bit version of this structure, the mark field has type
- "PCRE_UCHAR16 **".
-
- The flags field is a bitmap that specifies which of the other fields
- are set. The flag bits are:
-
- PCRE_EXTRA_STUDY_DATA
- PCRE_EXTRA_EXECUTABLE_JIT
- PCRE_EXTRA_MATCH_LIMIT
- PCRE_EXTRA_MATCH_LIMIT_RECURSION
- PCRE_EXTRA_CALLOUT_DATA
- PCRE_EXTRA_TABLES
- PCRE_EXTRA_MARK
-
- Other flag bits should be set to zero. The study_data field and some-
- times the executable_jit field are set in the pcre_extra block that is
- returned by pcre_study(), together with the appropriate flag bits. You
- should not set these yourself, but you may add to the block by setting
- the other fields and their corresponding flag bits.
-
- The match_limit field provides a means of preventing PCRE from using up
- a vast amount of resources when running patterns that are not going to
- match, but which have a very large number of possibilities in their
- search trees. The classic example is a pattern that uses nested unlim-
- ited repeats.
-
- Internally, pcre_exec() uses a function called match(), which it calls
- repeatedly (sometimes recursively). The limit set by match_limit is
- imposed on the number of times this function is called during a match,
- which has the effect of limiting the amount of backtracking that can
- take place. For patterns that are not anchored, the count restarts from
- zero for each position in the subject string.
-
- When pcre_exec() is called with a pattern that was successfully studied
- with the PCRE_STUDY_JIT_COMPILE option, the way that the matching is
- executed is entirely different. However, there is still the possibility
- of runaway matching that goes on for a very long time, and so the
- match_limit value is also used in this case (but in a different way) to
- limit how long the matching can continue.
-
- The default value for the limit can be set when PCRE is built; the
- default default is 10 million, which handles all but the most extreme
- cases. You can override the default by suppling pcre_exec() with a
- pcre_extra block in which match_limit is set, and
- PCRE_EXTRA_MATCH_LIMIT is set in the flags field. If the limit is
- exceeded, pcre_exec() returns PCRE_ERROR_MATCHLIMIT.
-
- The match_limit_recursion field is similar to match_limit, but instead
- of limiting the total number of times that match() is called, it limits
- the depth of recursion. The recursion depth is a smaller number than
- the total number of calls, because not all calls to match() are recur-
- sive. This limit is of use only if it is set smaller than match_limit.
-
- Limiting the recursion depth limits the amount of machine stack that
- can be used, or, when PCRE has been compiled to use memory on the heap
- instead of the stack, the amount of heap memory that can be used. This
- limit is not relevant, and is ignored, if the pattern was successfully
- studied with PCRE_STUDY_JIT_COMPILE.
-
- The default value for match_limit_recursion can be set when PCRE is
- built; the default default is the same value as the default for
- match_limit. You can override the default by suppling pcre_exec() with
- a pcre_extra block in which match_limit_recursion is set, and
- PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the flags field. If the
- limit is exceeded, pcre_exec() returns PCRE_ERROR_RECURSIONLIMIT.
-
- The callout_data field is used in conjunction with the "callout" fea-
- ture, and is described in the pcrecallout documentation.
-
- The tables field is used to pass a character tables pointer to
- pcre_exec(); this overrides the value that is stored with the compiled
- pattern. A non-NULL value is stored with the compiled pattern only if
- custom tables were supplied to pcre_compile() via its tableptr argu-
- ment. If NULL is passed to pcre_exec() using this mechanism, it forces
- PCRE's internal tables to be used. This facility is helpful when re-
- using patterns that have been saved after compiling with an external
- set of tables, because the external tables might be at a different
- address when pcre_exec() is called. See the pcreprecompile documenta-
- tion for a discussion of saving compiled patterns for later use.
-
- If PCRE_EXTRA_MARK is set in the flags field, the mark field must be
- set to point to a suitable variable. If the pattern contains any back-
- tracking control verbs such as (*MARK:NAME), and the execution ends up
- with a name to pass back, a pointer to the name string (zero termi-
- nated) is placed in the variable pointed to by the mark field. The
- names are within the compiled pattern; if you wish to retain such a
- name you must copy it before freeing the memory of a compiled pattern.
- If there is no name to pass back, the variable pointed to by the mark
- field is set to NULL. For details of the backtracking control verbs,
- see the section entitled "Backtracking control" in the pcrepattern doc-
- umentation.
-
- Option bits for pcre_exec()
-
- The unused bits of the options argument for pcre_exec() must be zero.
- The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_xxx,
- PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
- PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_SOFT, and
- PCRE_PARTIAL_HARD.
-
- If the pattern was successfully studied with the PCRE_STUDY_JIT_COMPILE
- option, the only supported options for JIT execution are
- PCRE_NO_UTF8_CHECK, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and
- PCRE_NOTEMPTY_ATSTART. Note in particular that partial matching is not
- supported. If an unsupported option is used, JIT execution is disabled
- and the normal interpretive code in pcre_exec() is run.
-
- PCRE_ANCHORED
-
- The PCRE_ANCHORED option limits pcre_exec() to matching at the first
- matching position. If a pattern was compiled with PCRE_ANCHORED, or
- turned out to be anchored by virtue of its contents, it cannot be made
- unachored at matching time.
-
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-
- These options (which are mutually exclusive) control what the \R escape
- sequence matches. The choice is either to match only CR, LF, or CRLF,
- or to match any Unicode newline sequence. These options override the
- choice that was made or defaulted when the pattern was compiled.
-
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-
- These options override the newline definition that was chosen or
- defaulted when the pattern was compiled. For details, see the descrip-
- tion of pcre_compile() above. During matching, the newline choice
- affects the behaviour of the dot, circumflex, and dollar metacharac-
- ters. It may also alter the way the match position is advanced after a
- match failure for an unanchored pattern.
-
- When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is
- set, and a match attempt for an unanchored pattern fails when the cur-
- rent position is at a CRLF sequence, and the pattern contains no
- explicit matches for CR or LF characters, the match position is
- advanced by two characters instead of one, in other words, to after the
- CRLF.
-
- The above rule is a compromise that makes the most common cases work as
- expected. For example, if the pattern is .+A (and the PCRE_DOTALL
- option is not set), it does not match the string "\r\nA" because, after
- failing at the start, it skips both the CR and the LF before retrying.
- However, the pattern [\r\n]A does match that string, because it con-
- tains an explicit CR or LF reference, and so advances only by one char-
- acter after the first failure.
-
- An explicit match for CR of LF is either a literal appearance of one of
- those characters, or one of the \r or \n escape sequences. Implicit
- matches such as [^X] do not count, nor does \s (which includes CR and
- LF in the characters that it matches).
-
- Notwithstanding the above, anomalous effects may still occur when CRLF
- is a valid newline sequence and explicit \r or \n escapes appear in the
- pattern.
-
- PCRE_NOTBOL
-
- This option specifies that first character of the subject string is not
- the beginning of a line, so the circumflex metacharacter should not
- match before it. Setting this without PCRE_MULTILINE (at compile time)
- causes circumflex never to match. This option affects only the behav-
- iour of the circumflex metacharacter. It does not affect \A.
-
- PCRE_NOTEOL
-
- This option specifies that the end of the subject string is not the end
- of a line, so the dollar metacharacter should not match it nor (except
- in multiline mode) a newline immediately before it. Setting this with-
- out PCRE_MULTILINE (at compile time) causes dollar never to match. This
- option affects only the behaviour of the dollar metacharacter. It does
- not affect \Z or \z.
-
- PCRE_NOTEMPTY
-
- An empty string is not considered to be a valid match if this option is
- set. If there are alternatives in the pattern, they are tried. If all
- the alternatives match the empty string, the entire match fails. For
- example, if the pattern
-
- a?b?
-
- is applied to a string not beginning with "a" or "b", it matches an
- empty string at the start of the subject. With PCRE_NOTEMPTY set, this
- match is not valid, so PCRE searches further into the string for occur-
- rences of "a" or "b".
-
- PCRE_NOTEMPTY_ATSTART
-
- This is like PCRE_NOTEMPTY, except that an empty string match that is
- not at the start of the subject is permitted. If the pattern is
- anchored, such a match can occur only if the pattern contains \K.
-
- Perl has no direct equivalent of PCRE_NOTEMPTY or
- PCRE_NOTEMPTY_ATSTART, but it does make a special case of a pattern
- match of the empty string within its split() function, and when using
- the /g modifier. It is possible to emulate Perl's behaviour after
- matching a null string by first trying the match again at the same off-
- set with PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED, and then if that
- fails, by advancing the starting offset (see below) and trying an ordi-
- nary match again. There is some code that demonstrates how to do this
- in the pcredemo sample program. In the most general case, you have to
- check to see if the newline convention recognizes CRLF as a newline,
- and if so, and the current character is CR followed by LF, advance the
- starting offset by two characters instead of one.
-
- PCRE_NO_START_OPTIMIZE
-
- There are a number of optimizations that pcre_exec() uses at the start
- of a match, in order to speed up the process. For example, if it is
- known that an unanchored match must start with a specific character, it
- searches the subject for that character, and fails immediately if it
- cannot find it, without actually running the main matching function.
- This means that a special item such as (*COMMIT) at the start of a pat-
- tern is not considered until after a suitable starting point for the
- match has been found. When callouts or (*MARK) items are in use, these
- "start-up" optimizations can cause them to be skipped if the pattern is
- never actually used. The start-up optimizations are in effect a pre-
- scan of the subject that takes place before the pattern is run.
-
- The PCRE_NO_START_OPTIMIZE option disables the start-up optimizations,
- possibly causing performance to suffer, but ensuring that in cases
- where the result is "no match", the callouts do occur, and that items
- such as (*COMMIT) and (*MARK) are considered at every possible starting
- position in the subject string. If PCRE_NO_START_OPTIMIZE is set at
- compile time, it cannot be unset at matching time.
-
- Setting PCRE_NO_START_OPTIMIZE can change the outcome of a matching
- operation. Consider the pattern
-
- (*COMMIT)ABC
-
- When this is compiled, PCRE records the fact that a match must start
- with the character "A". Suppose the subject string is "DEFABC". The
- start-up optimization scans along the subject, finds "A" and runs the
- first match attempt from there. The (*COMMIT) item means that the pat-
- tern must match the current starting position, which in this case, it
- does. However, if the same match is run with PCRE_NO_START_OPTIMIZE
- set, the initial scan along the subject string does not happen. The
- first match attempt is run starting from "D" and when this fails,
- (*COMMIT) prevents any further matches being tried, so the overall
- result is "no match". If the pattern is studied, more start-up opti-
- mizations may be used. For example, a minimum length for the subject
- may be recorded. Consider the pattern
-
- (*MARK:A)(X|Y)
-
- The minimum length for a match is one character. If the subject is
- "ABC", there will be attempts to match "ABC", "BC", "C", and then
- finally an empty string. If the pattern is studied, the final attempt
- does not take place, because PCRE knows that the subject is too short,
- and so the (*MARK) is never encountered. In this case, studying the
- pattern does not affect the overall match result, which is still "no
- match", but it does affect the auxiliary information that is returned.
-
- PCRE_NO_UTF8_CHECK
-
- When PCRE_UTF8 is set at compile time, the validity of the subject as a
- UTF-8 string is automatically checked when pcre_exec() is subsequently
- called. The value of startoffset is also checked to ensure that it
- points to the start of a UTF-8 character. There is a discussion about
- the validity of UTF-8 strings in the pcreunicode page. If an invalid
- sequence of bytes is found, pcre_exec() returns the error
- PCRE_ERROR_BADUTF8 or, if PCRE_PARTIAL_HARD is set and the problem is a
- truncated character at the end of the subject, PCRE_ERROR_SHORTUTF8. In
- both cases, information about the precise nature of the error may also
- be returned (see the descriptions of these errors in the section enti-
- tled Error return values from pcre_exec() below). If startoffset con-
- tains a value that does not point to the start of a UTF-8 character (or
- to the end of the subject), PCRE_ERROR_BADUTF8_OFFSET is returned.
-
- If you already know that your subject is valid, and you want to skip
- these checks for performance reasons, you can set the
- PCRE_NO_UTF8_CHECK option when calling pcre_exec(). You might want to
- do this for the second and subsequent calls to pcre_exec() if you are
- making repeated calls to find all the matches in a single subject
- string. However, you should be sure that the value of startoffset
- points to the start of a character (or the end of the subject). When
- PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid string as a
- subject or an invalid value of startoffset is undefined. Your program
- may crash.
-
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-
- These options turn on the partial matching feature. For backwards com-
- patibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial
- match occurs if the end of the subject string is reached successfully,
- but there are not enough subject characters to complete the match. If
- this happens when PCRE_PARTIAL_SOFT (but not PCRE_PARTIAL_HARD) is set,
- matching continues by testing any remaining alternatives. Only if no
- complete match can be found is PCRE_ERROR_PARTIAL returned instead of
- PCRE_ERROR_NOMATCH. In other words, PCRE_PARTIAL_SOFT says that the
- caller is prepared to handle a partial match, but only if no complete
- match can be found.
-
- If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this
- case, if a partial match is found, pcre_exec() immediately returns
- PCRE_ERROR_PARTIAL, without considering any other alternatives. In
- other words, when PCRE_PARTIAL_HARD is set, a partial match is consid-
- ered to be more important that an alternative complete match.
-
- In both cases, the portion of the string that was inspected when the
- partial match was found is set as the first matching string. There is a
- more detailed discussion of partial and multi-segment matching, with
- examples, in the pcrepartial documentation.
-
- The string to be matched by pcre_exec()
-
- The subject string is passed to pcre_exec() as a pointer in subject, a
- length in bytes in length, and a starting byte offset in startoffset.
- If this is negative or greater than the length of the subject,
- pcre_exec() returns PCRE_ERROR_BADOFFSET. When the starting offset is
- zero, the search for a match starts at the beginning of the subject,
- and this is by far the most common case. In UTF-8 mode, the byte offset
- must point to the start of a UTF-8 character (or the end of the sub-
- ject). Unlike the pattern string, the subject may contain binary zero
- bytes.
-
- A non-zero starting offset is useful when searching for another match
- in the same subject by calling pcre_exec() again after a previous suc-
- cess. Setting startoffset differs from just passing over a shortened
- string and setting PCRE_NOTBOL in the case of a pattern that begins
- with any kind of lookbehind. For example, consider the pattern
-
- \Biss\B
-
- which finds occurrences of "iss" in the middle of words. (\B matches
- only if the current position in the subject is not a word boundary.)
- When applied to the string "Mississipi" the first call to pcre_exec()
- finds the first occurrence. If pcre_exec() is called again with just
- the remainder of the subject, namely "issipi", it does not match,
- because \B is always false at the start of the subject, which is deemed
- to be a word boundary. However, if pcre_exec() is passed the entire
- string again, but with startoffset set to 4, it finds the second occur-
- rence of "iss" because it is able to look behind the starting point to
- discover that it is preceded by a letter.
-
- Finding all the matches in a subject is tricky when the pattern can
- match an empty string. It is possible to emulate Perl's /g behaviour by
- first trying the match again at the same offset, with the
- PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED options, and then if that
- fails, advancing the starting offset and trying an ordinary match
- again. There is some code that demonstrates how to do this in the pcre-
- demo sample program. In the most general case, you have to check to see
- if the newline convention recognizes CRLF as a newline, and if so, and
- the current character is CR followed by LF, advance the starting offset
- by two characters instead of one.
-
- If a non-zero starting offset is passed when the pattern is anchored,
- one attempt to match at the given offset is made. This can only succeed
- if the pattern does not require the match to be at the start of the
- subject.
-
- How pcre_exec() returns captured substrings
-
- In general, a pattern matches a certain portion of the subject, and in
- addition, further substrings from the subject may be picked out by
- parts of the pattern. Following the usage in Jeffrey Friedl's book,
- this is called "capturing" in what follows, and the phrase "capturing
- subpattern" is used for a fragment of a pattern that picks out a sub-
- string. PCRE supports several other kinds of parenthesized subpattern
- that do not cause substrings to be captured.
-
- Captured substrings are returned to the caller via a vector of integers
- whose address is passed in ovector. The number of elements in the vec-
- tor is passed in ovecsize, which must be a non-negative number. Note:
- this argument is NOT the size of ovector in bytes.
-
- The first two-thirds of the vector is used to pass back captured sub-
- strings, each substring using a pair of integers. The remaining third
- of the vector is used as workspace by pcre_exec() while matching cap-
- turing subpatterns, and is not available for passing back information.
- The number passed in ovecsize should always be a multiple of three. If
- it is not, it is rounded down.
-
- When a match is successful, information about captured substrings is
- returned in pairs of integers, starting at the beginning of ovector,
- and continuing up to two-thirds of its length at the most. The first
- element of each pair is set to the byte offset of the first character
- in a substring, and the second is set to the byte offset of the first
- character after the end of a substring. Note: these values are always
- byte offsets, even in UTF-8 mode. They are not character counts.
-
- The first pair of integers, ovector[0] and ovector[1], identify the
- portion of the subject string matched by the entire pattern. The next
- pair is used for the first capturing subpattern, and so on. The value
- returned by pcre_exec() is one more than the highest numbered pair that
- has been set. For example, if two substrings have been captured, the
- returned value is 3. If there are no capturing subpatterns, the return
- value from a successful match is 1, indicating that just the first pair
- of offsets has been set.
-
- If a capturing subpattern is matched repeatedly, it is the last portion
- of the string that it matched that is returned.
-
- If the vector is too small to hold all the captured substring offsets,
- it is used as far as possible (up to two-thirds of its length), and the
- function returns a value of zero. If neither the actual string matched
- not any captured substrings are of interest, pcre_exec() may be called
- with ovector passed as NULL and ovecsize as zero. However, if the pat-
- tern contains back references and the ovector is not big enough to
- remember the related substrings, PCRE has to get additional memory for
- use during matching. Thus it is usually advisable to supply an ovector
- of reasonable size.
-
- There are some cases where zero is returned (indicating vector over-
- flow) when in fact the vector is exactly the right size for the final
- match. For example, consider the pattern
-
- (a)(?:(b)c|bd)
-
- If a vector of 6 elements (allowing for only 1 captured substring) is
- given with subject string "abd", pcre_exec() will try to set the second
- captured string, thereby recording a vector overflow, before failing to
- match "c" and backing up to try the second alternative. The zero
- return, however, does correctly indicate that the maximum number of
- slots (namely 2) have been filled. In similar cases where there is tem-
- porary overflow, but the final number of used slots is actually less
- than the maximum, a non-zero value is returned.
-
- The pcre_fullinfo() function can be used to find out how many capturing
- subpatterns there are in a compiled pattern. The smallest size for
- ovector that will allow for n captured substrings, in addition to the
- offsets of the substring matched by the whole pattern, is (n+1)*3.
-
- It is possible for capturing subpattern number n+1 to match some part
- of the subject when subpattern n has not been used at all. For example,
- if the string "abc" is matched against the pattern (a|(z))(bc) the
- return from the function is 4, and subpatterns 1 and 3 are matched, but
- 2 is not. When this happens, both values in the offset pairs corre-
- sponding to unused subpatterns are set to -1.
-
- Offset values that correspond to unused subpatterns at the end of the
- expression are also set to -1. For example, if the string "abc" is
- matched against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not
- matched. The return from the function is 2, because the highest used
- capturing subpattern number is 1, and the offsets for for the second
- and third capturing subpatterns (assuming the vector is large enough,
- of course) are set to -1.
-
- Note: Elements in the first two-thirds of ovector that do not corre-
- spond to capturing parentheses in the pattern are never changed. That
- is, if a pattern contains n capturing parentheses, no more than ovec-
- tor[0] to ovector[2n+1] are set by pcre_exec(). The other elements (in
- the first two-thirds) retain whatever values they previously had.
-
- Some convenience functions are provided for extracting the captured
- substrings as separate strings. These are described below.
-
- Error return values from pcre_exec()
-
- If pcre_exec() fails, it returns a negative number. The following are
- defined in the header file:
-
- PCRE_ERROR_NOMATCH (-1)
-
- The subject string did not match the pattern.
-
- PCRE_ERROR_NULL (-2)
-
- Either code or subject was passed as NULL, or ovector was NULL and
- ovecsize was not zero.
-
- PCRE_ERROR_BADOPTION (-3)
-
- An unrecognized bit was set in the options argument.
-
- PCRE_ERROR_BADMAGIC (-4)
-
- PCRE stores a 4-byte "magic number" at the start of the compiled code,
- to catch the case when it is passed a junk pointer and to detect when a
- pattern that was compiled in an environment of one endianness is run in
- an environment with the other endianness. This is the error that PCRE
- gives when the magic number is not present.
-
- PCRE_ERROR_UNKNOWN_OPCODE (-5)
-
- While running the pattern match, an unknown item was encountered in the
- compiled pattern. This error could be caused by a bug in PCRE or by
- overwriting of the compiled pattern.
-
- PCRE_ERROR_NOMEMORY (-6)
-
- If a pattern contains back references, but the ovector that is passed
- to pcre_exec() is not big enough to remember the referenced substrings,
- PCRE gets a block of memory at the start of matching to use for this
- purpose. If the call via pcre_malloc() fails, this error is given. The
- memory is automatically freed at the end of matching.
-
- This error is also given if pcre_stack_malloc() fails in pcre_exec().
- This can happen only when PCRE has been compiled with --disable-stack-
- for-recursion.
-
- PCRE_ERROR_NOSUBSTRING (-7)
-
- This error is used by the pcre_copy_substring(), pcre_get_substring(),
- and pcre_get_substring_list() functions (see below). It is never
- returned by pcre_exec().
-
- PCRE_ERROR_MATCHLIMIT (-8)
-
- The backtracking limit, as specified by the match_limit field in a
- pcre_extra structure (or defaulted) was reached. See the description
- above.
-
- PCRE_ERROR_CALLOUT (-9)
-
- This error is never generated by pcre_exec() itself. It is provided for
- use by callout functions that want to yield a distinctive error code.
- See the pcrecallout documentation for details.
-
- PCRE_ERROR_BADUTF8 (-10)
-
- A string that contains an invalid UTF-8 byte sequence was passed as a
- subject, and the PCRE_NO_UTF8_CHECK option was not set. If the size of
- the output vector (ovecsize) is at least 2, the byte offset to the
- start of the the invalid UTF-8 character is placed in the first ele-
- ment, and a reason code is placed in the second element. The reason
- codes are listed in the following section. For backward compatibility,
- if PCRE_PARTIAL_HARD is set and the problem is a truncated UTF-8 char-
- acter at the end of the subject (reason codes 1 to 5),
- PCRE_ERROR_SHORTUTF8 is returned instead of PCRE_ERROR_BADUTF8.
-
- PCRE_ERROR_BADUTF8_OFFSET (-11)
-
- The UTF-8 byte sequence that was passed as a subject was checked and
- found to be valid (the PCRE_NO_UTF8_CHECK option was not set), but the
- value of startoffset did not point to the beginning of a UTF-8 charac-
- ter or the end of the subject.
-
- PCRE_ERROR_PARTIAL (-12)
-
- The subject string did not match, but it did match partially. See the
- pcrepartial documentation for details of partial matching.
-
- PCRE_ERROR_BADPARTIAL (-13)
-
- This code is no longer in use. It was formerly returned when the
- PCRE_PARTIAL option was used with a compiled pattern containing items
- that were not supported for partial matching. From release 8.00
- onwards, there are no restrictions on partial matching.
-
- PCRE_ERROR_INTERNAL (-14)
-
- An unexpected internal error has occurred. This error could be caused
- by a bug in PCRE or by overwriting of the compiled pattern.
-
- PCRE_ERROR_BADCOUNT (-15)
-
- This error is given if the value of the ovecsize argument is negative.
-
- PCRE_ERROR_RECURSIONLIMIT (-21)
-
- The internal recursion limit, as specified by the match_limit_recursion
- field in a pcre_extra structure (or defaulted) was reached. See the
- description above.
-
- PCRE_ERROR_BADNEWLINE (-23)
-
- An invalid combination of PCRE_NEWLINE_xxx options was given.
-
- PCRE_ERROR_BADOFFSET (-24)
-
- The value of startoffset was negative or greater than the length of the
- subject, that is, the value in length.
-
- PCRE_ERROR_SHORTUTF8 (-25)
-
- This error is returned instead of PCRE_ERROR_BADUTF8 when the subject
- string ends with a truncated UTF-8 character and the PCRE_PARTIAL_HARD
- option is set. Information about the failure is returned as for
- PCRE_ERROR_BADUTF8. It is in fact sufficient to detect this case, but
- this special error code for PCRE_PARTIAL_HARD precedes the implementa-
- tion of returned information; it is retained for backwards compatibil-
- ity.
-
- PCRE_ERROR_RECURSELOOP (-26)
-
- This error is returned when pcre_exec() detects a recursion loop within
- the pattern. Specifically, it means that either the whole pattern or a
- subpattern has been called recursively for the second time at the same
- position in the subject string. Some simple patterns that might do this
- are detected and faulted at compile time, but more complicated cases,
- in particular mutual recursions between two different subpatterns, can-
- not be detected until run time.
-
- PCRE_ERROR_JIT_STACKLIMIT (-27)
-
- This error is returned when a pattern that was successfully studied
- using the PCRE_STUDY_JIT_COMPILE option is being matched, but the mem-
- ory available for the just-in-time processing stack is not large
- enough. See the pcrejit documentation for more details.
-
- PCRE_ERROR_BADMODE (-28)
-
- This error is given if a pattern that was compiled by the 8-bit library
- is passed to a 16-bit library function, or vice versa.
-
- PCRE_ERROR_BADENDIANNESS (-29)
-
- This error is given if a pattern that was compiled and saved is
- reloaded on a host with different endianness. The utility function
- pcre_pattern_to_host_byte_order() can be used to convert such a pattern
- so that it runs on the new host.
-
- Error numbers -16 to -20 and -22 are not used by pcre_exec().
-
- Reason codes for invalid UTF-8 strings
-
- This section applies only to the 8-bit library. The corresponding
- information for the 16-bit library is given in the pcre16 page.
-
- When pcre_exec() returns either PCRE_ERROR_BADUTF8 or PCRE_ERROR_SHORT-
- UTF8, and the size of the output vector (ovecsize) is at least 2, the
- offset of the start of the invalid UTF-8 character is placed in the
- first output vector element (ovector[0]) and a reason code is placed in
- the second element (ovector[1]). The reason codes are given names in
- the pcre.h header file:
-
- PCRE_UTF8_ERR1
- PCRE_UTF8_ERR2
- PCRE_UTF8_ERR3
- PCRE_UTF8_ERR4
- PCRE_UTF8_ERR5
-
- The string ends with a truncated UTF-8 character; the code specifies
- how many bytes are missing (1 to 5). Although RFC 3629 restricts UTF-8
- characters to be no longer than 4 bytes, the encoding scheme (origi-
- nally defined by RFC 2279) allows for up to 6 bytes, and this is
- checked first; hence the possibility of 4 or 5 missing bytes.
-
- PCRE_UTF8_ERR6
- PCRE_UTF8_ERR7
- PCRE_UTF8_ERR8
- PCRE_UTF8_ERR9
- PCRE_UTF8_ERR10
-
- The two most significant bits of the 2nd, 3rd, 4th, 5th, or 6th byte of
- the character do not have the binary value 0b10 (that is, either the
- most significant bit is 0, or the next bit is 1).
-
- PCRE_UTF8_ERR11
- PCRE_UTF8_ERR12
-
- A character that is valid by the RFC 2279 rules is either 5 or 6 bytes
- long; these code points are excluded by RFC 3629.
-
- PCRE_UTF8_ERR13
-
- A 4-byte character has a value greater than 0x10fff; these code points
- are excluded by RFC 3629.
-
- PCRE_UTF8_ERR14
-
- A 3-byte character has a value in the range 0xd800 to 0xdfff; this
- range of code points are reserved by RFC 3629 for use with UTF-16, and
- so are excluded from UTF-8.
-
- PCRE_UTF8_ERR15
- PCRE_UTF8_ERR16
- PCRE_UTF8_ERR17
- PCRE_UTF8_ERR18
- PCRE_UTF8_ERR19
-
- A 2-, 3-, 4-, 5-, or 6-byte character is "overlong", that is, it codes
- for a value that can be represented by fewer bytes, which is invalid.
- For example, the two bytes 0xc0, 0xae give the value 0x2e, whose cor-
- rect coding uses just one byte.
-
- PCRE_UTF8_ERR20
-
- The two most significant bits of the first byte of a character have the
- binary value 0b10 (that is, the most significant bit is 1 and the sec-
- ond is 0). Such a byte can only validly occur as the second or subse-
- quent byte of a multi-byte character.
-
- PCRE_UTF8_ERR21
-
- The first byte of a character has the value 0xfe or 0xff. These values
- can never occur in a valid UTF-8 string.
-
-
-EXTRACTING CAPTURED SUBSTRINGS BY NUMBER
-
- int pcre_copy_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber, char *buffer,
- int buffersize);
-
- int pcre_get_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber,
- const char **stringptr);
-
- int pcre_get_substring_list(const char *subject,
- int *ovector, int stringcount, const char ***listptr);
-
- Captured substrings can be accessed directly by using the offsets
- returned by pcre_exec() in ovector. For convenience, the functions
- pcre_copy_substring(), pcre_get_substring(), and pcre_get_sub-
- string_list() are provided for extracting captured substrings as new,
- separate, zero-terminated strings. These functions identify substrings
- by number. The next section describes functions for extracting named
- substrings.
-
- A substring that contains a binary zero is correctly extracted and has
- a further zero added on the end, but the result is not, of course, a C
- string. However, you can process such a string by referring to the
- length that is returned by pcre_copy_substring() and pcre_get_sub-
- string(). Unfortunately, the interface to pcre_get_substring_list() is
- not adequate for handling strings containing binary zeros, because the
- end of the final string is not independently indicated.
-
- The first three arguments are the same for all three of these func-
- tions: subject is the subject string that has just been successfully
- matched, ovector is a pointer to the vector of integer offsets that was
- passed to pcre_exec(), and stringcount is the number of substrings that
- were captured by the match, including the substring that matched the
- entire regular expression. This is the value returned by pcre_exec() if
- it is greater than zero. If pcre_exec() returned zero, indicating that
- it ran out of space in ovector, the value passed as stringcount should
- be the number of elements in the vector divided by three.
-
- The functions pcre_copy_substring() and pcre_get_substring() extract a
- single substring, whose number is given as stringnumber. A value of
- zero extracts the substring that matched the entire pattern, whereas
- higher values extract the captured substrings. For pcre_copy_sub-
- string(), the string is placed in buffer, whose length is given by
- buffersize, while for pcre_get_substring() a new block of memory is
- obtained via pcre_malloc, and its address is returned via stringptr.
- The yield of the function is the length of the string, not including
- the terminating zero, or one of these error codes:
-
- PCRE_ERROR_NOMEMORY (-6)
-
- The buffer was too small for pcre_copy_substring(), or the attempt to
- get memory failed for pcre_get_substring().
-
- PCRE_ERROR_NOSUBSTRING (-7)
-
- There is no substring whose number is stringnumber.
-
- The pcre_get_substring_list() function extracts all available sub-
- strings and builds a list of pointers to them. All this is done in a
- single block of memory that is obtained via pcre_malloc. The address of
- the memory block is returned via listptr, which is also the start of
- the list of string pointers. The end of the list is marked by a NULL
- pointer. The yield of the function is zero if all went well, or the
- error code
-
- PCRE_ERROR_NOMEMORY (-6)
-
- if the attempt to get the memory block failed.
-
- When any of these functions encounter a substring that is unset, which
- can happen when capturing subpattern number n+1 matches some part of
- the subject, but subpattern n has not been used at all, they return an
- empty string. This can be distinguished from a genuine zero-length sub-
- string by inspecting the appropriate offset in ovector, which is nega-
- tive for unset substrings.
-
- The two convenience functions pcre_free_substring() and pcre_free_sub-
- string_list() can be used to free the memory returned by a previous
- call of pcre_get_substring() or pcre_get_substring_list(), respec-
- tively. They do nothing more than call the function pointed to by
- pcre_free, which of course could be called directly from a C program.
- However, PCRE is used in some situations where it is linked via a spe-
- cial interface to another programming language that cannot use
- pcre_free directly; it is for these cases that the functions are pro-
- vided.
-
-
-EXTRACTING CAPTURED SUBSTRINGS BY NAME
-
- int pcre_get_stringnumber(const pcre *code,
- const char *name);
-
- int pcre_copy_named_substring(const pcre *code,
- const char *subject, int *ovector,
- int stringcount, const char *stringname,
- char *buffer, int buffersize);
-
- int pcre_get_named_substring(const pcre *code,
- const char *subject, int *ovector,
- int stringcount, const char *stringname,
- const char **stringptr);
-
- To extract a substring by name, you first have to find associated num-
- ber. For example, for this pattern
-
- (a+)b(?<xxx>\d+)...
-
- the number of the subpattern called "xxx" is 2. If the name is known to
- be unique (PCRE_DUPNAMES was not set), you can find the number from the
- name by calling pcre_get_stringnumber(). The first argument is the com-
- piled pattern, and the second is the name. The yield of the function is
- the subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no
- subpattern of that name.
-
- Given the number, you can extract the substring directly, or use one of
- the functions described in the previous section. For convenience, there
- are also two functions that do the whole job.
-
- Most of the arguments of pcre_copy_named_substring() and
- pcre_get_named_substring() are the same as those for the similarly
- named functions that extract by number. As these are described in the
- previous section, they are not re-described here. There are just two
- differences:
-
- First, instead of a substring number, a substring name is given. Sec-
- ond, there is an extra argument, given at the start, which is a pointer
- to the compiled pattern. This is needed in order to gain access to the
- name-to-number translation table.
-
- These functions call pcre_get_stringnumber(), and if it succeeds, they
- then call pcre_copy_substring() or pcre_get_substring(), as appropri-
- ate. NOTE: If PCRE_DUPNAMES is set and there are duplicate names, the
- behaviour may not be what you want (see the next section).
-
- Warning: If the pattern uses the (?| feature to set up multiple subpat-
- terns with the same number, as described in the section on duplicate
- subpattern numbers in the pcrepattern page, you cannot use names to
- distinguish the different subpatterns, because names are not included
- in the compiled code. The matching process uses only numbers. For this
- reason, the use of different names for subpatterns of the same number
- causes an error at compile time.
-
-
-DUPLICATE SUBPATTERN NAMES
-
- int pcre_get_stringtable_entries(const pcre *code,
- const char *name, char **first, char **last);
-
- When a pattern is compiled with the PCRE_DUPNAMES option, names for
- subpatterns are not required to be unique. (Duplicate names are always
- allowed for subpatterns with the same number, created by using the (?|
- feature. Indeed, if such subpatterns are named, they are required to
- use the same names.)
-
- Normally, patterns with duplicate names are such that in any one match,
- only one of the named subpatterns participates. An example is shown in
- the pcrepattern documentation.
-
- When duplicates are present, pcre_copy_named_substring() and
- pcre_get_named_substring() return the first substring corresponding to
- the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING
- (-7) is returned; no data is returned. The pcre_get_stringnumber()
- function returns one of the numbers that are associated with the name,
- but it is not defined which it is.
-
- If you want to get full details of all captured substrings for a given
- name, you must use the pcre_get_stringtable_entries() function. The
- first argument is the compiled pattern, and the second is the name. The
- third and fourth are pointers to variables which are updated by the
- function. After it has run, they point to the first and last entries in
- the name-to-number table for the given name. The function itself
- returns the length of each entry, or PCRE_ERROR_NOSUBSTRING (-7) if
- there are none. The format of the table is described above in the sec-
- tion entitled Information about a pattern above. Given all the rele-
- vant entries for the name, you can extract each of their numbers, and
- hence the captured data, if any.
-
-
-FINDING ALL POSSIBLE MATCHES
-
- The traditional matching function uses a similar algorithm to Perl,
- which stops when it finds the first match, starting at a given point in
- the subject. If you want to find all possible matches, or the longest
- possible match, consider using the alternative matching function (see
- below) instead. If you cannot use the alternative function, but still
- need to find all possible matches, you can kludge it up by making use
- of the callout facility, which is described in the pcrecallout documen-
- tation.
-
- What you have to do is to insert a callout right at the end of the pat-
- tern. When your callout function is called, extract and save the cur-
- rent matched substring. Then return 1, which forces pcre_exec() to
- backtrack and try other alternatives. Ultimately, when it runs out of
- matches, pcre_exec() will yield PCRE_ERROR_NOMATCH.
-
-
-OBTAINING AN ESTIMATE OF STACK USAGE
-
- Matching certain patterns using pcre_exec() can use a lot of process
- stack, which in certain environments can be rather limited in size.
- Some users find it helpful to have an estimate of the amount of stack
- that is used by pcre_exec(), to help them set recursion limits, as
- described in the pcrestack documentation. The estimate that is output
- by pcretest when called with the -m and -C options is obtained by call-
- ing pcre_exec with the values NULL, NULL, NULL, -999, and -999 for its
- first five arguments.
-
- Normally, if its first argument is NULL, pcre_exec() immediately
- returns the negative error code PCRE_ERROR_NULL, but with this special
- combination of arguments, it returns instead a negative number whose
- absolute value is the approximate stack frame size in bytes. (A nega-
- tive number is used so that it is clear that no match has happened.)
- The value is approximate because in some cases, recursive calls to
- pcre_exec() occur when there are one or two additional variables on the
- stack.
-
- If PCRE has been compiled to use the heap instead of the stack for
- recursion, the value returned is the size of each block that is
- obtained from the heap.
-
-
-MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
-
- int pcre_dfa_exec(const pcre *code, const pcre_extra *extra,
- const char *subject, int length, int startoffset,
- int options, int *ovector, int ovecsize,
- int *workspace, int wscount);
-
- The function pcre_dfa_exec() is called to match a subject string
- against a compiled pattern, using a matching algorithm that scans the
- subject string just once, and does not backtrack. This has different
- characteristics to the normal algorithm, and is not compatible with
- Perl. Some of the features of PCRE patterns are not supported. Never-
- theless, there are times when this kind of matching can be useful. For
- a discussion of the two matching algorithms, and a list of features
- that pcre_dfa_exec() does not support, see the pcrematching documenta-
- tion.
-
- The arguments for the pcre_dfa_exec() function are the same as for
- pcre_exec(), plus two extras. The ovector argument is used in a differ-
- ent way, and this is described below. The other common arguments are
- used in the same way as for pcre_exec(), so their description is not
- repeated here.
-
- The two additional arguments provide workspace for the function. The
- workspace vector should contain at least 20 elements. It is used for
- keeping track of multiple paths through the pattern tree. More
- workspace will be needed for patterns and subjects where there are a
- lot of potential matches.
-
- Here is an example of a simple call to pcre_dfa_exec():
-
- int rc;
- int ovector[10];
- int wspace[20];
- rc = pcre_dfa_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 10, /* number of elements (NOT size in bytes) */
- wspace, /* working space vector */
- 20); /* number of elements (NOT size in bytes) */
-
- Option bits for pcre_dfa_exec()
-
- The unused bits of the options argument for pcre_dfa_exec() must be
- zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEW-
- LINE_xxx, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY,
- PCRE_NOTEMPTY_ATSTART, PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF,
- PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE, PCRE_PARTIAL_HARD, PCRE_PAR-
- TIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. All but the last
- four of these are exactly the same as for pcre_exec(), so their
- description is not repeated here.
-
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-
- These have the same general effect as they do for pcre_exec(), but the
- details are slightly different. When PCRE_PARTIAL_HARD is set for
- pcre_dfa_exec(), it returns PCRE_ERROR_PARTIAL if the end of the sub-
- ject is reached and there is still at least one matching possibility
- that requires additional characters. This happens even if some complete
- matches have also been found. When PCRE_PARTIAL_SOFT is set, the return
- code PCRE_ERROR_NOMATCH is converted into PCRE_ERROR_PARTIAL if the end
- of the subject is reached, there have been no complete matches, but
- there is still at least one matching possibility. The portion of the
- string that was inspected when the longest partial match was found is
- set as the first matching string in both cases. There is a more
- detailed discussion of partial and multi-segment matching, with exam-
- ples, in the pcrepartial documentation.
-
- PCRE_DFA_SHORTEST
-
- Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to
- stop as soon as it has found one match. Because of the way the alterna-
- tive algorithm works, this is necessarily the shortest possible match
- at the first possible matching point in the subject string.
-
- PCRE_DFA_RESTART
-
- When pcre_dfa_exec() returns a partial match, it is possible to call it
- again, with additional subject characters, and have it continue with
- the same match. The PCRE_DFA_RESTART option requests this action; when
- it is set, the workspace and wscount options must reference the same
- vector as before because data about the match so far is left in them
- after a partial match. There is more discussion of this facility in the
- pcrepartial documentation.
-
- Successful returns from pcre_dfa_exec()
-
- When pcre_dfa_exec() succeeds, it may have matched more than one sub-
- string in the subject. Note, however, that all the matches from one run
- of the function start at the same point in the subject. The shorter
- matches are all initial substrings of the longer matches. For example,
- if the pattern
-
- <.*>
-
- is matched against the string
-
- This is <something> <something else> <something further> no more
-
- the three matched strings are
-
- <something>
- <something> <something else>
- <something> <something else> <something further>
-
- On success, the yield of the function is a number greater than zero,
- which is the number of matched substrings. The substrings themselves
- are returned in ovector. Each string uses two elements; the first is
- the offset to the start, and the second is the offset to the end. In
- fact, all the strings have the same start offset. (Space could have
- been saved by giving this only once, but it was decided to retain some
- compatibility with the way pcre_exec() returns data, even though the
- meaning of the strings is different.)
-
- The strings are returned in reverse order of length; that is, the long-
- est matching string is given first. If there were too many matches to
- fit into ovector, the yield of the function is zero, and the vector is
- filled with the longest matches. Unlike pcre_exec(), pcre_dfa_exec()
- can use the entire ovector for returning matched strings.
-
- Error returns from pcre_dfa_exec()
-
- The pcre_dfa_exec() function returns a negative number when it fails.
- Many of the errors are the same as for pcre_exec(), and these are
- described above. There are in addition the following errors that are
- specific to pcre_dfa_exec():
-
- PCRE_ERROR_DFA_UITEM (-16)
-
- This return is given if pcre_dfa_exec() encounters an item in the pat-
- tern that it does not support, for instance, the use of \C or a back
- reference.
-
- PCRE_ERROR_DFA_UCOND (-17)
-
- This return is given if pcre_dfa_exec() encounters a condition item
- that uses a back reference for the condition, or a test for recursion
- in a specific group. These are not supported.
-
- PCRE_ERROR_DFA_UMLIMIT (-18)
-
- This return is given if pcre_dfa_exec() is called with an extra block
- that contains a setting of the match_limit or match_limit_recursion
- fields. This is not supported (these fields are meaningless for DFA
- matching).
-
- PCRE_ERROR_DFA_WSSIZE (-19)
-
- This return is given if pcre_dfa_exec() runs out of space in the
- workspace vector.
-
- PCRE_ERROR_DFA_RECURSE (-20)
-
- When a recursive subpattern is processed, the matching function calls
- itself recursively, using private vectors for ovector and workspace.
- This error is given if the output vector is not large enough. This
- should be extremely rare, as a vector of size 1000 is used.
-
-
-SEE ALSO
-
- pcre16(3), pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), pcrematch-
- ing(3), pcrepartial(3), pcreposix(3), pcreprecompile(3), pcresample(3),
- pcrestack(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 21 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRECALLOUT(3) PCRECALLOUT(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PCRE CALLOUTS
-
- int (*pcre_callout)(pcre_callout_block *);
-
- int (*pcre16_callout)(pcre16_callout_block *);
-
- PCRE provides a feature called "callout", which is a means of temporar-
- ily passing control to the caller of PCRE in the middle of pattern
- matching. The caller of PCRE provides an external function by putting
- its entry point in the global variable pcre_callout (pcre16_callout for
- the 16-bit library). By default, this variable contains NULL, which
- disables all calling out.
-
- Within a regular expression, (?C) indicates the points at which the
- external function is to be called. Different callout points can be
- identified by putting a number less than 256 after the letter C. The
- default value is zero. For example, this pattern has two callout
- points:
-
- (?C1)abc(?C2)def
-
- If the PCRE_AUTO_CALLOUT option bit is set when a pattern is compiled,
- PCRE automatically inserts callouts, all with number 255, before each
- item in the pattern. For example, if PCRE_AUTO_CALLOUT is used with the
- pattern
-
- A(\d{2}|--)
-
- it is processed as if it were
-
- (?C255)A(?C255)((?C255)\d{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
-
- Notice that there is a callout before and after each parenthesis and
- alternation bar. Automatic callouts can be used for tracking the
- progress of pattern matching. The pcretest command has an option that
- sets automatic callouts; when it is used, the output indicates how the
- pattern is matched. This is useful information when you are trying to
- optimize the performance of a particular pattern.
-
- The use of callouts in a pattern makes it ineligible for optimization
- by the just-in-time compiler. Studying such a pattern with the
- PCRE_STUDY_JIT_COMPILE option always fails.
-
-
-MISSING CALLOUTS
-
- You should be aware that, because of optimizations in the way PCRE
- matches patterns by default, callouts sometimes do not happen. For
- example, if the pattern is
-
- ab(?C4)cd
-
- PCRE knows that any matching string must contain the letter "d". If the
- subject string is "abyz", the lack of "d" means that matching doesn't
- ever start, and the callout is never reached. However, with "abyd",
- though the result is still no match, the callout is obeyed.
-
- If the pattern is studied, PCRE knows the minimum length of a matching
- string, and will immediately give a "no match" return without actually
- running a match if the subject is not long enough, or, for unanchored
- patterns, if it has been scanned far enough.
-
- You can disable these optimizations by passing the PCRE_NO_START_OPTI-
- MIZE option to the matching function, or by starting the pattern with
- (*NO_START_OPT). This slows down the matching process, but does ensure
- that callouts such as the example above are obeyed.
-
-
-THE CALLOUT INTERFACE
-
- During matching, when PCRE reaches a callout point, the external func-
- tion defined by pcre_callout or pcre16_callout is called (if it is
- set). This applies to both normal and DFA matching. The only argument
- to the callout function is a pointer to a pcre_callout or pcre16_call-
- out block. These structures contains the following fields:
-
- int version;
- int callout_number;
- int *offset_vector;
- const char *subject; (8-bit version)
- PCRE_SPTR16 subject; (16-bit version)
- int subject_length;
- int start_match;
- int current_position;
- int capture_top;
- int capture_last;
- void *callout_data;
- int pattern_position;
- int next_item_length;
- const unsigned char *mark; (8-bit version)
- const PCRE_UCHAR16 *mark; (16-bit version)
-
- The version field is an integer containing the version number of the
- block format. The initial version was 0; the current version is 2. The
- version number will change again in future if additional fields are
- added, but the intention is never to remove any of the existing fields.
-
- The callout_number field contains the number of the callout, as com-
- piled into the pattern (that is, the number after ?C for manual call-
- outs, and 255 for automatically generated callouts).
-
- The offset_vector field is a pointer to the vector of offsets that was
- passed by the caller to the matching function. When pcre_exec() or
- pcre16_exec() is used, the contents can be inspected, in order to
- extract substrings that have been matched so far, in the same way as
- for extracting substrings after a match has completed. For the DFA
- matching functions, this field is not useful.
-
- The subject and subject_length fields contain copies of the values that
- were passed to the matching function.
-
- The start_match field normally contains the offset within the subject
- at which the current match attempt started. However, if the escape
- sequence \K has been encountered, this value is changed to reflect the
- modified starting point. If the pattern is not anchored, the callout
- function may be called several times from the same point in the pattern
- for different starting points in the subject.
-
- The current_position field contains the offset within the subject of
- the current match pointer.
-
- When the pcre_exec() or pcre16_exec() is used, the capture_top field
- contains one more than the number of the highest numbered captured sub-
- string so far. If no substrings have been captured, the value of cap-
- ture_top is one. This is always the case when the DFA functions are
- used, because they do not support captured substrings.
-
- The capture_last field contains the number of the most recently cap-
- tured substring. If no substrings have been captured, its value is -1.
- This is always the case for the DFA matching functions.
-
- The callout_data field contains a value that is passed to a matching
- function specifically so that it can be passed back in callouts. It is
- passed in the callout_data field of a pcre_extra or pcre16_extra data
- structure. If no such data was passed, the value of callout_data in a
- callout block is NULL. There is a description of the pcre_extra struc-
- ture in the pcreapi documentation.
-
- The pattern_position field is present from version 1 of the callout
- structure. It contains the offset to the next item to be matched in the
- pattern string.
-
- The next_item_length field is present from version 1 of the callout
- structure. It contains the length of the next item to be matched in the
- pattern string. When the callout immediately precedes an alternation
- bar, a closing parenthesis, or the end of the pattern, the length is
- zero. When the callout precedes an opening parenthesis, the length is
- that of the entire subpattern.
-
- The pattern_position and next_item_length fields are intended to help
- in distinguishing between different automatic callouts, which all have
- the same callout number. However, they are set for all callouts.
-
- The mark field is present from version 2 of the callout structure. In
- callouts from pcre_exec() or pcre16_exec() it contains a pointer to the
- zero-terminated name of the most recently passed (*MARK), (*PRUNE), or
- (*THEN) item in the match, or NULL if no such items have been passed.
- Instances of (*PRUNE) or (*THEN) without a name do not obliterate a
- previous (*MARK). In callouts from the DFA matching functions this
- field always contains NULL.
-
-
-RETURN VALUES
-
- The external callout function returns an integer to PCRE. If the value
- is zero, matching proceeds as normal. If the value is greater than
- zero, matching fails at the current point, but the testing of other
- matching possibilities goes ahead, just as if a lookahead assertion had
- failed. If the value is less than zero, the match is abandoned, the
- matching function returns the negative value.
-
- Negative values should normally be chosen from the set of
- PCRE_ERROR_xxx values. In particular, PCRE_ERROR_NOMATCH forces a stan-
- dard "no match" failure. The error number PCRE_ERROR_CALLOUT is
- reserved for use by callout functions; it will never be used by PCRE
- itself.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 08 Janurary 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRECOMPAT(3) PCRECOMPAT(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-DIFFERENCES BETWEEN PCRE AND PERL
-
- This document describes the differences in the ways that PCRE and Perl
- handle regular expressions. The differences described here are with
- respect to Perl versions 5.10 and above.
-
- 1. PCRE has only a subset of Perl's Unicode support. Details of what it
- does have are given in the pcreunicode page.
-
- 2. PCRE allows repeat quantifiers only on parenthesized assertions, but
- they do not mean what you might think. For example, (?!a){3} does not
- assert that the next three characters are not "a". It just asserts that
- the next character is not "a" three times (in principle: PCRE optimizes
- this to run the assertion just once). Perl allows repeat quantifiers on
- other assertions such as \b, but these do not seem to have any use.
-
- 3. Capturing subpatterns that occur inside negative lookahead asser-
- tions are counted, but their entries in the offsets vector are never
- set. Perl sets its numerical variables from any such patterns that are
- matched before the assertion fails to match something (thereby succeed-
- ing), but only if the negative lookahead assertion contains just one
- branch.
-
- 4. Though binary zero characters are supported in the subject string,
- they are not allowed in a pattern string because it is passed as a nor-
- mal C string, terminated by zero. The escape sequence \0 can be used in
- the pattern to represent a binary zero.
-
- 5. The following Perl escape sequences are not supported: \l, \u, \L,
- \U, and \N when followed by a character name or Unicode value. (\N on
- its own, matching a non-newline character, is supported.) In fact these
- are implemented by Perl's general string-handling and are not part of
- its pattern matching engine. If any of these are encountered by PCRE,
- an error is generated by default. However, if the PCRE_JAVASCRIPT_COM-
- PAT option is set, \U and \u are interpreted as JavaScript interprets
- them.
-
- 6. The Perl escape sequences \p, \P, and \X are supported only if PCRE
- is built with Unicode character property support. The properties that
- can be tested with \p and \P are limited to the general category prop-
- erties such as Lu and Nd, script names such as Greek or Han, and the
- derived properties Any and L&. PCRE does support the Cs (surrogate)
- property, which Perl does not; the Perl documentation says "Because
- Perl hides the need for the user to understand the internal representa-
- tion of Unicode characters, there is no need to implement the somewhat
- messy concept of surrogates."
-
- 7. PCRE implements a simpler version of \X than Perl, which changed to
- make \X match what Unicode calls an "extended grapheme cluster". This
- is more complicated than an extended Unicode sequence, which is what
- PCRE matches.
-
- 8. PCRE does support the \Q...\E escape for quoting substrings. Charac-
- ters in between are treated as literals. This is slightly different
- from Perl in that $ and @ are also handled as literals inside the
- quotes. In Perl, they cause variable interpolation (but of course PCRE
- does not have variables). Note the following examples:
-
- Pattern PCRE matches Perl matches
-
- \Qabc$xyz\E abc$xyz abc followed by the
- contents of $xyz
- \Qabc\$xyz\E abc\$xyz abc\$xyz
- \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
-
- The \Q...\E sequence is recognized both inside and outside character
- classes.
-
- 9. Fairly obviously, PCRE does not support the (?{code}) and (??{code})
- constructions. However, there is support for recursive patterns. This
- is not available in Perl 5.8, but it is in Perl 5.10. Also, the PCRE
- "callout" feature allows an external function to be called during pat-
- tern matching. See the pcrecallout documentation for details.
-
- 10. Subpatterns that are called as subroutines (whether or not recur-
- sively) are always treated as atomic groups in PCRE. This is like
- Python, but unlike Perl. Captured values that are set outside a sub-
- routine call can be reference from inside in PCRE, but not in Perl.
- There is a discussion that explains these differences in more detail in
- the section on recursion differences from Perl in the pcrepattern page.
-
- 11. If (*THEN) is present in a group that is called as a subroutine,
- its action is limited to that group, even if the group does not contain
- any | characters.
-
- 12. There are some differences that are concerned with the settings of
- captured strings when part of a pattern is repeated. For example,
- matching "aba" against the pattern /^(a(b)?)+$/ in Perl leaves $2
- unset, but in PCRE it is set to "b".
-
- 13. PCRE's handling of duplicate subpattern numbers and duplicate sub-
- pattern names is not as general as Perl's. This is a consequence of the
- fact the PCRE works internally just with numbers, using an external ta-
- ble to translate between numbers and names. In particular, a pattern
- such as (?|(?<a>A)|(?<b)B), where the two capturing parentheses have
- the same number but different names, is not supported, and causes an
- error at compile time. If it were allowed, it would not be possible to
- distinguish which parentheses matched, because both names map to cap-
- turing subpattern number 1. To avoid this confusing situation, an error
- is given at compile time.
-
- 14. Perl recognizes comments in some places that PCRE does not, for
- example, between the ( and ? at the start of a subpattern. If the /x
- modifier is set, Perl allows whitespace between ( and ? but PCRE never
- does, even if the PCRE_EXTENDED option is set.
-
- 15. PCRE provides some extensions to the Perl regular expression facil-
- ities. Perl 5.10 includes new features that are not in earlier ver-
- sions of Perl, some of which (such as named parentheses) have been in
- PCRE for some time. This list is with respect to Perl 5.10:
-
- (a) Although lookbehind assertions in PCRE must match fixed length
- strings, each alternative branch of a lookbehind assertion can match a
- different length of string. Perl requires them all to have the same
- length.
-
- (b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
- meta-character matches only at the very end of the string.
-
- (c) If PCRE_EXTRA is set, a backslash followed by a letter with no spe-
- cial meaning is faulted. Otherwise, like Perl, the backslash is quietly
- ignored. (Perl can be made to issue a warning.)
-
- (d) If PCRE_UNGREEDY is set, the greediness of the repetition quanti-
- fiers is inverted, that is, by default they are not greedy, but if fol-
- lowed by a question mark they are.
-
- (e) PCRE_ANCHORED can be used at matching time to force a pattern to be
- tried only at the first matching position in the subject string.
-
- (f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
- and PCRE_NO_AUTO_CAPTURE options for pcre_exec() have no Perl equiva-
- lents.
-
- (g) The \R escape sequence can be restricted to match only CR, LF, or
- CRLF by the PCRE_BSR_ANYCRLF option.
-
- (h) The callout facility is PCRE-specific.
-
- (i) The partial matching facility is PCRE-specific.
-
- (j) Patterns compiled by PCRE can be saved and re-used at a later time,
- even on different hosts that have the other endianness. However, this
- does not apply to optimized data created by the just-in-time compiler.
-
- (k) The alternative matching functions (pcre_dfa_exec() and
- pcre16_dfa_exec()) match in a different way and are not Perl-compati-
- ble.
-
- (l) PCRE recognizes some special sequences such as (*CR) at the start
- of a pattern that set overall options that cannot be changed within the
- pattern.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 08 Januray 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPATTERN(3) PCREPATTERN(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PCRE REGULAR EXPRESSION DETAILS
-
- The syntax and semantics of the regular expressions that are supported
- by PCRE are described in detail below. There is a quick-reference syn-
- tax summary in the pcresyntax page. PCRE tries to match Perl syntax and
- semantics as closely as it can. PCRE also supports some alternative
- regular expression syntax (which does not conflict with the Perl syn-
- tax) in order to provide some compatibility with regular expressions in
- Python, .NET, and Oniguruma.
-
- Perl's regular expressions are described in its own documentation, and
- regular expressions in general are covered in a number of books, some
- of which have copious examples. Jeffrey Friedl's "Mastering Regular
- Expressions", published by O'Reilly, covers regular expressions in
- great detail. This description of PCRE's regular expressions is
- intended as reference material.
-
- The original operation of PCRE was on strings of one-byte characters.
- However, there is now also support for UTF-8 strings in the original
- library, and a second library that supports 16-bit and UTF-16 character
- strings. To use these features, PCRE must be built to include appropri-
- ate support. When using UTF strings you must either call the compiling
- function with the PCRE_UTF8 or PCRE_UTF16 option, or the pattern must
- start with one of these special sequences:
-
- (*UTF8)
- (*UTF16)
-
- Starting a pattern with such a sequence is equivalent to setting the
- relevant option. This feature is not Perl-compatible. How setting a UTF
- mode affects pattern matching is mentioned in several places below.
- There is also a summary of features in the pcreunicode page.
-
- Another special sequence that may appear at the start of a pattern or
- in combination with (*UTF8) or (*UTF16) is:
-
- (*UCP)
-
- This has the same effect as setting the PCRE_UCP option: it causes
- sequences such as \d and \w to use Unicode properties to determine
- character types, instead of recognizing only characters with codes less
- than 128 via a lookup table.
-
- If a pattern starts with (*NO_START_OPT), it has the same effect as
- setting the PCRE_NO_START_OPTIMIZE option either at compile or matching
- time. There are also some more of these special sequences that are con-
- cerned with the handling of newlines; they are described below.
-
- The remainder of this document discusses the patterns that are sup-
- ported by PCRE when one its main matching functions, pcre_exec()
- (8-bit) or pcre16_exec() (16-bit), is used. PCRE also has alternative
- matching functions, pcre_dfa_exec() and pcre16_dfa_exec(), which match
- using a different algorithm that is not Perl-compatible. Some of the
- features discussed below are not available when DFA matching is used.
- The advantages and disadvantages of the alternative functions, and how
- they differ from the normal functions, are discussed in the pcrematch-
- ing page.
-
-
-NEWLINE CONVENTIONS
-
- PCRE supports five different conventions for indicating line breaks in
- strings: a single CR (carriage return) character, a single LF (line-
- feed) character, the two-character sequence CRLF, any of the three pre-
- ceding, or any Unicode newline sequence. The pcreapi page has further
- discussion about newlines, and shows how to set the newline convention
- in the options arguments for the compiling and matching functions.
-
- It is also possible to specify a newline convention by starting a pat-
- tern string with one of the following five sequences:
-
- (*CR) carriage return
- (*LF) linefeed
- (*CRLF) carriage return, followed by linefeed
- (*ANYCRLF) any of the three above
- (*ANY) all Unicode newline sequences
-
- These override the default and the options given to the compiling func-
- tion. For example, on a Unix system where LF is the default newline
- sequence, the pattern
-
- (*CR)a.b
-
- changes the convention to CR. That pattern matches "a\nb" because LF is
- no longer a newline. Note that these special settings, which are not
- Perl-compatible, are recognized only at the very start of a pattern,
- and that they must be in upper case. If more than one of them is
- present, the last one is used.
-
- The newline convention affects the interpretation of the dot metachar-
- acter when PCRE_DOTALL is not set, and also the behaviour of \N. How-
- ever, it does not affect what the \R escape sequence matches. By
- default, this is any Unicode newline sequence, for Perl compatibility.
- However, this can be changed; see the description of \R in the section
- entitled "Newline sequences" below. A change of \R setting can be com-
- bined with a change of newline convention.
-
-
-CHARACTERS AND METACHARACTERS
-
- A regular expression is a pattern that is matched against a subject
- string from left to right. Most characters stand for themselves in a
- pattern, and match the corresponding characters in the subject. As a
- trivial example, the pattern
-
- The quick brown fox
-
- matches a portion of a subject string that is identical to itself. When
- caseless matching is specified (the PCRE_CASELESS option), letters are
- matched independently of case. In a UTF mode, PCRE always understands
- the concept of case for characters whose values are less than 128, so
- caseless matching is always possible. For characters with higher val-
- ues, the concept of case is supported if PCRE is compiled with Unicode
- property support, but not otherwise. If you want to use caseless
- matching for characters 128 and above, you must ensure that PCRE is
- compiled with Unicode property support as well as with UTF support.
-
- The power of regular expressions comes from the ability to include
- alternatives and repetitions in the pattern. These are encoded in the
- pattern by the use of metacharacters, which do not stand for themselves
- but instead are interpreted in some special way.
-
- There are two different sets of metacharacters: those that are recog-
- nized anywhere in the pattern except within square brackets, and those
- that are recognized within square brackets. Outside square brackets,
- the metacharacters are as follows:
-
- \ general escape character with several uses
- ^ assert start of string (or line, in multiline mode)
- $ assert end of string (or line, in multiline mode)
- . match any character except newline (by default)
- [ start character class definition
- | start of alternative branch
- ( start subpattern
- ) end subpattern
- ? extends the meaning of (
- also 0 or 1 quantifier
- also quantifier minimizer
- * 0 or more quantifier
- + 1 or more quantifier
- also "possessive quantifier"
- { start min/max quantifier
-
- Part of a pattern that is in square brackets is called a "character
- class". In a character class the only metacharacters are:
-
- \ general escape character
- ^ negate the class, but only if the first character
- - indicates character range
- [ POSIX character class (only if followed by POSIX
- syntax)
- ] terminates the character class
-
- The following sections describe the use of each of the metacharacters.
-
-
-BACKSLASH
-
- The backslash character has several uses. Firstly, if it is followed by
- a character that is not a number or a letter, it takes away any special
- meaning that character may have. This use of backslash as an escape
- character applies both inside and outside character classes.
-
- For example, if you want to match a * character, you write \* in the
- pattern. This escaping action applies whether or not the following
- character would otherwise be interpreted as a metacharacter, so it is
- always safe to precede a non-alphanumeric with backslash to specify
- that it stands for itself. In particular, if you want to match a back-
- slash, you write \\.
-
- In a UTF mode, only ASCII numbers and letters have any special meaning
- after a backslash. All other characters (in particular, those whose
- codepoints are greater than 127) are treated as literals.
-
- If a pattern is compiled with the PCRE_EXTENDED option, whitespace in
- the pattern (other than in a character class) and characters between a
- # outside a character class and the next newline are ignored. An escap-
- ing backslash can be used to include a whitespace or # character as
- part of the pattern.
-
- If you want to remove the special meaning from a sequence of charac-
- ters, you can do so by putting them between \Q and \E. This is differ-
- ent from Perl in that $ and @ are handled as literals in \Q...\E
- sequences in PCRE, whereas in Perl, $ and @ cause variable interpola-
- tion. Note the following examples:
-
- Pattern PCRE matches Perl matches
-
- \Qabc$xyz\E abc$xyz abc followed by the
- contents of $xyz
- \Qabc\$xyz\E abc\$xyz abc\$xyz
- \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
-
- The \Q...\E sequence is recognized both inside and outside character
- classes. An isolated \E that is not preceded by \Q is ignored. If \Q
- is not followed by \E later in the pattern, the literal interpretation
- continues to the end of the pattern (that is, \E is assumed at the
- end). If the isolated \Q is inside a character class, this causes an
- error, because the character class is not terminated.
-
- Non-printing characters
-
- A second use of backslash provides a way of encoding non-printing char-
- acters in patterns in a visible manner. There is no restriction on the
- appearance of non-printing characters, apart from the binary zero that
- terminates a pattern, but when a pattern is being prepared by text
- editing, it is often easier to use one of the following escape
- sequences than the binary character it represents:
-
- \a alarm, that is, the BEL character (hex 07)
- \cx "control-x", where x is any ASCII character
- \e escape (hex 1B)
- \f formfeed (hex 0C)
- \n linefeed (hex 0A)
- \r carriage return (hex 0D)
- \t tab (hex 09)
- \ddd character with octal code ddd, or back reference
- \xhh character with hex code hh
- \x{hhh..} character with hex code hhh.. (non-JavaScript mode)
- \uhhhh character with hex code hhhh (JavaScript mode only)
-
- The precise effect of \cx is as follows: if x is a lower case letter,
- it is converted to upper case. Then bit 6 of the character (hex 40) is
- inverted. Thus \cz becomes hex 1A (z is 7A), but \c{ becomes hex 3B ({
- is 7B), while \c; becomes hex 7B (; is 3B). If the byte following \c
- has a value greater than 127, a compile-time error occurs. This locks
- out non-ASCII characters in all modes. (When PCRE is compiled in EBCDIC
- mode, all byte values are valid. A lower case letter is converted to
- upper case, and then the 0xc0 bits are flipped.)
-
- By default, after \x, from zero to two hexadecimal digits are read
- (letters can be in upper or lower case). Any number of hexadecimal dig-
- its may appear between \x{ and }, but the character code is constrained
- as follows:
-
- 8-bit non-UTF mode less than 0x100
- 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint
- 16-bit non-UTF mode less than 0x10000
- 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint
-
- Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-
- called "surrogate" codepoints).
-
- If characters other than hexadecimal digits appear between \x{ and },
- or if there is no terminating }, this form of escape is not recognized.
- Instead, the initial \x will be interpreted as a basic hexadecimal
- escape, with no following digits, giving a character whose value is
- zero.
-
- If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x
- is as just described only when it is followed by two hexadecimal dig-
- its. Otherwise, it matches a literal "x" character. In JavaScript
- mode, support for code points greater than 256 is provided by \u, which
- must be followed by four hexadecimal digits; otherwise it matches a
- literal "u" character.
-
- Characters whose value is less than 256 can be defined by either of the
- two syntaxes for \x (or by \u in JavaScript mode). There is no differ-
- ence in the way they are handled. For example, \xdc is exactly the same
- as \x{dc} (or \u00dc in JavaScript mode).
-
- After \0 up to two further octal digits are read. If there are fewer
- than two digits, just those that are present are used. Thus the
- sequence \0\x\07 specifies two binary zeros followed by a BEL character
- (code value 7). Make sure you supply two digits after the initial zero
- if the pattern character that follows is itself an octal digit.
-
- The handling of a backslash followed by a digit other than 0 is compli-
- cated. Outside a character class, PCRE reads it and any following dig-
- its as a decimal number. If the number is less than 10, or if there
- have been at least that many previous capturing left parentheses in the
- expression, the entire sequence is taken as a back reference. A
- description of how this works is given later, following the discussion
- of parenthesized subpatterns.
-
- Inside a character class, or if the decimal number is greater than 9
- and there have not been that many capturing subpatterns, PCRE re-reads
- up to three octal digits following the backslash, and uses them to gen-
- erate a data character. Any subsequent digits stand for themselves. The
- value of the character is constrained in the same way as characters
- specified in hexadecimal. For example:
-
- \040 is another way of writing a space
- \40 is the same, provided there are fewer than 40
- previous capturing subpatterns
- \7 is always a back reference
- \11 might be a back reference, or another way of
- writing a tab
- \011 is always a tab
- \0113 is a tab followed by the character "3"
- \113 might be a back reference, otherwise the
- character with octal code 113
- \377 might be a back reference, otherwise
- the value 255 (decimal)
- \81 is either a back reference, or a binary zero
- followed by the two characters "8" and "1"
-
- Note that octal values of 100 or greater must not be introduced by a
- leading zero, because no more than three octal digits are ever read.
-
- All the sequences that define a single character value can be used both
- inside and outside character classes. In addition, inside a character
- class, \b is interpreted as the backspace character (hex 08).
-
- \N is not allowed in a character class. \B, \R, and \X are not special
- inside a character class. Like other unrecognized escape sequences,
- they are treated as the literal characters "B", "R", and "X" by
- default, but cause an error if the PCRE_EXTRA option is set. Outside a
- character class, these sequences have different meanings.
-
- Unsupported escape sequences
-
- In Perl, the sequences \l, \L, \u, and \U are recognized by its string
- handler and used to modify the case of following characters. By
- default, PCRE does not support these escape sequences. However, if the
- PCRE_JAVASCRIPT_COMPAT option is set, \U matches a "U" character, and
- \u can be used to define a character by code point, as described in the
- previous section.
-
- Absolute and relative back references
-
- The sequence \g followed by an unsigned or a negative number, option-
- ally enclosed in braces, is an absolute or relative back reference. A
- named back reference can be coded as \g{name}. Back references are dis-
- cussed later, following the discussion of parenthesized subpatterns.
-
- Absolute and relative subroutine calls
-
- For compatibility with Oniguruma, the non-Perl syntax \g followed by a
- name or a number enclosed either in angle brackets or single quotes, is
- an alternative syntax for referencing a subpattern as a "subroutine".
- Details are discussed later. Note that \g{...} (Perl syntax) and
- \g<...> (Oniguruma syntax) are not synonymous. The former is a back
- reference; the latter is a subroutine call.
-
- Generic character types
-
- Another use of backslash is for specifying generic character types:
-
- \d any decimal digit
- \D any character that is not a decimal digit
- \h any horizontal whitespace character
- \H any character that is not a horizontal whitespace character
- \s any whitespace character
- \S any character that is not a whitespace character
- \v any vertical whitespace character
- \V any character that is not a vertical whitespace character
- \w any "word" character
- \W any "non-word" character
-
- There is also the single sequence \N, which matches a non-newline char-
- acter. This is the same as the "." metacharacter when PCRE_DOTALL is
- not set. Perl also uses \N to match characters by name; PCRE does not
- support this.
-
- Each pair of lower and upper case escape sequences partitions the com-
- plete set of characters into two disjoint sets. Any given character
- matches one, and only one, of each pair. The sequences can appear both
- inside and outside character classes. They each match one character of
- the appropriate type. If the current matching point is at the end of
- the subject string, all of them fail, because there is no character to
- match.
-
- For compatibility with Perl, \s does not match the VT character (code
- 11). This makes it different from the the POSIX "space" class. The \s
- characters are HT (9), LF (10), FF (12), CR (13), and space (32). If
- "use locale;" is included in a Perl script, \s may match the VT charac-
- ter. In PCRE, it never does.
-
- A "word" character is an underscore or any character that is a letter
- or digit. By default, the definition of letters and digits is con-
- trolled by PCRE's low-valued character tables, and may vary if locale-
- specific matching is taking place (see "Locale support" in the pcreapi
- page). For example, in a French locale such as "fr_FR" in Unix-like
- systems, or "french" in Windows, some character codes greater than 128
- are used for accented letters, and these are then matched by \w. The
- use of locales with Unicode is discouraged.
-
- By default, in a UTF mode, characters with values greater than 128
- never match \d, \s, or \w, and always match \D, \S, and \W. These
- sequences retain their original meanings from before UTF support was
- available, mainly for efficiency reasons. However, if PCRE is compiled
- with Unicode property support, and the PCRE_UCP option is set, the be-
- haviour is changed so that Unicode properties are used to determine
- character types, as follows:
-
- \d any character that \p{Nd} matches (decimal digit)
- \s any character that \p{Z} matches, plus HT, LF, FF, CR
- \w any character that \p{L} or \p{N} matches, plus underscore
-
- The upper case escapes match the inverse sets of characters. Note that
- \d matches only decimal digits, whereas \w matches any Unicode digit,
- as well as any Unicode letter, and underscore. Note also that PCRE_UCP
- affects \b, and \B because they are defined in terms of \w and \W.
- Matching these sequences is noticeably slower when PCRE_UCP is set.
-
- The sequences \h, \H, \v, and \V are features that were added to Perl
- at release 5.10. In contrast to the other sequences, which match only
- ASCII characters by default, these always match certain high-valued
- codepoints, whether or not PCRE_UCP is set. The horizontal space char-
- acters are:
-
- U+0009 Horizontal tab
- U+0020 Space
- U+00A0 Non-break space
- U+1680 Ogham space mark
- U+180E Mongolian vowel separator
- U+2000 En quad
- U+2001 Em quad
- U+2002 En space
- U+2003 Em space
- U+2004 Three-per-em space
- U+2005 Four-per-em space
- U+2006 Six-per-em space
- U+2007 Figure space
- U+2008 Punctuation space
- U+2009 Thin space
- U+200A Hair space
- U+202F Narrow no-break space
- U+205F Medium mathematical space
- U+3000 Ideographic space
-
- The vertical space characters are:
-
- U+000A Linefeed
- U+000B Vertical tab
- U+000C Formfeed
- U+000D Carriage return
- U+0085 Next line
- U+2028 Line separator
- U+2029 Paragraph separator
-
- In 8-bit, non-UTF-8 mode, only the characters with codepoints less than
- 256 are relevant.
-
- Newline sequences
-
- Outside a character class, by default, the escape sequence \R matches
- any Unicode newline sequence. In 8-bit non-UTF-8 mode \R is equivalent
- to the following:
-
- (?>\r\n|\n|\x0b|\f|\r|\x85)
-
- This is an example of an "atomic group", details of which are given
- below. This particular group matches either the two-character sequence
- CR followed by LF, or one of the single characters LF (linefeed,
- U+000A), VT (vertical tab, U+000B), FF (formfeed, U+000C), CR (carriage
- return, U+000D), or NEL (next line, U+0085). The two-character sequence
- is treated as a single unit that cannot be split.
-
- In other modes, two additional characters whose codepoints are greater
- than 255 are added: LS (line separator, U+2028) and PS (paragraph sepa-
- rator, U+2029). Unicode character property support is not needed for
- these characters to be recognized.
-
- It is possible to restrict \R to match only CR, LF, or CRLF (instead of
- the complete set of Unicode line endings) by setting the option
- PCRE_BSR_ANYCRLF either at compile time or when the pattern is matched.
- (BSR is an abbrevation for "backslash R".) This can be made the default
- when PCRE is built; if this is the case, the other behaviour can be
- requested via the PCRE_BSR_UNICODE option. It is also possible to
- specify these settings by starting a pattern string with one of the
- following sequences:
-
- (*BSR_ANYCRLF) CR, LF, or CRLF only
- (*BSR_UNICODE) any Unicode newline sequence
-
- These override the default and the options given to the compiling func-
- tion, but they can themselves be overridden by options given to a
- matching function. Note that these special settings, which are not
- Perl-compatible, are recognized only at the very start of a pattern,
- and that they must be in upper case. If more than one of them is
- present, the last one is used. They can be combined with a change of
- newline convention; for example, a pattern can start with:
-
- (*ANY)(*BSR_ANYCRLF)
-
- They can also be combined with the (*UTF8), (*UTF16), or (*UCP) special
- sequences. Inside a character class, \R is treated as an unrecognized
- escape sequence, and so matches the letter "R" by default, but causes
- an error if PCRE_EXTRA is set.
-
- Unicode character properties
-
- When PCRE is built with Unicode character property support, three addi-
- tional escape sequences that match characters with specific properties
- are available. When in 8-bit non-UTF-8 mode, these sequences are of
- course limited to testing characters whose codepoints are less than
- 256, but they do work in this mode. The extra escape sequences are:
-
- \p{xx} a character with the xx property
- \P{xx} a character without the xx property
- \X an extended Unicode sequence
-
- The property names represented by xx above are limited to the Unicode
- script names, the general category properties, "Any", which matches any
- character (including newline), and some special PCRE properties
- (described in the next section). Other Perl properties such as "InMu-
- sicalSymbols" are not currently supported by PCRE. Note that \P{Any}
- does not match any characters, so always causes a match failure.
-
- Sets of Unicode characters are defined as belonging to certain scripts.
- A character from one of these sets can be matched using a script name.
- For example:
-
- \p{Greek}
- \P{Han}
-
- Those that are not part of an identified script are lumped together as
- "Common". The current list of scripts is:
-
- Arabic, Armenian, Avestan, Balinese, Bamum, Bengali, Bopomofo, Braille,
- Buginese, Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common,
- Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Egyp-
- tian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, Gothic, Greek,
- Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana, Impe-
- rial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscriptional_Parthian,
- Javanese, Kaithi, Kannada, Katakana, Kayah_Li, Kharoshthi, Khmer, Lao,
- Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam,
- Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic,
- Old_Persian, Old_South_Arabian, Old_Turkic, Ol_Chiki, Oriya, Osmanya,
- Phags_Pa, Phoenician, Rejang, Runic, Samaritan, Saurashtra, Shavian,
- Sinhala, Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le,
- Tai_Tham, Tai_Viet, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh,
- Ugaritic, Vai, Yi.
-
- Each character has exactly one Unicode general category property, spec-
- ified by a two-letter abbreviation. For compatibility with Perl, nega-
- tion can be specified by including a circumflex between the opening
- brace and the property name. For example, \p{^Lu} is the same as
- \P{Lu}.
-
- If only one letter is specified with \p or \P, it includes all the gen-
- eral category properties that start with that letter. In this case, in
- the absence of negation, the curly brackets in the escape sequence are
- optional; these two examples have the same effect:
-
- \p{L}
- \pL
-
- The following general category property codes are supported:
-
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
-
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-
- The special property L& is also supported: it matches a character that
- has the Lu, Ll, or Lt property, in other words, a letter that is not
- classified as a modifier or "other".
-
- The Cs (Surrogate) property applies only to characters in the range
- U+D800 to U+DFFF. Such characters are not valid in Unicode strings and
- so cannot be tested by PCRE, unless UTF validity checking has been
- turned off (see the discussion of PCRE_NO_UTF8_CHECK and
- PCRE_NO_UTF16_CHECK in the pcreapi page). Perl does not support the Cs
- property.
-
- The long synonyms for property names that Perl supports (such as
- \p{Letter}) are not supported by PCRE, nor is it permitted to prefix
- any of these properties with "Is".
-
- No character that is in the Unicode table has the Cn (unassigned) prop-
- erty. Instead, this property is assumed for any code point that is not
- in the Unicode table.
-
- Specifying caseless matching does not affect these escape sequences.
- For example, \p{Lu} always matches only upper case letters.
-
- The \X escape matches any number of Unicode characters that form an
- extended Unicode sequence. \X is equivalent to
-
- (?>\PM\pM*)
-
- That is, it matches a character without the "mark" property, followed
- by zero or more characters with the "mark" property, and treats the
- sequence as an atomic group (see below). Characters with the "mark"
- property are typically accents that affect the preceding character.
- None of them have codepoints less than 256, so in 8-bit non-UTF-8 mode
- \X matches any one character.
-
- Note that recent versions of Perl have changed \X to match what Unicode
- calls an "extended grapheme cluster", which has a more complicated def-
- inition.
-
- Matching characters by Unicode property is not fast, because PCRE has
- to search a structure that contains data for over fifteen thousand
- characters. That is why the traditional escape sequences such as \d and
- \w do not use Unicode properties in PCRE by default, though you can
- make them do so by setting the PCRE_UCP option or by starting the pat-
- tern with (*UCP).
-
- PCRE's additional properties
-
- As well as the standard Unicode properties described in the previous
- section, PCRE supports four more that make it possible to convert tra-
- ditional escape sequences such as \w and \s and POSIX character classes
- to use Unicode properties. PCRE uses these non-standard, non-Perl prop-
- erties internally when PCRE_UCP is set. They are:
-
- Xan Any alphanumeric character
- Xps Any POSIX space character
- Xsp Any Perl space character
- Xwd Any Perl "word" character
-
- Xan matches characters that have either the L (letter) or the N (num-
- ber) property. Xps matches the characters tab, linefeed, vertical tab,
- formfeed, or carriage return, and any other character that has the Z
- (separator) property. Xsp is the same as Xps, except that vertical tab
- is excluded. Xwd matches the same characters as Xan, plus underscore.
-
- Resetting the match start
-
- The escape sequence \K causes any previously matched characters not to
- be included in the final matched sequence. For example, the pattern:
-
- foo\Kbar
-
- matches "foobar", but reports that it has matched "bar". This feature
- is similar to a lookbehind assertion (described below). However, in
- this case, the part of the subject before the real match does not have
- to be of fixed length, as lookbehind assertions do. The use of \K does
- not interfere with the setting of captured substrings. For example,
- when the pattern
-
- (foo)\Kbar
-
- matches "foobar", the first substring is still set to "foo".
-
- Perl documents that the use of \K within assertions is "not well
- defined". In PCRE, \K is acted upon when it occurs inside positive
- assertions, but is ignored in negative assertions.
-
- Simple assertions
-
- The final use of backslash is for certain simple assertions. An asser-
- tion specifies a condition that has to be met at a particular point in
- a match, without consuming any characters from the subject string. The
- use of subpatterns for more complicated assertions is described below.
- The backslashed assertions are:
-
- \b matches at a word boundary
- \B matches when not at a word boundary
- \A matches at the start of the subject
- \Z matches at the end of the subject
- also matches before a newline at the end of the subject
- \z matches only at the end of the subject
- \G matches at the first matching position in the subject
-
- Inside a character class, \b has a different meaning; it matches the
- backspace character. If any other of these assertions appears in a
- character class, by default it matches the corresponding literal char-
- acter (for example, \B matches the letter B). However, if the
- PCRE_EXTRA option is set, an "invalid escape sequence" error is gener-
- ated instead.
-
- A word boundary is a position in the subject string where the current
- character and the previous character do not both match \w or \W (i.e.
- one matches \w and the other matches \W), or the start or end of the
- string if the first or last character matches \w, respectively. In a
- UTF mode, the meanings of \w and \W can be changed by setting the
- PCRE_UCP option. When this is done, it also affects \b and \B. Neither
- PCRE nor Perl has a separate "start of word" or "end of word" metase-
- quence. However, whatever follows \b normally determines which it is.
- For example, the fragment \ba matches "a" at the start of a word.
-
- The \A, \Z, and \z assertions differ from the traditional circumflex
- and dollar (described in the next section) in that they only ever match
- at the very start and end of the subject string, whatever options are
- set. Thus, they are independent of multiline mode. These three asser-
- tions are not affected by the PCRE_NOTBOL or PCRE_NOTEOL options, which
- affect only the behaviour of the circumflex and dollar metacharacters.
- However, if the startoffset argument of pcre_exec() is non-zero, indi-
- cating that matching is to start at a point other than the beginning of
- the subject, \A can never match. The difference between \Z and \z is
- that \Z matches before a newline at the end of the string as well as at
- the very end, whereas \z matches only at the end.
-
- The \G assertion is true only when the current matching position is at
- the start point of the match, as specified by the startoffset argument
- of pcre_exec(). It differs from \A when the value of startoffset is
- non-zero. By calling pcre_exec() multiple times with appropriate argu-
- ments, you can mimic Perl's /g option, and it is in this kind of imple-
- mentation where \G can be useful.
-
- Note, however, that PCRE's interpretation of \G, as the start of the
- current match, is subtly different from Perl's, which defines it as the
- end of the previous match. In Perl, these can be different when the
- previously matched string was empty. Because PCRE does just one match
- at a time, it cannot reproduce this behaviour.
-
- If all the alternatives of a pattern begin with \G, the expression is
- anchored to the starting match position, and the "anchored" flag is set
- in the compiled regular expression.
-
-
-CIRCUMFLEX AND DOLLAR
-
- Outside a character class, in the default matching mode, the circumflex
- character is an assertion that is true only if the current matching
- point is at the start of the subject string. If the startoffset argu-
- ment of pcre_exec() is non-zero, circumflex can never match if the
- PCRE_MULTILINE option is unset. Inside a character class, circumflex
- has an entirely different meaning (see below).
-
- Circumflex need not be the first character of the pattern if a number
- of alternatives are involved, but it should be the first thing in each
- alternative in which it appears if the pattern is ever to match that
- branch. If all possible alternatives start with a circumflex, that is,
- if the pattern is constrained to match only at the start of the sub-
- ject, it is said to be an "anchored" pattern. (There are also other
- constructs that can cause a pattern to be anchored.)
-
- A dollar character is an assertion that is true only if the current
- matching point is at the end of the subject string, or immediately
- before a newline at the end of the string (by default). Dollar need not
- be the last character of the pattern if a number of alternatives are
- involved, but it should be the last item in any branch in which it
- appears. Dollar has no special meaning in a character class.
-
- The meaning of dollar can be changed so that it matches only at the
- very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at
- compile time. This does not affect the \Z assertion.
-
- The meanings of the circumflex and dollar characters are changed if the
- PCRE_MULTILINE option is set. When this is the case, a circumflex
- matches immediately after internal newlines as well as at the start of
- the subject string. It does not match after a newline that ends the
- string. A dollar matches before any newlines in the string, as well as
- at the very end, when PCRE_MULTILINE is set. When newline is specified
- as the two-character sequence CRLF, isolated CR and LF characters do
- not indicate newlines.
-
- For example, the pattern /^abc$/ matches the subject string "def\nabc"
- (where \n represents a newline) in multiline mode, but not otherwise.
- Consequently, patterns that are anchored in single line mode because
- all branches start with ^ are not anchored in multiline mode, and a
- match for circumflex is possible when the startoffset argument of
- pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if
- PCRE_MULTILINE is set.
-
- Note that the sequences \A, \Z, and \z can be used to match the start
- and end of the subject in both modes, and if all branches of a pattern
- start with \A it is always anchored, whether or not PCRE_MULTILINE is
- set.
-
-
-FULL STOP (PERIOD, DOT) AND \N
-
- Outside a character class, a dot in the pattern matches any one charac-
- ter in the subject string except (by default) a character that signi-
- fies the end of a line.
-
- When a line ending is defined as a single character, dot never matches
- that character; when the two-character sequence CRLF is used, dot does
- not match CR if it is immediately followed by LF, but otherwise it
- matches all characters (including isolated CRs and LFs). When any Uni-
- code line endings are being recognized, dot does not match CR or LF or
- any of the other line ending characters.
-
- The behaviour of dot with regard to newlines can be changed. If the
- PCRE_DOTALL option is set, a dot matches any one character, without
- exception. If the two-character sequence CRLF is present in the subject
- string, it takes two dots to match it.
-
- The handling of dot is entirely independent of the handling of circum-
- flex and dollar, the only relationship being that they both involve
- newlines. Dot has no special meaning in a character class.
-
- The escape sequence \N behaves like a dot, except that it is not
- affected by the PCRE_DOTALL option. In other words, it matches any
- character except one that signifies the end of a line. Perl also uses
- \N to match characters by name; PCRE does not support this.
-
-
-MATCHING A SINGLE DATA UNIT
-
- Outside a character class, the escape sequence \C matches any one data
- unit, whether or not a UTF mode is set. In the 8-bit library, one data
- unit is one byte; in the 16-bit library it is a 16-bit unit. Unlike a
- dot, \C always matches line-ending characters. The feature is provided
- in Perl in order to match individual bytes in UTF-8 mode, but it is
- unclear how it can usefully be used. Because \C breaks up characters
- into individual data units, matching one unit with \C in a UTF mode
- means that the rest of the string may start with a malformed UTF char-
- acter. This has undefined results, because PCRE assumes that it is
- dealing with valid UTF strings (and by default it checks this at the
- start of processing unless the PCRE_NO_UTF8_CHECK option is used).
-
- PCRE does not allow \C to appear in lookbehind assertions (described
- below) in a UTF mode, because this would make it impossible to calcu-
- late the length of the lookbehind.
-
- In general, the \C escape sequence is best avoided. However, one way of
- using it that avoids the problem of malformed UTF characters is to use
- a lookahead to check the length of the next character, as in this pat-
- tern, which could be used with a UTF-8 string (ignore white space and
- line breaks):
-
- (?| (?=[\x00-\x7f])(\C) |
- (?=[\x80-\x{7ff}])(\C)(\C) |
- (?=[\x{800}-\x{ffff}])(\C)(\C)(\C) |
- (?=[\x{10000}-\x{1fffff}])(\C)(\C)(\C)(\C))
-
- A group that starts with (?| resets the capturing parentheses numbers
- in each alternative (see "Duplicate Subpattern Numbers" below). The
- assertions at the start of each branch check the next UTF-8 character
- for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
- character's individual bytes are then captured by the appropriate num-
- ber of groups.
-
-
-SQUARE BRACKETS AND CHARACTER CLASSES
-
- An opening square bracket introduces a character class, terminated by a
- closing square bracket. A closing square bracket on its own is not spe-
- cial by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set,
- a lone closing square bracket causes a compile-time error. If a closing
- square bracket is required as a member of the class, it should be the
- first data character in the class (after an initial circumflex, if
- present) or escaped with a backslash.
-
- A character class matches a single character in the subject. In a UTF
- mode, the character may be more than one data unit long. A matched
- character must be in the set of characters defined by the class, unless
- the first character in the class definition is a circumflex, in which
- case the subject character must not be in the set defined by the class.
- If a circumflex is actually required as a member of the class, ensure
- it is not the first character, or escape it with a backslash.
-
- For example, the character class [aeiou] matches any lower case vowel,
- while [^aeiou] matches any character that is not a lower case vowel.
- Note that a circumflex is just a convenient notation for specifying the
- characters that are in the class by enumerating those that are not. A
- class that starts with a circumflex is not an assertion; it still con-
- sumes a character from the subject string, and therefore it fails if
- the current pointer is at the end of the string.
-
- In UTF-8 (UTF-16) mode, characters with values greater than 255
- (0xffff) can be included in a class as a literal string of data units,
- or by using the \x{ escaping mechanism.
-
- When caseless matching is set, any letters in a class represent both
- their upper case and lower case versions, so for example, a caseless
- [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not
- match "A", whereas a caseful version would. In a UTF mode, PCRE always
- understands the concept of case for characters whose values are less
- than 128, so caseless matching is always possible. For characters with
- higher values, the concept of case is supported if PCRE is compiled
- with Unicode property support, but not otherwise. If you want to use
- caseless matching in a UTF mode for characters 128 and above, you must
- ensure that PCRE is compiled with Unicode property support as well as
- with UTF support.
-
- Characters that might indicate line breaks are never treated in any
- special way when matching character classes, whatever line-ending
- sequence is in use, and whatever setting of the PCRE_DOTALL and
- PCRE_MULTILINE options is used. A class such as [^a] always matches one
- of these characters.
-
- The minus (hyphen) character can be used to specify a range of charac-
- ters in a character class. For example, [d-m] matches any letter
- between d and m, inclusive. If a minus character is required in a
- class, it must be escaped with a backslash or appear in a position
- where it cannot be interpreted as indicating a range, typically as the
- first or last character in the class.
-
- It is not possible to have the literal character "]" as the end charac-
- ter of a range. A pattern such as [W-]46] is interpreted as a class of
- two characters ("W" and "-") followed by a literal string "46]", so it
- would match "W46]" or "-46]". However, if the "]" is escaped with a
- backslash it is interpreted as the end of range, so [W-\]46] is inter-
- preted as a class containing a range followed by two other characters.
- The octal or hexadecimal representation of "]" can also be used to end
- a range.
-
- Ranges operate in the collating sequence of character values. They can
- also be used for characters specified numerically, for example
- [\000-\037]. Ranges can include any characters that are valid for the
- current mode.
-
- If a range that includes letters is used when caseless matching is set,
- it matches the letters in either case. For example, [W-c] is equivalent
- to [][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if
- character tables for a French locale are in use, [\xc8-\xcb] matches
- accented E characters in both cases. In UTF modes, PCRE supports the
- concept of case for characters with values greater than 128 only when
- it is compiled with Unicode property support.
-
- The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v, \V,
- \w, and \W may appear in a character class, and add the characters that
- they match to the class. For example, [\dABCDEF] matches any hexadeci-
- mal digit. In UTF modes, the PCRE_UCP option affects the meanings of
- \d, \s, \w and their upper case partners, just as it does when they
- appear outside a character class, as described in the section entitled
- "Generic character types" above. The escape sequence \b has a different
- meaning inside a character class; it matches the backspace character.
- The sequences \B, \N, \R, and \X are not special inside a character
- class. Like any other unrecognized escape sequences, they are treated
- as the literal characters "B", "N", "R", and "X" by default, but cause
- an error if the PCRE_EXTRA option is set.
-
- A circumflex can conveniently be used with the upper case character
- types to specify a more restricted set of characters than the matching
- lower case type. For example, the class [^\W_] matches any letter or
- digit, but not underscore, whereas [\w] includes underscore. A positive
- character class should be read as "something OR something OR ..." and a
- negative class as "NOT something AND NOT something AND NOT ...".
-
- The only metacharacters that are recognized in character classes are
- backslash, hyphen (only where it can be interpreted as specifying a
- range), circumflex (only at the start), opening square bracket (only
- when it can be interpreted as introducing a POSIX class name - see the
- next section), and the terminating closing square bracket. However,
- escaping other non-alphanumeric characters does no harm.
-
-
-POSIX CHARACTER CLASSES
-
- Perl supports the POSIX notation for character classes. This uses names
- enclosed by [: and :] within the enclosing square brackets. PCRE also
- supports this notation. For example,
-
- [01[:alpha:]%]
-
- matches "0", "1", any alphabetic character, or "%". The supported class
- names are:
-
- alnum letters and digits
- alpha letters
- ascii character codes 0 - 127
- blank space or tab only
- cntrl control characters
- digit decimal digits (same as \d)
- graph printing characters, excluding space
- lower lower case letters
- print printing characters, including space
- punct printing characters, excluding letters and digits and space
- space white space (not quite the same as \s)
- upper upper case letters
- word "word" characters (same as \w)
- xdigit hexadecimal digits
-
- The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13),
- and space (32). Notice that this list includes the VT character (code
- 11). This makes "space" different to \s, which does not include VT (for
- Perl compatibility).
-
- The name "word" is a Perl extension, and "blank" is a GNU extension
- from Perl 5.8. Another Perl extension is negation, which is indicated
- by a ^ character after the colon. For example,
-
- [12[:^digit:]]
-
- matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the
- POSIX syntax [.ch.] and [=ch=] where "ch" is a "collating element", but
- these are not supported, and an error is given if they are encountered.
-
- By default, in UTF modes, characters with values greater than 128 do
- not match any of the POSIX character classes. However, if the PCRE_UCP
- option is passed to pcre_compile(), some of the classes are changed so
- that Unicode character properties are used. This is achieved by replac-
- ing the POSIX classes by other sequences, as follows:
-
- [:alnum:] becomes \p{Xan}
- [:alpha:] becomes \p{L}
- [:blank:] becomes \h
- [:digit:] becomes \p{Nd}
- [:lower:] becomes \p{Ll}
- [:space:] becomes \p{Xps}
- [:upper:] becomes \p{Lu}
- [:word:] becomes \p{Xwd}
-
- Negated versions, such as [:^alpha:] use \P instead of \p. The other
- POSIX classes are unchanged, and match only characters with code points
- less than 128.
-
-
-VERTICAL BAR
-
- Vertical bar characters are used to separate alternative patterns. For
- example, the pattern
-
- gilbert|sullivan
-
- matches either "gilbert" or "sullivan". Any number of alternatives may
- appear, and an empty alternative is permitted (matching the empty
- string). The matching process tries each alternative in turn, from left
- to right, and the first one that succeeds is used. If the alternatives
- are within a subpattern (defined below), "succeeds" means matching the
- rest of the main pattern as well as the alternative in the subpattern.
-
-
-INTERNAL OPTION SETTING
-
- The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
- PCRE_EXTENDED options (which are Perl-compatible) can be changed from
- within the pattern by a sequence of Perl option letters enclosed
- between "(?" and ")". The option letters are
-
- i for PCRE_CASELESS
- m for PCRE_MULTILINE
- s for PCRE_DOTALL
- x for PCRE_EXTENDED
-
- For example, (?im) sets caseless, multiline matching. It is also possi-
- ble to unset these options by preceding the letter with a hyphen, and a
- combined setting and unsetting such as (?im-sx), which sets PCRE_CASE-
- LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED,
- is also permitted. If a letter appears both before and after the
- hyphen, the option is unset.
-
- The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA
- can be changed in the same way as the Perl-compatible options by using
- the characters J, U and X respectively.
-
- When one of these option changes occurs at top level (that is, not
- inside subpattern parentheses), the change applies to the remainder of
- the pattern that follows. If the change is placed right at the start of
- a pattern, PCRE extracts it into the global options (and it will there-
- fore show up in data extracted by the pcre_fullinfo() function).
-
- An option change within a subpattern (see below for a description of
- subpatterns) affects only that part of the subpattern that follows it,
- so
-
- (a(?i)b)c
-
- matches abc and aBc and no other strings (assuming PCRE_CASELESS is not
- used). By this means, options can be made to have different settings
- in different parts of the pattern. Any changes made in one alternative
- do carry on into subsequent branches within the same subpattern. For
- example,
-
- (a(?i)b|c)
-
- matches "ab", "aB", "c", and "C", even though when matching "C" the
- first branch is abandoned before the option setting. This is because
- the effects of option settings happen at compile time. There would be
- some very weird behaviour otherwise.
-
- Note: There are other PCRE-specific options that can be set by the
- application when the compiling or matching functions are called. In
- some cases the pattern can contain special leading sequences such as
- (*CRLF) to override what the application has set or what has been
- defaulted. Details are given in the section entitled "Newline
- sequences" above. There are also the (*UTF8), (*UTF16), and (*UCP)
- leading sequences that can be used to set UTF and Unicode property
- modes; they are equivalent to setting the PCRE_UTF8, PCRE_UTF16, and
- the PCRE_UCP options, respectively.
-
-
-SUBPATTERNS
-
- Subpatterns are delimited by parentheses (round brackets), which can be
- nested. Turning part of a pattern into a subpattern does two things:
-
- 1. It localizes a set of alternatives. For example, the pattern
-
- cat(aract|erpillar|)
-
- matches "cataract", "caterpillar", or "cat". Without the parentheses,
- it would match "cataract", "erpillar" or an empty string.
-
- 2. It sets up the subpattern as a capturing subpattern. This means
- that, when the whole pattern matches, that portion of the subject
- string that matched the subpattern is passed back to the caller via the
- ovector argument of the matching function. (This applies only to the
- traditional matching functions; the DFA matching functions do not sup-
- port capturing.)
-
- Opening parentheses are counted from left to right (starting from 1) to
- obtain numbers for the capturing subpatterns. For example, if the
- string "the red king" is matched against the pattern
-
- the ((red|white) (king|queen))
-
- the captured substrings are "red king", "red", and "king", and are num-
- bered 1, 2, and 3, respectively.
-
- The fact that plain parentheses fulfil two functions is not always
- helpful. There are often times when a grouping subpattern is required
- without a capturing requirement. If an opening parenthesis is followed
- by a question mark and a colon, the subpattern does not do any captur-
- ing, and is not counted when computing the number of any subsequent
- capturing subpatterns. For example, if the string "the white queen" is
- matched against the pattern
-
- the ((?:red|white) (king|queen))
-
- the captured substrings are "white queen" and "queen", and are numbered
- 1 and 2. The maximum number of capturing subpatterns is 65535.
-
- As a convenient shorthand, if any option settings are required at the
- start of a non-capturing subpattern, the option letters may appear
- between the "?" and the ":". Thus the two patterns
-
- (?i:saturday|sunday)
- (?:(?i)saturday|sunday)
-
- match exactly the same set of strings. Because alternative branches are
- tried from left to right, and options are not reset until the end of
- the subpattern is reached, an option setting in one branch does affect
- subsequent branches, so the above patterns match "SUNDAY" as well as
- "Saturday".
-
-
-DUPLICATE SUBPATTERN NUMBERS
-
- Perl 5.10 introduced a feature whereby each alternative in a subpattern
- uses the same numbers for its capturing parentheses. Such a subpattern
- starts with (?| and is itself a non-capturing subpattern. For example,
- consider this pattern:
-
- (?|(Sat)ur|(Sun))day
-
- Because the two alternatives are inside a (?| group, both sets of cap-
- turing parentheses are numbered one. Thus, when the pattern matches,
- you can look at captured substring number one, whichever alternative
- matched. This construct is useful when you want to capture part, but
- not all, of one of a number of alternatives. Inside a (?| group, paren-
- theses are numbered as usual, but the number is reset at the start of
- each branch. The numbers of any capturing parentheses that follow the
- subpattern start after the highest number used in any branch. The fol-
- lowing example is taken from the Perl documentation. The numbers under-
- neath show in which buffer the captured content will be stored.
-
- # before ---------------branch-reset----------- after
- / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
- # 1 2 2 3 2 3 4
-
- A back reference to a numbered subpattern uses the most recent value
- that is set for that number by any subpattern. The following pattern
- matches "abcabc" or "defdef":
-
- /(?|(abc)|(def))\1/
-
- In contrast, a subroutine call to a numbered subpattern always refers
- to the first one in the pattern with the given number. The following
- pattern matches "abcabc" or "defabc":
-
- /(?|(abc)|(def))(?1)/
-
- If a condition test for a subpattern's having matched refers to a non-
- unique number, the test is true if any of the subpatterns of that num-
- ber have matched.
-
- An alternative approach to using this "branch reset" feature is to use
- duplicate named subpatterns, as described in the next section.
-
-
-NAMED SUBPATTERNS
-
- Identifying capturing parentheses by number is simple, but it can be
- very hard to keep track of the numbers in complicated regular expres-
- sions. Furthermore, if an expression is modified, the numbers may
- change. To help with this difficulty, PCRE supports the naming of sub-
- patterns. This feature was not added to Perl until release 5.10. Python
- had the feature earlier, and PCRE introduced it at release 4.0, using
- the Python syntax. PCRE now supports both the Perl and the Python syn-
- tax. Perl allows identically numbered subpatterns to have different
- names, but PCRE does not.
-
- In PCRE, a subpattern can be named in one of three ways: (?<name>...)
- or (?'name'...) as in Perl, or (?P<name>...) as in Python. References
- to capturing parentheses from other parts of the pattern, such as back
- references, recursion, and conditions, can be made by name as well as
- by number.
-
- Names consist of up to 32 alphanumeric characters and underscores.
- Named capturing parentheses are still allocated numbers as well as
- names, exactly as if the names were not present. The PCRE API provides
- function calls for extracting the name-to-number translation table from
- a compiled pattern. There is also a convenience function for extracting
- a captured substring by name.
-
- By default, a name must be unique within a pattern, but it is possible
- to relax this constraint by setting the PCRE_DUPNAMES option at compile
- time. (Duplicate names are also always permitted for subpatterns with
- the same number, set up as described in the previous section.) Dupli-
- cate names can be useful for patterns where only one instance of the
- named parentheses can match. Suppose you want to match the name of a
- weekday, either as a 3-letter abbreviation or as the full name, and in
- both cases you want to extract the abbreviation. This pattern (ignoring
- the line breaks) does the job:
-
- (?<DN>Mon|Fri|Sun)(?:day)?|
- (?<DN>Tue)(?:sday)?|
- (?<DN>Wed)(?:nesday)?|
- (?<DN>Thu)(?:rsday)?|
- (?<DN>Sat)(?:urday)?
-
- There are five capturing substrings, but only one is ever set after a
- match. (An alternative way of solving this problem is to use a "branch
- reset" subpattern, as described in the previous section.)
-
- The convenience function for extracting the data by name returns the
- substring for the first (and in this example, the only) subpattern of
- that name that matched. This saves searching to find which numbered
- subpattern it was.
-
- If you make a back reference to a non-unique named subpattern from
- elsewhere in the pattern, the one that corresponds to the first occur-
- rence of the name is used. In the absence of duplicate numbers (see the
- previous section) this is the one with the lowest number. If you use a
- named reference in a condition test (see the section about conditions
- below), either to check whether a subpattern has matched, or to check
- for recursion, all subpatterns with the same name are tested. If the
- condition is true for any one of them, the overall condition is true.
- This is the same behaviour as testing by number. For further details of
- the interfaces for handling named subpatterns, see the pcreapi documen-
- tation.
-
- Warning: You cannot use different names to distinguish between two sub-
- patterns with the same number because PCRE uses only the numbers when
- matching. For this reason, an error is given at compile time if differ-
- ent names are given to subpatterns with the same number. However, you
- can give the same name to subpatterns with the same number, even when
- PCRE_DUPNAMES is not set.
-
-
-REPETITION
-
- Repetition is specified by quantifiers, which can follow any of the
- following items:
-
- a literal data character
- the dot metacharacter
- the \C escape sequence
- the \X escape sequence
- the \R escape sequence
- an escape such as \d or \pL that matches a single character
- a character class
- a back reference (see next section)
- a parenthesized subpattern (including assertions)
- a subroutine call to a subpattern (recursive or otherwise)
-
- The general repetition quantifier specifies a minimum and maximum num-
- ber of permitted matches, by giving the two numbers in curly brackets
- (braces), separated by a comma. The numbers must be less than 65536,
- and the first must be less than or equal to the second. For example:
-
- z{2,4}
-
- matches "zz", "zzz", or "zzzz". A closing brace on its own is not a
- special character. If the second number is omitted, but the comma is
- present, there is no upper limit; if the second number and the comma
- are both omitted, the quantifier specifies an exact number of required
- matches. Thus
-
- [aeiou]{3,}
-
- matches at least 3 successive vowels, but may match many more, while
-
- \d{8}
-
- matches exactly 8 digits. An opening curly bracket that appears in a
- position where a quantifier is not allowed, or one that does not match
- the syntax of a quantifier, is taken as a literal character. For exam-
- ple, {,6} is not a quantifier, but a literal string of four characters.
-
- In UTF modes, quantifiers apply to characters rather than to individual
- data units. Thus, for example, \x{100}{2} matches two characters, each
- of which is represented by a two-byte sequence in a UTF-8 string. Simi-
- larly, \X{3} matches three Unicode extended sequences, each of which
- may be several data units long (and they may be of different lengths).
-
- The quantifier {0} is permitted, causing the expression to behave as if
- the previous item and the quantifier were not present. This may be use-
- ful for subpatterns that are referenced as subroutines from elsewhere
- in the pattern (but see also the section entitled "Defining subpatterns
- for use by reference only" below). Items other than subpatterns that
- have a {0} quantifier are omitted from the compiled pattern.
-
- For convenience, the three most common quantifiers have single-charac-
- ter abbreviations:
-
- * is equivalent to {0,}
- + is equivalent to {1,}
- ? is equivalent to {0,1}
-
- It is possible to construct infinite loops by following a subpattern
- that can match no characters with a quantifier that has no upper limit,
- for example:
-
- (a?)*
-
- Earlier versions of Perl and PCRE used to give an error at compile time
- for such patterns. However, because there are cases where this can be
- useful, such patterns are now accepted, but if any repetition of the
- subpattern does in fact match no characters, the loop is forcibly bro-
- ken.
-
- By default, the quantifiers are "greedy", that is, they match as much
- as possible (up to the maximum number of permitted times), without
- causing the rest of the pattern to fail. The classic example of where
- this gives problems is in trying to match comments in C programs. These
- appear between /* and */ and within the comment, individual * and /
- characters may appear. An attempt to match C comments by applying the
- pattern
-
- /\*.*\*/
-
- to the string
-
- /* first comment */ not comment /* second comment */
-
- fails, because it matches the entire string owing to the greediness of
- the .* item.
-
- However, if a quantifier is followed by a question mark, it ceases to
- be greedy, and instead matches the minimum number of times possible, so
- the pattern
-
- /\*.*?\*/
-
- does the right thing with the C comments. The meaning of the various
- quantifiers is not otherwise changed, just the preferred number of
- matches. Do not confuse this use of question mark with its use as a
- quantifier in its own right. Because it has two uses, it can sometimes
- appear doubled, as in
-
- \d??\d
-
- which matches one digit by preference, but can match two if that is the
- only way the rest of the pattern matches.
-
- If the PCRE_UNGREEDY option is set (an option that is not available in
- Perl), the quantifiers are not greedy by default, but individual ones
- can be made greedy by following them with a question mark. In other
- words, it inverts the default behaviour.
-
- When a parenthesized subpattern is quantified with a minimum repeat
- count that is greater than 1 or with a limited maximum, more memory is
- required for the compiled pattern, in proportion to the size of the
- minimum or maximum.
-
- If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equiv-
- alent to Perl's /s) is set, thus allowing the dot to match newlines,
- the pattern is implicitly anchored, because whatever follows will be
- tried against every character position in the subject string, so there
- is no point in retrying the overall match at any position after the
- first. PCRE normally treats such a pattern as though it were preceded
- by \A.
-
- In cases where it is known that the subject string contains no new-
- lines, it is worth setting PCRE_DOTALL in order to obtain this opti-
- mization, or alternatively using ^ to indicate anchoring explicitly.
-
- However, there is one situation where the optimization cannot be used.
- When .* is inside capturing parentheses that are the subject of a back
- reference elsewhere in the pattern, a match at the start may fail where
- a later one succeeds. Consider, for example:
-
- (.*)abc\1
-
- If the subject is "xyz123abc123" the match point is the fourth charac-
- ter. For this reason, such a pattern is not implicitly anchored.
-
- When a capturing subpattern is repeated, the value captured is the sub-
- string that matched the final iteration. For example, after
-
- (tweedle[dume]{3}\s*)+
-
- has matched "tweedledum tweedledee" the value of the captured substring
- is "tweedledee". However, if there are nested capturing subpatterns,
- the corresponding captured values may have been set in previous itera-
- tions. For example, after
-
- /(a|(b))+/
-
- matches "aba" the value of the second captured substring is "b".
-
-
-ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS
-
- With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy")
- repetition, failure of what follows normally causes the repeated item
- to be re-evaluated to see if a different number of repeats allows the
- rest of the pattern to match. Sometimes it is useful to prevent this,
- either to change the nature of the match, or to cause it fail earlier
- than it otherwise might, when the author of the pattern knows there is
- no point in carrying on.
-
- Consider, for example, the pattern \d+foo when applied to the subject
- line
-
- 123456bar
-
- After matching all 6 digits and then failing to match "foo", the normal
- action of the matcher is to try again with only 5 digits matching the
- \d+ item, and then with 4, and so on, before ultimately failing.
- "Atomic grouping" (a term taken from Jeffrey Friedl's book) provides
- the means for specifying that once a subpattern has matched, it is not
- to be re-evaluated in this way.
-
- If we use atomic grouping for the previous example, the matcher gives
- up immediately on failing to match "foo" the first time. The notation
- is a kind of special parenthesis, starting with (?> as in this example:
-
- (?>\d+)foo
-
- This kind of parenthesis "locks up" the part of the pattern it con-
- tains once it has matched, and a failure further into the pattern is
- prevented from backtracking into it. Backtracking past it to previous
- items, however, works as normal.
-
- An alternative description is that a subpattern of this type matches
- the string of characters that an identical standalone pattern would
- match, if anchored at the current point in the subject string.
-
- Atomic grouping subpatterns are not capturing subpatterns. Simple cases
- such as the above example can be thought of as a maximizing repeat that
- must swallow everything it can. So, while both \d+ and \d+? are pre-
- pared to adjust the number of digits they match in order to make the
- rest of the pattern match, (?>\d+) can only match an entire sequence of
- digits.
-
- Atomic groups in general can of course contain arbitrarily complicated
- subpatterns, and can be nested. However, when the subpattern for an
- atomic group is just a single repeated item, as in the example above, a
- simpler notation, called a "possessive quantifier" can be used. This
- consists of an additional + character following a quantifier. Using
- this notation, the previous example can be rewritten as
-
- \d++foo
-
- Note that a possessive quantifier can be used with an entire group, for
- example:
-
- (abc|xyz){2,3}+
-
- Possessive quantifiers are always greedy; the setting of the
- PCRE_UNGREEDY option is ignored. They are a convenient notation for the
- simpler forms of atomic group. However, there is no difference in the
- meaning of a possessive quantifier and the equivalent atomic group,
- though there may be a performance difference; possessive quantifiers
- should be slightly faster.
-
- The possessive quantifier syntax is an extension to the Perl 5.8 syn-
- tax. Jeffrey Friedl originated the idea (and the name) in the first
- edition of his book. Mike McCloskey liked it, so implemented it when he
- built Sun's Java package, and PCRE copied it from there. It ultimately
- found its way into Perl at release 5.10.
-
- PCRE has an optimization that automatically "possessifies" certain sim-
- ple pattern constructs. For example, the sequence A+B is treated as
- A++B because there is no point in backtracking into a sequence of A's
- when B must follow.
-
- When a pattern contains an unlimited repeat inside a subpattern that
- can itself be repeated an unlimited number of times, the use of an
- atomic group is the only way to avoid some failing matches taking a
- very long time indeed. The pattern
-
- (\D+|<\d+>)*[!?]
-
- matches an unlimited number of substrings that either consist of non-
- digits, or digits enclosed in <>, followed by either ! or ?. When it
- matches, it runs quickly. However, if it is applied to
-
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
- it takes a long time before reporting failure. This is because the
- string can be divided between the internal \D+ repeat and the external
- * repeat in a large number of ways, and all have to be tried. (The
- example uses [!?] rather than a single character at the end, because
- both PCRE and Perl have an optimization that allows for fast failure
- when a single character is used. They remember the last single charac-
- ter that is required for a match, and fail early if it is not present
- in the string.) If the pattern is changed so that it uses an atomic
- group, like this:
-
- ((?>\D+)|<\d+>)*[!?]
-
- sequences of non-digits cannot be broken, and failure happens quickly.
-
-
-BACK REFERENCES
-
- Outside a character class, a backslash followed by a digit greater than
- 0 (and possibly further digits) is a back reference to a capturing sub-
- pattern earlier (that is, to its left) in the pattern, provided there
- have been that many previous capturing left parentheses.
-
- However, if the decimal number following the backslash is less than 10,
- it is always taken as a back reference, and causes an error only if
- there are not that many capturing left parentheses in the entire pat-
- tern. In other words, the parentheses that are referenced need not be
- to the left of the reference for numbers less than 10. A "forward back
- reference" of this type can make sense when a repetition is involved
- and the subpattern to the right has participated in an earlier itera-
- tion.
-
- It is not possible to have a numerical "forward back reference" to a
- subpattern whose number is 10 or more using this syntax because a
- sequence such as \50 is interpreted as a character defined in octal.
- See the subsection entitled "Non-printing characters" above for further
- details of the handling of digits following a backslash. There is no
- such problem when named parentheses are used. A back reference to any
- subpattern is possible using named parentheses (see below).
-
- Another way of avoiding the ambiguity inherent in the use of digits
- following a backslash is to use the \g escape sequence. This escape
- must be followed by an unsigned number or a negative number, optionally
- enclosed in braces. These examples are all identical:
-
- (ring), \1
- (ring), \g1
- (ring), \g{1}
-
- An unsigned number specifies an absolute reference without the ambigu-
- ity that is present in the older syntax. It is also useful when literal
- digits follow the reference. A negative number is a relative reference.
- Consider this example:
-
- (abc(def)ghi)\g{-1}
-
- The sequence \g{-1} is a reference to the most recently started captur-
- ing subpattern before \g, that is, is it equivalent to \2 in this exam-
- ple. Similarly, \g{-2} would be equivalent to \1. The use of relative
- references can be helpful in long patterns, and also in patterns that
- are created by joining together fragments that contain references
- within themselves.
-
- A back reference matches whatever actually matched the capturing sub-
- pattern in the current subject string, rather than anything matching
- the subpattern itself (see "Subpatterns as subroutines" below for a way
- of doing that). So the pattern
-
- (sens|respons)e and \1ibility
-
- matches "sense and sensibility" and "response and responsibility", but
- not "sense and responsibility". If caseful matching is in force at the
- time of the back reference, the case of letters is relevant. For exam-
- ple,
-
- ((?i)rah)\s+\1
-
- matches "rah rah" and "RAH RAH", but not "RAH rah", even though the
- original capturing subpattern is matched caselessly.
-
- There are several different ways of writing back references to named
- subpatterns. The .NET syntax \k{name} and the Perl syntax \k<name> or
- \k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's
- unified back reference syntax, in which \g can be used for both numeric
- and named references, is also supported. We could rewrite the above
- example in any of the following ways:
-
- (?<p1>(?i)rah)\s+\k<p1>
- (?'p1'(?i)rah)\s+\k{p1}
- (?P<p1>(?i)rah)\s+(?P=p1)
- (?<p1>(?i)rah)\s+\g{p1}
-
- A subpattern that is referenced by name may appear in the pattern
- before or after the reference.
-
- There may be more than one back reference to the same subpattern. If a
- subpattern has not actually been used in a particular match, any back
- references to it always fail by default. For example, the pattern
-
- (a|(bc))\2
-
- always fails if it starts to match "a" rather than "bc". However, if
- the PCRE_JAVASCRIPT_COMPAT option is set at compile time, a back refer-
- ence to an unset value matches an empty string.
-
- Because there may be many capturing parentheses in a pattern, all dig-
- its following a backslash are taken as part of a potential back refer-
- ence number. If the pattern continues with a digit character, some
- delimiter must be used to terminate the back reference. If the
- PCRE_EXTENDED option is set, this can be whitespace. Otherwise, the \g{
- syntax or an empty comment (see "Comments" below) can be used.
-
- Recursive back references
-
- A back reference that occurs inside the parentheses to which it refers
- fails when the subpattern is first used, so, for example, (a\1) never
- matches. However, such references can be useful inside repeated sub-
- patterns. For example, the pattern
-
- (a|b\1)+
-
- matches any number of "a"s and also "aba", "ababbaa" etc. At each iter-
- ation of the subpattern, the back reference matches the character
- string corresponding to the previous iteration. In order for this to
- work, the pattern must be such that the first iteration does not need
- to match the back reference. This can be done using alternation, as in
- the example above, or by a quantifier with a minimum of zero.
-
- Back references of this type cause the group that they reference to be
- treated as an atomic group. Once the whole group has been matched, a
- subsequent matching failure cannot cause backtracking into the middle
- of the group.
-
-
-ASSERTIONS
-
- An assertion is a test on the characters following or preceding the
- current matching point that does not actually consume any characters.
- The simple assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are
- described above.
-
- More complicated assertions are coded as subpatterns. There are two
- kinds: those that look ahead of the current position in the subject
- string, and those that look behind it. An assertion subpattern is
- matched in the normal way, except that it does not cause the current
- matching position to be changed.
-
- Assertion subpatterns are not capturing subpatterns. If such an asser-
- tion contains capturing subpatterns within it, these are counted for
- the purposes of numbering the capturing subpatterns in the whole pat-
- tern. However, substring capturing is carried out only for positive
- assertions, because it does not make sense for negative assertions.
-
- For compatibility with Perl, assertion subpatterns may be repeated;
- though it makes no sense to assert the same thing several times, the
- side effect of capturing parentheses may occasionally be useful. In
- practice, there only three cases:
-
- (1) If the quantifier is {0}, the assertion is never obeyed during
- matching. However, it may contain internal capturing parenthesized
- groups that are called from elsewhere via the subroutine mechanism.
-
- (2) If quantifier is {0,n} where n is greater than zero, it is treated
- as if it were {0,1}. At run time, the rest of the pattern match is
- tried with and without the assertion, the order depending on the greed-
- iness of the quantifier.
-
- (3) If the minimum repetition is greater than zero, the quantifier is
- ignored. The assertion is obeyed just once when encountered during
- matching.
-
- Lookahead assertions
-
- Lookahead assertions start with (?= for positive assertions and (?! for
- negative assertions. For example,
-
- \w+(?=;)
-
- matches a word followed by a semicolon, but does not include the semi-
- colon in the match, and
-
- foo(?!bar)
-
- matches any occurrence of "foo" that is not followed by "bar". Note
- that the apparently similar pattern
-
- (?!foo)bar
-
- does not find an occurrence of "bar" that is preceded by something
- other than "foo"; it finds any occurrence of "bar" whatsoever, because
- the assertion (?!foo) is always true when the next three characters are
- "bar". A lookbehind assertion is needed to achieve the other effect.
-
- If you want to force a matching failure at some point in a pattern, the
- most convenient way to do it is with (?!) because an empty string
- always matches, so an assertion that requires there not to be an empty
- string must always fail. The backtracking control verb (*FAIL) or (*F)
- is a synonym for (?!).
-
- Lookbehind assertions
-
- Lookbehind assertions start with (?<= for positive assertions and (?<!
- for negative assertions. For example,
-
- (?<!foo)bar
-
- does find an occurrence of "bar" that is not preceded by "foo". The
- contents of a lookbehind assertion are restricted such that all the
- strings it matches must have a fixed length. However, if there are sev-
- eral top-level alternatives, they do not all have to have the same
- fixed length. Thus
-
- (?<=bullock|donkey)
-
- is permitted, but
-
- (?<!dogs?|cats?)
-
- causes an error at compile time. Branches that match different length
- strings are permitted only at the top level of a lookbehind assertion.
- This is an extension compared with Perl, which requires all branches to
- match the same length of string. An assertion such as
-
- (?<=ab(c|de))
-
- is not permitted, because its single top-level branch can match two
- different lengths, but it is acceptable to PCRE if rewritten to use two
- top-level branches:
-
- (?<=abc|abde)
-
- In some cases, the escape sequence \K (see above) can be used instead
- of a lookbehind assertion to get round the fixed-length restriction.
-
- The implementation of lookbehind assertions is, for each alternative,
- to temporarily move the current position back by the fixed length and
- then try to match. If there are insufficient characters before the cur-
- rent position, the assertion fails.
-
- In a UTF mode, PCRE does not allow the \C escape (which matches a sin-
- gle data unit even in a UTF mode) to appear in lookbehind assertions,
- because it makes it impossible to calculate the length of the lookbe-
- hind. The \X and \R escapes, which can match different numbers of data
- units, are also not permitted.
-
- "Subroutine" calls (see below) such as (?2) or (?&X) are permitted in
- lookbehinds, as long as the subpattern matches a fixed-length string.
- Recursion, however, is not supported.
-
- Possessive quantifiers can be used in conjunction with lookbehind
- assertions to specify efficient matching of fixed-length strings at the
- end of subject strings. Consider a simple pattern such as
-
- abcd$
-
- when applied to a long string that does not match. Because matching
- proceeds from left to right, PCRE will look for each "a" in the subject
- and then see if what follows matches the rest of the pattern. If the
- pattern is specified as
-
- ^.*abcd$
-
- the initial .* matches the entire string at first, but when this fails
- (because there is no following "a"), it backtracks to match all but the
- last character, then all but the last two characters, and so on. Once
- again the search for "a" covers the entire string, from right to left,
- so we are no better off. However, if the pattern is written as
-
- ^.*+(?<=abcd)
-
- there can be no backtracking for the .*+ item; it can match only the
- entire string. The subsequent lookbehind assertion does a single test
- on the last four characters. If it fails, the match fails immediately.
- For long strings, this approach makes a significant difference to the
- processing time.
-
- Using multiple assertions
-
- Several assertions (of any sort) may occur in succession. For example,
-
- (?<=\d{3})(?<!999)foo
-
- matches "foo" preceded by three digits that are not "999". Notice that
- each of the assertions is applied independently at the same point in
- the subject string. First there is a check that the previous three
- characters are all digits, and then there is a check that the same
- three characters are not "999". This pattern does not match "foo" pre-
- ceded by six characters, the first of which are digits and the last
- three of which are not "999". For example, it doesn't match "123abc-
- foo". A pattern to do that is
-
- (?<=\d{3}...)(?<!999)foo
-
- This time the first assertion looks at the preceding six characters,
- checking that the first three are digits, and then the second assertion
- checks that the preceding three characters are not "999".
-
- Assertions can be nested in any combination. For example,
-
- (?<=(?<!foo)bar)baz
-
- matches an occurrence of "baz" that is preceded by "bar" which in turn
- is not preceded by "foo", while
-
- (?<=\d{3}(?!999)...)foo
-
- is another pattern that matches "foo" preceded by three digits and any
- three characters that are not "999".
-
-
-CONDITIONAL SUBPATTERNS
-
- It is possible to cause the matching process to obey a subpattern con-
- ditionally or to choose between two alternative subpatterns, depending
- on the result of an assertion, or whether a specific capturing subpat-
- tern has already been matched. The two possible forms of conditional
- subpattern are:
-
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-
- If the condition is satisfied, the yes-pattern is used; otherwise the
- no-pattern (if present) is used. If there are more than two alterna-
- tives in the subpattern, a compile-time error occurs. Each of the two
- alternatives may itself contain nested subpatterns of any form, includ-
- ing conditional subpatterns; the restriction to two alternatives
- applies only at the level of the condition. This pattern fragment is an
- example where the alternatives are complex:
-
- (?(1) (A|B|C) | (D | (?(2)E|F) | E) )
-
-
- There are four kinds of condition: references to subpatterns, refer-
- ences to recursion, a pseudo-condition called DEFINE, and assertions.
-
- Checking for a used subpattern by number
-
- If the text between the parentheses consists of a sequence of digits,
- the condition is true if a capturing subpattern of that number has pre-
- viously matched. If there is more than one capturing subpattern with
- the same number (see the earlier section about duplicate subpattern
- numbers), the condition is true if any of them have matched. An alter-
- native notation is to precede the digits with a plus or minus sign. In
- this case, the subpattern number is relative rather than absolute. The
- most recently opened parentheses can be referenced by (?(-1), the next
- most recent by (?(-2), and so on. Inside loops it can also make sense
- to refer to subsequent groups. The next parentheses to be opened can be
- referenced as (?(+1), and so on. (The value zero in any of these forms
- is not used; it provokes a compile-time error.)
-
- Consider the following pattern, which contains non-significant white
- space to make it more readable (assume the PCRE_EXTENDED option) and to
- divide it into three parts for ease of discussion:
-
- ( \( )? [^()]+ (?(1) \) )
-
- The first part matches an optional opening parenthesis, and if that
- character is present, sets it as the first captured substring. The sec-
- ond part matches one or more characters that are not parentheses. The
- third part is a conditional subpattern that tests whether or not the
- first set of parentheses matched. If they did, that is, if subject
- started with an opening parenthesis, the condition is true, and so the
- yes-pattern is executed and a closing parenthesis is required. Other-
- wise, since no-pattern is not present, the subpattern matches nothing.
- In other words, this pattern matches a sequence of non-parentheses,
- optionally enclosed in parentheses.
-
- If you were embedding this pattern in a larger one, you could use a
- relative reference:
-
- ...other stuff... ( \( )? [^()]+ (?(-1) \) ) ...
-
- This makes the fragment independent of the parentheses in the larger
- pattern.
-
- Checking for a used subpattern by name
-
- Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a
- used subpattern by name. For compatibility with earlier versions of
- PCRE, which had this facility before Perl, the syntax (?(name)...) is
- also recognized. However, there is a possible ambiguity with this syn-
- tax, because subpattern names may consist entirely of digits. PCRE
- looks first for a named subpattern; if it cannot find one and the name
- consists entirely of digits, PCRE looks for a subpattern of that num-
- ber, which must be greater than zero. Using subpattern names that con-
- sist entirely of digits is not recommended.
-
- Rewriting the above example to use a named subpattern gives this:
-
- (?<OPEN> \( )? [^()]+ (?(<OPEN>) \) )
-
- If the name used in a condition of this kind is a duplicate, the test
- is applied to all subpatterns of the same name, and is true if any one
- of them has matched.
-
- Checking for pattern recursion
-
- If the condition is the string (R), and there is no subpattern with the
- name R, the condition is true if a recursive call to the whole pattern
- or any subpattern has been made. If digits or a name preceded by amper-
- sand follow the letter R, for example:
-
- (?(R3)...) or (?(R&name)...)
-
- the condition is true if the most recent recursion is into a subpattern
- whose number or name is given. This condition does not check the entire
- recursion stack. If the name used in a condition of this kind is a
- duplicate, the test is applied to all subpatterns of the same name, and
- is true if any one of them is the most recent recursion.
-
- At "top level", all these recursion test conditions are false. The
- syntax for recursive patterns is described below.
-
- Defining subpatterns for use by reference only
-
- If the condition is the string (DEFINE), and there is no subpattern
- with the name DEFINE, the condition is always false. In this case,
- there may be only one alternative in the subpattern. It is always
- skipped if control reaches this point in the pattern; the idea of
- DEFINE is that it can be used to define subroutines that can be refer-
- enced from elsewhere. (The use of subroutines is described below.) For
- example, a pattern to match an IPv4 address such as "192.168.23.245"
- could be written like this (ignore whitespace and line breaks):
-
- (?(DEFINE) (?<byte> 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )
- \b (?&byte) (\.(?&byte)){3} \b
-
- The first part of the pattern is a DEFINE group inside which a another
- group named "byte" is defined. This matches an individual component of
- an IPv4 address (a number less than 256). When matching takes place,
- this part of the pattern is skipped because DEFINE acts like a false
- condition. The rest of the pattern uses references to the named group
- to match the four dot-separated components of an IPv4 address, insist-
- ing on a word boundary at each end.
-
- Assertion conditions
-
- If the condition is not in any of the above formats, it must be an
- assertion. This may be a positive or negative lookahead or lookbehind
- assertion. Consider this pattern, again containing non-significant
- white space, and with the two alternatives on the second line:
-
- (?(?=[^a-z]*[a-z])
- \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} )
-
- The condition is a positive lookahead assertion that matches an
- optional sequence of non-letters followed by a letter. In other words,
- it tests for the presence of at least one letter in the subject. If a
- letter is found, the subject is matched against the first alternative;
- otherwise it is matched against the second. This pattern matches
- strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are
- letters and dd are digits.
-
-
-COMMENTS
-
- There are two ways of including comments in patterns that are processed
- by PCRE. In both cases, the start of the comment must not be in a char-
- acter class, nor in the middle of any other sequence of related charac-
- ters such as (?: or a subpattern name or number. The characters that
- make up a comment play no part in the pattern matching.
-
- The sequence (?# marks the start of a comment that continues up to the
- next closing parenthesis. Nested parentheses are not permitted. If the
- PCRE_EXTENDED option is set, an unescaped # character also introduces a
- comment, which in this case continues to immediately after the next
- newline character or character sequence in the pattern. Which charac-
- ters are interpreted as newlines is controlled by the options passed to
- a compiling function or by a special sequence at the start of the pat-
- tern, as described in the section entitled "Newline conventions" above.
- Note that the end of this type of comment is a literal newline sequence
- in the pattern; escape sequences that happen to represent a newline do
- not count. For example, consider this pattern when PCRE_EXTENDED is
- set, and the default newline convention is in force:
-
- abc #comment \n still comment
-
- On encountering the # character, pcre_compile() skips along, looking
- for a newline in the pattern. The sequence \n is still literal at this
- stage, so it does not terminate the comment. Only an actual character
- with the code value 0x0a (the default newline) does so.
-
-
-RECURSIVE PATTERNS
-
- Consider the problem of matching a string in parentheses, allowing for
- unlimited nested parentheses. Without the use of recursion, the best
- that can be done is to use a pattern that matches up to some fixed
- depth of nesting. It is not possible to handle an arbitrary nesting
- depth.
-
- For some time, Perl has provided a facility that allows regular expres-
- sions to recurse (amongst other things). It does this by interpolating
- Perl code in the expression at run time, and the code can refer to the
- expression itself. A Perl pattern using code interpolation to solve the
- parentheses problem can be created like this:
-
- $re = qr{\( (?: (?>[^()]+) | (?p{$re}) )* \)}x;
-
- The (?p{...}) item interpolates Perl code at run time, and in this case
- refers recursively to the pattern in which it appears.
-
- Obviously, PCRE cannot support the interpolation of Perl code. Instead,
- it supports special syntax for recursion of the entire pattern, and
- also for individual subpattern recursion. After its introduction in
- PCRE and Python, this kind of recursion was subsequently introduced
- into Perl at release 5.10.
-
- A special item that consists of (? followed by a number greater than
- zero and a closing parenthesis is a recursive subroutine call of the
- subpattern of the given number, provided that it occurs inside that
- subpattern. (If not, it is a non-recursive subroutine call, which is
- described in the next section.) The special item (?R) or (?0) is a
- recursive call of the entire regular expression.
-
- This PCRE pattern solves the nested parentheses problem (assume the
- PCRE_EXTENDED option is set so that white space is ignored):
-
- \( ( [^()]++ | (?R) )* \)
-
- First it matches an opening parenthesis. Then it matches any number of
- substrings which can either be a sequence of non-parentheses, or a
- recursive match of the pattern itself (that is, a correctly parenthe-
- sized substring). Finally there is a closing parenthesis. Note the use
- of a possessive quantifier to avoid backtracking into sequences of non-
- parentheses.
-
- If this were part of a larger pattern, you would not want to recurse
- the entire pattern, so instead you could use this:
-
- ( \( ( [^()]++ | (?1) )* \) )
-
- We have put the pattern into parentheses, and caused the recursion to
- refer to them instead of the whole pattern.
-
- In a larger pattern, keeping track of parenthesis numbers can be
- tricky. This is made easier by the use of relative references. Instead
- of (?1) in the pattern above you can write (?-2) to refer to the second
- most recently opened parentheses preceding the recursion. In other
- words, a negative number counts capturing parentheses leftwards from
- the point at which it is encountered.
-
- It is also possible to refer to subsequently opened parentheses, by
- writing references such as (?+2). However, these cannot be recursive
- because the reference is not inside the parentheses that are refer-
- enced. They are always non-recursive subroutine calls, as described in
- the next section.
-
- An alternative approach is to use named parentheses instead. The Perl
- syntax for this is (?&name); PCRE's earlier syntax (?P>name) is also
- supported. We could rewrite the above example as follows:
-
- (?<pn> \( ( [^()]++ | (?&pn) )* \) )
-
- If there is more than one subpattern with the same name, the earliest
- one is used.
-
- This particular example pattern that we have been looking at contains
- nested unlimited repeats, and so the use of a possessive quantifier for
- matching strings of non-parentheses is important when applying the pat-
- tern to strings that do not match. For example, when this pattern is
- applied to
-
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-
- it yields "no match" quickly. However, if a possessive quantifier is
- not used, the match runs for a very long time indeed because there are
- so many different ways the + and * repeats can carve up the subject,
- and all have to be tested before failure can be reported.
-
- At the end of a match, the values of capturing parentheses are those
- from the outermost level. If you want to obtain intermediate values, a
- callout function can be used (see below and the pcrecallout documenta-
- tion). If the pattern above is matched against
-
- (ab(cd)ef)
-
- the value for the inner capturing parentheses (numbered 2) is "ef",
- which is the last value taken on at the top level. If a capturing sub-
- pattern is not matched at the top level, its final captured value is
- unset, even if it was (temporarily) set at a deeper level during the
- matching process.
-
- If there are more than 15 capturing parentheses in a pattern, PCRE has
- to obtain extra memory to store data during a recursion, which it does
- by using pcre_malloc, freeing it via pcre_free afterwards. If no memory
- can be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
-
- Do not confuse the (?R) item with the condition (R), which tests for
- recursion. Consider this pattern, which matches text in angle brack-
- ets, allowing for arbitrary nesting. Only digits are allowed in nested
- brackets (that is, when recursing), whereas any characters are permit-
- ted at the outer level.
-
- < (?: (?(R) \d++ | [^<>]*+) | (?R)) * >
-
- In this pattern, (?(R) is the start of a conditional subpattern, with
- two different alternatives for the recursive and non-recursive cases.
- The (?R) item is the actual recursive call.
-
- Differences in recursion processing between PCRE and Perl
-
- Recursion processing in PCRE differs from Perl in two important ways.
- In PCRE (like Python, but unlike Perl), a recursive subpattern call is
- always treated as an atomic group. That is, once it has matched some of
- the subject string, it is never re-entered, even if it contains untried
- alternatives and there is a subsequent matching failure. This can be
- illustrated by the following pattern, which purports to match a palin-
- dromic string that contains an odd number of characters (for example,
- "a", "aba", "abcba", "abcdcba"):
-
- ^(.|(.)(?1)\2)$
-
- The idea is that it either matches a single character, or two identical
- characters surrounding a sub-palindrome. In Perl, this pattern works;
- in PCRE it does not if the pattern is longer than three characters.
- Consider the subject string "abcba":
-
- At the top level, the first character is matched, but as it is not at
- the end of the string, the first alternative fails; the second alterna-
- tive is taken and the recursion kicks in. The recursive call to subpat-
- tern 1 successfully matches the next character ("b"). (Note that the
- beginning and end of line tests are not part of the recursion).
-
- Back at the top level, the next character ("c") is compared with what
- subpattern 2 matched, which was "a". This fails. Because the recursion
- is treated as an atomic group, there are now no backtracking points,
- and so the entire match fails. (Perl is able, at this point, to re-
- enter the recursion and try the second alternative.) However, if the
- pattern is written with the alternatives in the other order, things are
- different:
-
- ^((.)(?1)\2|.)$
-
- This time, the recursing alternative is tried first, and continues to
- recurse until it runs out of characters, at which point the recursion
- fails. But this time we do have another alternative to try at the
- higher level. That is the big difference: in the previous case the
- remaining alternative is at a deeper recursion level, which PCRE cannot
- use.
-
- To change the pattern so that it matches all palindromic strings, not
- just those with an odd number of characters, it is tempting to change
- the pattern to this:
-
- ^((.)(?1)\2|.?)$
-
- Again, this works in Perl, but not in PCRE, and for the same reason.
- When a deeper recursion has matched a single character, it cannot be
- entered again in order to match an empty string. The solution is to
- separate the two cases, and write out the odd and even cases as alter-
- natives at the higher level:
-
- ^(?:((.)(?1)\2|)|((.)(?3)\4|.))
-
- If you want to match typical palindromic phrases, the pattern has to
- ignore all non-word characters, which can be done like this:
-
- ^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$
-
- If run with the PCRE_CASELESS option, this pattern matches phrases such
- as "A man, a plan, a canal: Panama!" and it works well in both PCRE and
- Perl. Note the use of the possessive quantifier *+ to avoid backtrack-
- ing into sequences of non-word characters. Without this, PCRE takes a
- great deal longer (ten times or more) to match typical phrases, and
- Perl takes so long that you think it has gone into a loop.
-
- WARNING: The palindrome-matching patterns above work only if the sub-
- ject string does not start with a palindrome that is shorter than the
- entire string. For example, although "abcba" is correctly matched, if
- the subject is "ababa", PCRE finds the palindrome "aba" at the start,
- then fails at top level because the end of the string does not follow.
- Once again, it cannot jump back into the recursion to try other alter-
- natives, so the entire match fails.
-
- The second way in which PCRE and Perl differ in their recursion pro-
- cessing is in the handling of captured values. In Perl, when a subpat-
- tern is called recursively or as a subpattern (see the next section),
- it has no access to any values that were captured outside the recur-
- sion, whereas in PCRE these values can be referenced. Consider this
- pattern:
-
- ^(.)(\1|a(?2))
-
- In PCRE, this pattern matches "bab". The first capturing parentheses
- match "b", then in the second group, when the back reference \1 fails
- to match "b", the second alternative matches "a" and then recurses. In
- the recursion, \1 does now match "b" and so the whole match succeeds.
- In Perl, the pattern fails to match because inside the recursive call
- \1 cannot access the externally set value.
-
-
-SUBPATTERNS AS SUBROUTINES
-
- If the syntax for a recursive subpattern call (either by number or by
- name) is used outside the parentheses to which it refers, it operates
- like a subroutine in a programming language. The called subpattern may
- be defined before or after the reference. A numbered reference can be
- absolute or relative, as in these examples:
-
- (...(absolute)...)...(?2)...
- (...(relative)...)...(?-1)...
- (...(?+1)...(relative)...
-
- An earlier example pointed out that the pattern
-
- (sens|respons)e and \1ibility
-
- matches "sense and sensibility" and "response and responsibility", but
- not "sense and responsibility". If instead the pattern
-
- (sens|respons)e and (?1)ibility
-
- is used, it does match "sense and responsibility" as well as the other
- two strings. Another example is given in the discussion of DEFINE
- above.
-
- All subroutine calls, whether recursive or not, are always treated as
- atomic groups. That is, once a subroutine has matched some of the sub-
- ject string, it is never re-entered, even if it contains untried alter-
- natives and there is a subsequent matching failure. Any capturing
- parentheses that are set during the subroutine call revert to their
- previous values afterwards.
-
- Processing options such as case-independence are fixed when a subpat-
- tern is defined, so if it is used as a subroutine, such options cannot
- be changed for different calls. For example, consider this pattern:
-
- (abc)(?i:(?-1))
-
- It matches "abcabc". It does not match "abcABC" because the change of
- processing option does not affect the called subpattern.
-
-
-ONIGURUMA SUBROUTINE SYNTAX
-
- For compatibility with Oniguruma, the non-Perl syntax \g followed by a
- name or a number enclosed either in angle brackets or single quotes, is
- an alternative syntax for referencing a subpattern as a subroutine,
- possibly recursively. Here are two of the examples used above, rewrit-
- ten using this syntax:
-
- (?<pn> \( ( (?>[^()]+) | \g<pn> )* \) )
- (sens|respons)e and \g'1'ibility
-
- PCRE supports an extension to Oniguruma: if a number is preceded by a
- plus or a minus sign it is taken as a relative reference. For example:
-
- (abc)(?i:\g<-1>)
-
- Note that \g{...} (Perl syntax) and \g<...> (Oniguruma syntax) are not
- synonymous. The former is a back reference; the latter is a subroutine
- call.
-
-
-CALLOUTS
-
- Perl has a feature whereby using the sequence (?{...}) causes arbitrary
- Perl code to be obeyed in the middle of matching a regular expression.
- This makes it possible, amongst other things, to extract different sub-
- strings that match the same pair of parentheses when there is a repeti-
- tion.
-
- PCRE provides a similar feature, but of course it cannot obey arbitrary
- Perl code. The feature is called "callout". The caller of PCRE provides
- an external function by putting its entry point in the global variable
- pcre_callout (8-bit library) or pcre16_callout (16-bit library). By
- default, this variable contains NULL, which disables all calling out.
-
- Within a regular expression, (?C) indicates the points at which the
- external function is to be called. If you want to identify different
- callout points, you can put a number less than 256 after the letter C.
- The default value is zero. For example, this pattern has two callout
- points:
-
- (?C1)abc(?C2)def
-
- If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, call-
- outs are automatically installed before each item in the pattern. They
- are all numbered 255.
-
- During matching, when PCRE reaches a callout point, the external func-
- tion is called. It is provided with the number of the callout, the
- position in the pattern, and, optionally, one item of data originally
- supplied by the caller of the matching function. The callout function
- may cause matching to proceed, to backtrack, or to fail altogether. A
- complete description of the interface to the callout function is given
- in the pcrecallout documentation.
-
-
-BACKTRACKING CONTROL
-
- Perl 5.10 introduced a number of "Special Backtracking Control Verbs",
- which are described in the Perl documentation as "experimental and sub-
- ject to change or removal in a future version of Perl". It goes on to
- say: "Their usage in production code should be noted to avoid problems
- during upgrades." The same remarks apply to the PCRE features described
- in this section.
-
- Since these verbs are specifically related to backtracking, most of
- them can be used only when the pattern is to be matched using one of
- the traditional matching functions, which use a backtracking algorithm.
- With the exception of (*FAIL), which behaves like a failing negative
- assertion, they cause an error if encountered by a DFA matching func-
- tion.
-
- If any of these verbs are used in an assertion or in a subpattern that
- is called as a subroutine (whether or not recursively), their effect is
- confined to that subpattern; it does not extend to the surrounding pat-
- tern, with one exception: the name from a *(MARK), (*PRUNE), or (*THEN)
- that is encountered in a successful positive assertion is passed back
- when a match succeeds (compare capturing parentheses in assertions).
- Note that such subpatterns are processed as anchored at the point where
- they are tested. Note also that Perl's treatment of subroutines is dif-
- ferent in some cases.
-
- The new verbs make use of what was previously invalid syntax: an open-
- ing parenthesis followed by an asterisk. They are generally of the form
- (*VERB) or (*VERB:NAME). Some may take either form, with differing be-
- haviour, depending on whether or not an argument is present. A name is
- any sequence of characters that does not include a closing parenthesis.
- If the name is empty, that is, if the closing parenthesis immediately
- follows the colon, the effect is as if the colon were not there. Any
- number of these verbs may occur in a pattern.
-
- PCRE contains some optimizations that are used to speed up matching by
- running some checks at the start of each match attempt. For example, it
- may know the minimum length of matching subject, or that a particular
- character must be present. When one of these optimizations suppresses
- the running of a match, any included backtracking verbs will not, of
- course, be processed. You can suppress the start-of-match optimizations
- by setting the PCRE_NO_START_OPTIMIZE option when calling pcre_com-
- pile() or pcre_exec(), or by starting the pattern with (*NO_START_OPT).
-
- Experiments with Perl suggest that it too has similar optimizations,
- sometimes leading to anomalous results.
-
- Verbs that act immediately
-
- The following verbs act as soon as they are encountered. They may not
- be followed by a name.
-
- (*ACCEPT)
-
- This verb causes the match to end successfully, skipping the remainder
- of the pattern. However, when it is inside a subpattern that is called
- as a subroutine, only that subpattern is ended successfully. Matching
- then continues at the outer level. If (*ACCEPT) is inside capturing
- parentheses, the data so far is captured. For example:
-
- A((?:A|B(*ACCEPT)|C)D)
-
- This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is cap-
- tured by the outer parentheses.
-
- (*FAIL) or (*F)
-
- This verb causes a matching failure, forcing backtracking to occur. It
- is equivalent to (?!) but easier to read. The Perl documentation notes
- that it is probably useful only when combined with (?{}) or (??{}).
- Those are, of course, Perl features that are not present in PCRE. The
- nearest equivalent is the callout feature, as for example in this pat-
- tern:
-
- a+(?C)(*FAIL)
-
- A match with the string "aaaa" always fails, but the callout is taken
- before each backtrack happens (in this example, 10 times).
-
- Recording which path was taken
-
- There is one verb whose main purpose is to track how a match was
- arrived at, though it also has a secondary use in conjunction with
- advancing the match starting point (see (*SKIP) below).
-
- (*MARK:NAME) or (*:NAME)
-
- A name is always required with this verb. There may be as many
- instances of (*MARK) as you like in a pattern, and their names do not
- have to be unique.
-
- When a match succeeds, the name of the last-encountered (*MARK) on the
- matching path is passed back to the caller as described in the section
- entitled "Extra data for pcre_exec()" in the pcreapi documentation.
- Here is an example of pcretest output, where the /K modifier requests
- the retrieval and outputting of (*MARK) data:
-
- re> /X(*MARK:A)Y|X(*MARK:B)Z/K
- data> XY
- 0: XY
- MK: A
- XZ
- 0: XZ
- MK: B
-
- The (*MARK) name is tagged with "MK:" in this output, and in this exam-
- ple it indicates which of the two alternatives matched. This is a more
- efficient way of obtaining this information than putting each alterna-
- tive in its own capturing parentheses.
-
- If (*MARK) is encountered in a positive assertion, its name is recorded
- and passed back if it is the last-encountered. This does not happen for
- negative assertions.
-
- After a partial match or a failed match, the name of the last encoun-
- tered (*MARK) in the entire match process is returned. For example:
-
- re> /X(*MARK:A)Y|X(*MARK:B)Z/K
- data> XP
- No match, mark = B
-
- Note that in this unanchored example the mark is retained from the
- match attempt that started at the letter "X". Subsequent match attempts
- starting at "P" and then with an empty string do not get as far as the
- (*MARK) item, but nevertheless do not reset it.
-
- Verbs that act after backtracking
-
- The following verbs do nothing when they are encountered. Matching con-
- tinues with what follows, but if there is no subsequent match, causing
- a backtrack to the verb, a failure is forced. That is, backtracking
- cannot pass to the left of the verb. However, when one of these verbs
- appears inside an atomic group, its effect is confined to that group,
- because once the group has been matched, there is never any backtrack-
- ing into it. In this situation, backtracking can "jump back" to the
- left of the entire atomic group. (Remember also, as stated above, that
- this localization also applies in subroutine calls and assertions.)
-
- These verbs differ in exactly what kind of failure occurs when back-
- tracking reaches them.
-
- (*COMMIT)
-
- This verb, which may not be followed by a name, causes the whole match
- to fail outright if the rest of the pattern does not match. Even if the
- pattern is unanchored, no further attempts to find a match by advancing
- the starting point take place. Once (*COMMIT) has been passed,
- pcre_exec() is committed to finding a match at the current starting
- point, or not at all. For example:
-
- a+(*COMMIT)b
-
- This matches "xxaab" but not "aacaab". It can be thought of as a kind
- of dynamic anchor, or "I've started, so I must finish." The name of the
- most recently passed (*MARK) in the path is passed back when (*COMMIT)
- forces a match failure.
-
- Note that (*COMMIT) at the start of a pattern is not the same as an
- anchor, unless PCRE's start-of-match optimizations are turned off, as
- shown in this pcretest example:
-
- re> /(*COMMIT)abc/
- data> xyzabc
- 0: abc
- xyzabc\Y
- No match
-
- PCRE knows that any match must start with "a", so the optimization
- skips along the subject to "a" before running the first match attempt,
- which succeeds. When the optimization is disabled by the \Y escape in
- the second subject, the match starts at "x" and so the (*COMMIT) causes
- it to fail without trying any other starting points.
-
- (*PRUNE) or (*PRUNE:NAME)
-
- This verb causes the match to fail at the current starting position in
- the subject if the rest of the pattern does not match. If the pattern
- is unanchored, the normal "bumpalong" advance to the next starting
- character then happens. Backtracking can occur as usual to the left of
- (*PRUNE), before it is reached, or when matching to the right of
- (*PRUNE), but if there is no match to the right, backtracking cannot
- cross (*PRUNE). In simple cases, the use of (*PRUNE) is just an alter-
- native to an atomic group or possessive quantifier, but there are some
- uses of (*PRUNE) that cannot be expressed in any other way. The behav-
- iour of (*PRUNE:NAME) is the same as (*MARK:NAME)(*PRUNE). In an
- anchored pattern (*PRUNE) has the same effect as (*COMMIT).
-
- (*SKIP)
-
- This verb, when given without a name, is like (*PRUNE), except that if
- the pattern is unanchored, the "bumpalong" advance is not to the next
- character, but to the position in the subject where (*SKIP) was encoun-
- tered. (*SKIP) signifies that whatever text was matched leading up to
- it cannot be part of a successful match. Consider:
-
- a+(*SKIP)b
-
- If the subject is "aaaac...", after the first match attempt fails
- (starting at the first character in the string), the starting point
- skips on to start the next attempt at "c". Note that a possessive quan-
- tifer does not have the same effect as this example; although it would
- suppress backtracking during the first match attempt, the second
- attempt would start at the second character instead of skipping on to
- "c".
-
- (*SKIP:NAME)
-
- When (*SKIP) has an associated name, its behaviour is modified. If the
- following pattern fails to match, the previous path through the pattern
- is searched for the most recent (*MARK) that has the same name. If one
- is found, the "bumpalong" advance is to the subject position that cor-
- responds to that (*MARK) instead of to where (*SKIP) was encountered.
- If no (*MARK) with a matching name is found, the (*SKIP) is ignored.
-
- (*THEN) or (*THEN:NAME)
-
- This verb causes a skip to the next innermost alternative if the rest
- of the pattern does not match. That is, it cancels pending backtrack-
- ing, but only within the current alternative. Its name comes from the
- observation that it can be used for a pattern-based if-then-else block:
-
- ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...
-
- If the COND1 pattern matches, FOO is tried (and possibly further items
- after the end of the group if FOO succeeds); on failure, the matcher
- skips to the second alternative and tries COND2, without backtracking
- into COND1. The behaviour of (*THEN:NAME) is exactly the same as
- (*MARK:NAME)(*THEN). If (*THEN) is not inside an alternation, it acts
- like (*PRUNE).
-
- Note that a subpattern that does not contain a | character is just a
- part of the enclosing alternative; it is not a nested alternation with
- only one alternative. The effect of (*THEN) extends beyond such a sub-
- pattern to the enclosing alternative. Consider this pattern, where A,
- B, etc. are complex pattern fragments that do not contain any | charac-
- ters at this level:
-
- A (B(*THEN)C) | D
-
- If A and B are matched, but there is a failure in C, matching does not
- backtrack into A; instead it moves to the next alternative, that is, D.
- However, if the subpattern containing (*THEN) is given an alternative,
- it behaves differently:
-
- A (B(*THEN)C | (*FAIL)) | D
-
- The effect of (*THEN) is now confined to the inner subpattern. After a
- failure in C, matching moves to (*FAIL), which causes the whole subpat-
- tern to fail because there are no more alternatives to try. In this
- case, matching does now backtrack into A.
-
- Note also that a conditional subpattern is not considered as having two
- alternatives, because only one is ever used. In other words, the |
- character in a conditional subpattern has a different meaning. Ignoring
- white space, consider:
-
- ^.*? (?(?=a) a | b(*THEN)c )
-
- If the subject is "ba", this pattern does not match. Because .*? is
- ungreedy, it initially matches zero characters. The condition (?=a)
- then fails, the character "b" is matched, but "c" is not. At this
- point, matching does not backtrack to .*? as might perhaps be expected
- from the presence of the | character. The conditional subpattern is
- part of the single alternative that comprises the whole pattern, and so
- the match fails. (If there was a backtrack into .*?, allowing it to
- match "b", the match would succeed.)
-
- The verbs just described provide four different "strengths" of control
- when subsequent matching fails. (*THEN) is the weakest, carrying on the
- match at the next alternative. (*PRUNE) comes next, failing the match
- at the current starting position, but allowing an advance to the next
- character (for an unanchored pattern). (*SKIP) is similar, except that
- the advance may be more than one character. (*COMMIT) is the strongest,
- causing the entire match to fail.
-
- If more than one such verb is present in a pattern, the "strongest" one
- wins. For example, consider this pattern, where A, B, etc. are complex
- pattern fragments:
-
- (A(*COMMIT)B(*THEN)C|D)
-
- Once A has matched, PCRE is committed to this match, at the current
- starting position. If subsequently B matches, but C does not, the nor-
- mal (*THEN) action of trying the next alternative (that is, D) does not
- happen because (*COMMIT) overrides.
-
-
-SEE ALSO
-
- pcreapi(3), pcrecallout(3), pcrematching(3), pcresyntax(3), pcre(3),
- pcre16(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 09 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRESYNTAX(3) PCRESYNTAX(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PCRE REGULAR EXPRESSION SYNTAX SUMMARY
-
- The full syntax and semantics of the regular expressions that are sup-
- ported by PCRE are described in the pcrepattern documentation. This
- document contains a quick-reference summary of the syntax.
-
-
-QUOTING
-
- \x where x is non-alphanumeric is a literal x
- \Q...\E treat enclosed characters as literal
-
-
-CHARACTERS
-
- \a alarm, that is, the BEL character (hex 07)
- \cx "control-x", where x is any ASCII character
- \e escape (hex 1B)
- \f formfeed (hex 0C)
- \n newline (hex 0A)
- \r carriage return (hex 0D)
- \t tab (hex 09)
- \ddd character with octal code ddd, or backreference
- \xhh character with hex code hh
- \x{hhh..} character with hex code hhh..
-
-
-CHARACTER TYPES
-
- . any character except newline;
- in dotall mode, any character whatsoever
- \C one data unit, even in UTF mode (best avoided)
- \d a decimal digit
- \D a character that is not a decimal digit
- \h a horizontal whitespace character
- \H a character that is not a horizontal whitespace character
- \N a character that is not a newline
- \p{xx} a character with the xx property
- \P{xx} a character without the xx property
- \R a newline sequence
- \s a whitespace character
- \S a character that is not a whitespace character
- \v a vertical whitespace character
- \V a character that is not a vertical whitespace character
- \w a "word" character
- \W a "non-word" character
- \X an extended Unicode sequence
-
- In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII
- characters, even in a UTF mode. However, this can be changed by setting
- the PCRE_UCP option.
-
-
-GENERAL CATEGORY PROPERTIES FOR \p and \P
-
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
- L& Ll, Lu, or Lt
-
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-
-
-PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P
-
- Xan Alphanumeric: union of properties L and N
- Xps POSIX space: property Z or tab, NL, VT, FF, CR
- Xsp Perl space: property Z or tab, NL, FF, CR
- Xwd Perl word: property Xan or underscore
-
-
-SCRIPT NAMES FOR \p AND \P
-
- Arabic, Armenian, Avestan, Balinese, Bamum, Bengali, Bopomofo, Braille,
- Buginese, Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common,
- Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Egyp-
- tian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, Gothic, Greek,
- Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana, Impe-
- rial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscriptional_Parthian,
- Javanese, Kaithi, Kannada, Katakana, Kayah_Li, Kharoshthi, Khmer, Lao,
- Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam,
- Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic,
- Old_Persian, Old_South_Arabian, Old_Turkic, Ol_Chiki, Oriya, Osmanya,
- Phags_Pa, Phoenician, Rejang, Runic, Samaritan, Saurashtra, Shavian,
- Sinhala, Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le,
- Tai_Tham, Tai_Viet, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh,
- Ugaritic, Vai, Yi.
-
-
-CHARACTER CLASSES
-
- [...] positive character class
- [^...] negative character class
- [x-y] range (can be used for hex characters)
- [[:xxx:]] positive POSIX named set
- [[:^xxx:]] negative POSIX named set
-
- alnum alphanumeric
- alpha alphabetic
- ascii 0-127
- blank space or tab
- cntrl control character
- digit decimal digit
- graph printing, excluding space
- lower lower case letter
- print printing, including space
- punct printing, excluding alphanumeric
- space whitespace
- upper upper case letter
- word same as \w
- xdigit hexadecimal digit
-
- In PCRE, POSIX character set names recognize only ASCII characters by
- default, but some of them use Unicode properties if PCRE_UCP is set.
- You can use \Q...\E inside a character class.
-
-
-QUANTIFIERS
-
- ? 0 or 1, greedy
- ?+ 0 or 1, possessive
- ?? 0 or 1, lazy
- * 0 or more, greedy
- *+ 0 or more, possessive
- *? 0 or more, lazy
- + 1 or more, greedy
- ++ 1 or more, possessive
- +? 1 or more, lazy
- {n} exactly n
- {n,m} at least n, no more than m, greedy
- {n,m}+ at least n, no more than m, possessive
- {n,m}? at least n, no more than m, lazy
- {n,} n or more, greedy
- {n,}+ n or more, possessive
- {n,}? n or more, lazy
-
-
-ANCHORS AND SIMPLE ASSERTIONS
-
- \b word boundary
- \B not a word boundary
- ^ start of subject
- also after internal newline in multiline mode
- \A start of subject
- $ end of subject
- also before newline at end of subject
- also before internal newline in multiline mode
- \Z end of subject
- also before newline at end of subject
- \z end of subject
- \G first matching position in subject
-
-
-MATCH POINT RESET
-
- \K reset start of match
-
-
-ALTERNATION
-
- expr|expr|expr...
-
-
-CAPTURING
-
- (...) capturing group
- (?<name>...) named capturing group (Perl)
- (?'name'...) named capturing group (Perl)
- (?P<name>...) named capturing group (Python)
- (?:...) non-capturing group
- (?|...) non-capturing group; reset group numbers for
- capturing groups in each alternative
-
-
-ATOMIC GROUPS
-
- (?>...) atomic, non-capturing group
-
-
-COMMENT
-
- (?#....) comment (not nestable)
-
-
-OPTION SETTING
-
- (?i) caseless
- (?J) allow duplicate names
- (?m) multiline
- (?s) single line (dotall)
- (?U) default ungreedy (lazy)
- (?x) extended (ignore white space)
- (?-...) unset option(s)
-
- The following are recognized only at the start of a pattern or after
- one of the newline-setting options with similar syntax:
-
- (*NO_START_OPT) no start-match optimization (PCRE_NO_START_OPTIMIZE)
- (*UTF8) set UTF-8 mode: 8-bit library (PCRE_UTF8)
- (*UTF16) set UTF-16 mode: 16-bit library (PCRE_UTF16)
- (*UCP) set PCRE_UCP (use Unicode properties for \d etc)
-
-
-LOOKAHEAD AND LOOKBEHIND ASSERTIONS
-
- (?=...) positive look ahead
- (?!...) negative look ahead
- (?<=...) positive look behind
- (?<!...) negative look behind
-
- Each top-level branch of a look behind must be of a fixed length.
-
-
-BACKREFERENCES
-
- \n reference by number (can be ambiguous)
- \gn reference by number
- \g{n} reference by number
- \g{-n} relative reference by number
- \k<name> reference by name (Perl)
- \k'name' reference by name (Perl)
- \g{name} reference by name (Perl)
- \k{name} reference by name (.NET)
- (?P=name) reference by name (Python)
-
-
-SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)
-
- (?R) recurse whole pattern
- (?n) call subpattern by absolute number
- (?+n) call subpattern by relative number
- (?-n) call subpattern by relative number
- (?&name) call subpattern by name (Perl)
- (?P>name) call subpattern by name (Python)
- \g<name> call subpattern by name (Oniguruma)
- \g'name' call subpattern by name (Oniguruma)
- \g<n> call subpattern by absolute number (Oniguruma)
- \g'n' call subpattern by absolute number (Oniguruma)
- \g<+n> call subpattern by relative number (PCRE extension)
- \g'+n' call subpattern by relative number (PCRE extension)
- \g<-n> call subpattern by relative number (PCRE extension)
- \g'-n' call subpattern by relative number (PCRE extension)
-
-
-CONDITIONAL PATTERNS
-
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-
- (?(n)... absolute reference condition
- (?(+n)... relative reference condition
- (?(-n)... relative reference condition
- (?(<name>)... named reference condition (Perl)
- (?('name')... named reference condition (Perl)
- (?(name)... named reference condition (PCRE)
- (?(R)... overall recursion condition
- (?(Rn)... specific group recursion condition
- (?(R&name)... specific recursion condition
- (?(DEFINE)... define subpattern for reference
- (?(assert)... assertion condition
-
-
-BACKTRACKING CONTROL
-
- The following act immediately they are reached:
-
- (*ACCEPT) force successful match
- (*FAIL) force backtrack; synonym (*F)
- (*MARK:NAME) set name to be passed back; synonym (*:NAME)
-
- The following act only when a subsequent match failure causes a back-
- track to reach them. They all force a match failure, but they differ in
- what happens afterwards. Those that advance the start-of-match point do
- so only if the pattern is not anchored.
-
- (*COMMIT) overall failure, no advance of starting point
- (*PRUNE) advance to next starting character
- (*PRUNE:NAME) equivalent to (*MARK:NAME)(*PRUNE)
- (*SKIP) advance to current matching position
- (*SKIP:NAME) advance to position corresponding to an earlier
- (*MARK:NAME); if not found, the (*SKIP) is ignored
- (*THEN) local failure, backtrack to next alternation
- (*THEN:NAME) equivalent to (*MARK:NAME)(*THEN)
-
-
-NEWLINE CONVENTIONS
-
- These are recognized only at the very start of the pattern or after a
- (*BSR_...), (*UTF8), (*UTF16) or (*UCP) option.
-
- (*CR) carriage return only
- (*LF) linefeed only
- (*CRLF) carriage return followed by linefeed
- (*ANYCRLF) all three of the above
- (*ANY) any Unicode newline sequence
-
-
-WHAT \R MATCHES
-
- These are recognized only at the very start of the pattern or after a
- (*...) option that sets the newline convention or a UTF or UCP mode.
-
- (*BSR_ANYCRLF) CR, LF, or CRLF
- (*BSR_UNICODE) any Unicode newline sequence
-
-
-CALLOUTS
-
- (?C) callout
- (?Cn) callout with data n
-
-
-SEE ALSO
-
- pcrepattern(3), pcreapi(3), pcrecallout(3), pcrematching(3), pcre(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 10 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREUNICODE(3) PCREUNICODE(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-UTF-8, UTF-16, AND UNICODE PROPERTY SUPPORT
-
- From Release 8.30, in addition to its previous UTF-8 support, PCRE also
- supports UTF-16 by means of a separate 16-bit library. This can be
- built as well as, or instead of, the 8-bit library.
-
-
-UTF-8 SUPPORT
-
- In order process UTF-8 strings, you must build PCRE's 8-bit library
- with UTF support, and, in addition, you must call pcre_compile() with
- the PCRE_UTF8 option flag, or the pattern must start with the sequence
- (*UTF8). When either of these is the case, both the pattern and any
- subject strings that are matched against it are treated as UTF-8
- strings instead of strings of 1-byte characters.
-
-
-UTF-16 SUPPORT
-
- In order process UTF-16 strings, you must build PCRE's 16-bit library
- with UTF support, and, in addition, you must call pcre16_compile() with
- the PCRE_UTF16 option flag, or the pattern must start with the sequence
- (*UTF16). When either of these is the case, both the pattern and any
- subject strings that are matched against it are treated as UTF-16
- strings instead of strings of 16-bit characters.
-
-
-UTF SUPPORT OVERHEAD
-
- If you compile PCRE with UTF support, but do not use it at run time,
- the library will be a bit bigger, but the additional run time overhead
- is limited to testing the PCRE_UTF8/16 flag occasionally, so should not
- be very big.
-
-
-UNICODE PROPERTY SUPPORT
-
- If PCRE is built with Unicode character property support (which implies
- UTF support), the escape sequences \p{..}, \P{..}, and \X can be used.
- The available properties that can be tested are limited to the general
- category properties such as Lu for an upper case letter or Nd for a
- decimal number, the Unicode script names such as Arabic or Han, and the
- derived properties Any and L&. A full list is given in the pcrepattern
- documentation. Only the short names for properties are supported. For
- example, \p{L} matches a letter. Its Perl synonym, \p{Letter}, is not
- supported. Furthermore, in Perl, many properties may optionally be
- prefixed by "Is", for compatibility with Perl 5.6. PCRE does not sup-
- port this.
-
- Validity of UTF-8 strings
-
- When you set the PCRE_UTF8 flag, the byte strings passed as patterns
- and subjects are (by default) checked for validity on entry to the rel-
- evant functions. From release 7.3 of PCRE, the check is according the
- rules of RFC 3629, which are themselves derived from the Unicode speci-
- fication. Earlier releases of PCRE followed the rules of RFC 2279,
- which allows the full range of 31-bit values (0 to 0x7FFFFFFF). The
- current check allows only values in the range U+0 to U+10FFFF, exclud-
- ing U+D800 to U+DFFF.
-
- The excluded code points are the "Surrogate Area" of Unicode. They are
- reserved for use by UTF-16, where they are used in pairs to encode
- codepoints with values greater than 0xFFFF. The code points that are
- encoded by UTF-16 pairs are available independently in the UTF-8 encod-
- ing. (In other words, the whole surrogate thing is a fudge for UTF-16
- which unfortunately messes up UTF-8.)
-
- If an invalid UTF-8 string is passed to PCRE, an error return is given.
- At compile time, the only additional information is the offset to the
- first byte of the failing character. The runtime functions pcre_exec()
- and pcre_dfa_exec() also pass back this information, as well as a more
- detailed reason code if the caller has provided memory in which to do
- this.
-
- In some situations, you may already know that your strings are valid,
- and therefore want to skip these checks in order to improve perfor-
- mance. If you set the PCRE_NO_UTF8_CHECK flag at compile time or at run
- time, PCRE assumes that the pattern or subject it is given (respec-
- tively) contains only valid UTF-8 codes. In this case, it does not
- diagnose an invalid UTF-8 string.
-
- If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set,
- what happens depends on why the string is invalid. If the string con-
- forms to the "old" definition of UTF-8 (RFC 2279), it is processed as a
- string of characters in the range 0 to 0x7FFFFFFF by pcre_dfa_exec()
- and the interpreted version of pcre_exec(). In other words, apart from
- the initial validity test, these functions (when in UTF-8 mode) handle
- strings according to the more liberal rules of RFC 2279. However, the
- just-in-time (JIT) optimization for pcre_exec() supports only RFC 3629.
- If you are using JIT optimization, or if the string does not even con-
- form to RFC 2279, the result is undefined. Your program may crash.
-
- If you want to process strings of values in the full range 0 to
- 0x7FFFFFFF, encoded in a UTF-8-like manner as per the old RFC, you can
- set PCRE_NO_UTF8_CHECK to bypass the more restrictive test. However, in
- this situation, you will have to apply your own validity check, and
- avoid the use of JIT optimization.
-
- Validity of UTF-16 strings
-
- When you set the PCRE_UTF16 flag, the strings of 16-bit data units that
- are passed as patterns and subjects are (by default) checked for valid-
- ity on entry to the relevant functions. Values other than those in the
- surrogate range U+D800 to U+DFFF are independent code points. Values in
- the surrogate range must be used in pairs in the correct manner.
-
- If an invalid UTF-16 string is passed to PCRE, an error return is
- given. At compile time, the only additional information is the offset
- to the first data unit of the failing character. The runtime functions
- pcre16_exec() and pcre16_dfa_exec() also pass back this information, as
- well as a more detailed reason code if the caller has provided memory
- in which to do this.
-
- In some situations, you may already know that your strings are valid,
- and therefore want to skip these checks in order to improve perfor-
- mance. If you set the PCRE_NO_UTF16_CHECK flag at compile time or at
- run time, PCRE assumes that the pattern or subject it is given (respec-
- tively) contains only valid UTF-16 sequences. In this case, it does not
- diagnose an invalid UTF-16 string.
-
- General comments about UTF modes
-
- 1. Codepoints less than 256 can be specified by either braced or
- unbraced hexadecimal escape sequences (for example, \x{b3} or \xb3).
- Larger values have to use braced sequences.
-
- 2. Octal numbers up to \777 are recognized, and in UTF-8 mode, they
- match two-byte characters for values greater than \177.
-
- 3. Repeat quantifiers apply to complete UTF characters, not to individ-
- ual data units, for example: \x{100}{3}.
-
- 4. The dot metacharacter matches one UTF character instead of a single
- data unit.
-
- 5. The escape sequence \C can be used to match a single byte in UTF-8
- mode, or a single 16-bit data unit in UTF-16 mode, but its use can lead
- to some strange effects because it breaks up multi-unit characters (see
- the description of \C in the pcrepattern documentation). The use of \C
- is not supported in the alternative matching function
- pcre[16]_dfa_exec(), nor is it supported in UTF mode by the JIT opti-
- mization of pcre[16]_exec(). If JIT optimization is requested for a UTF
- pattern that contains \C, it will not succeed, and so the matching will
- be carried out by the normal interpretive function.
-
- 6. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly
- test characters of any code value, but, by default, the characters that
- PCRE recognizes as digits, spaces, or word characters remain the same
- set as in non-UTF mode, all with values less than 256. This remains
- true even when PCRE is built to include Unicode property support,
- because to do otherwise would slow down PCRE in many common cases. Note
- in particular that this applies to \b and \B, because they are defined
- in terms of \w and \W. If you really want to test for a wider sense of,
- say, "digit", you can use explicit Unicode property tests such as
- \p{Nd}. Alternatively, if you set the PCRE_UCP option, the way that the
- character escapes work is changed so that Unicode properties are used
- to determine which characters match. There are more details in the sec-
- tion on generic character types in the pcrepattern documentation.
-
- 7. Similarly, characters that match the POSIX named character classes
- are all low-valued characters, unless the PCRE_UCP option is set.
-
- 8. However, the horizontal and vertical whitespace matching escapes
- (\h, \H, \v, and \V) do match all the appropriate Unicode characters,
- whether or not PCRE_UCP is set.
-
- 9. Case-insensitive matching applies only to characters whose values
- are less than 128, unless PCRE is built with Unicode property support.
- Even when Unicode property support is available, PCRE still uses its
- own character tables when checking the case of low-valued characters,
- so as not to degrade performance. The Unicode property information is
- used only for characters with higher values. Furthermore, PCRE supports
- case-insensitive matching only when there is a one-to-one mapping
- between a letter's cases. There are a small number of many-to-one map-
- pings in Unicode; these are not supported by PCRE.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 13 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREJIT(3) PCREJIT(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PCRE JUST-IN-TIME COMPILER SUPPORT
-
- Just-in-time compiling is a heavyweight optimization that can greatly
- speed up pattern matching. However, it comes at the cost of extra pro-
- cessing before the match is performed. Therefore, it is of most benefit
- when the same pattern is going to be matched many times. This does not
- necessarily mean many calls of a matching function; if the pattern is
- not anchored, matching attempts may take place many times at various
- positions in the subject, even for a single call. Therefore, if the
- subject string is very long, it may still pay to use JIT for one-off
- matches.
-
- JIT support applies only to the traditional Perl-compatible matching
- function. It does not apply when the DFA matching function is being
- used. The code for this support was written by Zoltan Herczeg.
-
-
-8-BIT and 16-BIT SUPPORT
-
- JIT support is available for both the 8-bit and 16-bit PCRE libraries.
- To keep this documentation simple, only the 8-bit interface is
- described in what follows. If you are using the 16-bit library, substi-
- tute the 16-bit functions and 16-bit structures (for example,
- pcre16_jit_stack instead of pcre_jit_stack).
-
-
-AVAILABILITY OF JIT SUPPORT
-
- JIT support is an optional feature of PCRE. The "configure" option
- --enable-jit (or equivalent CMake option) must be set when PCRE is
- built if you want to use JIT. The support is limited to the following
- hardware platforms:
-
- ARM v5, v7, and Thumb2
- Intel x86 32-bit and 64-bit
- MIPS 32-bit
- Power PC 32-bit and 64-bit
-
- The Power PC support is designated as experimental because it has not
- been fully tested. If --enable-jit is set on an unsupported platform,
- compilation fails.
-
- A program that is linked with PCRE 8.20 or later can tell if JIT sup-
- port is available by calling pcre_config() with the PCRE_CONFIG_JIT
- option. The result is 1 when JIT is available, and 0 otherwise. How-
- ever, a simple program does not need to check this in order to use JIT.
- The API is implemented in a way that falls back to the ordinary PCRE
- code if JIT is not available.
-
- If your program may sometimes be linked with versions of PCRE that are
- older than 8.20, but you want to use JIT when it is available, you can
- test the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT
- macro such as PCRE_CONFIG_JIT, for compile-time control of your code.
-
-
-SIMPLE USE OF JIT
-
- You have to do two things to make use of the JIT support in the sim-
- plest way:
-
- (1) Call pcre_study() with the PCRE_STUDY_JIT_COMPILE option for
- each compiled pattern, and pass the resulting pcre_extra block to
- pcre_exec().
-
- (2) Use pcre_free_study() to free the pcre_extra block when it is
- no longer needed instead of just freeing it yourself. This
- ensures that any JIT data is also freed.
-
- For a program that may be linked with pre-8.20 versions of PCRE, you
- can insert
-
- #ifndef PCRE_STUDY_JIT_COMPILE
- #define PCRE_STUDY_JIT_COMPILE 0
- #endif
-
- so that no option is passed to pcre_study(), and then use something
- like this to free the study data:
-
- #ifdef PCRE_CONFIG_JIT
- pcre_free_study(study_ptr);
- #else
- pcre_free(study_ptr);
- #endif
-
- In some circumstances you may need to call additional functions. These
- are described in the section entitled "Controlling the JIT stack"
- below.
-
- If JIT support is not available, PCRE_STUDY_JIT_COMPILE is ignored, and
- no JIT data is set up. Otherwise, the compiled pattern is passed to the
- JIT compiler, which turns it into machine code that executes much
- faster than the normal interpretive code. When pcre_exec() is passed a
- pcre_extra block containing a pointer to JIT code, it obeys that
- instead of the normal code. The result is identical, but the code runs
- much faster.
-
- There are some pcre_exec() options that are not supported for JIT exe-
- cution. There are also some pattern items that JIT cannot handle.
- Details are given below. In both cases, execution automatically falls
- back to the interpretive code.
-
- If the JIT compiler finds an unsupported item, no JIT data is gener-
- ated. You can find out if JIT execution is available after studying a
- pattern by calling pcre_fullinfo() with the PCRE_INFO_JIT option. A
- result of 1 means that JIT compilation was successful. A result of 0
- means that JIT support is not available, or the pattern was not studied
- with PCRE_STUDY_JIT_COMPILE, or the JIT compiler was not able to handle
- the pattern.
-
- Once a pattern has been studied, with or without JIT, it can be used as
- many times as you like for matching different subject strings.
-
-
-UNSUPPORTED OPTIONS AND PATTERN ITEMS
-
- The only pcre_exec() options that are supported for JIT execution are
- PCRE_NO_UTF8_CHECK, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and
- PCRE_NOTEMPTY_ATSTART. Note in particular that partial matching is not
- supported.
-
- The unsupported pattern items are:
-
- \C match a single byte; not supported in UTF-8 mode
- (?Cn) callouts
- (*COMMIT) )
- (*MARK) )
- (*PRUNE) ) the backtracking control verbs
- (*SKIP) )
- (*THEN) )
-
- Support for some of these may be added in future.
-
-
-RETURN VALUES FROM JIT EXECUTION
-
- When a pattern is matched using JIT execution, the return values are
- the same as those given by the interpretive pcre_exec() code, with the
- addition of one new error code: PCRE_ERROR_JIT_STACKLIMIT. This means
- that the memory used for the JIT stack was insufficient. See "Control-
- ling the JIT stack" below for a discussion of JIT stack usage. For com-
- patibility with the interpretive pcre_exec() code, no more than two-
- thirds of the ovector argument is used for passing back captured sub-
- strings.
-
- The error code PCRE_ERROR_MATCHLIMIT is returned by the JIT code if
- searching a very large pattern tree goes on for too long, as it is in
- the same circumstance when JIT is not used, but the details of exactly
- what is counted are not the same. The PCRE_ERROR_RECURSIONLIMIT error
- code is never returned by JIT execution.
-
-
-SAVING AND RESTORING COMPILED PATTERNS
-
- The code that is generated by the JIT compiler is architecture-spe-
- cific, and is also position dependent. For those reasons it cannot be
- saved (in a file or database) and restored later like the bytecode and
- other data of a compiled pattern. Saving and restoring compiled pat-
- terns is not something many people do. More detail about this facility
- is given in the pcreprecompile documentation. It should be possible to
- run pcre_study() on a saved and restored pattern, and thereby recreate
- the JIT data, but because JIT compilation uses significant resources,
- it is probably not worth doing this; you might as well recompile the
- original pattern.
-
-
-CONTROLLING THE JIT STACK
-
- When the compiled JIT code runs, it needs a block of memory to use as a
- stack. By default, it uses 32K on the machine stack. However, some
- large or complicated patterns need more than this. The error
- PCRE_ERROR_JIT_STACKLIMIT is given when there is not enough stack.
- Three functions are provided for managing blocks of memory for use as
- JIT stacks. There is further discussion about the use of JIT stacks in
- the section entitled "JIT stack FAQ" below.
-
- The pcre_jit_stack_alloc() function creates a JIT stack. Its arguments
- are a starting size and a maximum size, and it returns a pointer to an
- opaque structure of type pcre_jit_stack, or NULL if there is an error.
- The pcre_jit_stack_free() function can be used to free a stack that is
- no longer needed. (For the technically minded: the address space is
- allocated by mmap or VirtualAlloc.)
-
- JIT uses far less memory for recursion than the interpretive code, and
- a maximum stack size of 512K to 1M should be more than enough for any
- pattern.
-
- The pcre_assign_jit_stack() function specifies which stack JIT code
- should use. Its arguments are as follows:
-
- pcre_extra *extra
- pcre_jit_callback callback
- void *data
-
- The extra argument must be the result of studying a pattern with
- PCRE_STUDY_JIT_COMPILE. There are three cases for the values of the
- other two options:
-
- (1) If callback is NULL and data is NULL, an internal 32K block
- on the machine stack is used.
-
- (2) If callback is NULL and data is not NULL, data must be
- a valid JIT stack, the result of calling pcre_jit_stack_alloc().
-
- (3) If callback not NULL, it must point to a function that is called
- with data as an argument at the start of matching, in order to
- set up a JIT stack. If the result is NULL, the internal 32K stack
- is used; otherwise the return value must be a valid JIT stack,
- the result of calling pcre_jit_stack_alloc().
-
- You may safely assign the same JIT stack to more than one pattern, as
- long as they are all matched sequentially in the same thread. In a mul-
- tithread application, each thread must use its own JIT stack.
-
- Strictly speaking, even more is allowed. You can assign the same stack
- to any number of patterns as long as they are not used for matching by
- multiple threads at the same time. For example, you can assign the same
- stack to all compiled patterns, and use a global mutex in the callback
- to wait until the stack is available for use. However, this is an inef-
- ficient solution, and not recommended.
-
- This is a suggestion for how a typical multithreaded program might
- operate:
-
- During thread initalization
- thread_local_var = pcre_jit_stack_alloc(...)
-
- During thread exit
- pcre_jit_stack_free(thread_local_var)
-
- Use a one-line callback function
- return thread_local_var
-
- All the functions described in this section do nothing if JIT is not
- available, and pcre_assign_jit_stack() does nothing unless the extra
- argument is non-NULL and points to a pcre_extra block that is the
- result of a successful study with PCRE_STUDY_JIT_COMPILE.
-
-
-JIT STACK FAQ
-
- (1) Why do we need JIT stacks?
-
- PCRE (and JIT) is a recursive, depth-first engine, so it needs a stack
- where the local data of the current node is pushed before checking its
- child nodes. Allocating real machine stack on some platforms is diffi-
- cult. For example, the stack chain needs to be updated every time if we
- extend the stack on PowerPC. Although it is possible, its updating
- time overhead decreases performance. So we do the recursion in memory.
-
- (2) Why don't we simply allocate blocks of memory with malloc()?
-
- Modern operating systems have a nice feature: they can reserve an
- address space instead of allocating memory. We can safely allocate mem-
- ory pages inside this address space, so the stack could grow without
- moving memory data (this is important because of pointers). Thus we can
- allocate 1M address space, and use only a single memory page (usually
- 4K) if that is enough. However, we can still grow up to 1M anytime if
- needed.
-
- (3) Who "owns" a JIT stack?
-
- The owner of the stack is the user program, not the JIT studied pattern
- or anything else. The user program must ensure that if a stack is used
- by pcre_exec(), (that is, it is assigned to the pattern currently run-
- ning), that stack must not be used by any other threads (to avoid over-
- writing the same memory area). The best practice for multithreaded pro-
- grams is to allocate a stack for each thread, and return this stack
- through the JIT callback function.
-
- (4) When should a JIT stack be freed?
-
- You can free a JIT stack at any time, as long as it will not be used by
- pcre_exec() again. When you assign the stack to a pattern, only a
- pointer is set. There is no reference counting or any other magic. You
- can free the patterns and stacks in any order, anytime. Just do not
- call pcre_exec() with a pattern pointing to an already freed stack, as
- that will cause SEGFAULT. (Also, do not free a stack currently used by
- pcre_exec() in another thread). You can also replace the stack for a
- pattern at any time. You can even free the previous stack before
- assigning a replacement.
-
- (5) Should I allocate/free a stack every time before/after calling
- pcre_exec()?
-
- No, because this is too costly in terms of resources. However, you
- could implement some clever idea which release the stack if it is not
- used in let's say two minutes. The JIT callback can help to achive this
- without keeping a list of the currently JIT studied patterns.
-
- (6) OK, the stack is for long term memory allocation. But what happens
- if a pattern causes stack overflow with a stack of 1M? Is that 1M kept
- until the stack is freed?
-
- Especially on embedded sytems, it might be a good idea to release mem-
- ory sometimes without freeing the stack. There is no API for this at
- the moment. Probably a function call which returns with the currently
- allocated memory for any stack and another which allows releasing mem-
- ory (shrinking the stack) would be a good idea if someone needs this.
-
- (7) This is too much of a headache. Isn't there any better solution for
- JIT stack handling?
-
- No, thanks to Windows. If POSIX threads were used everywhere, we could
- throw out this complicated API.
-
-
-EXAMPLE CODE
-
- This is a single-threaded example that specifies a JIT stack without
- using a callback.
-
- int rc;
- int ovector[30];
- pcre *re;
- pcre_extra *extra;
- pcre_jit_stack *jit_stack;
-
- re = pcre_compile(pattern, 0, &error, &erroffset, NULL);
- /* Check for errors */
- extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
- jit_stack = pcre_jit_stack_alloc(32*1024, 512*1024);
- /* Check for error (NULL) */
- pcre_assign_jit_stack(extra, NULL, jit_stack);
- rc = pcre_exec(re, extra, subject, length, 0, 0, ovector, 30);
- /* Check results */
- pcre_free(re);
- pcre_free_study(extra);
- pcre_jit_stack_free(jit_stack);
-
-
-SEE ALSO
-
- pcreapi(3)
-
-
-AUTHOR
-
- Philip Hazel (FAQ by Zoltan Herczeg)
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 08 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPARTIAL(3) PCREPARTIAL(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PARTIAL MATCHING IN PCRE
-
- In normal use of PCRE, if the subject string that is passed to a match-
- ing function matches as far as it goes, but is too short to match the
- entire pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances
- where it might be helpful to distinguish this case from other cases in
- which there is no match.
-
- Consider, for example, an application where a human is required to type
- in data for a field with specific formatting requirements. An example
- might be a date in the form ddmmmyy, defined by this pattern:
-
- ^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$
-
- If the application sees the user's keystrokes one by one, and can check
- that what has been typed so far is potentially valid, it is able to
- raise an error as soon as a mistake is made, by beeping and not
- reflecting the character that has been typed, for example. This immedi-
- ate feedback is likely to be a better user interface than a check that
- is delayed until the entire string has been entered. Partial matching
- can also be useful when the subject string is very long and is not all
- available at once.
-
- PCRE supports partial matching by means of the PCRE_PARTIAL_SOFT and
- PCRE_PARTIAL_HARD options, which can be set when calling any of the
- matching functions. For backwards compatibility, PCRE_PARTIAL is a syn-
- onym for PCRE_PARTIAL_SOFT. The essential difference between the two
- options is whether or not a partial match is preferred to an alterna-
- tive complete match, though the details differ between the two types of
- matching function. If both options are set, PCRE_PARTIAL_HARD takes
- precedence.
-
- Setting a partial matching option disables the use of any just-in-time
- code that was set up by studying the compiled pattern with the
- PCRE_STUDY_JIT_COMPILE option. It also disables two of PCRE's standard
- optimizations. PCRE remembers the last literal data unit in a pattern,
- and abandons matching immediately if it is not present in the subject
- string. This optimization cannot be used for a subject string that
- might match only partially. If the pattern was studied, PCRE knows the
- minimum length of a matching string, and does not bother to run the
- matching function on shorter strings. This optimization is also dis-
- abled for partial matching.
-
-
-PARTIAL MATCHING USING pcre_exec() OR pcre16_exec()
-
- A partial match occurs during a call to pcre_exec() or pcre16_exec()
- when the end of the subject string is reached successfully, but match-
- ing cannot continue because more characters are needed. However, at
- least one character in the subject must have been inspected. This char-
- acter need not form part of the final matched string; lookbehind asser-
- tions and the \K escape sequence provide ways of inspecting characters
- before the start of a matched substring. The requirement for inspecting
- at least one character exists because an empty string can always be
- matched; without such a restriction there would always be a partial
- match of an empty string at the end of the subject.
-
- If there are at least two slots in the offsets vector when a partial
- match is returned, the first slot is set to the offset of the earliest
- character that was inspected. For convenience, the second offset points
- to the end of the subject so that a substring can easily be identified.
-
- For the majority of patterns, the first offset identifies the start of
- the partially matched string. However, for patterns that contain look-
- behind assertions, or \K, or begin with \b or \B, earlier characters
- have been inspected while carrying out the match. For example:
-
- /(?<=abc)123/
-
- This pattern matches "123", but only if it is preceded by "abc". If the
- subject string is "xyzabc12", the offsets after a partial match are for
- the substring "abc12", because all these characters are needed if
- another match is tried with extra characters added to the subject.
-
- What happens when a partial match is identified depends on which of the
- two partial matching options are set.
-
- PCRE_PARTIAL_SOFT WITH pcre_exec() OR pcre16_exec()
-
- If PCRE_PARTIAL_SOFT is set when pcre_exec() or pcre16_exec() identi-
- fies a partial match, the partial match is remembered, but matching
- continues as normal, and other alternatives in the pattern are tried.
- If no complete match can be found, PCRE_ERROR_PARTIAL is returned
- instead of PCRE_ERROR_NOMATCH.
-
- This option is "soft" because it prefers a complete match over a par-
- tial match. All the various matching items in a pattern behave as if
- the subject string is potentially complete. For example, \z, \Z, and $
- match at the end of the subject, as normal, and for \b and \B the end
- of the subject is treated as a non-alphanumeric.
-
- If there is more than one partial match, the first one that was found
- provides the data that is returned. Consider this pattern:
-
- /123\w+X|dogY/
-
- If this is matched against the subject string "abc123dog", both alter-
- natives fail to match, but the end of the subject is reached during
- matching, so PCRE_ERROR_PARTIAL is returned. The offsets are set to 3
- and 9, identifying "123dog" as the first partial match that was found.
- (In this example, there are two partial matches, because "dog" on its
- own partially matches the second alternative.)
-
- PCRE_PARTIAL_HARD WITH pcre_exec() OR pcre16_exec()
-
- If PCRE_PARTIAL_HARD is set for pcre_exec() or pcre16_exec(),
- PCRE_ERROR_PARTIAL is returned as soon as a partial match is found,
- without continuing to search for possible complete matches. This option
- is "hard" because it prefers an earlier partial match over a later com-
- plete match. For this reason, the assumption is made that the end of
- the supplied subject string may not be the true end of the available
- data, and so, if \z, \Z, \b, \B, or $ are encountered at the end of the
- subject, the result is PCRE_ERROR_PARTIAL, provided that at least one
- character in the subject has been inspected.
-
- Setting PCRE_PARTIAL_HARD also affects the way UTF-8 and UTF-16 subject
- strings are checked for validity. Normally, an invalid sequence causes
- the error PCRE_ERROR_BADUTF8 or PCRE_ERROR_BADUTF16. However, in the
- special case of a truncated character at the end of the subject,
- PCRE_ERROR_SHORTUTF8 or PCRE_ERROR_SHORTUTF16 is returned when
- PCRE_PARTIAL_HARD is set.
-
- Comparing hard and soft partial matching
-
- The difference between the two partial matching options can be illus-
- trated by a pattern such as:
-
- /dog(sbody)?/
-
- This matches either "dog" or "dogsbody", greedily (that is, it prefers
- the longer string if possible). If it is matched against the string
- "dog" with PCRE_PARTIAL_SOFT, it yields a complete match for "dog".
- However, if PCRE_PARTIAL_HARD is set, the result is PCRE_ERROR_PARTIAL.
- On the other hand, if the pattern is made ungreedy the result is dif-
- ferent:
-
- /dog(sbody)??/
-
- In this case the result is always a complete match because that is
- found first, and matching never continues after finding a complete
- match. It might be easier to follow this explanation by thinking of the
- two patterns like this:
-
- /dog(sbody)?/ is the same as /dogsbody|dog/
- /dog(sbody)??/ is the same as /dog|dogsbody/
-
- The second pattern will never match "dogsbody", because it will always
- find the shorter match first.
-
-
-PARTIAL MATCHING USING pcre_dfa_exec() OR pcre16_dfa_exec()
-
- The DFA functions move along the subject string character by character,
- without backtracking, searching for all possible matches simultane-
- ously. If the end of the subject is reached before the end of the pat-
- tern, there is the possibility of a partial match, again provided that
- at least one character has been inspected.
-
- When PCRE_PARTIAL_SOFT is set, PCRE_ERROR_PARTIAL is returned only if
- there have been no complete matches. Otherwise, the complete matches
- are returned. However, if PCRE_PARTIAL_HARD is set, a partial match
- takes precedence over any complete matches. The portion of the string
- that was inspected when the longest partial match was found is set as
- the first matching string, provided there are at least two slots in the
- offsets vector.
-
- Because the DFA functions always search for all possible matches, and
- there is no difference between greedy and ungreedy repetition, their
- behaviour is different from the standard functions when PCRE_PAR-
- TIAL_HARD is set. Consider the string "dog" matched against the
- ungreedy pattern shown above:
-
- /dog(sbody)??/
-
- Whereas the standard functions stop as soon as they find the complete
- match for "dog", the DFA functions also find the partial match for
- "dogsbody", and so return that when PCRE_PARTIAL_HARD is set.
-
-
-PARTIAL MATCHING AND WORD BOUNDARIES
-
- If a pattern ends with one of sequences \b or \B, which test for word
- boundaries, partial matching with PCRE_PARTIAL_SOFT can give counter-
- intuitive results. Consider this pattern:
-
- /\bcat\b/
-
- This matches "cat", provided there is a word boundary at either end. If
- the subject string is "the cat", the comparison of the final "t" with a
- following character cannot take place, so a partial match is found.
- However, normal matching carries on, and \b matches at the end of the
- subject when the last character is a letter, so a complete match is
- found. The result, therefore, is not PCRE_ERROR_PARTIAL. Using
- PCRE_PARTIAL_HARD in this case does yield PCRE_ERROR_PARTIAL, because
- then the partial match takes precedence.
-
-
-FORMERLY RESTRICTED PATTERNS
-
- For releases of PCRE prior to 8.00, because of the way certain internal
- optimizations were implemented in the pcre_exec() function, the
- PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be
- used with all patterns. From release 8.00 onwards, the restrictions no
- longer apply, and partial matching with can be requested for any pat-
- tern.
-
- Items that were formerly restricted were repeated single characters and
- repeated metasequences. If PCRE_PARTIAL was set for a pattern that did
- not conform to the restrictions, pcre_exec() returned the error code
- PCRE_ERROR_BADPARTIAL (-13). This error code is no longer in use. The
- PCRE_INFO_OKPARTIAL call to pcre_fullinfo() to find out if a compiled
- pattern can be used for partial matching now always returns 1.
-
-
-EXAMPLE OF PARTIAL MATCHING USING PCRETEST
-
- If the escape sequence \P is present in a pcretest data line, the
- PCRE_PARTIAL_SOFT option is used for the match. Here is a run of
- pcretest that uses the date example quoted above:
-
- re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data> 25jun04\P
- 0: 25jun04
- 1: jun
- data> 25dec3\P
- Partial match: 23dec3
- data> 3ju\P
- Partial match: 3ju
- data> 3juj\P
- No match
- data> j\P
- No match
-
- The first data string is matched completely, so pcretest shows the
- matched substrings. The remaining four strings do not match the com-
- plete pattern, but the first two are partial matches. Similar output is
- obtained if DFA matching is used.
-
- If the escape sequence \P is present more than once in a pcretest data
- line, the PCRE_PARTIAL_HARD option is set for the match.
-
-
-MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre16_dfa_exec()
-
- When a partial match has been found using a DFA matching function, it
- is possible to continue the match by providing additional subject data
- and calling the function again with the same compiled regular expres-
- sion, this time setting the PCRE_DFA_RESTART option. You must pass the
- same working space as before, because this is where details of the pre-
- vious partial match are stored. Here is an example using pcretest,
- using the \R escape sequence to set the PCRE_DFA_RESTART option (\D
- specifies the use of the DFA matching function):
-
- re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data> 23ja\P\D
- Partial match: 23ja
- data> n05\R\D
- 0: n05
-
- The first call has "23ja" as the subject, and requests partial match-
- ing; the second call has "n05" as the subject for the continued
- (restarted) match. Notice that when the match is complete, only the
- last part is shown; PCRE does not retain the previously partially-
- matched string. It is up to the calling program to do that if it needs
- to.
-
- You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with
- PCRE_DFA_RESTART to continue partial matching over multiple segments.
- This facility can be used to pass very long subject strings to the DFA
- matching functions.
-
-
-MULTI-SEGMENT MATCHING WITH pcre_exec() OR pcre16_exec()
-
- From release 8.00, the standard matching functions can also be used to
- do multi-segment matching. Unlike the DFA functions, it is not possible
- to restart the previous match with a new segment of data. Instead, new
- data must be added to the previous subject string, and the entire match
- re-run, starting from the point where the partial match occurred. Ear-
- lier data can be discarded.
-
- It is best to use PCRE_PARTIAL_HARD in this situation, because it does
- not treat the end of a segment as the end of the subject when matching
- \z, \Z, \b, \B, and $. Consider an unanchored pattern that matches
- dates:
-
- re> /\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d/
- data> The date is 23ja\P\P
- Partial match: 23ja
-
- At this stage, an application could discard the text preceding "23ja",
- add on text from the next segment, and call the matching function
- again. Unlike the DFA matching functions the entire matching string
- must always be available, and the complete matching process occurs for
- each call, so more memory and more processing time is needed.
-
- Note: If the pattern contains lookbehind assertions, or \K, or starts
- with \b or \B, the string that is returned for a partial match includes
- characters that precede the partially matched string itself, because
- these must be retained when adding on more characters for a subsequent
- matching attempt.
-
-
-ISSUES WITH MULTI-SEGMENT MATCHING
-
- Certain types of pattern may give problems with multi-segment matching,
- whichever matching function is used.
-
- 1. If the pattern contains a test for the beginning of a line, you need
- to pass the PCRE_NOTBOL option when the subject string for any call
- does start at the beginning of a line. There is also a PCRE_NOTEOL
- option, but in practice when doing multi-segment matching you should be
- using PCRE_PARTIAL_HARD, which includes the effect of PCRE_NOTEOL.
-
- 2. Lookbehind assertions at the start of a pattern are catered for in
- the offsets that are returned for a partial match. However, in theory,
- a lookbehind assertion later in the pattern could require even earlier
- characters to be inspected, and it might not have been reached when a
- partial match occurs. This is probably an extremely unlikely case; you
- could guard against it to a certain extent by always including extra
- characters at the start.
-
- 3. Matching a subject string that is split into multiple segments may
- not always produce exactly the same result as matching over one single
- long string, especially when PCRE_PARTIAL_SOFT is used. The section
- "Partial Matching and Word Boundaries" above describes an issue that
- arises if the pattern ends with \b or \B. Another kind of difference
- may occur when there are multiple matching possibilities, because (for
- PCRE_PARTIAL_SOFT) a partial match result is given only when there are
- no completed matches. This means that as soon as the shortest match has
- been found, continuation to a new subject segment is no longer possi-
- ble. Consider again this pcretest example:
-
- re> /dog(sbody)?/
- data> dogsb\P
- 0: dog
- data> do\P\D
- Partial match: do
- data> gsb\R\P\D
- 0: g
- data> dogsbody\D
- 0: dogsbody
- 1: dog
-
- The first data line passes the string "dogsb" to a standard matching
- function, setting the PCRE_PARTIAL_SOFT option. Although the string is
- a partial match for "dogsbody", the result is not PCRE_ERROR_PARTIAL,
- because the shorter string "dog" is a complete match. Similarly, when
- the subject is presented to a DFA matching function in several parts
- ("do" and "gsb" being the first two) the match stops when "dog" has
- been found, and it is not possible to continue. On the other hand, if
- "dogsbody" is presented as a single string, a DFA matching function
- finds both matches.
-
- Because of these problems, it is best to use PCRE_PARTIAL_HARD when
- matching multi-segment data. The example above then behaves differ-
- ently:
-
- re> /dog(sbody)?/
- data> dogsb\P\P
- Partial match: dogsb
- data> do\P\D
- Partial match: do
- data> gsb\R\P\P\D
- Partial match: gsb
-
- 4. Patterns that contain alternatives at the top level which do not all
- start with the same pattern item may not work as expected when
- PCRE_DFA_RESTART is used. For example, consider this pattern:
-
- 1234|3789
-
- If the first part of the subject is "ABC123", a partial match of the
- first alternative is found at offset 3. There is no partial match for
- the second alternative, because such a match does not start at the same
- point in the subject string. Attempting to continue with the string
- "7890" does not yield a match because only those alternatives that
- match at one point in the subject are remembered. The problem arises
- because the start of the second alternative matches within the first
- alternative. There is no problem with anchored patterns or patterns
- such as:
-
- 1234|ABCD
-
- where no string can be a partial match for both alternatives. This is
- not a problem if a standard matching function is used, because the
- entire match has to be rerun each time:
-
- re> /1234|3789/
- data> ABC123\P\P
- Partial match: 123
- data> 1237890
- 0: 3789
-
- Of course, instead of using PCRE_DFA_RESTART, the same technique of re-
- running the entire match can also be used with the DFA matching func-
- tions. Another possibility is to work with two buffers. If a partial
- match at offset n in the first buffer is followed by "no match" when
- PCRE_DFA_RESTART is used on the second buffer, you can then try a new
- match starting at offset n+1 in the first buffer.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 21 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPRECOMPILE(3) PCREPRECOMPILE(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-SAVING AND RE-USING PRECOMPILED PCRE PATTERNS
-
- If you are running an application that uses a large number of regular
- expression patterns, it may be useful to store them in a precompiled
- form instead of having to compile them every time the application is
- run. If you are not using any private character tables (see the
- pcre_maketables() documentation), this is relatively straightforward.
- If you are using private tables, it is a little bit more complicated.
- However, if you are using the just-in-time optimization feature, it is
- not possible to save and reload the JIT data.
-
- If you save compiled patterns to a file, you can copy them to a differ-
- ent host and run them there. If the two hosts have different endianness
- (byte order), you should run the pcre[16]_pattern_to_host_byte_order()
- function on the new host before trying to match the pattern. The match-
- ing functions return PCRE_ERROR_BADENDIANNESS if they detect a pattern
- with the wrong endianness.
-
- Compiling regular expressions with one version of PCRE for use with a
- different version is not guaranteed to work and may cause crashes, and
- saving and restoring a compiled pattern loses any JIT optimization
- data.
-
-
-SAVING A COMPILED PATTERN
-
- The value returned by pcre[16]_compile() points to a single block of
- memory that holds the compiled pattern and associated data. You can
- find the length of this block in bytes by calling pcre[16]_fullinfo()
- with an argument of PCRE_INFO_SIZE. You can then save the data in any
- appropriate manner. Here is sample code for the 8-bit library that com-
- piles a pattern and writes it to a file. It assumes that the variable
- fd refers to a file that is open for output:
-
- int erroroffset, rc, size;
- char *error;
- pcre *re;
-
- re = pcre_compile("my pattern", 0, &error, &erroroffset, NULL);
- if (re == NULL) { ... handle errors ... }
- rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
- if (rc < 0) { ... handle errors ... }
- rc = fwrite(re, 1, size, fd);
- if (rc != size) { ... handle errors ... }
-
- In this example, the bytes that comprise the compiled pattern are
- copied exactly. Note that this is binary data that may contain any of
- the 256 possible byte values. On systems that make a distinction
- between binary and non-binary data, be sure that the file is opened for
- binary output.
-
- If you want to write more than one pattern to a file, you will have to
- devise a way of separating them. For binary data, preceding each pat-
- tern with its length is probably the most straightforward approach.
- Another possibility is to write out the data in hexadecimal instead of
- binary, one pattern to a line.
-
- Saving compiled patterns in a file is only one possible way of storing
- them for later use. They could equally well be saved in a database, or
- in the memory of some daemon process that passes them via sockets to
- the processes that want them.
-
- If the pattern has been studied, it is also possible to save the normal
- study data in a similar way to the compiled pattern itself. However, if
- the PCRE_STUDY_JIT_COMPILE was used, the just-in-time data that is cre-
- ated cannot be saved because it is too dependent on the current envi-
- ronment. When studying generates additional information,
- pcre[16]_study() returns a pointer to a pcre[16]_extra data block. Its
- format is defined in the section on matching a pattern in the pcreapi
- documentation. The study_data field points to the binary study data,
- and this is what you must save (not the pcre[16]_extra block itself).
- The length of the study data can be obtained by calling
- pcre[16]_fullinfo() with an argument of PCRE_INFO_STUDYSIZE. Remember
- to check that pcre[16]_study() did return a non-NULL value before try-
- ing to save the study data.
-
-
-RE-USING A PRECOMPILED PATTERN
-
- Re-using a precompiled pattern is straightforward. Having reloaded it
- into main memory, called pcre[16]_pattern_to_host_byte_order() if nec-
- essary, you pass its pointer to pcre[16]_exec() or pcre[16]_dfa_exec()
- in the usual way.
-
- However, if you passed a pointer to custom character tables when the
- pattern was compiled (the tableptr argument of pcre[16]_compile()), you
- must now pass a similar pointer to pcre[16]_exec() or
- pcre[16]_dfa_exec(), because the value saved with the compiled pattern
- will obviously be nonsense. A field in a pcre[16]_extra() block is used
- to pass this data, as described in the section on matching a pattern in
- the pcreapi documentation.
-
- If you did not provide custom character tables when the pattern was
- compiled, the pointer in the compiled pattern is NULL, which causes the
- matching functions to use PCRE's internal tables. Thus, you do not need
- to take any special action at run time in this case.
-
- If you saved study data with the compiled pattern, you need to create
- your own pcre[16]_extra data block and set the study_data field to
- point to the reloaded study data. You must also set the
- PCRE_EXTRA_STUDY_DATA bit in the flags field to indicate that study
- data is present. Then pass the pcre[16]_extra block to the matching
- function in the usual way. If the pattern was studied for just-in-time
- optimization, that data cannot be saved, and so is lost by a
- save/restore cycle.
-
-
-COMPATIBILITY WITH DIFFERENT PCRE RELEASES
-
- In general, it is safest to recompile all saved patterns when you
- update to a new PCRE release, though not all updates actually require
- this.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 10 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPERFORM(3) PCREPERFORM(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PCRE PERFORMANCE
-
- Two aspects of performance are discussed below: memory usage and pro-
- cessing time. The way you express your pattern as a regular expression
- can affect both of them.
-
-
-COMPILED PATTERN MEMORY USAGE
-
- Patterns are compiled by PCRE into a reasonably efficient interpretive
- code, so that most simple patterns do not use much memory. However,
- there is one case where the memory usage of a compiled pattern can be
- unexpectedly large. If a parenthesized subpattern has a quantifier with
- a minimum greater than 1 and/or a limited maximum, the whole subpattern
- is repeated in the compiled code. For example, the pattern
-
- (abc|def){2,4}
-
- is compiled as if it were
-
- (abc|def)(abc|def)((abc|def)(abc|def)?)?
-
- (Technical aside: It is done this way so that backtrack points within
- each of the repetitions can be independently maintained.)
-
- For regular expressions whose quantifiers use only small numbers, this
- is not usually a problem. However, if the numbers are large, and par-
- ticularly if such repetitions are nested, the memory usage can become
- an embarrassment. For example, the very simple pattern
-
- ((ab){1,1000}c){1,3}
-
- uses 51K bytes when compiled using the 8-bit library. When PCRE is com-
- piled with its default internal pointer size of two bytes, the size
- limit on a compiled pattern is 64K data units, and this is reached with
- the above pattern if the outer repetition is increased from 3 to 4.
- PCRE can be compiled to use larger internal pointers and thus handle
- larger compiled patterns, but it is better to try to rewrite your pat-
- tern to use less memory if you can.
-
- One way of reducing the memory usage for such patterns is to make use
- of PCRE's "subroutine" facility. Re-writing the above pattern as
-
- ((ab)(?2){0,999}c)(?1){0,2}
-
- reduces the memory requirements to 18K, and indeed it remains under 20K
- even with the outer repetition increased to 100. However, this pattern
- is not exactly equivalent, because the "subroutine" calls are treated
- as atomic groups into which there can be no backtracking if there is a
- subsequent matching failure. Therefore, PCRE cannot do this kind of
- rewriting automatically. Furthermore, there is a noticeable loss of
- speed when executing the modified pattern. Nevertheless, if the atomic
- grouping is not a problem and the loss of speed is acceptable, this
- kind of rewriting will allow you to process patterns that PCRE cannot
- otherwise handle.
-
-
-STACK USAGE AT RUN TIME
-
- When pcre_exec() or pcre16_exec() is used for matching, certain kinds
- of pattern can cause it to use large amounts of the process stack. In
- some environments the default process stack is quite small, and if it
- runs out the result is often SIGSEGV. This issue is probably the most
- frequently raised problem with PCRE. Rewriting your pattern can often
- help. The pcrestack documentation discusses this issue in detail.
-
-
-PROCESSING TIME
-
- Certain items in regular expression patterns are processed more effi-
- ciently than others. It is more efficient to use a character class like
- [aeiou] than a set of single-character alternatives such as
- (a|e|i|o|u). In general, the simplest construction that provides the
- required behaviour is usually the most efficient. Jeffrey Friedl's book
- contains a lot of useful general discussion about optimizing regular
- expressions for efficient performance. This document contains a few
- observations about PCRE.
-
- Using Unicode character properties (the \p, \P, and \X escapes) is
- slow, because PCRE has to scan a structure that contains data for over
- fifteen thousand characters whenever it needs a character's property.
- If you can find an alternative pattern that does not use character
- properties, it will probably be faster.
-
- By default, the escape sequences \b, \d, \s, and \w, and the POSIX
- character classes such as [:alpha:] do not use Unicode properties,
- partly for backwards compatibility, and partly for performance reasons.
- However, you can set PCRE_UCP if you want Unicode character properties
- to be used. This can double the matching time for items such as \d,
- when matched with a traditional matching function; the performance loss
- is less with a DFA matching function, and in both cases there is not
- much difference for \b.
-
- When a pattern begins with .* not in parentheses, or in parentheses
- that are not the subject of a backreference, and the PCRE_DOTALL option
- is set, the pattern is implicitly anchored by PCRE, since it can match
- only at the start of a subject string. However, if PCRE_DOTALL is not
- set, PCRE cannot make this optimization, because the . metacharacter
- does not then match a newline, and if the subject string contains new-
- lines, the pattern may match from the character immediately following
- one of them instead of from the very start. For example, the pattern
-
- .*second
-
- matches the subject "first\nand second" (where \n stands for a newline
- character), with the match starting at the seventh character. In order
- to do this, PCRE has to retry the match starting after every newline in
- the subject.
-
- If you are using such a pattern with subject strings that do not con-
- tain newlines, the best performance is obtained by setting PCRE_DOTALL,
- or starting the pattern with ^.* or ^.*? to indicate explicit anchor-
- ing. That saves PCRE from having to scan along the subject looking for
- a newline to restart at.
-
- Beware of patterns that contain nested indefinite repeats. These can
- take a long time to run when applied to a string that does not match.
- Consider the pattern fragment
-
- ^(a+)*
-
- This can match "aaaa" in 16 different ways, and this number increases
- very rapidly as the string gets longer. (The * repeat can match 0, 1,
- 2, 3, or 4 times, and for each of those cases other than 0 or 4, the +
- repeats can match different numbers of times.) When the remainder of
- the pattern is such that the entire match is going to fail, PCRE has in
- principle to try every possible variation, and this can take an
- extremely long time, even for relatively short strings.
-
- An optimization catches some of the more simple cases such as
-
- (a+)*b
-
- where a literal character follows. Before embarking on the standard
- matching procedure, PCRE checks that there is a "b" later in the sub-
- ject string, and if there is not, it fails the match immediately. How-
- ever, when there is no following literal this optimization cannot be
- used. You can see the difference by comparing the behaviour of
-
- (a+)*\d
-
- with the pattern above. The former gives a failure almost instantly
- when applied to a whole line of "a" characters, whereas the latter
- takes an appreciable time with strings longer than about 20 characters.
-
- In many cases, the solution to this kind of performance issue is to use
- an atomic group or a possessive quantifier.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 09 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCREPOSIX(3) PCREPOSIX(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions.
-
-
-SYNOPSIS OF POSIX API
-
- #include <pcreposix.h>
-
- int regcomp(regex_t *preg, const char *pattern,
- int cflags);
-
- int regexec(regex_t *preg, const char *string,
- size_t nmatch, regmatch_t pmatch[], int eflags);
-
- size_t regerror(int errcode, const regex_t *preg,
- char *errbuf, size_t errbuf_size);
-
- void regfree(regex_t *preg);
-
-
-DESCRIPTION
-
- This set of functions provides a POSIX-style API for the PCRE regular
- expression 8-bit library. See the pcreapi documentation for a descrip-
- tion of PCRE's native API, which contains much additional functional-
- ity. There is no POSIX-style wrapper for PCRE's 16-bit library.
-
- The functions described here are just wrapper functions that ultimately
- call the PCRE native API. Their prototypes are defined in the
- pcreposix.h header file, and on Unix systems the library itself is
- called pcreposix.a, so can be accessed by adding -lpcreposix to the
- command for linking an application that uses them. Because the POSIX
- functions call the native ones, it is also necessary to add -lpcre.
-
- I have implemented only those POSIX option bits that can be reasonably
- mapped to PCRE native options. In addition, the option REG_EXTENDED is
- defined with the value zero. This has no effect, but since programs
- that are written to the POSIX interface often use it, this makes it
- easier to slot in PCRE as a replacement library. Other POSIX options
- are not even defined.
-
- There are also some other options that are not defined by POSIX. These
- have been added at the request of users who want to make use of certain
- PCRE-specific features via the POSIX calling interface.
-
- When PCRE is called via these functions, it is only the API that is
- POSIX-like in style. The syntax and semantics of the regular expres-
- sions themselves are still those of Perl, subject to the setting of
- various PCRE options, as described below. "POSIX-like in style" means
- that the API approximates to the POSIX definition; it is not fully
- POSIX-compatible, and in multi-byte encoding domains it is probably
- even less compatible.
-
- The header for these functions is supplied as pcreposix.h to avoid any
- potential clash with other POSIX libraries. It can, of course, be
- renamed or aliased as regex.h, which is the "correct" name. It provides
- two structure types, regex_t for compiled internal forms, and reg-
- match_t for returning captured substrings. It also defines some con-
- stants whose names start with "REG_"; these are used for setting
- options and identifying error codes.
-
-
-COMPILING A PATTERN
-
- The function regcomp() is called to compile a pattern into an internal
- form. The pattern is a C string terminated by a binary zero, and is
- passed in the argument pattern. The preg argument is a pointer to a
- regex_t structure that is used as a base for storing information about
- the compiled regular expression.
-
- The argument cflags is either zero, or contains one or more of the bits
- defined by the following macros:
-
- REG_DOTALL
-
- The PCRE_DOTALL option is set when the regular expression is passed for
- compilation to the native function. Note that REG_DOTALL is not part of
- the POSIX standard.
-
- REG_ICASE
-
- The PCRE_CASELESS option is set when the regular expression is passed
- for compilation to the native function.
-
- REG_NEWLINE
-
- The PCRE_MULTILINE option is set when the regular expression is passed
- for compilation to the native function. Note that this does not mimic
- the defined POSIX behaviour for REG_NEWLINE (see the following sec-
- tion).
-
- REG_NOSUB
-
- The PCRE_NO_AUTO_CAPTURE option is set when the regular expression is
- passed for compilation to the native function. In addition, when a pat-
- tern that is compiled with this flag is passed to regexec() for match-
- ing, the nmatch and pmatch arguments are ignored, and no captured
- strings are returned.
-
- REG_UCP
-
- The PCRE_UCP option is set when the regular expression is passed for
- compilation to the native function. This causes PCRE to use Unicode
- properties when matchine \d, \w, etc., instead of just recognizing
- ASCII values. Note that REG_UTF8 is not part of the POSIX standard.
-
- REG_UNGREEDY
-
- The PCRE_UNGREEDY option is set when the regular expression is passed
- for compilation to the native function. Note that REG_UNGREEDY is not
- part of the POSIX standard.
-
- REG_UTF8
-
- The PCRE_UTF8 option is set when the regular expression is passed for
- compilation to the native function. This causes the pattern itself and
- all data strings used for matching it to be treated as UTF-8 strings.
- Note that REG_UTF8 is not part of the POSIX standard.
-
- In the absence of these flags, no options are passed to the native
- function. This means the the regex is compiled with PCRE default
- semantics. In particular, the way it handles newline characters in the
- subject string is the Perl way, not the POSIX way. Note that setting
- PCRE_MULTILINE has only some of the effects specified for REG_NEWLINE.
- It does not affect the way newlines are matched by . (they are not) or
- by a negative class such as [^a] (they are).
-
- The yield of regcomp() is zero on success, and non-zero otherwise. The
- preg structure is filled in on success, and one member of the structure
- is public: re_nsub contains the number of capturing subpatterns in the
- regular expression. Various error codes are defined in the header file.
-
- NOTE: If the yield of regcomp() is non-zero, you must not attempt to
- use the contents of the preg structure. If, for example, you pass it to
- regexec(), the result is undefined and your program is likely to crash.
-
-
-MATCHING NEWLINE CHARACTERS
-
- This area is not simple, because POSIX and Perl take different views of
- things. It is not possible to get PCRE to obey POSIX semantics, but
- then PCRE was never intended to be a POSIX engine. The following table
- lists the different possibilities for matching newline characters in
- PCRE:
-
- Default Change with
-
- . matches newline no PCRE_DOTALL
- newline matches [^a] yes not changeable
- $ matches \n at end yes PCRE_DOLLARENDONLY
- $ matches \n in middle no PCRE_MULTILINE
- ^ matches \n in middle no PCRE_MULTILINE
-
- This is the equivalent table for POSIX:
-
- Default Change with
-
- . matches newline yes REG_NEWLINE
- newline matches [^a] yes REG_NEWLINE
- $ matches \n at end no REG_NEWLINE
- $ matches \n in middle no REG_NEWLINE
- ^ matches \n in middle no REG_NEWLINE
-
- PCRE's behaviour is the same as Perl's, except that there is no equiva-
- lent for PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is
- no way to stop newline from matching [^a].
-
- The default POSIX newline handling can be obtained by setting
- PCRE_DOTALL and PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE
- behave exactly as for the REG_NEWLINE action.
-
-
-MATCHING A PATTERN
-
- The function regexec() is called to match a compiled pattern preg
- against a given string, which is by default terminated by a zero byte
- (but see REG_STARTEND below), subject to the options in eflags. These
- can be:
-
- REG_NOTBOL
-
- The PCRE_NOTBOL option is set when calling the underlying PCRE matching
- function.
-
- REG_NOTEMPTY
-
- The PCRE_NOTEMPTY option is set when calling the underlying PCRE match-
- ing function. Note that REG_NOTEMPTY is not part of the POSIX standard.
- However, setting this option can give more POSIX-like behaviour in some
- situations.
-
- REG_NOTEOL
-
- The PCRE_NOTEOL option is set when calling the underlying PCRE matching
- function.
-
- REG_STARTEND
-
- The string is considered to start at string + pmatch[0].rm_so and to
- have a terminating NUL located at string + pmatch[0].rm_eo (there need
- not actually be a NUL at that location), regardless of the value of
- nmatch. This is a BSD extension, compatible with but not specified by
- IEEE Standard 1003.2 (POSIX.2), and should be used with caution in
- software intended to be portable to other systems. Note that a non-zero
- rm_so does not imply REG_NOTBOL; REG_STARTEND affects only the location
- of the string, not how it is matched.
-
- If the pattern was compiled with the REG_NOSUB flag, no data about any
- matched strings is returned. The nmatch and pmatch arguments of
- regexec() are ignored.
-
- If the value of nmatch is zero, or if the value pmatch is NULL, no data
- about any matched strings is returned.
-
- Otherwise,the portion of the string that was matched, and also any cap-
- tured substrings, are returned via the pmatch argument, which points to
- an array of nmatch structures of type regmatch_t, containing the mem-
- bers rm_so and rm_eo. These contain the offset to the first character
- of each substring and the offset to the first character after the end
- of each substring, respectively. The 0th element of the vector relates
- to the entire portion of string that was matched; subsequent elements
- relate to the capturing subpatterns of the regular expression. Unused
- entries in the array have both structure members set to -1.
-
- A successful match yields a zero return; various error codes are
- defined in the header file, of which REG_NOMATCH is the "expected"
- failure code.
-
-
-ERROR MESSAGES
-
- The regerror() function maps a non-zero errorcode from either regcomp()
- or regexec() to a printable message. If preg is not NULL, the error
- should have arisen from the use of that structure. A message terminated
- by a binary zero is placed in errbuf. The length of the message,
- including the zero, is limited to errbuf_size. The yield of the func-
- tion is the size of buffer needed to hold the whole message.
-
-
-MEMORY USAGE
-
- Compiling a regular expression causes memory to be allocated and asso-
- ciated with the preg structure. The function regfree() frees all such
- memory, after which preg may no longer be used as a compiled expres-
- sion.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 09 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRECPP(3) PCRECPP(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions.
-
-
-SYNOPSIS OF C++ WRAPPER
-
- #include <pcrecpp.h>
-
-
-DESCRIPTION
-
- The C++ wrapper for PCRE was provided by Google Inc. Some additional
- functionality was added by Giuseppe Maxia. This brief man page was con-
- structed from the notes in the pcrecpp.h file, which should be con-
- sulted for further details. Note that the C++ wrapper supports only the
- original 8-bit PCRE library. There is no 16-bit support at present.
-
-
-MATCHING INTERFACE
-
- The "FullMatch" operation checks that supplied text matches a supplied
- pattern exactly. If pointer arguments are supplied, it copies matched
- sub-strings that match sub-patterns into them.
-
- Example: successful match
- pcrecpp::RE re("h.*o");
- re.FullMatch("hello");
-
- Example: unsuccessful match (requires full match):
- pcrecpp::RE re("e");
- !re.FullMatch("hello");
-
- Example: creating a temporary RE object:
- pcrecpp::RE("h.*o").FullMatch("hello");
-
- You can pass in a "const char*" or a "string" for "text". The examples
- below tend to use a const char*. You can, as in the different examples
- above, store the RE object explicitly in a variable or use a temporary
- RE object. The examples below use one mode or the other arbitrarily.
- Either could correctly be used for any of these examples.
-
- You must supply extra pointer arguments to extract matched subpieces.
-
- Example: extracts "ruby" into "s" and 1234 into "i"
- int i;
- string s;
- pcrecpp::RE re("(\\w+):(\\d+)");
- re.FullMatch("ruby:1234", &s, &i);
-
- Example: does not try to extract any extra sub-patterns
- re.FullMatch("ruby:1234", &s);
-
- Example: does not try to extract into NULL
- re.FullMatch("ruby:1234", NULL, &i);
-
- Example: integer overflow causes failure
- !re.FullMatch("ruby:1234567891234", NULL, &i);
-
- Example: fails because there aren't enough sub-patterns:
- !pcrecpp::RE("\\w+:\\d+").FullMatch("ruby:1234", &s);
-
- Example: fails because string cannot be stored in integer
- !pcrecpp::RE("(.*)").FullMatch("ruby", &i);
-
- The provided pointer arguments can be pointers to any scalar numeric
- type, or one of:
-
- string (matched piece is copied to string)
- StringPiece (StringPiece is mutated to point to matched piece)
- T (where "bool T::ParseFrom(const char*, int)" exists)
- NULL (the corresponding matched sub-pattern is not copied)
-
- The function returns true iff all of the following conditions are sat-
- isfied:
-
- a. "text" matches "pattern" exactly;
-
- b. The number of matched sub-patterns is >= number of supplied
- pointers;
-
- c. The "i"th argument has a suitable type for holding the
- string captured as the "i"th sub-pattern. If you pass in
- void * NULL for the "i"th argument, or a non-void * NULL
- of the correct type, or pass fewer arguments than the
- number of sub-patterns, "i"th captured sub-pattern is
- ignored.
-
- CAVEAT: An optional sub-pattern that does not exist in the matched
- string is assigned the empty string. Therefore, the following will
- return false (because the empty string is not a valid number):
-
- int number;
- pcrecpp::RE::FullMatch("abc", "[a-z]+(\\d+)?", &number);
-
- The matching interface supports at most 16 arguments per call. If you
- need more, consider using the more general interface
- pcrecpp::RE::DoMatch. See pcrecpp.h for the signature for DoMatch.
-
- NOTE: Do not use no_arg, which is used internally to mark the end of a
- list of optional arguments, as a placeholder for missing arguments, as
- this can lead to segfaults.
-
-
-QUOTING METACHARACTERS
-
- You can use the "QuoteMeta" operation to insert backslashes before all
- potentially meaningful characters in a string. The returned string,
- used as a regular expression, will exactly match the original string.
-
- Example:
- string quoted = RE::QuoteMeta(unquoted);
-
- Note that it's legal to escape a character even if it has no special
- meaning in a regular expression -- so this function does that. (This
- also makes it identical to the perl function of the same name; see
- "perldoc -f quotemeta".) For example, "1.5-2.0?" becomes
- "1\.5\-2\.0\?".
-
-
-PARTIAL MATCHES
-
- You can use the "PartialMatch" operation when you want the pattern to
- match any substring of the text.
-
- Example: simple search for a string:
- pcrecpp::RE("ell").PartialMatch("hello");
-
- Example: find first number in a string:
- int number;
- pcrecpp::RE re("(\\d+)");
- re.PartialMatch("x*100 + 20", &number);
- assert(number == 100);
-
-
-UTF-8 AND THE MATCHING INTERFACE
-
- By default, pattern and text are plain text, one byte per character.
- The UTF8 flag, passed to the constructor, causes both pattern and
- string to be treated as UTF-8 text, still a byte stream but potentially
- multiple bytes per character. In practice, the text is likelier to be
- UTF-8 than the pattern, but the match returned may depend on the UTF8
- flag, so always use it when matching UTF8 text. For example, "." will
- match one byte normally but with UTF8 set may match up to three bytes
- of a multi-byte character.
-
- Example:
- pcrecpp::RE_Options options;
- options.set_utf8();
- pcrecpp::RE re(utf8_pattern, options);
- re.FullMatch(utf8_string);
-
- Example: using the convenience function UTF8():
- pcrecpp::RE re(utf8_pattern, pcrecpp::UTF8());
- re.FullMatch(utf8_string);
-
- NOTE: The UTF8 flag is ignored if pcre was not configured with the
- --enable-utf8 flag.
-
-
-PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE
-
- PCRE defines some modifiers to change the behavior of the regular
- expression engine. The C++ wrapper defines an auxiliary class,
- RE_Options, as a vehicle to pass such modifiers to a RE class. Cur-
- rently, the following modifiers are supported:
-
- modifier description Perl corresponding
-
- PCRE_CASELESS case insensitive match /i
- PCRE_MULTILINE multiple lines match /m
- PCRE_DOTALL dot matches newlines /s
- PCRE_DOLLAR_ENDONLY $ matches only at end N/A
- PCRE_EXTRA strict escape parsing N/A
- PCRE_EXTENDED ignore whitespaces /x
- PCRE_UTF8 handles UTF8 chars built-in
- PCRE_UNGREEDY reverses * and *? N/A
- PCRE_NO_AUTO_CAPTURE disables capturing parens N/A (*)
-
- (*) Both Perl and PCRE allow non capturing parentheses by means of the
- "?:" modifier within the pattern itself. e.g. (?:ab|cd) does not cap-
- ture, while (ab|cd) does.
-
- For a full account on how each modifier works, please check the PCRE
- API reference page.
-
- For each modifier, there are two member functions whose name is made
- out of the modifier in lowercase, without the "PCRE_" prefix. For
- instance, PCRE_CASELESS is handled by
-
- bool caseless()
-
- which returns true if the modifier is set, and
-
- RE_Options & set_caseless(bool)
-
- which sets or unsets the modifier. Moreover, PCRE_EXTRA_MATCH_LIMIT can
- be accessed through the set_match_limit() and match_limit() member
- functions. Setting match_limit to a non-zero value will limit the exe-
- cution of pcre to keep it from doing bad things like blowing the stack
- or taking an eternity to return a result. A value of 5000 is good
- enough to stop stack blowup in a 2MB thread stack. Setting match_limit
- to zero disables match limiting. Alternatively, you can call
- match_limit_recursion() which uses PCRE_EXTRA_MATCH_LIMIT_RECURSION to
- limit how much PCRE recurses. match_limit() limits the number of
- matches PCRE does; match_limit_recursion() limits the depth of internal
- recursion, and therefore the amount of stack that is used.
-
- Normally, to pass one or more modifiers to a RE class, you declare a
- RE_Options object, set the appropriate options, and pass this object to
- a RE constructor. Example:
-
- RE_Options opt;
- opt.set_caseless(true);
- if (RE("HELLO", opt).PartialMatch("hello world")) ...
-
- RE_options has two constructors. The default constructor takes no argu-
- ments and creates a set of flags that are off by default. The optional
- parameter option_flags is to facilitate transfer of legacy code from C
- programs. This lets you do
-
- RE(pattern,
- RE_Options(PCRE_CASELESS|PCRE_MULTILINE)).PartialMatch(str);
-
- However, new code is better off doing
-
- RE(pattern,
- RE_Options().set_caseless(true).set_multiline(true))
- .PartialMatch(str);
-
- If you are going to pass one of the most used modifiers, there are some
- convenience functions that return a RE_Options class with the appropri-
- ate modifier already set: CASELESS(), UTF8(), MULTILINE(), DOTALL(),
- and EXTENDED().
-
- If you need to set several options at once, and you don't want to go
- through the pains of declaring a RE_Options object and setting several
- options, there is a parallel method that give you such ability on the
- fly. You can concatenate several set_xxxxx() member functions, since
- each of them returns a reference to its class object. For example, to
- pass PCRE_CASELESS, PCRE_EXTENDED, and PCRE_MULTILINE to a RE with one
- statement, you may write:
-
- RE(" ^ xyz \\s+ .* blah$",
- RE_Options()
- .set_caseless(true)
- .set_extended(true)
- .set_multiline(true)).PartialMatch(sometext);
-
-
-SCANNING TEXT INCREMENTALLY
-
- The "Consume" operation may be useful if you want to repeatedly match
- regular expressions at the front of a string and skip over them as they
- match. This requires use of the "StringPiece" type, which represents a
- sub-range of a real string. Like RE, StringPiece is defined in the
- pcrecpp namespace.
-
- Example: read lines of the form "var = value" from a string.
- string contents = ...; // Fill string somehow
- pcrecpp::StringPiece input(contents); // Wrap in a StringPiece
-
- string var;
- int value;
- pcrecpp::RE re("(\\w+) = (\\d+)\n");
- while (re.Consume(&input, &var, &value)) {
- ...;
- }
-
- Each successful call to "Consume" will set "var/value", and also
- advance "input" so it points past the matched text.
-
- The "FindAndConsume" operation is similar to "Consume" but does not
- anchor your match at the beginning of the string. For example, you
- could extract all words from a string by repeatedly calling
-
- pcrecpp::RE("(\\w+)").FindAndConsume(&input, &word)
-
-
-PARSING HEX/OCTAL/C-RADIX NUMBERS
-
- By default, if you pass a pointer to a numeric value, the corresponding
- text is interpreted as a base-10 number. You can instead wrap the
- pointer with a call to one of the operators Hex(), Octal(), or CRadix()
- to interpret the text in another base. The CRadix operator interprets
- C-style "0" (base-8) and "0x" (base-16) prefixes, but defaults to
- base-10.
-
- Example:
- int a, b, c, d;
- pcrecpp::RE re("(.*) (.*) (.*) (.*)");
- re.FullMatch("100 40 0100 0x40",
- pcrecpp::Octal(&a), pcrecpp::Hex(&b),
- pcrecpp::CRadix(&c), pcrecpp::CRadix(&d));
-
- will leave 64 in a, b, c, and d.
-
-
-REPLACING PARTS OF STRINGS
-
- You can replace the first match of "pattern" in "str" with "rewrite".
- Within "rewrite", backslash-escaped digits (\1 to \9) can be used to
- insert text matching corresponding parenthesized group from the pat-
- tern. \0 in "rewrite" refers to the entire matching text. For example:
-
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").Replace("d", &s);
-
- will leave "s" containing "yada dabba doo". The result is true if the
- pattern matches and a replacement occurs, false otherwise.
-
- GlobalReplace is like Replace except that it replaces all occurrences
- of the pattern in the string with the rewrite. Replacements are not
- subject to re-matching. For example:
-
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").GlobalReplace("d", &s);
-
- will leave "s" containing "yada dada doo". It returns the number of
- replacements made.
-
- Extract is like Replace, except that if the pattern matches, "rewrite"
- is copied into "out" (an additional argument) with substitutions. The
- non-matching portions of "text" are ignored. Returns true iff a match
- occurred and the extraction happened successfully; if no match occurs,
- the string is left unaffected.
-
-
-AUTHOR
-
- The C++ wrapper was contributed by Google Inc.
- Copyright (c) 2007 Google Inc.
-
-
-REVISION
-
- Last updated: 08 January 2012
-------------------------------------------------------------------------------
-
-
-PCRESAMPLE(3) PCRESAMPLE(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PCRE SAMPLE PROGRAM
-
- A simple, complete demonstration program, to get you started with using
- PCRE, is supplied in the file pcredemo.c in the PCRE distribution. A
- listing of this program is given in the pcredemo documentation. If you
- do not have a copy of the PCRE distribution, you can save this listing
- to re-create pcredemo.c.
-
- The demonstration program, which uses the original PCRE 8-bit library,
- compiles the regular expression that is its first argument, and matches
- it against the subject string in its second argument. No PCRE options
- are set, and default character tables are used. If matching succeeds,
- the program outputs the portion of the subject that matched, together
- with the contents of any captured substrings.
-
- If the -g option is given on the command line, the program then goes on
- to check for further matches of the same regular expression in the same
- subject string. The logic is a little bit tricky because of the possi-
- bility of matching an empty string. Comments in the code explain what
- is going on.
-
- If PCRE is installed in the standard include and library directories
- for your operating system, you should be able to compile the demonstra-
- tion program using this command:
-
- gcc -o pcredemo pcredemo.c -lpcre
-
- If PCRE is installed elsewhere, you may need to add additional options
- to the command line. For example, on a Unix-like system that has PCRE
- installed in /usr/local, you can compile the demonstration program
- using a command like this:
-
- gcc -o pcredemo -I/usr/local/include pcredemo.c \
- -L/usr/local/lib -lpcre
-
- In a Windows environment, if you want to statically link the program
- against a non-dll pcre.a file, you must uncomment the line that defines
- PCRE_STATIC before including pcre.h, because otherwise the pcre_mal-
- loc() and pcre_free() exported functions will be declared
- __declspec(dllimport), with unwanted results.
-
- Once you have compiled and linked the demonstration program, you can
- run simple tests like this:
-
- ./pcredemo 'cat|dog' 'the cat sat on the mat'
- ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
-
- Note that there is a much more comprehensive test program, called
- pcretest, which supports many more facilities for testing regular
- expressions and both PCRE libraries. The pcredemo program is provided
- as a simple coding example.
-
- If you try to run pcredemo when PCRE is not installed in the standard
- library directory, you may get an error like this on some operating
- systems (e.g. Solaris):
-
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or
- directory
-
- This is caused by the way shared library support works on those sys-
- tems. You need to add
-
- -R/usr/local/lib
-
- (for example) to the compile command to get round this problem.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 10 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-PCRELIMITS(3) PCRELIMITS(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-SIZE AND OTHER LIMITATIONS
-
- There are some size limitations in PCRE but it is hoped that they will
- never in practice be relevant.
-
- The maximum length of a compiled pattern is approximately 64K data
- units (bytes for the 8-bit library, 16-bit units for the 16-bit
- library) if PCRE is compiled with the default internal linkage size of
- 2 bytes. If you want to process regular expressions that are truly
- enormous, you can compile PCRE with an internal linkage size of 3 or 4
- (when building the 16-bit library, 3 is rounded up to 4). See the
- README file in the source distribution and the pcrebuild documentation
- for details. In these cases the limit is substantially larger. How-
- ever, the speed of execution is slower.
-
- All values in repeating quantifiers must be less than 65536.
-
- There is no limit to the number of parenthesized subpatterns, but there
- can be no more than 65535 capturing subpatterns.
-
- There is a limit to the number of forward references to subsequent sub-
- patterns of around 200,000. Repeated forward references with fixed
- upper limits, for example, (?2){0,100} when subpattern number 2 is to
- the right, are included in the count. There is no limit to the number
- of backward references.
-
- The maximum length of name for a named subpattern is 32 characters, and
- the maximum number of named subpatterns is 10000.
-
- The maximum length of a subject string is the largest positive number
- that an integer variable can hold. However, when using the traditional
- matching function, PCRE uses recursion to handle subpatterns and indef-
- inite repetition. This means that the available stack space may limit
- the size of a subject string that can be processed by certain patterns.
- For a discussion of stack issues, see the pcrestack documentation.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 08 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
-PCRESTACK(3) PCRESTACK(3)
-
-
-NAME
- PCRE - Perl-compatible regular expressions
-
-
-PCRE DISCUSSION OF STACK USAGE
-
- When you call pcre[16]_exec(), it makes use of an internal function
- called match(). This calls itself recursively at branch points in the
- pattern, in order to remember the state of the match so that it can
- back up and try a different alternative if the first one fails. As
- matching proceeds deeper and deeper into the tree of possibilities, the
- recursion depth increases. The match() function is also called in other
- circumstances, for example, whenever a parenthesized sub-pattern is
- entered, and in certain cases of repetition.
-
- Not all calls of match() increase the recursion depth; for an item such
- as a* it may be called several times at the same level, after matching
- different numbers of a's. Furthermore, in a number of cases where the
- result of the recursive call would immediately be passed back as the
- result of the current call (a "tail recursion"), the function is just
- restarted instead.
-
- The above comments apply when pcre[16]_exec() is run in its normal
- interpretive manner. If the pattern was studied with the
- PCRE_STUDY_JIT_COMPILE option, and just-in-time compiling was success-
- ful, and the options passed to pcre[16]_exec() were not incompatible,
- the matching process uses the JIT-compiled code instead of the match()
- function. In this case, the memory requirements are handled entirely
- differently. See the pcrejit documentation for details.
-
- The pcre[16]_dfa_exec() function operates in an entirely different way,
- and uses recursion only when there is a regular expression recursion or
- subroutine call in the pattern. This includes the processing of asser-
- tion and "once-only" subpatterns, which are handled like subroutine
- calls. Normally, these are never very deep, and the limit on the com-
- plexity of pcre[16]_dfa_exec() is controlled by the amount of workspace
- it is given. However, it is possible to write patterns with runaway
- infinite recursions; such patterns will cause pcre[16]_dfa_exec() to
- run out of stack. At present, there is no protection against this.
-
- The comments that follow do NOT apply to pcre[16]_dfa_exec(); they are
- relevant only for pcre[16]_exec() without the JIT optimization.
-
- Reducing pcre[16]_exec()'s stack usage
-
- Each time that match() is actually called recursively, it uses memory
- from the process stack. For certain kinds of pattern and data, very
- large amounts of stack may be needed, despite the recognition of "tail
- recursion". You can often reduce the amount of recursion, and there-
- fore the amount of stack used, by modifying the pattern that is being
- matched. Consider, for example, this pattern:
-
- ([^<]|<(?!inet))+
-
- It matches from wherever it starts until it encounters "<inet" or the
- end of the data, and is the kind of pattern that might be used when
- processing an XML file. Each iteration of the outer parentheses matches
- either one character that is not "<" or a "<" that is not followed by
- "inet". However, each time a parenthesis is processed, a recursion
- occurs, so this formulation uses a stack frame for each matched charac-
- ter. For a long string, a lot of stack is required. Consider now this
- rewritten pattern, which matches exactly the same strings:
-
- ([^<]++|<(?!inet))+
-
- This uses very much less stack, because runs of characters that do not
- contain "<" are "swallowed" in one item inside the parentheses. Recur-
- sion happens only when a "<" character that is not followed by "inet"
- is encountered (and we assume this is relatively rare). A possessive
- quantifier is used to stop any backtracking into the runs of non-"<"
- characters, but that is not related to stack usage.
-
- This example shows that one way of avoiding stack problems when match-
- ing long subject strings is to write repeated parenthesized subpatterns
- to match more than one character whenever possible.
-
- Compiling PCRE to use heap instead of stack for pcre[16]_exec()
-
- In environments where stack memory is constrained, you might want to
- compile PCRE to use heap memory instead of stack for remembering back-
- up points when pcre[16]_exec() is running. This makes it run a lot more
- slowly, however. Details of how to do this are given in the pcrebuild
- documentation. When built in this way, instead of using the stack, PCRE
- obtains and frees memory by calling the functions that are pointed to
- by the pcre[16]_stack_malloc and pcre[16]_stack_free variables. By
- default, these point to malloc() and free(), but you can replace the
- pointers to cause PCRE to use your own functions. Since the block sizes
- are always the same, and are always freed in reverse order, it may be
- possible to implement customized memory handlers that are more effi-
- cient than the standard functions.
-
- Limiting pcre[16]_exec()'s stack usage
-
- You can set limits on the number of times that match() is called, both
- in total and recursively. If a limit is exceeded, pcre[16]_exec()
- returns an error code. Setting suitable limits should prevent it from
- running out of stack. The default values of the limits are very large,
- and unlikely ever to operate. They can be changed when PCRE is built,
- and they can also be set when pcre[16]_exec() is called. For details of
- these interfaces, see the pcrebuild documentation and the section on
- extra data for pcre[16]_exec() in the pcreapi documentation.
-
- As a very rough rule of thumb, you should reckon on about 500 bytes per
- recursion. Thus, if you want to limit your stack usage to 8Mb, you
- should set the limit at 16000 recursions. A 64Mb stack, on the other
- hand, can support around 128000 recursions.
-
- In Unix-like environments, the pcretest test program has a command line
- option (-S) that can be used to increase the size of its stack. As long
- as the stack is large enough, another option (-M) can be used to find
- the smallest limits that allow a particular pattern to match a given
- subject string. This is done by calling pcre[16]_exec() repeatedly with
- different limits.
-
- Obtaining an estimate of stack usage
-
- The actual amount of stack used per recursion can vary quite a lot,
- depending on the compiler that was used to build PCRE and the optimiza-
- tion or debugging options that were set for it. The rule of thumb value
- of 500 bytes mentioned above may be larger or smaller than what is
- actually needed. A better approximation can be obtained by running this
- command:
-
- pcretest -m -C
-
- The -C option causes pcretest to output information about the options
- with which PCRE was compiled. When -m is also given (before -C), infor-
- mation about stack use is given in a line like this:
-
- Match recursion uses stack: approximate frame size = 640 bytes
-
- The value is approximate because some recursions need a bit more (up to
- perhaps 16 more bytes).
-
- If the above command is given when PCRE is compiled to use the heap
- instead of the stack for recursion, the value that is output is the
- size of each block that is obtained from the heap.
-
- Changing stack size in Unix-like systems
-
- In Unix-like environments, there is not often a problem with the stack
- unless very long strings are involved, though the default limit on
- stack size varies from system to system. Values from 8Mb to 64Mb are
- common. You can find your default limit by running the command:
-
- ulimit -s
-
- Unfortunately, the effect of running out of stack is often SIGSEGV,
- though sometimes a more explicit error message is given. You can nor-
- mally increase the limit on stack size by code such as this:
-
- struct rlimit rlim;
- getrlimit(RLIMIT_STACK, &rlim);
- rlim.rlim_cur = 100*1024*1024;
- setrlimit(RLIMIT_STACK, &rlim);
-
- This reads the current limits (soft and hard) using getrlimit(), then
- attempts to increase the soft limit to 100Mb using setrlimit(). You
- must do this before calling pcre[16]_exec().
-
- Changing stack size in Mac OS X
-
- Using setrlimit(), as described above, should also work on Mac OS X. It
- is also possible to set a stack size when linking a program. There is a
- discussion about stack sizes in Mac OS X at this web site:
- http://developer.apple.com/qa/qa2005/qa1419.html.
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 21 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
-------------------------------------------------------------------------------
-
-
diff --git a/src/third_party/pcre-8.30/doc/pcre16.3 b/src/third_party/pcre-8.30/doc/pcre16.3
deleted file mode 100644
index 726ef90b9e2..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre16.3
+++ /dev/null
@@ -1,379 +0,0 @@
-.TH PCRE 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.sp
-.B #include <pcre.h>
-.
-.
-.SH "PCRE 16-BIT API BASIC FUNCTIONS"
-.rs
-.sp
-.SM
-.B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.PP
-.B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B int *\fIerrorcodeptr\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.PP
-.B pcre16_extra *pcre16_study(const pcre16 *\fIcode\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP);
-.PP
-.B void pcre16_free_study(pcre16_extra *\fIextra\fP);
-.PP
-.B int pcre16_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.ti +5n
-.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
-.PP
-.B int pcre16_dfa_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.ti +5n
-.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
-.ti +5n
-.B int *\fIworkspace\fP, int \fIwscount\fP);
-.
-.
-.SH "PCRE 16-BIT API STRING EXTRACTION FUNCTIONS"
-.rs
-.sp
-.B int pcre16_copy_named_substring(const pcre16 *\fIcode\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,
-.ti +5n
-.B PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);
-.PP
-.B int pcre16_copy_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP,
-.ti +5n
-.B int \fIbuffersize\fP);
-.PP
-.B int pcre16_get_named_substring(const pcre16 *\fIcode\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,
-.ti +5n
-.B PCRE_SPTR16 *\fIstringptr\fP);
-.PP
-.B int pcre16_get_stringnumber(const pcre16 *\fIcode\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIname\fP);
-.PP
-.B int pcre16_get_stringtable_entries(const pcre16 *\fIcode\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);
-.PP
-.B int pcre16_get_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP,
-.ti +5n
-.B PCRE_SPTR16 *\fIstringptr\fP);
-.PP
-.B int pcre16_get_substring_list(PCRE_SPTR16 \fIsubject\fP,
-.ti +5n
-.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR16 **\fIlistptr\fP);"
-.PP
-.B void pcre16_free_substring(PCRE_SPTR16 \fIstringptr\fP);
-.PP
-.B void pcre16_free_substring_list(PCRE_SPTR16 *\fIstringptr\fP);
-.
-.
-.SH "PCRE 16-BIT API AUXILIARY FUNCTIONS"
-.rs
-.sp
-.B pcre16_jit_stack *pcre16_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP);
-.PP
-.B void pcre16_jit_stack_free(pcre16_jit_stack *\fIstack\fP);
-.PP
-.B void pcre16_assign_jit_stack(pcre16_extra *\fIextra\fP,
-.ti +5n
-.B pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);
-.PP
-.B const unsigned char *pcre16_maketables(void);
-.PP
-.B int pcre16_fullinfo(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.ti +5n
-.B int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-.B int pcre16_refcount(pcre16 *\fIcode\fP, int \fIadjust\fP);
-.PP
-.B int pcre16_config(int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-.B const char *pcre16_version(void);
-.PP
-.B int pcre16_pattern_to_host_byte_order(pcre16 *\fIcode\fP,
-.ti +5n
-.B pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);
-.
-.
-.SH "PCRE 16-BIT API INDIRECTED FUNCTIONS"
-.rs
-.sp
-.B void *(*pcre16_malloc)(size_t);
-.PP
-.B void (*pcre16_free)(void *);
-.PP
-.B void *(*pcre16_stack_malloc)(size_t);
-.PP
-.B void (*pcre16_stack_free)(void *);
-.PP
-.B int (*pcre16_callout)(pcre16_callout_block *);
-.
-.
-.SH "PCRE 16-BIT API 16-BIT-ONLY FUNCTION"
-.rs
-.sp
-.B int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *\fIoutput\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP,
-.ti +5n
-.B int \fIkeep_boms\fP);
-.
-.
-.SH "THE PCRE 16-BIT LIBRARY"
-.rs
-.sp
-Starting with release 8.30, it is possible to compile a PCRE library that
-supports 16-bit character strings, including UTF-16 strings, as well as or
-instead of the original 8-bit library. The majority of the work to make this
-possible was done by Zoltan Herczeg. The two libraries contain identical sets
-of functions, used in exactly the same way. Only the names of the functions and
-the data types of their arguments and results are different. To avoid
-over-complication and reduce the documentation maintenance load, most of the
-PCRE documentation describes the 8-bit library, with only occasional references
-to the 16-bit library. This page describes what is different when you use the
-16-bit library.
-.P
-WARNING: A single application can be linked with both libraries, but you must
-take care when processing any particular pattern to use functions from just one
-library. For example, if you want to study a pattern that was compiled with
-\fBpcre16_compile()\fP, you must do so with \fBpcre16_study()\fP, not
-\fBpcre_study()\fP, and you must free the study data with
-\fBpcre16_free_study()\fP.
-.
-.
-.SH "THE HEADER FILE"
-.rs
-.sp
-There is only one header file, \fBpcre.h\fP. It contains prototypes for all the
-functions in both libraries, as well as definitions of flags, structures, error
-codes, etc.
-.
-.
-.SH "THE LIBRARY NAME"
-.rs
-.sp
-In Unix-like systems, the 16-bit library is called \fBlibpcre16\fP, and can
-normally be accesss by adding \fB-lpcre16\fP to the command for linking an
-application that uses PCRE.
-.
-.
-.SH "STRING TYPES"
-.rs
-.sp
-In the 8-bit library, strings are passed to PCRE library functions as vectors
-of bytes with the C type "char *". In the 16-bit library, strings are passed as
-vectors of unsigned 16-bit quantities. The macro PCRE_UCHAR16 specifies an
-appropriate data type, and PCRE_SPTR16 is defined as "const PCRE_UCHAR16 *". In
-very many environments, "short int" is a 16-bit data type. When PCRE is built,
-it defines PCRE_UCHAR16 as "short int", but checks that it really is a 16-bit
-data type. If it is not, the build fails with an error message telling the
-maintainer to modify the definition appropriately.
-.
-.
-.SH "STRUCTURE TYPES"
-.rs
-.sp
-The types of the opaque structures that are used for compiled 16-bit patterns
-and JIT stacks are \fBpcre16\fP and \fBpcre16_jit_stack\fP respectively. The
-type of the user-accessible structure that is returned by \fBpcre16_study()\fP
-is \fBpcre16_extra\fP, and the type of the structure that is used for passing
-data to a callout function is \fBpcre16_callout_block\fP. These structures
-contain the same fields, with the same names, as their 8-bit counterparts. The
-only difference is that pointers to character strings are 16-bit instead of
-8-bit types.
-.
-.
-.SH "16-BIT FUNCTIONS"
-.rs
-.sp
-For every function in the 8-bit library there is a corresponding function in
-the 16-bit library with a name that starts with \fBpcre16_\fP instead of
-\fBpcre_\fP. The prototypes are listed above. In addition, there is one extra
-function, \fBpcre16_utf16_to_host_byte_order()\fP. This is a utility function
-that converts a UTF-16 character string to host byte order if necessary. The
-other 16-bit functions expect the strings they are passed to be in host byte
-order.
-.P
-The \fIinput\fP and \fIoutput\fP arguments of
-\fBpcre16_utf16_to_host_byte_order()\fP may point to the same address, that is,
-conversion in place is supported. The output buffer must be at least as long as
-the input.
-.P
-The \fIlength\fP argument specifies the number of 16-bit data units in the
-input string; a negative value specifies a zero-terminated string.
-.P
-If \fIbyte_order\fP is NULL, it is assumed that the string starts off in host
-byte order. This may be changed by byte-order marks (BOMs) anywhere in the
-string (commonly as the first character).
-.P
-If \fIbyte_order\fP is not NULL, a non-zero value of the integer to which it
-points means that the input starts off in host byte order, otherwise the
-opposite order is assumed. Again, BOMs in the string can change this. The final
-byte order is passed back at the end of processing.
-.P
-If \fIkeep_boms\fP is not zero, byte-order mark characters (0xfeff) are copied
-into the output string. Otherwise they are discarded.
-.P
-The result of the function is the number of 16-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-.
-.
-.SH "SUBJECT STRING OFFSETS"
-.rs
-.sp
-The offsets within subject strings that are returned by the matching functions
-are in 16-bit units rather than bytes.
-.
-.
-.SH "NAMED SUBPATTERNS"
-.rs
-.sp
-The name-to-number translation table that is maintained for named subpatterns
-uses 16-bit characters. The \fBpcre16_get_stringtable_entries()\fP function
-returns the length of each entry in the table as the number of 16-bit data
-units.
-.
-.
-.SH "OPTION NAMES"
-.rs
-.sp
-There are two new general option names, PCRE_UTF16 and PCRE_NO_UTF16_CHECK,
-which correspond to PCRE_UTF8 and PCRE_NO_UTF8_CHECK in the 8-bit library. In
-fact, these new options define the same bits in the options word.
-.P
-For the \fBpcre16_config()\fP function there is an option PCRE_CONFIG_UTF16
-that returns 1 if UTF-16 support is configured, otherwise 0. If this option is
-given to \fBpcre_config()\fP, or if the PCRE_CONFIG_UTF8 option is given to
-\fBpcre16_config()\fP, the result is the PCRE_ERROR_BADOPTION error.
-.
-.
-.SH "CHARACTER CODES"
-.rs
-.sp
-In 16-bit mode, when PCRE_UTF16 is not set, character values are treated in the
-same way as in 8-bit, non UTF-8 mode, except, of course, that they can range
-from 0 to 0xffff instead of 0 to 0xff. Character types for characters less than
-0xff can therefore be influenced by the locale in the same way as before.
-Characters greater than 0xff have only one case, and no "type" (such as letter
-or digit).
-.P
-In UTF-16 mode, the character code is Unicode, in the range 0 to 0x10ffff, with
-the exception of values in the range 0xd800 to 0xdfff because those are
-"surrogate" values that are used in pairs to encode values greater than 0xffff.
-.P
-A UTF-16 string can indicate its endianness by special code knows as a
-byte-order mark (BOM). The PCRE functions do not handle this, expecting strings
-to be in host byte order. A utility function called
-\fBpcre16_utf16_to_host_byte_order()\fP is provided to help with this (see
-above).
-.
-.
-.SH "ERROR NAMES"
-.rs
-.sp
-The errors PCRE_ERROR_BADUTF16_OFFSET and PCRE_ERROR_SHORTUTF16 correspond to
-their 8-bit counterparts. The error PCRE_ERROR_BADMODE is given when a compiled
-pattern is passed to a function that processes patterns in the other
-mode, for example, if a pattern compiled with \fBpcre_compile()\fP is passed to
-\fBpcre16_exec()\fP.
-.P
-There are new error codes whose names begin with PCRE_UTF16_ERR for invalid
-UTF-16 strings, corresponding to the PCRE_UTF8_ERR codes for UTF-8 strings that
-are described in the section entitled
-.\" HTML <a href="pcreapi.html#badutf8reasons">
-.\" </a>
-"Reason codes for invalid UTF-8 strings"
-.\"
-in the main
-.\" HREF
-\fBpcreapi\fP
-.\"
-page. The UTF-16 errors are:
-.sp
- PCRE_UTF16_ERR1 Missing low surrogate at end of string
- PCRE_UTF16_ERR2 Invalid low surrogate follows high surrogate
- PCRE_UTF16_ERR3 Isolated low surrogate
- PCRE_UTF16_ERR4 Invalid character 0xfffe
-.
-.
-.SH "ERROR TEXTS"
-.rs
-.sp
-If there is an error while compiling a pattern, the error text that is passed
-back by \fBpcre16_compile()\fP or \fBpcre16_compile2()\fP is still an 8-bit
-character string, zero-terminated.
-.
-.
-.SH "CALLOUTS"
-.rs
-.sp
-The \fIsubject\fP and \fImark\fP fields in the callout block that is passed to
-a callout function point to 16-bit vectors.
-.
-.
-.SH "TESTING"
-.rs
-.sp
-The \fBpcretest\fP program continues to operate with 8-bit input and output
-files, but it can be used for testing the 16-bit library. If it is run with the
-command line option \fB-16\fP, patterns and subject strings are converted from
-8-bit to 16-bit before being passed to PCRE, and the 16-bit library functions
-are used instead of the 8-bit ones. Returned 16-bit strings are converted to
-8-bit for output. If the 8-bit library was not compiled, \fBpcretest\fP
-defaults to 16-bit and the \fB-16\fP option is ignored.
-.P
-When PCRE is being built, the \fBRunTest\fP script that is called by "make
-check" uses the \fBpcretest\fP \fB-C\fP option to discover which of the 8-bit
-and 16-bit libraries has been built, and runs the tests appropriately.
-.
-.
-.SH "NOT SUPPORTED IN 16-BIT MODE"
-.rs
-.sp
-Not all the features of the 8-bit library are available with the 16-bit
-library. The C++ and POSIX wrapper functions support only the 8-bit library,
-and the \fBpcregrep\fP program is at present 8-bit only.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 08 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcre_assign_jit_stack.3 b/src/third_party/pcre-8.30/doc/pcre_assign_jit_stack.3
deleted file mode 100644
index b5944a47a3e..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_assign_jit_stack.3
+++ /dev/null
@@ -1,57 +0,0 @@
-.TH PCRE_ASSIGN_JIT_STACK 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP,
-.ti +5n
-.B pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);
-.PP
-.B void pcre16_assign_jit_stack(pcre16_extra *\fIextra\fP,
-.ti +5n
-.B pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function provides control over the memory used as a stack at runtime by a
-call to \fBpcre[16]_exec()\fP with a pattern that has been successfully
-compiled with JIT optimization. The arguments are:
-.sp
- extra the data pointer returned by \fBpcre[16]_study()\fP
- callback a callback function
- data a JIT stack or a value to be passed to the callback
- function
-.P
-If \fIcallback\fP is NULL and \fIdata\fP is NULL, an internal 32K block on
-the machine stack is used.
-.P
-If \fIcallback\fP is NULL and \fIdata\fP is not NULL, \fIdata\fP must
-be a valid JIT stack, the result of calling \fBpcre[16]_jit_stack_alloc()\fP.
-.P
-If \fIcallback\fP not NULL, it is called with \fIdata\fP as an argument at
-the start of matching, in order to set up a JIT stack. If the result is NULL,
-the internal 32K stack is used; otherwise the return value must be a valid JIT
-stack, the result of calling \fBpcre[16]_jit_stack_alloc()\fP.
-.P
-You may safely assign the same JIT stack to multiple patterns, as long as they
-are all matched in the same thread. In a multithread application, each thread
-must use its own JIT stack. For more details, see the
-.\" HREF
-\fBpcrejit\fP
-.\"
-page.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_compile.3 b/src/third_party/pcre-8.30/doc/pcre_compile.3
deleted file mode 100644
index 0dec9e952ea..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_compile.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.TH PCRE_COMPILE 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.PP
-.B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function compiles a regular expression into an internal form. It is the
-same as \fBpcre[16]_compile2()\fP, except for the absence of the
-\fIerrorcodeptr\fP argument. Its arguments are:
-.sp
- \fIpattern\fP A zero-terminated string containing the
- regular expression to be compiled
- \fIoptions\fP Zero or more option bits
- \fIerrptr\fP Where to put an error message
- \fIerroffset\fP Offset in pattern where error was found
- \fItableptr\fP Pointer to character tables, or NULL to
- use the built-in default
-.sp
-The option bits are:
-.sp
- PCRE_ANCHORED Force pattern anchoring
- PCRE_AUTO_CALLOUT Compile automatic callouts
- PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \eR matches all Unicode line endings
- PCRE_CASELESS Do caseless matching
- PCRE_DOLLAR_ENDONLY $ not to match newline at end
- PCRE_DOTALL . matches anything including NL
- PCRE_DUPNAMES Allow duplicate names for subpatterns
- PCRE_EXTENDED Ignore whitespace and # comments
- PCRE_EXTRA PCRE extra features
- (not much use currently)
- PCRE_FIRSTLINE Force matching to be before newline
- PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
- PCRE_MULTILINE ^ and $ match newlines within data
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
- sequences
- PCRE_NEWLINE_CR Set CR as the newline sequence
- PCRE_NEWLINE_CRLF Set CRLF as the newline sequence
- PCRE_NEWLINE_LF Set LF as the newline sequence
- PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
- theses (named ones available)
- PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
- validity (only relevant if
- PCRE_UTF16 is set)
- PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
- validity (only relevant if
- PCRE_UTF8 is set)
- PCRE_UCP Use Unicode properties for \ed, \ew, etc.
- PCRE_UNGREEDY Invert greediness of quantifiers
- PCRE_UTF16 Run in \fBpcre16_compile()\fP UTF-16 mode
- PCRE_UTF8 Run in \fBpcre_compile()\fP UTF-8 mode
-.sp
-PCRE must be built with UTF support in order to use PCRE_UTF8/16 and
-PCRE_NO_UTF8/16_CHECK, and with UCP support if PCRE_UCP is used.
-.P
-The yield of the function is a pointer to a private data structure that
-contains the compiled pattern, or NULL if an error was detected. Note that
-compiling regular expressions with one version of PCRE for use with a different
-version is not guaranteed to work and may cause crashes.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_compile2.3 b/src/third_party/pcre-8.30/doc/pcre_compile2.3
deleted file mode 100644
index 99f38721c17..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_compile2.3
+++ /dev/null
@@ -1,94 +0,0 @@
-.TH PCRE_COMPILE2 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B int *\fIerrorcodeptr\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.PP
-.B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B int *\fIerrorcodeptr\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function compiles a regular expression into an internal form. It is the
-same as \fBpcre[16]_compile()\fP, except for the addition of the
-\fIerrorcodeptr\fP argument. The arguments are:
-.
-.sp
- \fIpattern\fP A zero-terminated string containing the
- regular expression to be compiled
- \fIoptions\fP Zero or more option bits
- \fIerrorcodeptr\fP Where to put an error code
- \fIerrptr\fP Where to put an error message
- \fIerroffset\fP Offset in pattern where error was found
- \fItableptr\fP Pointer to character tables, or NULL to
- use the built-in default
-.sp
-The option bits are:
-.sp
- PCRE_ANCHORED Force pattern anchoring
- PCRE_AUTO_CALLOUT Compile automatic callouts
- PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \eR matches all Unicode line endings
- PCRE_CASELESS Do caseless matching
- PCRE_DOLLAR_ENDONLY $ not to match newline at end
- PCRE_DOTALL . matches anything including NL
- PCRE_DUPNAMES Allow duplicate names for subpatterns
- PCRE_EXTENDED Ignore whitespace and # comments
- PCRE_EXTRA PCRE extra features
- (not much use currently)
- PCRE_FIRSTLINE Force matching to be before newline
- PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
- PCRE_MULTILINE ^ and $ match newlines within data
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
- sequences
- PCRE_NEWLINE_CR Set CR as the newline sequence
- PCRE_NEWLINE_CRLF Set CRLF as the newline sequence
- PCRE_NEWLINE_LF Set LF as the newline sequence
- PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
- theses (named ones available)
- PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
- validity (only relevant if
- PCRE_UTF16 is set)
- PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
- validity (only relevant if
- PCRE_UTF8 is set)
- PCRE_UCP Use Unicode properties for \ed, \ew, etc.
- PCRE_UNGREEDY Invert greediness of quantifiers
- PCRE_UTF16 Run \fBpcre16_compile()\fP in UTF-16 mode
- PCRE_UTF8 Run \fBpcre_compile()\fP in UTF-8 mode
-.sp
-PCRE must be built with UTF support in order to use PCRE_UTF8/16 and
-PCRE_NO_UTF8/16_CHECK, and with UCP support if PCRE_UCP is used.
-.P
-The yield of the function is a pointer to a private data structure that
-contains the compiled pattern, or NULL if an error was detected. Note that
-compiling regular expressions with one version of PCRE for use with a different
-version is not guaranteed to work and may cause crashes.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_config.3 b/src/third_party/pcre-8.30/doc/pcre_config.3
deleted file mode 100644
index ac298c21435..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_config.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.TH PCRE_CONFIG 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-.B int pcre16_config(int \fIwhat\fP, void *\fIwhere\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function makes it possible for a client program to find out which optional
-features are available in the version of the PCRE library it is using. The
-arguments are as follows:
-.sp
- \fIwhat\fP A code specifying what information is required
- \fIwhere\fP Points to where to put the data
-.sp
-The \fIwhere\fP argument must point to an integer variable, except for
-PCRE_CONFIG_MATCH_LIMIT and PCRE_CONFIG_MATCH_LIMIT_RECURSION, when it must
-point to an unsigned long integer. The available codes are:
-.sp
- PCRE_CONFIG_JIT Availability of just-in-time compiler
- support (1=yes 0=no)
- PCRE_CONFIG_JITTARGET String containing information about the
- target architecture for the JIT compiler,
- or NULL if there is no JIT support
- PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4
- PCRE_CONFIG_MATCH_LIMIT Internal resource limit
- PCRE_CONFIG_MATCH_LIMIT_RECURSION
- Internal recursion depth limit
- PCRE_CONFIG_NEWLINE Value of the default newline sequence:
- 13 (0x000d) for CR
- 10 (0x000a) for LF
- 3338 (0x0d0a) for CRLF
- -2 for ANYCRLF
- -1 for ANY
- PCRE_CONFIG_BSR Indicates what \eR matches by default:
- 0 all Unicode line endings
- 1 CR, LF, or CRLF only
- PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
- Threshold of return slots, above which
- \fBmalloc()\fP is used by the POSIX API
- PCRE_CONFIG_STACKRECURSE Recursion implementation (1=stack 0=heap)
- PCRE_CONFIG_UTF16 Availability of UTF-16 support (1=yes
- 0=no); option for \fBpcre16_config()\fP
- PCRE_CONFIG_UTF8 Availability of UTF-8 support (1=yes 0=no);
- option for \fBpcre_config()\fP
- PCRE_CONFIG_UNICODE_PROPERTIES
- Availability of Unicode property support
- (1=yes 0=no)
-.sp
-The function yields 0 on success or PCRE_ERROR_BADOPTION otherwise. That error
-is also given if PCRE_CONFIG_UTF16 is passed to \fBpcre_config()\fP or if
-PCRE_CONFIG_UTF8 is passed to \fBpcre16_config()\fP.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_copy_named_substring.3 b/src/third_party/pcre-8.30/doc/pcre_copy_named_substring.3
deleted file mode 100644
index 266e33d0382..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_copy_named_substring.3
+++ /dev/null
@@ -1,51 +0,0 @@
-.TH PCRE_COPY_NAMED_SUBSTRING 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B char *\fIbuffer\fP, int \fIbuffersize\fP);
-.PP
-.B int pcre16_copy_named_substring(const pcre16 *\fIcode\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,
-.ti +5n
-.B PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a captured substring, identified
-by name, into a given buffer. The arguments are:
-.sp
- \fIcode\fP Pattern that was successfully matched
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16]_exec()\fP used
- \fIstringcount\fP Value returned by \fBpcre[16]_exec()\fP
- \fIstringname\fP Name of the required substring
- \fIbuffer\fP Buffer to receive the string
- \fIbuffersize\fP Size of buffer
-.sp
-The yield is the length of the substring, PCRE_ERROR_NOMEMORY if the buffer was
-too small, or PCRE_ERROR_NOSUBSTRING if the string name is invalid.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_copy_substring.3 b/src/third_party/pcre-8.30/doc/pcre_copy_substring.3
deleted file mode 100644
index 728517357e7..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_copy_substring.3
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH PCRE_COPY_SUBSTRING 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,
-.ti +5n
-.B int \fIbuffersize\fP);
-.PP
-.B int pcre16_copy_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP,
-.ti +5n
-.B int \fIbuffersize\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a captured substring into a given
-buffer. The arguments are:
-.sp
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16]_exec()\fP used
- \fIstringcount\fP Value returned by \fBpcre[16]_exec()\fP
- \fIstringnumber\fP Number of the required substring
- \fIbuffer\fP Buffer to receive the string
- \fIbuffersize\fP Size of buffer
-.sp
-The yield is the length of the string, PCRE_ERROR_NOMEMORY if the buffer was
-too small, or PCRE_ERROR_NOSUBSTRING if the string number is invalid.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_dfa_exec.3 b/src/third_party/pcre-8.30/doc/pcre_dfa_exec.3
deleted file mode 100644
index 170ac4f2b22..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_dfa_exec.3
+++ /dev/null
@@ -1,114 +0,0 @@
-.TH PCRE_DFA_EXEC 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
-.ti +5n
-.B int *\fIworkspace\fP, int \fIwscount\fP);
-.PP
-.B int pcre16_dfa_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.ti +5n
-.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
-.ti +5n
-.B int *\fIworkspace\fP, int \fIwscount\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function matches a compiled regular expression against a given subject
-string, using an alternative matching algorithm that scans the subject string
-just once (\fInot\fP Perl-compatible). Note that the main, Perl-compatible,
-matching function is \fBpcre[16]_exec()\fP. The arguments for this function
-are:
-.sp
- \fIcode\fP Points to the compiled pattern
- \fIextra\fP Points to an associated \fBpcre[16]_extra\fP structure,
- or is NULL
- \fIsubject\fP Points to the subject string
- \fIlength\fP Length of the subject string, in bytes
- \fIstartoffset\fP Offset in bytes in the subject at which to
- start matching
- \fIoptions\fP Option bits
- \fIovector\fP Points to a vector of ints for result offsets
- \fIovecsize\fP Number of elements in the vector
- \fIworkspace\fP Points to a vector of ints used as working space
- \fIwscount\fP Number of elements in the vector
-.sp
-The options are:
-.sp
- PCRE_ANCHORED Match only at the first position
- PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \eR matches all Unicode line endings
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, & CRLF as newline sequences
- PCRE_NEWLINE_CR Recognize CR as the only newline sequence
- PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
- PCRE_NEWLINE_LF Recognize LF as the only newline sequence
- PCRE_NOTBOL Subject is not the beginning of a line
- PCRE_NOTEOL Subject is not the end of a line
- PCRE_NOTEMPTY An empty string is not a valid match
- PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
- validity (only relevant if PCRE_UTF8
- was set at compile time)
- PCRE_PARTIAL ) Return PCRE_ERROR_PARTIAL for a partial
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- even if there is a full match as well
- PCRE_DFA_SHORTEST Return only the shortest match
- PCRE_DFA_RESTART Restart after a partial match
-.sp
-There are restrictions on what may appear in a pattern when using this matching
-function. Details are given in the
-.\" HREF
-\fBpcrematching\fP
-.\"
-documentation. For details of partial matching, see the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-page.
-.P
-A \fBpcre[16]_extra\fP structure contains the following fields:
-.sp
- \fIflags\fP Bits indicating which fields are set
- \fIstudy_data\fP Opaque data from \fBpcre[16]_study()\fP
- \fImatch_limit\fP Limit on internal resource use
- \fImatch_limit_recursion\fP Limit on internal recursion depth
- \fIcallout_data\fP Opaque data passed back to callouts
- \fItables\fP Points to character tables or is NULL
- \fImark\fP For passing back a *MARK pointer
- \fIexecutable_jit\fP Opaque data from JIT compilation
-.sp
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT. For this
-matching function, the \fImatch_limit\fP and \fImatch_limit_recursion\fP fields
-are not used, and must not be set. The PCRE_EXTRA_EXECUTABLE_JIT flag and
-the corresponding variable are ignored.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_exec.3 b/src/third_party/pcre-8.30/doc/pcre_exec.3
deleted file mode 100644
index 68db3c0a496..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_exec.3
+++ /dev/null
@@ -1,94 +0,0 @@
-.TH PCRE_EXEC 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
-.PP
-.B int pcre16_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.ti +5n
-.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function matches a compiled regular expression against a given subject
-string, using a matching algorithm that is similar to Perl's. It returns
-offsets to captured substrings. Its arguments are:
-.sp
- \fIcode\fP Points to the compiled pattern
- \fIextra\fP Points to an associated \fBpcre[16]_extra\fP structure,
- or is NULL
- \fIsubject\fP Points to the subject string
- \fIlength\fP Length of the subject string, in bytes
- \fIstartoffset\fP Offset in bytes in the subject at which to
- start matching
- \fIoptions\fP Option bits
- \fIovector\fP Points to a vector of ints for result offsets
- \fIovecsize\fP Number of elements in the vector (a multiple of 3)
-.sp
-The options are:
-.sp
- PCRE_ANCHORED Match only at the first position
- PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
- PCRE_BSR_UNICODE \eR matches all Unicode line endings
- PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
- PCRE_NEWLINE_ANYCRLF Recognize CR, LF, & CRLF as newline sequences
- PCRE_NEWLINE_CR Recognize CR as the only newline sequence
- PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
- PCRE_NEWLINE_LF Recognize LF as the only newline sequence
- PCRE_NOTBOL Subject string is not the beginning of a line
- PCRE_NOTEOL Subject string is not the end of a line
- PCRE_NOTEMPTY An empty string is not a valid match
- PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
- is not a valid match
- PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
- PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
- validity (only relevant if PCRE_UTF16
- was set at compile time)
- PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
- validity (only relevant if PCRE_UTF8
- was set at compile time)
- PCRE_PARTIAL ) Return PCRE_ERROR_PARTIAL for a partial
- PCRE_PARTIAL_SOFT ) match if no full matches are found
- PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
- if that is found before a full match
-.sp
-For details of partial matching, see the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-page. A \fBpcre_extra\fP structure contains the following fields:
-.sp
- \fIflags\fP Bits indicating which fields are set
- \fIstudy_data\fP Opaque data from \fBpcre[16]_study()\fP
- \fImatch_limit\fP Limit on internal resource use
- \fImatch_limit_recursion\fP Limit on internal recursion depth
- \fIcallout_data\fP Opaque data passed back to callouts
- \fItables\fP Points to character tables or is NULL
- \fImark\fP For passing back a *MARK pointer
- \fIexecutable_jit\fP Opaque data from JIT compilation
-.sp
-The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
-PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
-PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_free_study.3 b/src/third_party/pcre-8.30/doc/pcre_free_study.3
deleted file mode 100644
index 308ca940127..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_free_study.3
+++ /dev/null
@@ -1,29 +0,0 @@
-.TH PCRE_FREE_STUDY 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B void pcre_free_study(pcre_extra *\fIextra\fP);
-.PP
-.B void pcre16_free_study(pcre16_extra *\fIextra\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function is used to free the memory used for the data generated by a call
-to \fBpcre[16]_study()\fP when it is no longer needed. The argument must be the
-result of such a call.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_free_substring.3 b/src/third_party/pcre-8.30/doc/pcre_free_substring.3
deleted file mode 100644
index 9f1d70088e1..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_free_substring.3
+++ /dev/null
@@ -1,29 +0,0 @@
-.TH PCRE_FREE_SUBSTRING 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B void pcre_free_substring(const char *\fIstringptr\fP);
-.PP
-.B void pcre16_free_substring(PCRE_SPTR16 \fIstringptr\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for freeing the store obtained by a previous
-call to \fBpcre[16]_get_substring()\fP or \fBpcre[16]_get_named_substring()\fP.
-Its only argument is a pointer to the string.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_free_substring_list.3 b/src/third_party/pcre-8.30/doc/pcre_free_substring_list.3
deleted file mode 100644
index b8d8bbbe025..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_free_substring_list.3
+++ /dev/null
@@ -1,29 +0,0 @@
-.TH PCRE_FREE_SUBSTRING_LIST 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B void pcre_free_substring_list(const char **\fIstringptr\fP);
-.PP
-.B void pcre16_free_substring_list(PCRE_SPTR16 *\fIstringptr\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for freeing the store obtained by a previous
-call to \fBpcre[16]_get_substring_list()\fP. Its only argument is a pointer to
-the list of string pointers.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_fullinfo.3 b/src/third_party/pcre-8.30/doc/pcre_fullinfo.3
deleted file mode 100644
index 7ba65326f7e..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_fullinfo.3
+++ /dev/null
@@ -1,78 +0,0 @@
-.TH PCRE_FULLINFO 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-.B int pcre16_fullinfo(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
-.ti +5n
-.B int \fIwhat\fP, void *\fIwhere\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function returns information about a compiled pattern. Its arguments are:
-.sp
- \fIcode\fP Compiled regular expression
- \fIextra\fP Result of \fBpcre[16]_study()\fP or NULL
- \fIwhat\fP What information is required
- \fIwhere\fP Where to put the information
-.sp
-The following information is available:
-.sp
- PCRE_INFO_BACKREFMAX Number of highest back reference
- PCRE_INFO_CAPTURECOUNT Number of capturing subpatterns
- PCRE_INFO_DEFAULT_TABLES Pointer to default tables
- PCRE_INFO_FIRSTBYTE Fixed first data unit for a match, or
- -1 for start of string
- or after newline, or
- -2 otherwise
- PCRE_INFO_FIRSTTABLE Table of first data units (after studying)
- PCRE_INFO_HASCRORLF Return 1 if explicit CR or LF matches exist
- PCRE_INFO_JCHANGED Return 1 if (?J) or (?-J) was used
- PCRE_INFO_JIT Return 1 after successful JIT compilation
- PCRE_INFO_JITSIZE Size of JIT compiled code
- PCRE_INFO_LASTLITERAL Literal last data unit required
- PCRE_INFO_MINLENGTH Lower bound length of matching strings
- PCRE_INFO_NAMECOUNT Number of named subpatterns
- PCRE_INFO_NAMEENTRYSIZE Size of name table entry
- PCRE_INFO_NAMETABLE Pointer to name table
- PCRE_INFO_OKPARTIAL Return 1 if partial matching can be tried
- (always returns 1 after release 8.00)
- PCRE_INFO_OPTIONS Option bits used for compilation
- PCRE_INFO_SIZE Size of compiled pattern
- PCRE_INFO_STUDYSIZE Size of study data
-.sp
-The \fIwhere\fP argument must point to an integer variable, except for the
-following \fIwhat\fP values:
-.sp
- PCRE_INFO_DEFAULT_TABLES const unsigned char *
- PCRE_INFO_FIRSTTABLE const unsigned char *
- PCRE_INFO_NAMETABLE PCRE_SPTR16 (16-bit library)
- PCRE_INFO_NAMETABLE const unsigned char * (8-bit library)
- PCRE_INFO_OPTIONS unsigned long int
- PCRE_INFO_SIZE size_t
-.sp
-The yield of the function is zero on success or:
-.sp
- PCRE_ERROR_NULL the argument \fIcode\fP was NULL
- the argument \fIwhere\fP was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADOPTION the value of \fIwhat\fP was invalid
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_get_named_substring.3 b/src/third_party/pcre-8.30/doc/pcre_get_named_substring.3
deleted file mode 100644
index 60b107c3bcd..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_get_named_substring.3
+++ /dev/null
@@ -1,54 +0,0 @@
-.TH PCRE_GET_NAMED_SUBSTRING 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_get_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
-.PP
-.B int pcre16_get_named_substring(const pcre16 *\fIcode\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,
-.ti +5n
-.B PCRE_SPTR16 *\fIstringptr\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a captured substring by name. The
-arguments are:
-.sp
- \fIcode\fP Compiled pattern
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16]_exec()\fP used
- \fIstringcount\fP Value returned by \fBpcre[16]_exec()\fP
- \fIstringname\fP Name of the required substring
- \fIstringptr\fP Where to put the string pointer
-.sp
-The memory in which the substring is placed is obtained by calling
-\fBpcre[16]_malloc()\fP. The convenience function
-\fBpcre[16]_free_substring()\fP can be used to free it when it is no longer
-needed. The yield of the function is the length of the extracted substring,
-PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or
-PCRE_ERROR_NOSUBSTRING if the string name is invalid.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_get_stringnumber.3 b/src/third_party/pcre-8.30/doc/pcre_get_stringnumber.3
deleted file mode 100644
index 62bf7370451..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_get_stringnumber.3
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH PCRE_GET_STRINGNUMBER 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP);
-.PP
-.B int pcre16_get_stringnumber(const pcre16 *\fIcode\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIname\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This convenience function finds the number of a named substring capturing
-parenthesis in a compiled pattern. Its arguments are:
-.sp
- \fIcode\fP Compiled regular expression
- \fIname\fP Name whose number is required
-.sp
-The yield of the function is the number of the parenthesis if the name is
-found, or PCRE_ERROR_NOSUBSTRING otherwise. When duplicate names are allowed
-(PCRE_DUPNAMES is set), it is not defined which of the numbers is returned by
-\fBpcre[16]_get_stringnumber()\fP. You can obtain the complete list by calling
-\fBpcre[16]_get_stringtable_entries()\fP.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_get_stringtable_entries.3 b/src/third_party/pcre-8.30/doc/pcre_get_stringtable_entries.3
deleted file mode 100644
index 9a862bb44a3..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_get_stringtable_entries.3
+++ /dev/null
@@ -1,44 +0,0 @@
-.TH PCRE_GET_STRINGTABLE_ENTRIES 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);
-.PP
-.B int pcre16_get_stringtable_entries(const pcre16 *\fIcode\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This convenience function finds, for a compiled pattern, the first and last
-entries for a given name in the table that translates capturing parenthesis
-names into numbers. When names are required to be unique (PCRE_DUPNAMES is
-\fInot\fP set), it is usually easier to use \fBpcre[16]_get_stringnumber()\fP
-instead.
-.sp
- \fIcode\fP Compiled regular expression
- \fIname\fP Name whose entries required
- \fIfirst\fP Where to return a pointer to the first entry
- \fIlast\fP Where to return a pointer to the last entry
-.sp
-The yield of the function is the length of each entry, or
-PCRE_ERROR_NOSUBSTRING if none are found.
-.P
-There is a complete description of the PCRE native API, including the format of
-the table entries, in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page, and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_get_substring.3 b/src/third_party/pcre-8.30/doc/pcre_get_substring.3
deleted file mode 100644
index f27cc99c2d2..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_get_substring.3
+++ /dev/null
@@ -1,49 +0,0 @@
-.TH PCRE_GET_SUBSTRING 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
-.PP
-.B int pcre16_get_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP,
-.ti +5n
-.B PCRE_SPTR16 *\fIstringptr\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a captured substring. The
-arguments are:
-.sp
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16]_exec()\fP used
- \fIstringcount\fP Value returned by \fBpcre[16]_exec()\fP
- \fIstringnumber\fP Number of the required substring
- \fIstringptr\fP Where to put the string pointer
-.sp
-The memory in which the substring is placed is obtained by calling
-\fBpcre[16]_malloc()\fP. The convenience function
-\fBpcre[16]_free_substring()\fP can be used to free it when it is no longer
-needed. The yield of the function is the length of the substring,
-PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or
-PCRE_ERROR_NOSUBSTRING if the string number is invalid.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_get_substring_list.3 b/src/third_party/pcre-8.30/doc/pcre_get_substring_list.3
deleted file mode 100644
index 2df985ac518..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_get_substring_list.3
+++ /dev/null
@@ -1,45 +0,0 @@
-.TH PCRE_GET_SUBSTRING_LIST 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_get_substring_list(const char *\fIsubject\fP,
-.ti +5n
-.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);"
-.PP
-.B int pcre16_get_substring_list(PCRE_SPTR16 \fIsubject\fP,
-.ti +5n
-.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR16 **\fIlistptr\fP);"
-.
-.SH DESCRIPTION
-.rs
-.sp
-This is a convenience function for extracting a list of all the captured
-substrings. The arguments are:
-.sp
- \fIsubject\fP Subject that has been successfully matched
- \fIovector\fP Offset vector that \fBpcre[16]_exec\fP used
- \fIstringcount\fP Value returned by \fBpcre[16]_exec\fP
- \fIlistptr\fP Where to put a pointer to the list
-.sp
-The memory in which the substrings and the list are placed is obtained by
-calling \fBpcre[16]_malloc()\fP. The convenience function
-\fBpcre[16]_free_substring_list()\fP can be used to free it when it is no
-longer needed. A pointer to a list of pointers is put in the variable whose
-address is in \fIlistptr\fP. The list is terminated by a NULL pointer. The
-yield of the function is zero on success or PCRE_ERROR_NOMEMORY if sufficient
-memory could not be obtained.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_jit_stack_alloc.3 b/src/third_party/pcre-8.30/doc/pcre_jit_stack_alloc.3
deleted file mode 100644
index 03928390e46..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_jit_stack_alloc.3
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH PCRE_JIT_STACK_ALLOC 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B pcre_jit_stack *pcre_jit_stack_alloc(int \fIstartsize\fP,
-.ti +5n
-.B int \fImaxsize\fP);
-.PP
-.B pcre16_jit_stack *pcre16_jit_stack_alloc(int \fIstartsize\fP,
-.ti +5n
-.B int \fImaxsize\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function is used to create a stack for use by the code compiled by the JIT
-optimization of \fBpcre[16]_study()\fP. The arguments are a starting size for
-the stack, and a maximum size to which it is allowed to grow. The result can be
-passed to the JIT runtime code by \fBpcre[16]_assign_jit_stack()\fP, or that
-function can set up a callback for obtaining a stack. A maximum stack size of
-512K to 1M should be more than enough for any pattern. For more details, see
-the
-.\" HREF
-\fBpcrejit\fP
-.\"
-page.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_jit_stack_free.3 b/src/third_party/pcre-8.30/doc/pcre_jit_stack_free.3
deleted file mode 100644
index c0daacb8836..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_jit_stack_free.3
+++ /dev/null
@@ -1,33 +0,0 @@
-.TH PCRE_JIT_STACK_FREE 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B void pcre_jit_stack_free(pcre_jit_stack *\fIstack\fP);
-.PP
-.B void pcre16_jit_stack_free(pcre16_jit_stack *\fIstack\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function is used to free a JIT stack that was created by
-\fBpcre[16]_jit_stack_alloc()\fP when it is no longer needed. For more details,
-see the
-.\" HREF
-\fBpcrejit\fP
-.\"
-page.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_maketables.3 b/src/third_party/pcre-8.30/doc/pcre_maketables.3
deleted file mode 100644
index 8b2c0b27a76..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_maketables.3
+++ /dev/null
@@ -1,31 +0,0 @@
-.TH PCRE_MAKETABLES 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B const unsigned char *pcre_maketables(void);
-.PP
-.B const unsigned char *pcre16_maketables(void);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function builds a set of character tables for character values less than
-256. These can be passed to \fBpcre[16]_compile()\fP to override PCRE's
-internal, built-in tables (which were made by \fBpcre[16]_maketables()\fP when
-PCRE was compiled). You might want to do this if you are using a non-standard
-locale. The function yields a pointer to the tables.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_pattern_to_host_byte_order.3 b/src/third_party/pcre-8.30/doc/pcre_pattern_to_host_byte_order.3
deleted file mode 100644
index 615cf55c1f3..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_pattern_to_host_byte_order.3
+++ /dev/null
@@ -1,43 +0,0 @@
-.TH PCRE_PATTERN_TO_HOST_BYTE_ORDER 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_pattern_to_host_byte_order(pcre *\fIcode\fP,
-.ti +5n
-.B pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);
-.PP
-.B int pcre16_pattern_to_host_byte_order(pcre16 *\fIcode\fP,
-.ti +5n
-.B pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);
-.
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function ensures that the bytes in 2-byte and 4-byte values in a compiled
-pattern are in the correct order for the current host. It is useful when a
-pattern that has been compiled on one host is transferred to another that might
-have different endianness. The arguments are:
-.sp
- \fIcode\fP A compiled regular expression
- \fIextra\fP Points to an associated \fBpcre[16]_extra\fP structure,
- or is NULL
- \fItables\fP Pointer to character tables, or NULL to
- set the built-in default
-.sp
-The result is 0 for success, a negative PCRE_ERROR_xxx value otherwise.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_refcount.3 b/src/third_party/pcre-8.30/doc/pcre_refcount.3
deleted file mode 100644
index 57c0ddcf2b3..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_refcount.3
+++ /dev/null
@@ -1,34 +0,0 @@
-.TH PCRE_REFCOUNT 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre_refcount(pcre *\fIcode\fP, int \fIadjust\fP);
-.PP
-.B int pcre16_refcount(pcre16 *\fIcode\fP, int \fIadjust\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function is used to maintain a reference count inside a data block that
-contains a compiled pattern. Its arguments are:
-.sp
- \fIcode\fP Compiled regular expression
- \fIadjust\fP Adjustment to reference value
-.sp
-The yield of the function is the adjusted reference value, which is constrained
-to lie between 0 and 65535.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_study.3 b/src/third_party/pcre-8.30/doc/pcre_study.3
deleted file mode 100644
index 092a4d73405..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_study.3
+++ /dev/null
@@ -1,52 +0,0 @@
-.TH PCRE_STUDY 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP);
-.PP
-.B pcre16_extra *pcre16_study(const pcre16 *\fIcode\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function studies a compiled pattern, to see if additional information can
-be extracted that might speed up matching. Its arguments are:
-.sp
- \fIcode\fP A compiled regular expression
- \fIoptions\fP Options for \fBpcre[16]_study()\fP
- \fIerrptr\fP Where to put an error message
-.sp
-If the function succeeds, it returns a value that can be passed to
-\fBpcre[16]_exec()\fP or \fBpcre[16]_dfa_exec()\fP via their \fIextra\fP
-arguments.
-.P
-If the function returns NULL, either it could not find any additional
-information, or there was an error. You can tell the difference by looking at
-the error value. It is NULL in first case.
-.P
-The only option is PCRE_STUDY_JIT_COMPILE. It requests just-in-time compilation
-if possible. If PCRE has been compiled without JIT support, this option is
-ignored. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-page for further details.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_utf16_to_host_byte_order.3 b/src/third_party/pcre-8.30/doc/pcre_utf16_to_host_byte_order.3
deleted file mode 100644
index f08ce1ecdd5..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_utf16_to_host_byte_order.3
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH PCRE_UTF16_TO_HOST_BYTE_ORDER 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *\fIoutput\fP,
-.ti +5n
-.B PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP,
-.ti +5n
-.B int \fIkeep_boms\fP);
-.
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function, which exists only in the 16-bit library, converts a UTF-16
-string to the correct order for the current host, taking account of any byte
-order marks (BOMs) within the string. Its arguments are:
-.sp
- \fIoutput\fP pointer to output buffer, may be the same as \fIinput\fP
- \fIinput\fP pointer to input buffer
- \fIlength\fP number of 16-bit units in the input, or negative for
- a zero-terminated string
- \fIhost_byte_order\fP a NULL value or a non-zero value pointed to means
- start in host byte order
- \fIkeep_boms\fP if non-zero, BOMs are copied to the output string
-.sp
-The result of the function is the number of 16-bit units placed into the output
-buffer, including the zero terminator if the string was zero-terminated.
-.P
-If \fIhost_byte_order\fP is not NULL, it is set to indicate the byte order that
-is current at the end of the string.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcre_version.3 b/src/third_party/pcre-8.30/doc/pcre_version.3
deleted file mode 100644
index 4658b5c1fb7..00000000000
--- a/src/third_party/pcre-8.30/doc/pcre_version.3
+++ /dev/null
@@ -1,29 +0,0 @@
-.TH PCRE_VERSION 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH SYNOPSIS
-.rs
-.sp
-.B #include <pcre.h>
-.PP
-.SM
-.B const char *pcre_version(void);
-.PP
-.B const char *pcre16_version(void);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This function (even in the 16-bit library) returns a zero-terminated, 8-bit
-character string that gives the version number of the PCRE library and the date
-of its release.
-.P
-There is a complete description of the PCRE native API in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page and a description of the POSIX API in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-page.
diff --git a/src/third_party/pcre-8.30/doc/pcreapi.3 b/src/third_party/pcre-8.30/doc/pcreapi.3
deleted file mode 100644
index 6263e7bc084..00000000000
--- a/src/third_party/pcre-8.30/doc/pcreapi.3
+++ /dev/null
@@ -1,2649 +0,0 @@
-.TH PCREAPI 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.sp
-.B #include <pcre.h>
-.
-.
-.SH "PCRE NATIVE API BASIC FUNCTIONS"
-.rs
-.sp
-.SM
-.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.PP
-.B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B int *\fIerrorcodeptr\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.PP
-.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP);
-.PP
-.B void pcre_free_study(pcre_extra *\fIextra\fP);
-.PP
-.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
-.PP
-.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
-.ti +5n
-.B int *\fIworkspace\fP, int \fIwscount\fP);
-.
-.
-.SH "PCRE NATIVE API STRING EXTRACTION FUNCTIONS"
-.rs
-.sp
-.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B char *\fIbuffer\fP, int \fIbuffersize\fP);
-.PP
-.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,
-.ti +5n
-.B int \fIbuffersize\fP);
-.PP
-.B int pcre_get_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
-.PP
-.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP);
-.PP
-.B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);
-.PP
-.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
-.PP
-.B int pcre_get_substring_list(const char *\fIsubject\fP,
-.ti +5n
-.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);"
-.PP
-.B void pcre_free_substring(const char *\fIstringptr\fP);
-.PP
-.B void pcre_free_substring_list(const char **\fIstringptr\fP);
-.
-.
-.SH "PCRE NATIVE API AUXILIARY FUNCTIONS"
-.rs
-.sp
-.B pcre_jit_stack *pcre_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP);
-.PP
-.B void pcre_jit_stack_free(pcre_jit_stack *\fIstack\fP);
-.PP
-.B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP,
-.ti +5n
-.B pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);
-.PP
-.B const unsigned char *pcre_maketables(void);
-.PP
-.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-.B int pcre_refcount(pcre *\fIcode\fP, int \fIadjust\fP);
-.PP
-.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-.B const char *pcre_version(void);
-.PP
-.B int pcre_pattern_to_host_byte_order(pcre *\fIcode\fP,
-.ti +5n
-.B pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);
-.
-.
-.SH "PCRE NATIVE API INDIRECTED FUNCTIONS"
-.rs
-.sp
-.B void *(*pcre_malloc)(size_t);
-.PP
-.B void (*pcre_free)(void *);
-.PP
-.B void *(*pcre_stack_malloc)(size_t);
-.PP
-.B void (*pcre_stack_free)(void *);
-.PP
-.B int (*pcre_callout)(pcre_callout_block *);
-.
-.
-.SH "PCRE 8-BIT AND 16-BIT LIBRARIES"
-.rs
-.sp
-From release 8.30, PCRE can be compiled as a library for handling 16-bit
-character strings as well as, or instead of, the original library that handles
-8-bit character strings. To avoid too much complication, this document
-describes the 8-bit versions of the functions, with only occasional references
-to the 16-bit library.
-.P
-The 16-bit functions operate in the same way as their 8-bit counterparts; they
-just use different data types for their arguments and results, and their names
-start with \fBpcre16_\fP instead of \fBpcre_\fP. For every option that has UTF8
-in its name (for example, PCRE_UTF8), there is a corresponding 16-bit name with
-UTF8 replaced by UTF16. This facility is in fact just cosmetic; the 16-bit
-option names define the same bit values.
-.P
-References to bytes and UTF-8 in this document should be read as references to
-16-bit data quantities and UTF-16 when using the 16-bit library, unless
-specified otherwise. More details of the specific differences for the 16-bit
-library are given in the
-.\" HREF
-\fBpcre16\fP
-.\"
-page.
-.
-.
-.SH "PCRE API OVERVIEW"
-.rs
-.sp
-PCRE has its own native API, which is described in this document. There are
-also some wrapper functions (for the 8-bit library only) that correspond to the
-POSIX regular expression API, but they do not give access to all the
-functionality. They are described in the
-.\" HREF
-\fBpcreposix\fP
-.\"
-documentation. Both of these APIs define a set of C function calls. A C++
-wrapper (again for the 8-bit library only) is also distributed with PCRE. It is
-documented in the
-.\" HREF
-\fBpcrecpp\fP
-.\"
-page.
-.P
-The native API C function prototypes are defined in the header file
-\fBpcre.h\fP, and on Unix-like systems the (8-bit) library itself is called
-\fBlibpcre\fP. It can normally be accessed by adding \fB-lpcre\fP to the
-command for linking an application that uses PCRE. The header file defines the
-macros PCRE_MAJOR and PCRE_MINOR to contain the major and minor release numbers
-for the library. Applications can use these to include support for different
-releases of PCRE.
-.P
-In a Windows environment, if you want to statically link an application program
-against a non-dll \fBpcre.a\fP file, you must define PCRE_STATIC before
-including \fBpcre.h\fP or \fBpcrecpp.h\fP, because otherwise the
-\fBpcre_malloc()\fP and \fBpcre_free()\fP exported functions will be declared
-\fB__declspec(dllimport)\fP, with unwanted results.
-.P
-The functions \fBpcre_compile()\fP, \fBpcre_compile2()\fP, \fBpcre_study()\fP,
-and \fBpcre_exec()\fP are used for compiling and matching regular expressions
-in a Perl-compatible manner. A sample program that demonstrates the simplest
-way of using them is provided in the file called \fIpcredemo.c\fP in the PCRE
-source distribution. A listing of this program is given in the
-.\" HREF
-\fBpcredemo\fP
-.\"
-documentation, and the
-.\" HREF
-\fBpcresample\fP
-.\"
-documentation describes how to compile and run it.
-.P
-Just-in-time compiler support is an optional feature of PCRE that can be built
-in appropriate hardware environments. It greatly speeds up the matching
-performance of many patterns. Simple programs can easily request that it be
-used if available, by setting an option that is ignored when it is not
-relevant. More complicated programs might need to make use of the functions
-\fBpcre_jit_stack_alloc()\fP, \fBpcre_jit_stack_free()\fP, and
-\fBpcre_assign_jit_stack()\fP in order to control the JIT code's memory usage.
-These functions are discussed in the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation.
-.P
-A second matching function, \fBpcre_dfa_exec()\fP, which is not
-Perl-compatible, is also provided. This uses a different algorithm for the
-matching. The alternative algorithm finds all possible matches (at a given
-point in the subject), and scans the subject just once (unless there are
-lookbehind assertions). However, this algorithm does not return captured
-substrings. A description of the two matching algorithms and their advantages
-and disadvantages is given in the
-.\" HREF
-\fBpcrematching\fP
-.\"
-documentation.
-.P
-In addition to the main compiling and matching functions, there are convenience
-functions for extracting captured substrings from a subject string that is
-matched by \fBpcre_exec()\fP. They are:
-.sp
- \fBpcre_copy_substring()\fP
- \fBpcre_copy_named_substring()\fP
- \fBpcre_get_substring()\fP
- \fBpcre_get_named_substring()\fP
- \fBpcre_get_substring_list()\fP
- \fBpcre_get_stringnumber()\fP
- \fBpcre_get_stringtable_entries()\fP
-.sp
-\fBpcre_free_substring()\fP and \fBpcre_free_substring_list()\fP are also
-provided, to free the memory used for extracted strings.
-.P
-The function \fBpcre_maketables()\fP is used to build a set of character tables
-in the current locale for passing to \fBpcre_compile()\fP, \fBpcre_exec()\fP,
-or \fBpcre_dfa_exec()\fP. This is an optional facility that is provided for
-specialist use. Most commonly, no special tables are passed, in which case
-internal tables that are generated when PCRE is built are used.
-.P
-The function \fBpcre_fullinfo()\fP is used to find out information about a
-compiled pattern. The function \fBpcre_version()\fP returns a pointer to a
-string containing the version of PCRE and its date of release.
-.P
-The function \fBpcre_refcount()\fP maintains a reference count in a data block
-containing a compiled pattern. This is provided for the benefit of
-object-oriented applications.
-.P
-The global variables \fBpcre_malloc\fP and \fBpcre_free\fP initially contain
-the entry points of the standard \fBmalloc()\fP and \fBfree()\fP functions,
-respectively. PCRE calls the memory management functions via these variables,
-so a calling program can replace them if it wishes to intercept the calls. This
-should be done before calling any PCRE functions.
-.P
-The global variables \fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP are also
-indirections to memory management functions. These special functions are used
-only when PCRE is compiled to use the heap for remembering data, instead of
-recursive function calls, when running the \fBpcre_exec()\fP function. See the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation for details of how to do this. It is a non-standard way of
-building PCRE, for use in environments that have limited stacks. Because of the
-greater use of memory management, it runs more slowly. Separate functions are
-provided so that special-purpose external code can be used for this case. When
-used, these functions are always called in a stack-like manner (last obtained,
-first freed), and always for memory blocks of the same size. There is a
-discussion about PCRE's stack usage in the
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation.
-.P
-The global variable \fBpcre_callout\fP initially contains NULL. It can be set
-by the caller to a "callout" function, which PCRE will then call at specified
-points during a matching operation. Details are given in the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.
-.
-.\" HTML <a name="newlines"></a>
-.SH NEWLINES
-.rs
-.sp
-PCRE supports five different conventions for indicating line breaks in
-strings: a single CR (carriage return) character, a single LF (linefeed)
-character, the two-character sequence CRLF, any of the three preceding, or any
-Unicode newline sequence. The Unicode newline sequences are the three just
-mentioned, plus the single characters VT (vertical tab, U+000B), FF (formfeed,
-U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
-(paragraph separator, U+2029).
-.P
-Each of the first three conventions is used by at least one operating system as
-its standard newline sequence. When PCRE is built, a default can be specified.
-The default default is LF, which is the Unix standard. When PCRE is run, the
-default can be overridden, either when a pattern is compiled, or when it is
-matched.
-.P
-At compile time, the newline convention can be specified by the \fIoptions\fP
-argument of \fBpcre_compile()\fP, or it can be specified by special text at the
-start of the pattern itself; this overrides any other settings. See the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page for details of the special character sequences.
-.P
-In the PCRE documentation the word "newline" is used to mean "the character or
-pair of characters that indicate a line break". The choice of newline
-convention affects the handling of the dot, circumflex, and dollar
-metacharacters, the handling of #-comments in /x mode, and, when CRLF is a
-recognized line ending sequence, the match position advancement for a
-non-anchored pattern. There is more detail about this in the
-.\" HTML <a href="#execoptions">
-.\" </a>
-section on \fBpcre_exec()\fP options
-.\"
-below.
-.P
-The choice of newline convention does not affect the interpretation of
-the \en or \er escape sequences, nor does it affect what \eR matches, which is
-controlled in a similar way, but by separate options.
-.
-.
-.SH MULTITHREADING
-.rs
-.sp
-The PCRE functions can be used in multi-threading applications, with the
-proviso that the memory management functions pointed to by \fBpcre_malloc\fP,
-\fBpcre_free\fP, \fBpcre_stack_malloc\fP, and \fBpcre_stack_free\fP, and the
-callout function pointed to by \fBpcre_callout\fP, are shared by all threads.
-.P
-The compiled form of a regular expression is not altered during matching, so
-the same compiled pattern can safely be used by several threads at once.
-.P
-If the just-in-time optimization feature is being used, it needs separate
-memory stack areas for each thread. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for more details.
-.
-.
-.SH "SAVING PRECOMPILED PATTERNS FOR LATER USE"
-.rs
-.sp
-The compiled form of a regular expression can be saved and re-used at a later
-time, possibly by a different program, and even on a host other than the one on
-which it was compiled. Details are given in the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation, which includes a description of the
-\fBpcre_pattern_to_host_byte_order()\fP function. However, compiling a regular
-expression with one version of PCRE for use with a different version is not
-guaranteed to work and may cause crashes.
-.
-.
-.SH "CHECKING BUILD-TIME OPTIONS"
-.rs
-.sp
-.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-The function \fBpcre_config()\fP makes it possible for a PCRE client to
-discover which optional features have been compiled into the PCRE library. The
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation has more details about these optional features.
-.P
-The first argument for \fBpcre_config()\fP is an integer, specifying which
-information is required; the second argument is a pointer to a variable into
-which the information is placed. The returned value is zero on success, or the
-negative error code PCRE_ERROR_BADOPTION if the value in the first argument is
-not recognized. The following information is available:
-.sp
- PCRE_CONFIG_UTF8
-.sp
-The output is an integer that is set to one if UTF-8 support is available;
-otherwise it is set to zero. If this option is given to the 16-bit version of
-this function, \fBpcre16_config()\fP, the result is PCRE_ERROR_BADOPTION.
-.sp
- PCRE_CONFIG_UTF16
-.sp
-The output is an integer that is set to one if UTF-16 support is available;
-otherwise it is set to zero. This value should normally be given to the 16-bit
-version of this function, \fBpcre16_config()\fP. If it is given to the 8-bit
-version of this function, the result is PCRE_ERROR_BADOPTION.
-.sp
- PCRE_CONFIG_UNICODE_PROPERTIES
-.sp
-The output is an integer that is set to one if support for Unicode character
-properties is available; otherwise it is set to zero.
-.sp
- PCRE_CONFIG_JIT
-.sp
-The output is an integer that is set to one if support for just-in-time
-compiling is available; otherwise it is set to zero.
-.sp
- PCRE_CONFIG_JITTARGET
-.sp
-The output is a pointer to a zero-terminated "const char *" string. If JIT
-support is available, the string contains the name of the architecture for
-which the JIT compiler is configured, for example "x86 32bit (little endian +
-unaligned)". If JIT support is not available, the result is NULL.
-.sp
- PCRE_CONFIG_NEWLINE
-.sp
-The output is an integer whose value specifies the default character sequence
-that is recognized as meaning "newline". The four values that are supported
-are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF, and -1 for ANY.
-Though they are derived from ASCII, the same values are returned in EBCDIC
-environments. The default should normally correspond to the standard sequence
-for your operating system.
-.sp
- PCRE_CONFIG_BSR
-.sp
-The output is an integer whose value indicates what character sequences the \eR
-escape sequence matches by default. A value of 0 means that \eR matches any
-Unicode line ending sequence; a value of 1 means that \eR matches only CR, LF,
-or CRLF. The default can be overridden when a pattern is compiled or matched.
-.sp
- PCRE_CONFIG_LINK_SIZE
-.sp
-The output is an integer that contains the number of bytes used for internal
-linkage in compiled regular expressions. For the 8-bit library, the value can
-be 2, 3, or 4. For the 16-bit library, the value is either 2 or 4 and is still
-a number of bytes. The default value of 2 is sufficient for all but the most
-massive patterns, since it allows the compiled pattern to be up to 64K in size.
-Larger values allow larger regular expressions to be compiled, at the expense
-of slower matching.
-.sp
- PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
-.sp
-The output is an integer that contains the threshold above which the POSIX
-interface uses \fBmalloc()\fP for output vectors. Further details are given in
-the
-.\" HREF
-\fBpcreposix\fP
-.\"
-documentation.
-.sp
- PCRE_CONFIG_MATCH_LIMIT
-.sp
-The output is a long integer that gives the default limit for the number of
-internal matching function calls in a \fBpcre_exec()\fP execution. Further
-details are given with \fBpcre_exec()\fP below.
-.sp
- PCRE_CONFIG_MATCH_LIMIT_RECURSION
-.sp
-The output is a long integer that gives the default limit for the depth of
-recursion when calling the internal matching function in a \fBpcre_exec()\fP
-execution. Further details are given with \fBpcre_exec()\fP below.
-.sp
- PCRE_CONFIG_STACKRECURSE
-.sp
-The output is an integer that is set to one if internal recursion when running
-\fBpcre_exec()\fP is implemented by recursive function calls that use the stack
-to remember their state. This is the usual way that PCRE is compiled. The
-output is zero if PCRE was compiled to use blocks of data on the heap instead
-of recursive function calls. In this case, \fBpcre_stack_malloc\fP and
-\fBpcre_stack_free\fP are called to manage memory blocks on the heap, thus
-avoiding the use of the stack.
-.
-.
-.SH "COMPILING A PATTERN"
-.rs
-.sp
-.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.sp
-.B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B int *\fIerrorcodeptr\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.P
-Either of the functions \fBpcre_compile()\fP or \fBpcre_compile2()\fP can be
-called to compile a pattern into an internal form. The only difference between
-the two interfaces is that \fBpcre_compile2()\fP has an additional argument,
-\fIerrorcodeptr\fP, via which a numerical error code can be returned. To avoid
-too much repetition, we refer just to \fBpcre_compile()\fP below, but the
-information applies equally to \fBpcre_compile2()\fP.
-.P
-The pattern is a C string terminated by a binary zero, and is passed in the
-\fIpattern\fP argument. A pointer to a single block of memory that is obtained
-via \fBpcre_malloc\fP is returned. This contains the compiled code and related
-data. The \fBpcre\fP type is defined for the returned block; this is a typedef
-for a structure whose contents are not externally defined. It is up to the
-caller to free the memory (via \fBpcre_free\fP) when it is no longer required.
-.P
-Although the compiled code of a PCRE regex is relocatable, that is, it does not
-depend on memory location, the complete \fBpcre\fP data block is not
-fully relocatable, because it may contain a copy of the \fItableptr\fP
-argument, which is an address (see below).
-.P
-The \fIoptions\fP argument contains various bit settings that affect the
-compilation. It should be zero if no options are required. The available
-options are described below. Some of them (in particular, those that are
-compatible with Perl, but some others as well) can also be set and unset from
-within the pattern (see the detailed description in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation). For those options that can be different in different parts of
-the pattern, the contents of the \fIoptions\fP argument specifies their
-settings at the start of compilation and execution. The PCRE_ANCHORED,
-PCRE_BSR_\fIxxx\fP, PCRE_NEWLINE_\fIxxx\fP, PCRE_NO_UTF8_CHECK, and
-PCRE_NO_START_OPT options can be set at the time of matching as well as at
-compile time.
-.P
-If \fIerrptr\fP is NULL, \fBpcre_compile()\fP returns NULL immediately.
-Otherwise, if compilation of a pattern fails, \fBpcre_compile()\fP returns
-NULL, and sets the variable pointed to by \fIerrptr\fP to point to a textual
-error message. This is a static string that is part of the library. You must
-not try to free it. Normally, the offset from the start of the pattern to the
-byte that was being processed when the error was discovered is placed in the
-variable pointed to by \fIerroffset\fP, which must not be NULL (if it is, an
-immediate error is given). However, for an invalid UTF-8 string, the offset is
-that of the first byte of the failing character.
-.P
-Some errors are not detected until the whole pattern has been scanned; in these
-cases, the offset passed back is the length of the pattern. Note that the
-offset is in bytes, not characters, even in UTF-8 mode. It may sometimes point
-into the middle of a UTF-8 character.
-.P
-If \fBpcre_compile2()\fP is used instead of \fBpcre_compile()\fP, and the
-\fIerrorcodeptr\fP argument is not NULL, a non-zero error code number is
-returned via this argument in the event of an error. This is in addition to the
-textual error message. Error codes and messages are listed below.
-.P
-If the final argument, \fItableptr\fP, is NULL, PCRE uses a default set of
-character tables that are built when PCRE is compiled, using the default C
-locale. Otherwise, \fItableptr\fP must be an address that is the result of a
-call to \fBpcre_maketables()\fP. This value is stored with the compiled
-pattern, and used again by \fBpcre_exec()\fP, unless another table pointer is
-passed to it. For more discussion, see the section on locale support below.
-.P
-This code fragment shows a typical straightforward call to \fBpcre_compile()\fP:
-.sp
- pcre *re;
- const char *error;
- int erroffset;
- re = pcre_compile(
- "^A.*Z", /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-.sp
-The following names for option bits are defined in the \fBpcre.h\fP header
-file:
-.sp
- PCRE_ANCHORED
-.sp
-If this bit is set, the pattern is forced to be "anchored", that is, it is
-constrained to match only at the first matching point in the string that is
-being searched (the "subject string"). This effect can also be achieved by
-appropriate constructs in the pattern itself, which is the only way to do it in
-Perl.
-.sp
- PCRE_AUTO_CALLOUT
-.sp
-If this bit is set, \fBpcre_compile()\fP automatically inserts callout items,
-all with number 255, before each pattern item. For discussion of the callout
-facility, see the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.sp
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-.sp
-These options (which are mutually exclusive) control what the \eR escape
-sequence matches. The choice is either to match only CR, LF, or CRLF, or to
-match any Unicode newline sequence. The default is specified when PCRE is
-built. It can be overridden from within the pattern, or by setting an option
-when a compiled pattern is matched.
-.sp
- PCRE_CASELESS
-.sp
-If this bit is set, letters in the pattern match both upper and lower case
-letters. It is equivalent to Perl's /i option, and it can be changed within a
-pattern by a (?i) option setting. In UTF-8 mode, PCRE always understands the
-concept of case for characters whose values are less than 128, so caseless
-matching is always possible. For characters with higher values, the concept of
-case is supported if PCRE is compiled with Unicode property support, but not
-otherwise. If you want to use caseless matching for characters 128 and above,
-you must ensure that PCRE is compiled with Unicode property support as well as
-with UTF-8 support.
-.sp
- PCRE_DOLLAR_ENDONLY
-.sp
-If this bit is set, a dollar metacharacter in the pattern matches only at the
-end of the subject string. Without this option, a dollar also matches
-immediately before a newline at the end of the string (but not before any other
-newlines). The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set.
-There is no equivalent to this option in Perl, and no way to set it within a
-pattern.
-.sp
- PCRE_DOTALL
-.sp
-If this bit is set, a dot metacharacter in the pattern matches a character of
-any value, including one that indicates a newline. However, it only ever
-matches one character, even if newlines are coded as CRLF. Without this option,
-a dot does not match when the current position is at a newline. This option is
-equivalent to Perl's /s option, and it can be changed within a pattern by a
-(?s) option setting. A negative class such as [^a] always matches newline
-characters, independent of the setting of this option.
-.sp
- PCRE_DUPNAMES
-.sp
-If this bit is set, names used to identify capturing subpatterns need not be
-unique. This can be helpful for certain types of pattern when it is known that
-only one instance of the named subpattern can ever be matched. There are more
-details of named subpatterns below; see also the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.sp
- PCRE_EXTENDED
-.sp
-If this bit is set, whitespace data characters in the pattern are totally
-ignored except when escaped or inside a character class. Whitespace does not
-include the VT character (code 11). In addition, characters between an
-unescaped # outside a character class and the next newline, inclusive, are also
-ignored. This is equivalent to Perl's /x option, and it can be changed within a
-pattern by a (?x) option setting.
-.P
-Which characters are interpreted as newlines is controlled by the options
-passed to \fBpcre_compile()\fP or by a special sequence at the start of the
-pattern, as described in the section entitled
-.\" HTML <a href="pcrepattern.html#newlines">
-.\" </a>
-"Newline conventions"
-.\"
-in the \fBpcrepattern\fP documentation. Note that the end of this type of
-comment is a literal newline sequence in the pattern; escape sequences that
-happen to represent a newline do not count.
-.P
-This option makes it possible to include comments inside complicated patterns.
-Note, however, that this applies only to data characters. Whitespace characters
-may never appear within special character sequences in a pattern, for example
-within the sequence (?( that introduces a conditional subpattern.
-.sp
- PCRE_EXTRA
-.sp
-This option was invented in order to turn on additional functionality of PCRE
-that is incompatible with Perl, but it is currently of very little use. When
-set, any backslash in a pattern that is followed by a letter that has no
-special meaning causes an error, thus reserving these combinations for future
-expansion. By default, as in Perl, a backslash followed by a letter with no
-special meaning is treated as a literal. (Perl can, however, be persuaded to
-give an error for this, by running it with the -w option.) There are at present
-no other features controlled by this option. It can also be set by a (?X)
-option setting within a pattern.
-.sp
- PCRE_FIRSTLINE
-.sp
-If this option is set, an unanchored pattern is required to match before or at
-the first newline in the subject string, though the matched text may continue
-over the newline.
-.sp
- PCRE_JAVASCRIPT_COMPAT
-.sp
-If this option is set, PCRE's behaviour is changed in some ways so that it is
-compatible with JavaScript rather than Perl. The changes are as follows:
-.P
-(1) A lone closing square bracket in a pattern causes a compile-time error,
-because this is illegal in JavaScript (by default it is treated as a data
-character). Thus, the pattern AB]CD becomes illegal when this option is set.
-.P
-(2) At run time, a back reference to an unset subpattern group matches an empty
-string (by default this causes the current matching alternative to fail). A
-pattern such as (\e1)(a) succeeds when this option is set (assuming it can find
-an "a" in the subject), whereas it fails by default, for Perl compatibility.
-.P
-(3) \eU matches an upper case "U" character; by default \eU causes a compile
-time error (Perl uses \eU to upper case subsequent characters).
-.P
-(4) \eu matches a lower case "u" character unless it is followed by four
-hexadecimal digits, in which case the hexadecimal number defines the code point
-to match. By default, \eu causes a compile time error (Perl uses it to upper
-case the following character).
-.P
-(5) \ex matches a lower case "x" character unless it is followed by two
-hexadecimal digits, in which case the hexadecimal number defines the code point
-to match. By default, as in Perl, a hexadecimal number is always expected after
-\ex, but it may have zero, one, or two digits (so, for example, \exz matches a
-binary zero character followed by z).
-.sp
- PCRE_MULTILINE
-.sp
-By default, PCRE treats the subject string as consisting of a single line of
-characters (even if it actually contains newlines). The "start of line"
-metacharacter (^) matches only at the start of the string, while the "end of
-line" metacharacter ($) matches only at the end of the string, or before a
-terminating newline (unless PCRE_DOLLAR_ENDONLY is set). This is the same as
-Perl.
-.P
-When PCRE_MULTILINE it is set, the "start of line" and "end of line" constructs
-match immediately following or immediately before internal newlines in the
-subject string, respectively, as well as at the very start and end. This is
-equivalent to Perl's /m option, and it can be changed within a pattern by a
-(?m) option setting. If there are no newlines in a subject string, or no
-occurrences of ^ or $ in a pattern, setting PCRE_MULTILINE has no effect.
-.sp
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-.sp
-These options override the default newline definition that was chosen when PCRE
-was built. Setting the first or the second specifies that a newline is
-indicated by a single character (CR or LF, respectively). Setting
-PCRE_NEWLINE_CRLF specifies that a newline is indicated by the two-character
-CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies that any of the three
-preceding sequences should be recognized. Setting PCRE_NEWLINE_ANY specifies
-that any Unicode newline sequence should be recognized. The Unicode newline
-sequences are the three just mentioned, plus the single characters VT (vertical
-tab, U+000B), FF (formfeed, U+000C), NEL (next line, U+0085), LS (line
-separator, U+2028), and PS (paragraph separator, U+2029). For the 8-bit
-library, the last two are recognized only in UTF-8 mode.
-.P
-The newline setting in the options word uses three bits that are treated
-as a number, giving eight possibilities. Currently only six are used (default
-plus the five values above). This means that if you set more than one newline
-option, the combination may or may not be sensible. For example,
-PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to PCRE_NEWLINE_CRLF, but
-other combinations may yield unused numbers and cause an error.
-.P
-The only time that a line break in a pattern is specially recognized when
-compiling is when PCRE_EXTENDED is set. CR and LF are whitespace characters,
-and so are ignored in this mode. Also, an unescaped # outside a character class
-indicates a comment that lasts until after the next line break sequence. In
-other circumstances, line break sequences in patterns are treated as literal
-data.
-.P
-The newline option that is set at compile time becomes the default that is used
-for \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP, but it can be overridden.
-.sp
- PCRE_NO_AUTO_CAPTURE
-.sp
-If this option is set, it disables the use of numbered capturing parentheses in
-the pattern. Any opening parenthesis that is not followed by ? behaves as if it
-were followed by ?: but named parentheses can still be used for capturing (and
-they acquire numbers in the usual way). There is no equivalent of this option
-in Perl.
-.sp
- NO_START_OPTIMIZE
-.sp
-This is an option that acts at matching time; that is, it is really an option
-for \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP. If it is set at compile time,
-it is remembered with the compiled pattern and assumed at matching time. For
-details see the discussion of PCRE_NO_START_OPTIMIZE
-.\" HTML <a href="#execoptions">
-.\" </a>
-below.
-.\"
-.sp
- PCRE_UCP
-.sp
-This option changes the way PCRE processes \eB, \eb, \eD, \ed, \eS, \es, \eW,
-\ew, and some of the POSIX character classes. By default, only ASCII characters
-are recognized, but if PCRE_UCP is set, Unicode properties are used instead to
-classify characters. More details are given in the section on
-.\" HTML <a href="pcre.html#genericchartypes">
-.\" </a>
-generic character types
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page. If you set PCRE_UCP, matching one of the items it affects takes much
-longer. The option is available only if PCRE has been compiled with Unicode
-property support.
-.sp
- PCRE_UNGREEDY
-.sp
-This option inverts the "greediness" of the quantifiers so that they are not
-greedy by default, but become greedy if followed by "?". It is not compatible
-with Perl. It can also be set by a (?U) option setting within the pattern.
-.sp
- PCRE_UTF8
-.sp
-This option causes PCRE to regard both the pattern and the subject as strings
-of UTF-8 characters instead of single-byte strings. However, it is available
-only when PCRE is built to include UTF support. If not, the use of this option
-provokes an error. Details of how this option changes the behaviour of PCRE are
-given in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page.
-.sp
- PCRE_NO_UTF8_CHECK
-.sp
-When PCRE_UTF8 is set, the validity of the pattern as a UTF-8
-string is automatically checked. There is a discussion about the
-.\" HTML <a href="pcreunicode.html#utf8strings">
-.\" </a>
-validity of UTF-8 strings
-.\"
-in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page. If an invalid UTF-8 sequence is found, \fBpcre_compile()\fP returns an
-error. If you already know that your pattern is valid, and you want to skip
-this check for performance reasons, you can set the PCRE_NO_UTF8_CHECK option.
-When it is set, the effect of passing an invalid UTF-8 string as a pattern is
-undefined. It may cause your program to crash. Note that this option can also
-be passed to \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP, to suppress the
-validity checking of subject strings.
-.
-.
-.SH "COMPILATION ERROR CODES"
-.rs
-.sp
-The following table lists the error codes than may be returned by
-\fBpcre_compile2()\fP, along with the error messages that may be returned by
-both compiling functions. Note that error messages are always 8-bit ASCII
-strings, even in 16-bit mode. As PCRE has developed, some error codes have
-fallen out of use. To avoid confusion, they have not been re-used.
-.sp
- 0 no error
- 1 \e at end of pattern
- 2 \ec at end of pattern
- 3 unrecognized character follows \e
- 4 numbers out of order in {} quantifier
- 5 number too big in {} quantifier
- 6 missing terminating ] for character class
- 7 invalid escape sequence in character class
- 8 range out of order in character class
- 9 nothing to repeat
- 10 [this code is not in use]
- 11 internal error: unexpected repeat
- 12 unrecognized character after (? or (?-
- 13 POSIX named classes are supported only within a class
- 14 missing )
- 15 reference to non-existent subpattern
- 16 erroffset passed as NULL
- 17 unknown option bit(s) set
- 18 missing ) after comment
- 19 [this code is not in use]
- 20 regular expression is too large
- 21 failed to get memory
- 22 unmatched parentheses
- 23 internal error: code overflow
- 24 unrecognized character after (?<
- 25 lookbehind assertion is not fixed length
- 26 malformed number or name after (?(
- 27 conditional group contains more than two branches
- 28 assertion expected after (?(
- 29 (?R or (?[+-]digits must be followed by )
- 30 unknown POSIX class name
- 31 POSIX collating elements are not supported
- 32 this version of PCRE is compiled without UTF support
- 33 [this code is not in use]
- 34 character value in \ex{...} sequence is too large
- 35 invalid condition (?(0)
- 36 \eC not allowed in lookbehind assertion
- 37 PCRE does not support \eL, \el, \eN{name}, \eU, or \eu
- 38 number after (?C is > 255
- 39 closing ) for (?C expected
- 40 recursive call could loop indefinitely
- 41 unrecognized character after (?P
- 42 syntax error in subpattern name (missing terminator)
- 43 two named subpatterns have the same name
- 44 invalid UTF-8 string (specifically UTF-8)
- 45 support for \eP, \ep, and \eX has not been compiled
- 46 malformed \eP or \ep sequence
- 47 unknown property name after \eP or \ep
- 48 subpattern name is too long (maximum 32 characters)
- 49 too many named subpatterns (maximum 10000)
- 50 [this code is not in use]
- 51 octal value is greater than \e377 in 8-bit non-UTF-8 mode
- 52 internal error: overran compiling workspace
- 53 internal error: previously-checked referenced subpattern
- not found
- 54 DEFINE group contains more than one branch
- 55 repeating a DEFINE group is not allowed
- 56 inconsistent NEWLINE options
- 57 \eg is not followed by a braced, angle-bracketed, or quoted
- name/number or by a plain number
- 58 a numbered reference must not be zero
- 59 an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)
- 60 (*VERB) not recognized
- 61 number is too big
- 62 subpattern name expected
- 63 digit expected after (?+
- 64 ] is an invalid data character in JavaScript compatibility mode
- 65 different names for subpatterns of the same number are
- not allowed
- 66 (*MARK) must have an argument
- 67 this version of PCRE is not compiled with Unicode property
- support
- 68 \ec must be followed by an ASCII character
- 69 \ek is not followed by a braced, angle-bracketed, or quoted name
- 70 internal error: unknown opcode in find_fixedlength()
- 71 \eN is not supported in a class
- 72 too many forward references
- 73 disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
- 74 invalid UTF-16 string (specifically UTF-16)
-.sp
-The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may
-be used if the limits were changed when PCRE was built.
-.
-.
-.\" HTML <a name="studyingapattern"></a>
-.SH "STUDYING A PATTERN"
-.rs
-.sp
-.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP
-.ti +5n
-.B const char **\fIerrptr\fP);
-.PP
-If a compiled pattern is going to be used several times, it is worth spending
-more time analyzing it in order to speed up the time taken for matching. The
-function \fBpcre_study()\fP takes a pointer to a compiled pattern as its first
-argument. If studying the pattern produces additional information that will
-help speed up matching, \fBpcre_study()\fP returns a pointer to a
-\fBpcre_extra\fP block, in which the \fIstudy_data\fP field points to the
-results of the study.
-.P
-The returned value from \fBpcre_study()\fP can be passed directly to
-\fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP. However, a \fBpcre_extra\fP block
-also contains other fields that can be set by the caller before the block is
-passed; these are described
-.\" HTML <a href="#extradata">
-.\" </a>
-below
-.\"
-in the section on matching a pattern.
-.P
-If studying the pattern does not produce any useful information,
-\fBpcre_study()\fP returns NULL. In that circumstance, if the calling program
-wants to pass any of the other fields to \fBpcre_exec()\fP or
-\fBpcre_dfa_exec()\fP, it must set up its own \fBpcre_extra\fP block.
-.P
-The second argument of \fBpcre_study()\fP contains option bits. There is only
-one option: PCRE_STUDY_JIT_COMPILE. If this is set, and the just-in-time
-compiler is available, the pattern is further compiled into machine code that
-executes much faster than the \fBpcre_exec()\fP matching function. If
-the just-in-time compiler is not available, this option is ignored. All other
-bits in the \fIoptions\fP argument must be zero.
-.P
-JIT compilation is a heavyweight optimization. It can take some time for
-patterns to be analyzed, and for one-off matches and simple patterns the
-benefit of faster execution might be offset by a much slower study time.
-Not all patterns can be optimized by the JIT compiler. For those that cannot be
-handled, matching automatically falls back to the \fBpcre_exec()\fP
-interpreter. For more details, see the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation.
-.P
-The third argument for \fBpcre_study()\fP is a pointer for an error message. If
-studying succeeds (even if no data is returned), the variable it points to is
-set to NULL. Otherwise it is set to point to a textual error message. This is a
-static string that is part of the library. You must not try to free it. You
-should test the error pointer for NULL after calling \fBpcre_study()\fP, to be
-sure that it has run successfully.
-.P
-When you are finished with a pattern, you can free the memory used for the
-study data by calling \fBpcre_free_study()\fP. This function was added to the
-API for release 8.20. For earlier versions, the memory could be freed with
-\fBpcre_free()\fP, just like the pattern itself. This will still work in cases
-where PCRE_STUDY_JIT_COMPILE is not used, but it is advisable to change to the
-new function when convenient.
-.P
-This is a typical way in which \fBpcre_study\fP() is used (except that in a
-real application there should be tests for errors):
-.sp
- int rc;
- pcre *re;
- pcre_extra *sd;
- re = pcre_compile("pattern", 0, &error, &erroroffset, NULL);
- sd = pcre_study(
- re, /* result of pcre_compile() */
- 0, /* no options */
- &error); /* set to NULL or points to a message */
- rc = pcre_exec( /* see below for details of pcre_exec() options */
- re, sd, "subject", 7, 0, 0, ovector, 30);
- ...
- pcre_free_study(sd);
- pcre_free(re);
-.sp
-Studying a pattern does two things: first, a lower bound for the length of
-subject string that is needed to match the pattern is computed. This does not
-mean that there are any strings of that length that match, but it does
-guarantee that no shorter strings match. The value is used by
-\fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP to avoid wasting time by trying to
-match strings that are shorter than the lower bound. You can find out the value
-in a calling program via the \fBpcre_fullinfo()\fP function.
-.P
-Studying a pattern is also useful for non-anchored patterns that do not have a
-single fixed starting character. A bitmap of possible starting bytes is
-created. This speeds up finding a position in the subject at which to start
-matching. (In 16-bit mode, the bitmap is used for 16-bit values less than 256.)
-.P
-These two optimizations apply to both \fBpcre_exec()\fP and
-\fBpcre_dfa_exec()\fP. However, they are not used by \fBpcre_exec()\fP if
-\fBpcre_study()\fP is called with the PCRE_STUDY_JIT_COMPILE option, and
-just-in-time compiling is successful. The optimizations can be disabled by
-setting the PCRE_NO_START_OPTIMIZE option when calling \fBpcre_exec()\fP or
-\fBpcre_dfa_exec()\fP. You might want to do this if your pattern contains
-callouts or (*MARK) (which cannot be handled by the JIT compiler), and you want
-to make use of these facilities in cases where matching fails. See the
-discussion of PCRE_NO_START_OPTIMIZE
-.\" HTML <a href="#execoptions">
-.\" </a>
-below.
-.\"
-.
-.
-.\" HTML <a name="localesupport"></a>
-.SH "LOCALE SUPPORT"
-.rs
-.sp
-PCRE handles caseless matching, and determines whether characters are letters,
-digits, or whatever, by reference to a set of tables, indexed by character
-value. When running in UTF-8 mode, this applies only to characters
-with codes less than 128. By default, higher-valued codes never match escapes
-such as \ew or \ed, but they can be tested with \ep if PCRE is built with
-Unicode character property support. Alternatively, the PCRE_UCP option can be
-set at compile time; this causes \ew and friends to use Unicode property
-support instead of built-in tables. The use of locales with Unicode is
-discouraged. If you are handling characters with codes greater than 128, you
-should either use UTF-8 and Unicode, or use locales, but not try to mix the
-two.
-.P
-PCRE contains an internal set of tables that are used when the final argument
-of \fBpcre_compile()\fP is NULL. These are sufficient for many applications.
-Normally, the internal tables recognize only ASCII characters. However, when
-PCRE is built, it is possible to cause the internal tables to be rebuilt in the
-default "C" locale of the local system, which may cause them to be different.
-.P
-The internal tables can always be overridden by tables supplied by the
-application that calls PCRE. These may be created in a different locale from
-the default. As more and more applications change to using Unicode, the need
-for this locale support is expected to die away.
-.P
-External tables are built by calling the \fBpcre_maketables()\fP function,
-which has no arguments, in the relevant locale. The result can then be passed
-to \fBpcre_compile()\fP or \fBpcre_exec()\fP as often as necessary. For
-example, to build and use tables that are appropriate for the French locale
-(where accented characters with values greater than 128 are treated as letters),
-the following code could be used:
-.sp
- setlocale(LC_CTYPE, "fr_FR");
- tables = pcre_maketables();
- re = pcre_compile(..., tables);
-.sp
-The locale name "fr_FR" is used on Linux and other Unix-like systems; if you
-are using Windows, the name for the French locale is "french".
-.P
-When \fBpcre_maketables()\fP runs, the tables are built in memory that is
-obtained via \fBpcre_malloc\fP. It is the caller's responsibility to ensure
-that the memory containing the tables remains available for as long as it is
-needed.
-.P
-The pointer that is passed to \fBpcre_compile()\fP is saved with the compiled
-pattern, and the same tables are used via this pointer by \fBpcre_study()\fP
-and normally also by \fBpcre_exec()\fP. Thus, by default, for any single
-pattern, compilation, studying and matching all happen in the same locale, but
-different patterns can be compiled in different locales.
-.P
-It is possible to pass a table pointer or NULL (indicating the use of the
-internal tables) to \fBpcre_exec()\fP. Although not intended for this purpose,
-this facility could be used to match a pattern in a different locale from the
-one in which it was compiled. Passing table pointers at run time is discussed
-below in the section on matching a pattern.
-.
-.
-.\" HTML <a name="infoaboutpattern"></a>
-.SH "INFORMATION ABOUT A PATTERN"
-.rs
-.sp
-.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B int \fIwhat\fP, void *\fIwhere\fP);
-.PP
-The \fBpcre_fullinfo()\fP function returns information about a compiled
-pattern. It replaces the \fBpcre_info()\fP function, which was removed from the
-library at version 8.30, after more than 10 years of obsolescence.
-.P
-The first argument for \fBpcre_fullinfo()\fP is a pointer to the compiled
-pattern. The second argument is the result of \fBpcre_study()\fP, or NULL if
-the pattern was not studied. The third argument specifies which piece of
-information is required, and the fourth argument is a pointer to a variable
-to receive the data. The yield of the function is zero for success, or one of
-the following negative numbers:
-.sp
- PCRE_ERROR_NULL the argument \fIcode\fP was NULL
- the argument \fIwhere\fP was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADENDIANNESS the pattern was compiled with different
- endianness
- PCRE_ERROR_BADOPTION the value of \fIwhat\fP was invalid
-.sp
-The "magic number" is placed at the start of each compiled pattern as an simple
-check against passing an arbitrary memory pointer. The endianness error can
-occur if a compiled pattern is saved and reloaded on a different host. Here is
-a typical call of \fBpcre_fullinfo()\fP, to obtain the length of the compiled
-pattern:
-.sp
- int rc;
- size_t length;
- rc = pcre_fullinfo(
- re, /* result of pcre_compile() */
- sd, /* result of pcre_study(), or NULL */
- PCRE_INFO_SIZE, /* what is required */
- &length); /* where to put the data */
-.sp
-The possible values for the third argument are defined in \fBpcre.h\fP, and are
-as follows:
-.sp
- PCRE_INFO_BACKREFMAX
-.sp
-Return the number of the highest back reference in the pattern. The fourth
-argument should point to an \fBint\fP variable. Zero is returned if there are
-no back references.
-.sp
- PCRE_INFO_CAPTURECOUNT
-.sp
-Return the number of capturing subpatterns in the pattern. The fourth argument
-should point to an \fBint\fP variable.
-.sp
- PCRE_INFO_DEFAULT_TABLES
-.sp
-Return a pointer to the internal default character tables within PCRE. The
-fourth argument should point to an \fBunsigned char *\fP variable. This
-information call is provided for internal use by the \fBpcre_study()\fP
-function. External callers can cause PCRE to use its internal tables by passing
-a NULL table pointer.
-.sp
- PCRE_INFO_FIRSTBYTE
-.sp
-Return information about the first data unit of any matched string, for a
-non-anchored pattern. (The name of this option refers to the 8-bit library,
-where data units are bytes.) The fourth argument should point to an \fBint\fP
-variable.
-.P
-If there is a fixed first value, for example, the letter "c" from a pattern
-such as (cat|cow|coyote), its value is returned. In the 8-bit library, the
-value is always less than 256; in the 16-bit library the value can be up to
-0xffff.
-.P
-If there is no fixed first value, and if either
-.sp
-(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch
-starts with "^", or
-.sp
-(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set
-(if it were set, the pattern would be anchored),
-.sp
--1 is returned, indicating that the pattern matches only at the start of a
-subject string or after any newline within the string. Otherwise -2 is
-returned. For anchored patterns, -2 is returned.
-.sp
- PCRE_INFO_FIRSTTABLE
-.sp
-If the pattern was studied, and this resulted in the construction of a 256-bit
-table indicating a fixed set of values for the first data unit in any matching
-string, a pointer to the table is returned. Otherwise NULL is returned. The
-fourth argument should point to an \fBunsigned char *\fP variable.
-.sp
- PCRE_INFO_HASCRORLF
-.sp
-Return 1 if the pattern contains any explicit matches for CR or LF characters,
-otherwise 0. The fourth argument should point to an \fBint\fP variable. An
-explicit match is either a literal CR or LF character, or \er or \en.
-.sp
- PCRE_INFO_JCHANGED
-.sp
-Return 1 if the (?J) or (?-J) option setting is used in the pattern, otherwise
-0. The fourth argument should point to an \fBint\fP variable. (?J) and
-(?-J) set and unset the local PCRE_DUPNAMES option, respectively.
-.sp
- PCRE_INFO_JIT
-.sp
-Return 1 if the pattern was studied with the PCRE_STUDY_JIT_COMPILE option, and
-just-in-time compiling was successful. The fourth argument should point to an
-\fBint\fP variable. A return value of 0 means that JIT support is not available
-in this version of PCRE, or that the pattern was not studied with the
-PCRE_STUDY_JIT_COMPILE option, or that the JIT compiler could not handle this
-particular pattern. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for details of what can and cannot be handled.
-.sp
- PCRE_INFO_JITSIZE
-.sp
-If the pattern was successfully studied with the PCRE_STUDY_JIT_COMPILE option,
-return the size of the JIT compiled code, otherwise return zero. The fourth
-argument should point to a \fBsize_t\fP variable.
-.sp
- PCRE_INFO_LASTLITERAL
-.sp
-Return the value of the rightmost literal data unit that must exist in any
-matched string, other than at its start, if such a value has been recorded. The
-fourth argument should point to an \fBint\fP variable. If there is no such
-value, -1 is returned. For anchored patterns, a last literal value is recorded
-only if it follows something of variable length. For example, for the pattern
-/^a\ed+z\ed+/ the returned value is "z", but for /^a\edz\ed/ the returned value
-is -1.
-.sp
- PCRE_INFO_MINLENGTH
-.sp
-If the pattern was studied and a minimum length for matching subject strings
-was computed, its value is returned. Otherwise the returned value is -1. The
-value is a number of characters, which in UTF-8 mode may be different from the
-number of bytes. The fourth argument should point to an \fBint\fP variable. A
-non-negative value is a lower bound to the length of any matching string. There
-may not be any strings of that length that do actually match, but every string
-that does match is at least that long.
-.sp
- PCRE_INFO_NAMECOUNT
- PCRE_INFO_NAMEENTRYSIZE
- PCRE_INFO_NAMETABLE
-.sp
-PCRE supports the use of named as well as numbered capturing parentheses. The
-names are just an additional way of identifying the parentheses, which still
-acquire numbers. Several convenience functions such as
-\fBpcre_get_named_substring()\fP are provided for extracting captured
-substrings by name. It is also possible to extract the data directly, by first
-converting the name to a number in order to access the correct pointers in the
-output vector (described with \fBpcre_exec()\fP below). To do the conversion,
-you need to use the name-to-number map, which is described by these three
-values.
-.P
-The map consists of a number of fixed-size entries. PCRE_INFO_NAMECOUNT gives
-the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size of each
-entry; both of these return an \fBint\fP value. The entry size depends on the
-length of the longest name. PCRE_INFO_NAMETABLE returns a pointer to the first
-entry of the table. This is a pointer to \fBchar\fP in the 8-bit library, where
-the first two bytes of each entry are the number of the capturing parenthesis,
-most significant byte first. In the 16-bit library, the pointer points to
-16-bit data units, the first of which contains the parenthesis number. The rest
-of the entry is the corresponding name, zero terminated.
-.P
-The names are in alphabetical order. Duplicate names may appear if (?| is used
-to create multiple groups with the same number, as described in the
-.\" HTML <a href="pcrepattern.html#dupsubpatternnumber">
-.\" </a>
-section on duplicate subpattern numbers
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page. Duplicate names for subpatterns with different numbers are permitted only
-if PCRE_DUPNAMES is set. In all cases of duplicate names, they appear in the
-table in the order in which they were found in the pattern. In the absence of
-(?| this is the order of increasing number; when (?| is used this is not
-necessarily the case because later subpatterns may have lower numbers.
-.P
-As a simple example of the name/number table, consider the following pattern
-after compilation by the 8-bit library (assume PCRE_EXTENDED is set, so white
-space - including newlines - is ignored):
-.sp
-.\" JOIN
- (?<date> (?<year>(\ed\ed)?\ed\ed) -
- (?<month>\ed\ed) - (?<day>\ed\ed) )
-.sp
-There are four named subpatterns, so the table has four entries, and each entry
-in the table is eight bytes long. The table is as follows, with non-printing
-bytes shows in hexadecimal, and undefined bytes shown as ??:
-.sp
- 00 01 d a t e 00 ??
- 00 05 d a y 00 ?? ??
- 00 04 m o n t h 00
- 00 02 y e a r 00 ??
-.sp
-When writing code to extract data from named subpatterns using the
-name-to-number map, remember that the length of the entries is likely to be
-different for each compiled pattern.
-.sp
- PCRE_INFO_OKPARTIAL
-.sp
-Return 1 if the pattern can be used for partial matching with
-\fBpcre_exec()\fP, otherwise 0. The fourth argument should point to an
-\fBint\fP variable. From release 8.00, this always returns 1, because the
-restrictions that previously applied to partial matching have been lifted. The
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation gives details of partial matching.
-.sp
- PCRE_INFO_OPTIONS
-.sp
-Return a copy of the options with which the pattern was compiled. The fourth
-argument should point to an \fBunsigned long int\fP variable. These option bits
-are those specified in the call to \fBpcre_compile()\fP, modified by any
-top-level option settings at the start of the pattern itself. In other words,
-they are the options that will be in force when matching starts. For example,
-if the pattern /(?im)abc(?-i)d/ is compiled with the PCRE_EXTENDED option, the
-result is PCRE_CASELESS, PCRE_MULTILINE, and PCRE_EXTENDED.
-.P
-A pattern is automatically anchored by PCRE if all of its top-level
-alternatives begin with one of the following:
-.sp
- ^ unless PCRE_MULTILINE is set
- \eA always
- \eG always
-.\" JOIN
- .* if PCRE_DOTALL is set and there are no back
- references to the subpattern in which .* appears
-.sp
-For such patterns, the PCRE_ANCHORED bit is set in the options returned by
-\fBpcre_fullinfo()\fP.
-.sp
- PCRE_INFO_SIZE
-.sp
-Return the size of the compiled pattern in bytes (for both libraries). The
-fourth argument should point to a \fBsize_t\fP variable. This value does not
-include the size of the \fBpcre\fP structure that is returned by
-\fBpcre_compile()\fP. The value that is passed as the argument to
-\fBpcre_malloc()\fP when \fBpcre_compile()\fP is getting memory in which to
-place the compiled data is the value returned by this option plus the size of
-the \fBpcre\fP structure. Studying a compiled pattern, with or without JIT,
-does not alter the value returned by this option.
-.sp
- PCRE_INFO_STUDYSIZE
-.sp
-Return the size in bytes of the data block pointed to by the \fIstudy_data\fP
-field in a \fBpcre_extra\fP block. If \fBpcre_extra\fP is NULL, or there is no
-study data, zero is returned. The fourth argument should point to a
-\fBsize_t\fP variable. The \fIstudy_data\fP field is set by \fBpcre_study()\fP
-to record information that will speed up matching (see the section entitled
-.\" HTML <a href="#studyingapattern">
-.\" </a>
-"Studying a pattern"
-.\"
-above). The format of the \fIstudy_data\fP block is private, but its length
-is made available via this option so that it can be saved and restored (see the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation for details).
-.
-.
-.SH "REFERENCE COUNTS"
-.rs
-.sp
-.B int pcre_refcount(pcre *\fIcode\fP, int \fIadjust\fP);
-.PP
-The \fBpcre_refcount()\fP function is used to maintain a reference count in the
-data block that contains a compiled pattern. It is provided for the benefit of
-applications that operate in an object-oriented manner, where different parts
-of the application may be using the same compiled pattern, but you want to free
-the block when they are all done.
-.P
-When a pattern is compiled, the reference count field is initialized to zero.
-It is changed only by calling this function, whose action is to add the
-\fIadjust\fP value (which may be positive or negative) to it. The yield of the
-function is the new value. However, the value of the count is constrained to
-lie between 0 and 65535, inclusive. If the new value is outside these limits,
-it is forced to the appropriate limit value.
-.P
-Except when it is zero, the reference count is not correctly preserved if a
-pattern is compiled on one host and then transferred to a host whose byte-order
-is different. (This seems a highly unlikely scenario.)
-.
-.
-.SH "MATCHING A PATTERN: THE TRADITIONAL FUNCTION"
-.rs
-.sp
-.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
-.P
-The function \fBpcre_exec()\fP is called to match a subject string against a
-compiled pattern, which is passed in the \fIcode\fP argument. If the
-pattern was studied, the result of the study should be passed in the
-\fIextra\fP argument. You can call \fBpcre_exec()\fP with the same \fIcode\fP
-and \fIextra\fP arguments as many times as you like, in order to match
-different subject strings with the same pattern.
-.P
-This function is the main matching facility of the library, and it operates in
-a Perl-like manner. For specialist use there is also an alternative matching
-function, which is described
-.\" HTML <a href="#dfamatch">
-.\" </a>
-below
-.\"
-in the section about the \fBpcre_dfa_exec()\fP function.
-.P
-In most applications, the pattern will have been compiled (and optionally
-studied) in the same process that calls \fBpcre_exec()\fP. However, it is
-possible to save compiled patterns and study data, and then use them later
-in different processes, possibly even on different hosts. For a discussion
-about this, see the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation.
-.P
-Here is an example of a simple call to \fBpcre_exec()\fP:
-.sp
- int rc;
- int ovector[30];
- rc = pcre_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 30); /* number of elements (NOT size in bytes) */
-.
-.
-.\" HTML <a name="extradata"></a>
-.SS "Extra data for \fBpcre_exec()\fR"
-.rs
-.sp
-If the \fIextra\fP argument is not NULL, it must point to a \fBpcre_extra\fP
-data block. The \fBpcre_study()\fP function returns such a block (when it
-doesn't return NULL), but you can also create one for yourself, and pass
-additional information in it. The \fBpcre_extra\fP block contains the following
-fields (not necessarily in this order):
-.sp
- unsigned long int \fIflags\fP;
- void *\fIstudy_data\fP;
- void *\fIexecutable_jit\fP;
- unsigned long int \fImatch_limit\fP;
- unsigned long int \fImatch_limit_recursion\fP;
- void *\fIcallout_data\fP;
- const unsigned char *\fItables\fP;
- unsigned char **\fImark\fP;
-.sp
-In the 16-bit version of this structure, the \fImark\fP field has type
-"PCRE_UCHAR16 **".
-.P
-The \fIflags\fP field is a bitmap that specifies which of the other fields
-are set. The flag bits are:
-.sp
- PCRE_EXTRA_STUDY_DATA
- PCRE_EXTRA_EXECUTABLE_JIT
- PCRE_EXTRA_MATCH_LIMIT
- PCRE_EXTRA_MATCH_LIMIT_RECURSION
- PCRE_EXTRA_CALLOUT_DATA
- PCRE_EXTRA_TABLES
- PCRE_EXTRA_MARK
-.sp
-Other flag bits should be set to zero. The \fIstudy_data\fP field and sometimes
-the \fIexecutable_jit\fP field are set in the \fBpcre_extra\fP block that is
-returned by \fBpcre_study()\fP, together with the appropriate flag bits. You
-should not set these yourself, but you may add to the block by setting the
-other fields and their corresponding flag bits.
-.P
-The \fImatch_limit\fP field provides a means of preventing PCRE from using up a
-vast amount of resources when running patterns that are not going to match,
-but which have a very large number of possibilities in their search trees. The
-classic example is a pattern that uses nested unlimited repeats.
-.P
-Internally, \fBpcre_exec()\fP uses a function called \fBmatch()\fP, which it
-calls repeatedly (sometimes recursively). The limit set by \fImatch_limit\fP is
-imposed on the number of times this function is called during a match, which
-has the effect of limiting the amount of backtracking that can take place. For
-patterns that are not anchored, the count restarts from zero for each position
-in the subject string.
-.P
-When \fBpcre_exec()\fP is called with a pattern that was successfully studied
-with the PCRE_STUDY_JIT_COMPILE option, the way that the matching is executed
-is entirely different. However, there is still the possibility of runaway
-matching that goes on for a very long time, and so the \fImatch_limit\fP value
-is also used in this case (but in a different way) to limit how long the
-matching can continue.
-.P
-The default value for the limit can be set when PCRE is built; the default
-default is 10 million, which handles all but the most extreme cases. You can
-override the default by suppling \fBpcre_exec()\fP with a \fBpcre_extra\fP
-block in which \fImatch_limit\fP is set, and PCRE_EXTRA_MATCH_LIMIT is set in
-the \fIflags\fP field. If the limit is exceeded, \fBpcre_exec()\fP returns
-PCRE_ERROR_MATCHLIMIT.
-.P
-The \fImatch_limit_recursion\fP field is similar to \fImatch_limit\fP, but
-instead of limiting the total number of times that \fBmatch()\fP is called, it
-limits the depth of recursion. The recursion depth is a smaller number than the
-total number of calls, because not all calls to \fBmatch()\fP are recursive.
-This limit is of use only if it is set smaller than \fImatch_limit\fP.
-.P
-Limiting the recursion depth limits the amount of machine stack that can be
-used, or, when PCRE has been compiled to use memory on the heap instead of the
-stack, the amount of heap memory that can be used. This limit is not relevant,
-and is ignored, if the pattern was successfully studied with
-PCRE_STUDY_JIT_COMPILE.
-.P
-The default value for \fImatch_limit_recursion\fP can be set when PCRE is
-built; the default default is the same value as the default for
-\fImatch_limit\fP. You can override the default by suppling \fBpcre_exec()\fP
-with a \fBpcre_extra\fP block in which \fImatch_limit_recursion\fP is set, and
-PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the \fIflags\fP field. If the limit
-is exceeded, \fBpcre_exec()\fP returns PCRE_ERROR_RECURSIONLIMIT.
-.P
-The \fIcallout_data\fP field is used in conjunction with the "callout" feature,
-and is described in the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.P
-The \fItables\fP field is used to pass a character tables pointer to
-\fBpcre_exec()\fP; this overrides the value that is stored with the compiled
-pattern. A non-NULL value is stored with the compiled pattern only if custom
-tables were supplied to \fBpcre_compile()\fP via its \fItableptr\fP argument.
-If NULL is passed to \fBpcre_exec()\fP using this mechanism, it forces PCRE's
-internal tables to be used. This facility is helpful when re-using patterns
-that have been saved after compiling with an external set of tables, because
-the external tables might be at a different address when \fBpcre_exec()\fP is
-called. See the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation for a discussion of saving compiled patterns for later use.
-.P
-If PCRE_EXTRA_MARK is set in the \fIflags\fP field, the \fImark\fP field must
-be set to point to a suitable variable. If the pattern contains any
-backtracking control verbs such as (*MARK:NAME), and the execution ends up with
-a name to pass back, a pointer to the name string (zero terminated) is placed
-in the variable pointed to by the \fImark\fP field. The names are within the
-compiled pattern; if you wish to retain such a name you must copy it before
-freeing the memory of a compiled pattern. If there is no name to pass back, the
-variable pointed to by the \fImark\fP field is set to NULL. For details of the
-backtracking control verbs, see the section entitled
-.\" HTML <a href="pcrepattern#backtrackcontrol">
-.\" </a>
-"Backtracking control"
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.
-.
-.\" HTML <a name="execoptions"></a>
-.SS "Option bits for \fBpcre_exec()\fP"
-.rs
-.sp
-The unused bits of the \fIoptions\fP argument for \fBpcre_exec()\fP must be
-zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_\fIxxx\fP,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
-PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_SOFT, and
-PCRE_PARTIAL_HARD.
-.P
-If the pattern was successfully studied with the PCRE_STUDY_JIT_COMPILE option,
-the only supported options for JIT execution are PCRE_NO_UTF8_CHECK,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and PCRE_NOTEMPTY_ATSTART. Note in
-particular that partial matching is not supported. If an unsupported option is
-used, JIT execution is disabled and the normal interpretive code in
-\fBpcre_exec()\fP is run.
-.sp
- PCRE_ANCHORED
-.sp
-The PCRE_ANCHORED option limits \fBpcre_exec()\fP to matching at the first
-matching position. If a pattern was compiled with PCRE_ANCHORED, or turned out
-to be anchored by virtue of its contents, it cannot be made unachored at
-matching time.
-.sp
- PCRE_BSR_ANYCRLF
- PCRE_BSR_UNICODE
-.sp
-These options (which are mutually exclusive) control what the \eR escape
-sequence matches. The choice is either to match only CR, LF, or CRLF, or to
-match any Unicode newline sequence. These options override the choice that was
-made or defaulted when the pattern was compiled.
-.sp
- PCRE_NEWLINE_CR
- PCRE_NEWLINE_LF
- PCRE_NEWLINE_CRLF
- PCRE_NEWLINE_ANYCRLF
- PCRE_NEWLINE_ANY
-.sp
-These options override the newline definition that was chosen or defaulted when
-the pattern was compiled. For details, see the description of
-\fBpcre_compile()\fP above. During matching, the newline choice affects the
-behaviour of the dot, circumflex, and dollar metacharacters. It may also alter
-the way the match position is advanced after a match failure for an unanchored
-pattern.
-.P
-When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is set, and a
-match attempt for an unanchored pattern fails when the current position is at a
-CRLF sequence, and the pattern contains no explicit matches for CR or LF
-characters, the match position is advanced by two characters instead of one, in
-other words, to after the CRLF.
-.P
-The above rule is a compromise that makes the most common cases work as
-expected. For example, if the pattern is .+A (and the PCRE_DOTALL option is not
-set), it does not match the string "\er\enA" because, after failing at the
-start, it skips both the CR and the LF before retrying. However, the pattern
-[\er\en]A does match that string, because it contains an explicit CR or LF
-reference, and so advances only by one character after the first failure.
-.P
-An explicit match for CR of LF is either a literal appearance of one of those
-characters, or one of the \er or \en escape sequences. Implicit matches such as
-[^X] do not count, nor does \es (which includes CR and LF in the characters
-that it matches).
-.P
-Notwithstanding the above, anomalous effects may still occur when CRLF is a
-valid newline sequence and explicit \er or \en escapes appear in the pattern.
-.sp
- PCRE_NOTBOL
-.sp
-This option specifies that first character of the subject string is not the
-beginning of a line, so the circumflex metacharacter should not match before
-it. Setting this without PCRE_MULTILINE (at compile time) causes circumflex
-never to match. This option affects only the behaviour of the circumflex
-metacharacter. It does not affect \eA.
-.sp
- PCRE_NOTEOL
-.sp
-This option specifies that the end of the subject string is not the end of a
-line, so the dollar metacharacter should not match it nor (except in multiline
-mode) a newline immediately before it. Setting this without PCRE_MULTILINE (at
-compile time) causes dollar never to match. This option affects only the
-behaviour of the dollar metacharacter. It does not affect \eZ or \ez.
-.sp
- PCRE_NOTEMPTY
-.sp
-An empty string is not considered to be a valid match if this option is set. If
-there are alternatives in the pattern, they are tried. If all the alternatives
-match the empty string, the entire match fails. For example, if the pattern
-.sp
- a?b?
-.sp
-is applied to a string not beginning with "a" or "b", it matches an empty
-string at the start of the subject. With PCRE_NOTEMPTY set, this match is not
-valid, so PCRE searches further into the string for occurrences of "a" or "b".
-.sp
- PCRE_NOTEMPTY_ATSTART
-.sp
-This is like PCRE_NOTEMPTY, except that an empty string match that is not at
-the start of the subject is permitted. If the pattern is anchored, such a match
-can occur only if the pattern contains \eK.
-.P
-Perl has no direct equivalent of PCRE_NOTEMPTY or PCRE_NOTEMPTY_ATSTART, but it
-does make a special case of a pattern match of the empty string within its
-\fBsplit()\fP function, and when using the /g modifier. It is possible to
-emulate Perl's behaviour after matching a null string by first trying the match
-again at the same offset with PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED, and then
-if that fails, by advancing the starting offset (see below) and trying an
-ordinary match again. There is some code that demonstrates how to do this in
-the
-.\" HREF
-\fBpcredemo\fP
-.\"
-sample program. In the most general case, you have to check to see if the
-newline convention recognizes CRLF as a newline, and if so, and the current
-character is CR followed by LF, advance the starting offset by two characters
-instead of one.
-.sp
- PCRE_NO_START_OPTIMIZE
-.sp
-There are a number of optimizations that \fBpcre_exec()\fP uses at the start of
-a match, in order to speed up the process. For example, if it is known that an
-unanchored match must start with a specific character, it searches the subject
-for that character, and fails immediately if it cannot find it, without
-actually running the main matching function. This means that a special item
-such as (*COMMIT) at the start of a pattern is not considered until after a
-suitable starting point for the match has been found. When callouts or (*MARK)
-items are in use, these "start-up" optimizations can cause them to be skipped
-if the pattern is never actually used. The start-up optimizations are in effect
-a pre-scan of the subject that takes place before the pattern is run.
-.P
-The PCRE_NO_START_OPTIMIZE option disables the start-up optimizations, possibly
-causing performance to suffer, but ensuring that in cases where the result is
-"no match", the callouts do occur, and that items such as (*COMMIT) and (*MARK)
-are considered at every possible starting position in the subject string. If
-PCRE_NO_START_OPTIMIZE is set at compile time, it cannot be unset at matching
-time.
-.P
-Setting PCRE_NO_START_OPTIMIZE can change the outcome of a matching operation.
-Consider the pattern
-.sp
- (*COMMIT)ABC
-.sp
-When this is compiled, PCRE records the fact that a match must start with the
-character "A". Suppose the subject string is "DEFABC". The start-up
-optimization scans along the subject, finds "A" and runs the first match
-attempt from there. The (*COMMIT) item means that the pattern must match the
-current starting position, which in this case, it does. However, if the same
-match is run with PCRE_NO_START_OPTIMIZE set, the initial scan along the
-subject string does not happen. The first match attempt is run starting from
-"D" and when this fails, (*COMMIT) prevents any further matches being tried, so
-the overall result is "no match". If the pattern is studied, more start-up
-optimizations may be used. For example, a minimum length for the subject may be
-recorded. Consider the pattern
-.sp
- (*MARK:A)(X|Y)
-.sp
-The minimum length for a match is one character. If the subject is "ABC", there
-will be attempts to match "ABC", "BC", "C", and then finally an empty string.
-If the pattern is studied, the final attempt does not take place, because PCRE
-knows that the subject is too short, and so the (*MARK) is never encountered.
-In this case, studying the pattern does not affect the overall match result,
-which is still "no match", but it does affect the auxiliary information that is
-returned.
-.sp
- PCRE_NO_UTF8_CHECK
-.sp
-When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8
-string is automatically checked when \fBpcre_exec()\fP is subsequently called.
-The value of \fIstartoffset\fP is also checked to ensure that it points to the
-start of a UTF-8 character. There is a discussion about the validity of UTF-8
-strings in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page. If an invalid sequence of bytes is found, \fBpcre_exec()\fP returns the
-error PCRE_ERROR_BADUTF8 or, if PCRE_PARTIAL_HARD is set and the problem is a
-truncated character at the end of the subject, PCRE_ERROR_SHORTUTF8. In both
-cases, information about the precise nature of the error may also be returned
-(see the descriptions of these errors in the section entitled \fIError return
-values from\fP \fBpcre_exec()\fP
-.\" HTML <a href="#errorlist">
-.\" </a>
-below).
-.\"
-If \fIstartoffset\fP contains a value that does not point to the start of a
-UTF-8 character (or to the end of the subject), PCRE_ERROR_BADUTF8_OFFSET is
-returned.
-.P
-If you already know that your subject is valid, and you want to skip these
-checks for performance reasons, you can set the PCRE_NO_UTF8_CHECK option when
-calling \fBpcre_exec()\fP. You might want to do this for the second and
-subsequent calls to \fBpcre_exec()\fP if you are making repeated calls to find
-all the matches in a single subject string. However, you should be sure that
-the value of \fIstartoffset\fP points to the start of a character (or the end
-of the subject). When PCRE_NO_UTF8_CHECK is set, the effect of passing an
-invalid string as a subject or an invalid value of \fIstartoffset\fP is
-undefined. Your program may crash.
-.sp
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-.sp
-These options turn on the partial matching feature. For backwards
-compatibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial match
-occurs if the end of the subject string is reached successfully, but there are
-not enough subject characters to complete the match. If this happens when
-PCRE_PARTIAL_SOFT (but not PCRE_PARTIAL_HARD) is set, matching continues by
-testing any remaining alternatives. Only if no complete match can be found is
-PCRE_ERROR_PARTIAL returned instead of PCRE_ERROR_NOMATCH. In other words,
-PCRE_PARTIAL_SOFT says that the caller is prepared to handle a partial match,
-but only if no complete match can be found.
-.P
-If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this case, if a
-partial match is found, \fBpcre_exec()\fP immediately returns
-PCRE_ERROR_PARTIAL, without considering any other alternatives. In other words,
-when PCRE_PARTIAL_HARD is set, a partial match is considered to be more
-important that an alternative complete match.
-.P
-In both cases, the portion of the string that was inspected when the partial
-match was found is set as the first matching string. There is a more detailed
-discussion of partial and multi-segment matching, with examples, in the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation.
-.
-.
-.SS "The string to be matched by \fBpcre_exec()\fP"
-.rs
-.sp
-The subject string is passed to \fBpcre_exec()\fP as a pointer in
-\fIsubject\fP, a length in bytes in \fIlength\fP, and a starting byte offset
-in \fIstartoffset\fP. If this is negative or greater than the length of the
-subject, \fBpcre_exec()\fP returns PCRE_ERROR_BADOFFSET. When the starting
-offset is zero, the search for a match starts at the beginning of the subject,
-and this is by far the most common case. In UTF-8 mode, the byte offset must
-point to the start of a UTF-8 character (or the end of the subject). Unlike the
-pattern string, the subject may contain binary zero bytes.
-.P
-A non-zero starting offset is useful when searching for another match in the
-same subject by calling \fBpcre_exec()\fP again after a previous success.
-Setting \fIstartoffset\fP differs from just passing over a shortened string and
-setting PCRE_NOTBOL in the case of a pattern that begins with any kind of
-lookbehind. For example, consider the pattern
-.sp
- \eBiss\eB
-.sp
-which finds occurrences of "iss" in the middle of words. (\eB matches only if
-the current position in the subject is not a word boundary.) When applied to
-the string "Mississipi" the first call to \fBpcre_exec()\fP finds the first
-occurrence. If \fBpcre_exec()\fP is called again with just the remainder of the
-subject, namely "issipi", it does not match, because \eB is always false at the
-start of the subject, which is deemed to be a word boundary. However, if
-\fBpcre_exec()\fP is passed the entire string again, but with \fIstartoffset\fP
-set to 4, it finds the second occurrence of "iss" because it is able to look
-behind the starting point to discover that it is preceded by a letter.
-.P
-Finding all the matches in a subject is tricky when the pattern can match an
-empty string. It is possible to emulate Perl's /g behaviour by first trying the
-match again at the same offset, with the PCRE_NOTEMPTY_ATSTART and
-PCRE_ANCHORED options, and then if that fails, advancing the starting offset
-and trying an ordinary match again. There is some code that demonstrates how to
-do this in the
-.\" HREF
-\fBpcredemo\fP
-.\"
-sample program. In the most general case, you have to check to see if the
-newline convention recognizes CRLF as a newline, and if so, and the current
-character is CR followed by LF, advance the starting offset by two characters
-instead of one.
-.P
-If a non-zero starting offset is passed when the pattern is anchored, one
-attempt to match at the given offset is made. This can only succeed if the
-pattern does not require the match to be at the start of the subject.
-.
-.
-.SS "How \fBpcre_exec()\fP returns captured substrings"
-.rs
-.sp
-In general, a pattern matches a certain portion of the subject, and in
-addition, further substrings from the subject may be picked out by parts of the
-pattern. Following the usage in Jeffrey Friedl's book, this is called
-"capturing" in what follows, and the phrase "capturing subpattern" is used for
-a fragment of a pattern that picks out a substring. PCRE supports several other
-kinds of parenthesized subpattern that do not cause substrings to be captured.
-.P
-Captured substrings are returned to the caller via a vector of integers whose
-address is passed in \fIovector\fP. The number of elements in the vector is
-passed in \fIovecsize\fP, which must be a non-negative number. \fBNote\fP: this
-argument is NOT the size of \fIovector\fP in bytes.
-.P
-The first two-thirds of the vector is used to pass back captured substrings,
-each substring using a pair of integers. The remaining third of the vector is
-used as workspace by \fBpcre_exec()\fP while matching capturing subpatterns,
-and is not available for passing back information. The number passed in
-\fIovecsize\fP should always be a multiple of three. If it is not, it is
-rounded down.
-.P
-When a match is successful, information about captured substrings is returned
-in pairs of integers, starting at the beginning of \fIovector\fP, and
-continuing up to two-thirds of its length at the most. The first element of
-each pair is set to the byte offset of the first character in a substring, and
-the second is set to the byte offset of the first character after the end of a
-substring. \fBNote\fP: these values are always byte offsets, even in UTF-8
-mode. They are not character counts.
-.P
-The first pair of integers, \fIovector[0]\fP and \fIovector[1]\fP, identify the
-portion of the subject string matched by the entire pattern. The next pair is
-used for the first capturing subpattern, and so on. The value returned by
-\fBpcre_exec()\fP is one more than the highest numbered pair that has been set.
-For example, if two substrings have been captured, the returned value is 3. If
-there are no capturing subpatterns, the return value from a successful match is
-1, indicating that just the first pair of offsets has been set.
-.P
-If a capturing subpattern is matched repeatedly, it is the last portion of the
-string that it matched that is returned.
-.P
-If the vector is too small to hold all the captured substring offsets, it is
-used as far as possible (up to two-thirds of its length), and the function
-returns a value of zero. If neither the actual string matched not any captured
-substrings are of interest, \fBpcre_exec()\fP may be called with \fIovector\fP
-passed as NULL and \fIovecsize\fP as zero. However, if the pattern contains
-back references and the \fIovector\fP is not big enough to remember the related
-substrings, PCRE has to get additional memory for use during matching. Thus it
-is usually advisable to supply an \fIovector\fP of reasonable size.
-.P
-There are some cases where zero is returned (indicating vector overflow) when
-in fact the vector is exactly the right size for the final match. For example,
-consider the pattern
-.sp
- (a)(?:(b)c|bd)
-.sp
-If a vector of 6 elements (allowing for only 1 captured substring) is given
-with subject string "abd", \fBpcre_exec()\fP will try to set the second
-captured string, thereby recording a vector overflow, before failing to match
-"c" and backing up to try the second alternative. The zero return, however,
-does correctly indicate that the maximum number of slots (namely 2) have been
-filled. In similar cases where there is temporary overflow, but the final
-number of used slots is actually less than the maximum, a non-zero value is
-returned.
-.P
-The \fBpcre_fullinfo()\fP function can be used to find out how many capturing
-subpatterns there are in a compiled pattern. The smallest size for
-\fIovector\fP that will allow for \fIn\fP captured substrings, in addition to
-the offsets of the substring matched by the whole pattern, is (\fIn\fP+1)*3.
-.P
-It is possible for capturing subpattern number \fIn+1\fP to match some part of
-the subject when subpattern \fIn\fP has not been used at all. For example, if
-the string "abc" is matched against the pattern (a|(z))(bc) the return from the
-function is 4, and subpatterns 1 and 3 are matched, but 2 is not. When this
-happens, both values in the offset pairs corresponding to unused subpatterns
-are set to -1.
-.P
-Offset values that correspond to unused subpatterns at the end of the
-expression are also set to -1. For example, if the string "abc" is matched
-against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not matched. The
-return from the function is 2, because the highest used capturing subpattern
-number is 1, and the offsets for for the second and third capturing subpatterns
-(assuming the vector is large enough, of course) are set to -1.
-.P
-\fBNote\fP: Elements in the first two-thirds of \fIovector\fP that do not
-correspond to capturing parentheses in the pattern are never changed. That is,
-if a pattern contains \fIn\fP capturing parentheses, no more than
-\fIovector[0]\fP to \fIovector[2n+1]\fP are set by \fBpcre_exec()\fP. The other
-elements (in the first two-thirds) retain whatever values they previously had.
-.P
-Some convenience functions are provided for extracting the captured substrings
-as separate strings. These are described below.
-.
-.
-.\" HTML <a name="errorlist"></a>
-.SS "Error return values from \fBpcre_exec()\fP"
-.rs
-.sp
-If \fBpcre_exec()\fP fails, it returns a negative number. The following are
-defined in the header file:
-.sp
- PCRE_ERROR_NOMATCH (-1)
-.sp
-The subject string did not match the pattern.
-.sp
- PCRE_ERROR_NULL (-2)
-.sp
-Either \fIcode\fP or \fIsubject\fP was passed as NULL, or \fIovector\fP was
-NULL and \fIovecsize\fP was not zero.
-.sp
- PCRE_ERROR_BADOPTION (-3)
-.sp
-An unrecognized bit was set in the \fIoptions\fP argument.
-.sp
- PCRE_ERROR_BADMAGIC (-4)
-.sp
-PCRE stores a 4-byte "magic number" at the start of the compiled code, to catch
-the case when it is passed a junk pointer and to detect when a pattern that was
-compiled in an environment of one endianness is run in an environment with the
-other endianness. This is the error that PCRE gives when the magic number is
-not present.
-.sp
- PCRE_ERROR_UNKNOWN_OPCODE (-5)
-.sp
-While running the pattern match, an unknown item was encountered in the
-compiled pattern. This error could be caused by a bug in PCRE or by overwriting
-of the compiled pattern.
-.sp
- PCRE_ERROR_NOMEMORY (-6)
-.sp
-If a pattern contains back references, but the \fIovector\fP that is passed to
-\fBpcre_exec()\fP is not big enough to remember the referenced substrings, PCRE
-gets a block of memory at the start of matching to use for this purpose. If the
-call via \fBpcre_malloc()\fP fails, this error is given. The memory is
-automatically freed at the end of matching.
-.P
-This error is also given if \fBpcre_stack_malloc()\fP fails in
-\fBpcre_exec()\fP. This can happen only when PCRE has been compiled with
-\fB--disable-stack-for-recursion\fP.
-.sp
- PCRE_ERROR_NOSUBSTRING (-7)
-.sp
-This error is used by the \fBpcre_copy_substring()\fP,
-\fBpcre_get_substring()\fP, and \fBpcre_get_substring_list()\fP functions (see
-below). It is never returned by \fBpcre_exec()\fP.
-.sp
- PCRE_ERROR_MATCHLIMIT (-8)
-.sp
-The backtracking limit, as specified by the \fImatch_limit\fP field in a
-\fBpcre_extra\fP structure (or defaulted) was reached. See the description
-above.
-.sp
- PCRE_ERROR_CALLOUT (-9)
-.sp
-This error is never generated by \fBpcre_exec()\fP itself. It is provided for
-use by callout functions that want to yield a distinctive error code. See the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation for details.
-.sp
- PCRE_ERROR_BADUTF8 (-10)
-.sp
-A string that contains an invalid UTF-8 byte sequence was passed as a subject,
-and the PCRE_NO_UTF8_CHECK option was not set. If the size of the output vector
-(\fIovecsize\fP) is at least 2, the byte offset to the start of the the invalid
-UTF-8 character is placed in the first element, and a reason code is placed in
-the second element. The reason codes are listed in the
-.\" HTML <a href="#badutf8reasons">
-.\" </a>
-following section.
-.\"
-For backward compatibility, if PCRE_PARTIAL_HARD is set and the problem is a
-truncated UTF-8 character at the end of the subject (reason codes 1 to 5),
-PCRE_ERROR_SHORTUTF8 is returned instead of PCRE_ERROR_BADUTF8.
-.sp
- PCRE_ERROR_BADUTF8_OFFSET (-11)
-.sp
-The UTF-8 byte sequence that was passed as a subject was checked and found to
-be valid (the PCRE_NO_UTF8_CHECK option was not set), but the value of
-\fIstartoffset\fP did not point to the beginning of a UTF-8 character or the
-end of the subject.
-.sp
- PCRE_ERROR_PARTIAL (-12)
-.sp
-The subject string did not match, but it did match partially. See the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation for details of partial matching.
-.sp
- PCRE_ERROR_BADPARTIAL (-13)
-.sp
-This code is no longer in use. It was formerly returned when the PCRE_PARTIAL
-option was used with a compiled pattern containing items that were not
-supported for partial matching. From release 8.00 onwards, there are no
-restrictions on partial matching.
-.sp
- PCRE_ERROR_INTERNAL (-14)
-.sp
-An unexpected internal error has occurred. This error could be caused by a bug
-in PCRE or by overwriting of the compiled pattern.
-.sp
- PCRE_ERROR_BADCOUNT (-15)
-.sp
-This error is given if the value of the \fIovecsize\fP argument is negative.
-.sp
- PCRE_ERROR_RECURSIONLIMIT (-21)
-.sp
-The internal recursion limit, as specified by the \fImatch_limit_recursion\fP
-field in a \fBpcre_extra\fP structure (or defaulted) was reached. See the
-description above.
-.sp
- PCRE_ERROR_BADNEWLINE (-23)
-.sp
-An invalid combination of PCRE_NEWLINE_\fIxxx\fP options was given.
-.sp
- PCRE_ERROR_BADOFFSET (-24)
-.sp
-The value of \fIstartoffset\fP was negative or greater than the length of the
-subject, that is, the value in \fIlength\fP.
-.sp
- PCRE_ERROR_SHORTUTF8 (-25)
-.sp
-This error is returned instead of PCRE_ERROR_BADUTF8 when the subject string
-ends with a truncated UTF-8 character and the PCRE_PARTIAL_HARD option is set.
-Information about the failure is returned as for PCRE_ERROR_BADUTF8. It is in
-fact sufficient to detect this case, but this special error code for
-PCRE_PARTIAL_HARD precedes the implementation of returned information; it is
-retained for backwards compatibility.
-.sp
- PCRE_ERROR_RECURSELOOP (-26)
-.sp
-This error is returned when \fBpcre_exec()\fP detects a recursion loop within
-the pattern. Specifically, it means that either the whole pattern or a
-subpattern has been called recursively for the second time at the same position
-in the subject string. Some simple patterns that might do this are detected and
-faulted at compile time, but more complicated cases, in particular mutual
-recursions between two different subpatterns, cannot be detected until run
-time.
-.sp
- PCRE_ERROR_JIT_STACKLIMIT (-27)
-.sp
-This error is returned when a pattern that was successfully studied using the
-PCRE_STUDY_JIT_COMPILE option is being matched, but the memory available for
-the just-in-time processing stack is not large enough. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for more details.
-.sp
- PCRE_ERROR_BADMODE (-28)
-.sp
-This error is given if a pattern that was compiled by the 8-bit library is
-passed to a 16-bit library function, or vice versa.
-.sp
- PCRE_ERROR_BADENDIANNESS (-29)
-.sp
-This error is given if a pattern that was compiled and saved is reloaded on a
-host with different endianness. The utility function
-\fBpcre_pattern_to_host_byte_order()\fP can be used to convert such a pattern
-so that it runs on the new host.
-.P
-Error numbers -16 to -20 and -22 are not used by \fBpcre_exec()\fP.
-.
-.
-.\" HTML <a name="badutf8reasons"></a>
-.SS "Reason codes for invalid UTF-8 strings"
-.rs
-.sp
-This section applies only to the 8-bit library. The corresponding information
-for the 16-bit library is given in the
-.\" HREF
-\fBpcre16\fP
-.\"
-page.
-.P
-When \fBpcre_exec()\fP returns either PCRE_ERROR_BADUTF8 or
-PCRE_ERROR_SHORTUTF8, and the size of the output vector (\fIovecsize\fP) is at
-least 2, the offset of the start of the invalid UTF-8 character is placed in
-the first output vector element (\fIovector[0]\fP) and a reason code is placed
-in the second element (\fIovector[1]\fP). The reason codes are given names in
-the \fBpcre.h\fP header file:
-.sp
- PCRE_UTF8_ERR1
- PCRE_UTF8_ERR2
- PCRE_UTF8_ERR3
- PCRE_UTF8_ERR4
- PCRE_UTF8_ERR5
-.sp
-The string ends with a truncated UTF-8 character; the code specifies how many
-bytes are missing (1 to 5). Although RFC 3629 restricts UTF-8 characters to be
-no longer than 4 bytes, the encoding scheme (originally defined by RFC 2279)
-allows for up to 6 bytes, and this is checked first; hence the possibility of
-4 or 5 missing bytes.
-.sp
- PCRE_UTF8_ERR6
- PCRE_UTF8_ERR7
- PCRE_UTF8_ERR8
- PCRE_UTF8_ERR9
- PCRE_UTF8_ERR10
-.sp
-The two most significant bits of the 2nd, 3rd, 4th, 5th, or 6th byte of the
-character do not have the binary value 0b10 (that is, either the most
-significant bit is 0, or the next bit is 1).
-.sp
- PCRE_UTF8_ERR11
- PCRE_UTF8_ERR12
-.sp
-A character that is valid by the RFC 2279 rules is either 5 or 6 bytes long;
-these code points are excluded by RFC 3629.
-.sp
- PCRE_UTF8_ERR13
-.sp
-A 4-byte character has a value greater than 0x10fff; these code points are
-excluded by RFC 3629.
-.sp
- PCRE_UTF8_ERR14
-.sp
-A 3-byte character has a value in the range 0xd800 to 0xdfff; this range of
-code points are reserved by RFC 3629 for use with UTF-16, and so are excluded
-from UTF-8.
-.sp
- PCRE_UTF8_ERR15
- PCRE_UTF8_ERR16
- PCRE_UTF8_ERR17
- PCRE_UTF8_ERR18
- PCRE_UTF8_ERR19
-.sp
-A 2-, 3-, 4-, 5-, or 6-byte character is "overlong", that is, it codes for a
-value that can be represented by fewer bytes, which is invalid. For example,
-the two bytes 0xc0, 0xae give the value 0x2e, whose correct coding uses just
-one byte.
-.sp
- PCRE_UTF8_ERR20
-.sp
-The two most significant bits of the first byte of a character have the binary
-value 0b10 (that is, the most significant bit is 1 and the second is 0). Such a
-byte can only validly occur as the second or subsequent byte of a multi-byte
-character.
-.sp
- PCRE_UTF8_ERR21
-.sp
-The first byte of a character has the value 0xfe or 0xff. These values can
-never occur in a valid UTF-8 string.
-.
-.
-.SH "EXTRACTING CAPTURED SUBSTRINGS BY NUMBER"
-.rs
-.sp
-.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,
-.ti +5n
-.B int \fIbuffersize\fP);
-.PP
-.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
-.PP
-.B int pcre_get_substring_list(const char *\fIsubject\fP,
-.ti +5n
-.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);"
-.PP
-Captured substrings can be accessed directly by using the offsets returned by
-\fBpcre_exec()\fP in \fIovector\fP. For convenience, the functions
-\fBpcre_copy_substring()\fP, \fBpcre_get_substring()\fP, and
-\fBpcre_get_substring_list()\fP are provided for extracting captured substrings
-as new, separate, zero-terminated strings. These functions identify substrings
-by number. The next section describes functions for extracting named
-substrings.
-.P
-A substring that contains a binary zero is correctly extracted and has a
-further zero added on the end, but the result is not, of course, a C string.
-However, you can process such a string by referring to the length that is
-returned by \fBpcre_copy_substring()\fP and \fBpcre_get_substring()\fP.
-Unfortunately, the interface to \fBpcre_get_substring_list()\fP is not adequate
-for handling strings containing binary zeros, because the end of the final
-string is not independently indicated.
-.P
-The first three arguments are the same for all three of these functions:
-\fIsubject\fP is the subject string that has just been successfully matched,
-\fIovector\fP is a pointer to the vector of integer offsets that was passed to
-\fBpcre_exec()\fP, and \fIstringcount\fP is the number of substrings that were
-captured by the match, including the substring that matched the entire regular
-expression. This is the value returned by \fBpcre_exec()\fP if it is greater
-than zero. If \fBpcre_exec()\fP returned zero, indicating that it ran out of
-space in \fIovector\fP, the value passed as \fIstringcount\fP should be the
-number of elements in the vector divided by three.
-.P
-The functions \fBpcre_copy_substring()\fP and \fBpcre_get_substring()\fP
-extract a single substring, whose number is given as \fIstringnumber\fP. A
-value of zero extracts the substring that matched the entire pattern, whereas
-higher values extract the captured substrings. For \fBpcre_copy_substring()\fP,
-the string is placed in \fIbuffer\fP, whose length is given by
-\fIbuffersize\fP, while for \fBpcre_get_substring()\fP a new block of memory is
-obtained via \fBpcre_malloc\fP, and its address is returned via
-\fIstringptr\fP. The yield of the function is the length of the string, not
-including the terminating zero, or one of these error codes:
-.sp
- PCRE_ERROR_NOMEMORY (-6)
-.sp
-The buffer was too small for \fBpcre_copy_substring()\fP, or the attempt to get
-memory failed for \fBpcre_get_substring()\fP.
-.sp
- PCRE_ERROR_NOSUBSTRING (-7)
-.sp
-There is no substring whose number is \fIstringnumber\fP.
-.P
-The \fBpcre_get_substring_list()\fP function extracts all available substrings
-and builds a list of pointers to them. All this is done in a single block of
-memory that is obtained via \fBpcre_malloc\fP. The address of the memory block
-is returned via \fIlistptr\fP, which is also the start of the list of string
-pointers. The end of the list is marked by a NULL pointer. The yield of the
-function is zero if all went well, or the error code
-.sp
- PCRE_ERROR_NOMEMORY (-6)
-.sp
-if the attempt to get the memory block failed.
-.P
-When any of these functions encounter a substring that is unset, which can
-happen when capturing subpattern number \fIn+1\fP matches some part of the
-subject, but subpattern \fIn\fP has not been used at all, they return an empty
-string. This can be distinguished from a genuine zero-length substring by
-inspecting the appropriate offset in \fIovector\fP, which is negative for unset
-substrings.
-.P
-The two convenience functions \fBpcre_free_substring()\fP and
-\fBpcre_free_substring_list()\fP can be used to free the memory returned by
-a previous call of \fBpcre_get_substring()\fP or
-\fBpcre_get_substring_list()\fP, respectively. They do nothing more than call
-the function pointed to by \fBpcre_free\fP, which of course could be called
-directly from a C program. However, PCRE is used in some situations where it is
-linked via a special interface to another programming language that cannot use
-\fBpcre_free\fP directly; it is for these cases that the functions are
-provided.
-.
-.
-.SH "EXTRACTING CAPTURED SUBSTRINGS BY NAME"
-.rs
-.sp
-.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP);
-.PP
-.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B char *\fIbuffer\fP, int \fIbuffersize\fP);
-.PP
-.B int pcre_get_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
-.PP
-To extract a substring by name, you first have to find associated number.
-For example, for this pattern
-.sp
- (a+)b(?<xxx>\ed+)...
-.sp
-the number of the subpattern called "xxx" is 2. If the name is known to be
-unique (PCRE_DUPNAMES was not set), you can find the number from the name by
-calling \fBpcre_get_stringnumber()\fP. The first argument is the compiled
-pattern, and the second is the name. The yield of the function is the
-subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no subpattern of
-that name.
-.P
-Given the number, you can extract the substring directly, or use one of the
-functions described in the previous section. For convenience, there are also
-two functions that do the whole job.
-.P
-Most of the arguments of \fBpcre_copy_named_substring()\fP and
-\fBpcre_get_named_substring()\fP are the same as those for the similarly named
-functions that extract by number. As these are described in the previous
-section, they are not re-described here. There are just two differences:
-.P
-First, instead of a substring number, a substring name is given. Second, there
-is an extra argument, given at the start, which is a pointer to the compiled
-pattern. This is needed in order to gain access to the name-to-number
-translation table.
-.P
-These functions call \fBpcre_get_stringnumber()\fP, and if it succeeds, they
-then call \fBpcre_copy_substring()\fP or \fBpcre_get_substring()\fP, as
-appropriate. \fBNOTE:\fP If PCRE_DUPNAMES is set and there are duplicate names,
-the behaviour may not be what you want (see the next section).
-.P
-\fBWarning:\fP If the pattern uses the (?| feature to set up multiple
-subpatterns with the same number, as described in the
-.\" HTML <a href="pcrepattern.html#dupsubpatternnumber">
-.\" </a>
-section on duplicate subpattern numbers
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page, you cannot use names to distinguish the different subpatterns, because
-names are not included in the compiled code. The matching process uses only
-numbers. For this reason, the use of different names for subpatterns of the
-same number causes an error at compile time.
-.
-.
-.SH "DUPLICATE SUBPATTERN NAMES"
-.rs
-.sp
-.B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);
-.PP
-When a pattern is compiled with the PCRE_DUPNAMES option, names for subpatterns
-are not required to be unique. (Duplicate names are always allowed for
-subpatterns with the same number, created by using the (?| feature. Indeed, if
-such subpatterns are named, they are required to use the same names.)
-.P
-Normally, patterns with duplicate names are such that in any one match, only
-one of the named subpatterns participates. An example is shown in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.P
-When duplicates are present, \fBpcre_copy_named_substring()\fP and
-\fBpcre_get_named_substring()\fP return the first substring corresponding to
-the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING (-7) is
-returned; no data is returned. The \fBpcre_get_stringnumber()\fP function
-returns one of the numbers that are associated with the name, but it is not
-defined which it is.
-.P
-If you want to get full details of all captured substrings for a given name,
-you must use the \fBpcre_get_stringtable_entries()\fP function. The first
-argument is the compiled pattern, and the second is the name. The third and
-fourth are pointers to variables which are updated by the function. After it
-has run, they point to the first and last entries in the name-to-number table
-for the given name. The function itself returns the length of each entry, or
-PCRE_ERROR_NOSUBSTRING (-7) if there are none. The format of the table is
-described above in the section entitled \fIInformation about a pattern\fP
-.\" HTML <a href="#infoaboutpattern">
-.\" </a>
-above.
-.\"
-Given all the relevant entries for the name, you can extract each of their
-numbers, and hence the captured data, if any.
-.
-.
-.SH "FINDING ALL POSSIBLE MATCHES"
-.rs
-.sp
-The traditional matching function uses a similar algorithm to Perl, which stops
-when it finds the first match, starting at a given point in the subject. If you
-want to find all possible matches, or the longest possible match, consider
-using the alternative matching function (see below) instead. If you cannot use
-the alternative function, but still need to find all possible matches, you
-can kludge it up by making use of the callout facility, which is described in
-the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.P
-What you have to do is to insert a callout right at the end of the pattern.
-When your callout function is called, extract and save the current matched
-substring. Then return 1, which forces \fBpcre_exec()\fP to backtrack and try
-other alternatives. Ultimately, when it runs out of matches, \fBpcre_exec()\fP
-will yield PCRE_ERROR_NOMATCH.
-.
-.
-.SH "OBTAINING AN ESTIMATE OF STACK USAGE"
-.rs
-.sp
-Matching certain patterns using \fBpcre_exec()\fP can use a lot of process
-stack, which in certain environments can be rather limited in size. Some users
-find it helpful to have an estimate of the amount of stack that is used by
-\fBpcre_exec()\fP, to help them set recursion limits, as described in the
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation. The estimate that is output by \fBpcretest\fP when called with
-the \fB-m\fP and \fB-C\fP options is obtained by calling \fBpcre_exec\fP with
-the values NULL, NULL, NULL, -999, and -999 for its first five arguments.
-.P
-Normally, if its first argument is NULL, \fBpcre_exec()\fP immediately returns
-the negative error code PCRE_ERROR_NULL, but with this special combination of
-arguments, it returns instead a negative number whose absolute value is the
-approximate stack frame size in bytes. (A negative number is used so that it is
-clear that no match has happened.) The value is approximate because in some
-cases, recursive calls to \fBpcre_exec()\fP occur when there are one or two
-additional variables on the stack.
-.P
-If PCRE has been compiled to use the heap instead of the stack for recursion,
-the value returned is the size of each block that is obtained from the heap.
-.
-.
-.\" HTML <a name="dfamatch"></a>
-.SH "MATCHING A PATTERN: THE ALTERNATIVE FUNCTION"
-.rs
-.sp
-.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
-.ti +5n
-.B int *\fIworkspace\fP, int \fIwscount\fP);
-.P
-The function \fBpcre_dfa_exec()\fP is called to match a subject string against
-a compiled pattern, using a matching algorithm that scans the subject string
-just once, and does not backtrack. This has different characteristics to the
-normal algorithm, and is not compatible with Perl. Some of the features of PCRE
-patterns are not supported. Nevertheless, there are times when this kind of
-matching can be useful. For a discussion of the two matching algorithms, and a
-list of features that \fBpcre_dfa_exec()\fP does not support, see the
-.\" HREF
-\fBpcrematching\fP
-.\"
-documentation.
-.P
-The arguments for the \fBpcre_dfa_exec()\fP function are the same as for
-\fBpcre_exec()\fP, plus two extras. The \fIovector\fP argument is used in a
-different way, and this is described below. The other common arguments are used
-in the same way as for \fBpcre_exec()\fP, so their description is not repeated
-here.
-.P
-The two additional arguments provide workspace for the function. The workspace
-vector should contain at least 20 elements. It is used for keeping track of
-multiple paths through the pattern tree. More workspace will be needed for
-patterns and subjects where there are a lot of potential matches.
-.P
-Here is an example of a simple call to \fBpcre_dfa_exec()\fP:
-.sp
- int rc;
- int ovector[10];
- int wspace[20];
- rc = pcre_dfa_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- 10, /* number of elements (NOT size in bytes) */
- wspace, /* working space vector */
- 20); /* number of elements (NOT size in bytes) */
-.
-.SS "Option bits for \fBpcre_dfa_exec()\fP"
-.rs
-.sp
-The unused bits of the \fIoptions\fP argument for \fBpcre_dfa_exec()\fP must be
-zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_\fIxxx\fP,
-PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
-PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF, PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE,
-PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART.
-All but the last four of these are exactly the same as for \fBpcre_exec()\fP,
-so their description is not repeated here.
-.sp
- PCRE_PARTIAL_HARD
- PCRE_PARTIAL_SOFT
-.sp
-These have the same general effect as they do for \fBpcre_exec()\fP, but the
-details are slightly different. When PCRE_PARTIAL_HARD is set for
-\fBpcre_dfa_exec()\fP, it returns PCRE_ERROR_PARTIAL if the end of the subject
-is reached and there is still at least one matching possibility that requires
-additional characters. This happens even if some complete matches have also
-been found. When PCRE_PARTIAL_SOFT is set, the return code PCRE_ERROR_NOMATCH
-is converted into PCRE_ERROR_PARTIAL if the end of the subject is reached,
-there have been no complete matches, but there is still at least one matching
-possibility. The portion of the string that was inspected when the longest
-partial match was found is set as the first matching string in both cases.
-There is a more detailed discussion of partial and multi-segment matching, with
-examples, in the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation.
-.sp
- PCRE_DFA_SHORTEST
-.sp
-Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to stop as
-soon as it has found one match. Because of the way the alternative algorithm
-works, this is necessarily the shortest possible match at the first possible
-matching point in the subject string.
-.sp
- PCRE_DFA_RESTART
-.sp
-When \fBpcre_dfa_exec()\fP returns a partial match, it is possible to call it
-again, with additional subject characters, and have it continue with the same
-match. The PCRE_DFA_RESTART option requests this action; when it is set, the
-\fIworkspace\fP and \fIwscount\fP options must reference the same vector as
-before because data about the match so far is left in them after a partial
-match. There is more discussion of this facility in the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation.
-.
-.
-.SS "Successful returns from \fBpcre_dfa_exec()\fP"
-.rs
-.sp
-When \fBpcre_dfa_exec()\fP succeeds, it may have matched more than one
-substring in the subject. Note, however, that all the matches from one run of
-the function start at the same point in the subject. The shorter matches are
-all initial substrings of the longer matches. For example, if the pattern
-.sp
- <.*>
-.sp
-is matched against the string
-.sp
- This is <something> <something else> <something further> no more
-.sp
-the three matched strings are
-.sp
- <something>
- <something> <something else>
- <something> <something else> <something further>
-.sp
-On success, the yield of the function is a number greater than zero, which is
-the number of matched substrings. The substrings themselves are returned in
-\fIovector\fP. Each string uses two elements; the first is the offset to the
-start, and the second is the offset to the end. In fact, all the strings have
-the same start offset. (Space could have been saved by giving this only once,
-but it was decided to retain some compatibility with the way \fBpcre_exec()\fP
-returns data, even though the meaning of the strings is different.)
-.P
-The strings are returned in reverse order of length; that is, the longest
-matching string is given first. If there were too many matches to fit into
-\fIovector\fP, the yield of the function is zero, and the vector is filled with
-the longest matches. Unlike \fBpcre_exec()\fP, \fBpcre_dfa_exec()\fP can use
-the entire \fIovector\fP for returning matched strings.
-.
-.
-.SS "Error returns from \fBpcre_dfa_exec()\fP"
-.rs
-.sp
-The \fBpcre_dfa_exec()\fP function returns a negative number when it fails.
-Many of the errors are the same as for \fBpcre_exec()\fP, and these are
-described
-.\" HTML <a href="#errorlist">
-.\" </a>
-above.
-.\"
-There are in addition the following errors that are specific to
-\fBpcre_dfa_exec()\fP:
-.sp
- PCRE_ERROR_DFA_UITEM (-16)
-.sp
-This return is given if \fBpcre_dfa_exec()\fP encounters an item in the pattern
-that it does not support, for instance, the use of \eC or a back reference.
-.sp
- PCRE_ERROR_DFA_UCOND (-17)
-.sp
-This return is given if \fBpcre_dfa_exec()\fP encounters a condition item that
-uses a back reference for the condition, or a test for recursion in a specific
-group. These are not supported.
-.sp
- PCRE_ERROR_DFA_UMLIMIT (-18)
-.sp
-This return is given if \fBpcre_dfa_exec()\fP is called with an \fIextra\fP
-block that contains a setting of the \fImatch_limit\fP or
-\fImatch_limit_recursion\fP fields. This is not supported (these fields are
-meaningless for DFA matching).
-.sp
- PCRE_ERROR_DFA_WSSIZE (-19)
-.sp
-This return is given if \fBpcre_dfa_exec()\fP runs out of space in the
-\fIworkspace\fP vector.
-.sp
- PCRE_ERROR_DFA_RECURSE (-20)
-.sp
-When a recursive subpattern is processed, the matching function calls itself
-recursively, using private vectors for \fIovector\fP and \fIworkspace\fP. This
-error is given if the output vector is not large enough. This should be
-extremely rare, as a vector of size 1000 is used.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcre16\fP(3), \fBpcrebuild\fP(3), \fBpcrecallout\fP(3), \fBpcrecpp(3)\fP(3),
-\fBpcrematching\fP(3), \fBpcrepartial\fP(3), \fBpcreposix\fP(3),
-\fBpcreprecompile\fP(3), \fBpcresample\fP(3), \fBpcrestack\fP(3).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 21 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcrebuild.3 b/src/third_party/pcre-8.30/doc/pcrebuild.3
deleted file mode 100644
index aea25b4ef17..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrebuild.3
+++ /dev/null
@@ -1,425 +0,0 @@
-.TH PCREBUILD 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.
-.
-.SH "PCRE BUILD-TIME OPTIONS"
-.rs
-.sp
-This document describes the optional features of PCRE that can be selected when
-the library is compiled. It assumes use of the \fBconfigure\fP script, where
-the optional features are selected or deselected by providing options to
-\fBconfigure\fP before running the \fBmake\fP command. However, the same
-options can be selected in both Unix-like and non-Unix-like environments using
-the GUI facility of \fBcmake-gui\fP if you are using \fBCMake\fP instead of
-\fBconfigure\fP to build PCRE.
-.P
-There is a lot more information about building PCRE in non-Unix-like
-environments in the file called \fINON_UNIX_USE\fP, which is part of the PCRE
-distribution. You should consult this file as well as the \fIREADME\fP file if
-you are building in a non-Unix-like environment.
-.P
-The complete list of options for \fBconfigure\fP (which includes the standard
-ones such as the selection of the installation directory) can be obtained by
-running
-.sp
- ./configure --help
-.sp
-The following sections include descriptions of options whose names begin with
---enable or --disable. These settings specify changes to the defaults for the
-\fBconfigure\fP command. Because of the way that \fBconfigure\fP works,
---enable and --disable always come in pairs, so the complementary option always
-exists as well, but as it specifies the default, it is not described.
-.
-.
-.SH "BUILDING 8-BIT and 16-BIT LIBRARIES"
-.rs
-.sp
-By default, a library called \fBlibpcre\fP is built, containing functions that
-take string arguments contained in vectors of bytes, either as single-byte
-characters, or interpreted as UTF-8 strings. You can also build a separate
-library, called \fBlibpcre16\fP, in which strings are contained in vectors of
-16-bit data units and interpreted either as single-unit characters or UTF-16
-strings, by adding
-.sp
- --enable-pcre16
-.sp
-to the \fBconfigure\fP command. If you do not want the 8-bit library, add
-.sp
- --disable-pcre8
-.sp
-as well. At least one of the two libraries must be built. Note that the C++ and
-POSIX wrappers are for the 8-bit library only, and that \fBpcregrep\fP is an
-8-bit program. None of these are built if you select only the 16-bit library.
-.
-.
-.SH "BUILDING SHARED AND STATIC LIBRARIES"
-.rs
-.sp
-The PCRE building process uses \fBlibtool\fP to build both shared and static
-Unix libraries by default. You can suppress one of these by adding one of
-.sp
- --disable-shared
- --disable-static
-.sp
-to the \fBconfigure\fP command, as required.
-.
-.
-.SH "C++ SUPPORT"
-.rs
-.sp
-By default, if the 8-bit library is being built, the \fBconfigure\fP script
-will search for a C++ compiler and C++ header files. If it finds them, it
-automatically builds the C++ wrapper library (which supports only 8-bit
-strings). You can disable this by adding
-.sp
- --disable-cpp
-.sp
-to the \fBconfigure\fP command.
-.
-.
-.SH "UTF-8 and UTF-16 SUPPORT"
-.rs
-.sp
-To build PCRE with support for UTF Unicode character strings, add
-.sp
- --enable-utf
-.sp
-to the \fBconfigure\fP command. This setting applies to both libraries, adding
-support for UTF-8 to the 8-bit library and support for UTF-16 to the 16-bit
-library. There are no separate options for enabling UTF-8 and UTF-16
-independently because that would allow ridiculous settings such as requesting
-UTF-16 support while building only the 8-bit library. It is not possible to
-build one library with UTF support and the other without in the same
-configuration. (For backwards compatibility, --enable-utf8 is a synonym of
---enable-utf.)
-.P
-Of itself, this setting does not make PCRE treat strings as UTF-8 or UTF-16. As
-well as compiling PCRE with this option, you also have have to set the
-PCRE_UTF8 or PCRE_UTF16 option when you call one of the pattern compiling
-functions.
-.P
-If you set --enable-utf when compiling in an EBCDIC environment, PCRE expects
-its input to be either ASCII or UTF-8 (depending on the runtime option). It is
-not possible to support both EBCDIC and UTF-8 codes in the same version of the
-library. Consequently, --enable-utf and --enable-ebcdic are mutually
-exclusive.
-.
-.
-.SH "UNICODE CHARACTER PROPERTY SUPPORT"
-.rs
-.sp
-UTF support allows the libraries to process character codepoints up to 0x10ffff
-in the strings that they handle. On its own, however, it does not provide any
-facilities for accessing the properties of such characters. If you want to be
-able to use the pattern escapes \eP, \ep, and \eX, which refer to Unicode
-character properties, you must add
-.sp
- --enable-unicode-properties
-.sp
-to the \fBconfigure\fP command. This implies UTF support, even if you have
-not explicitly requested it.
-.P
-Including Unicode property support adds around 30K of tables to the PCRE
-library. Only the general category properties such as \fILu\fP and \fINd\fP are
-supported. Details are given in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.
-.
-.SH "JUST-IN-TIME COMPILER SUPPORT"
-.rs
-.sp
-Just-in-time compiler support is included in the build by specifying
-.sp
- --enable-jit
-.sp
-This support is available only for certain hardware architectures. If this
-option is set for an unsupported architecture, a compile time error occurs.
-See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for a discussion of JIT usage. When JIT support is enabled,
-pcregrep automatically makes use of it, unless you add
-.sp
- --disable-pcregrep-jit
-.sp
-to the "configure" command.
-.
-.
-.SH "CODE VALUE OF NEWLINE"
-.rs
-.sp
-By default, PCRE interprets the linefeed (LF) character as indicating the end
-of a line. This is the normal newline character on Unix-like systems. You can
-compile PCRE to use carriage return (CR) instead, by adding
-.sp
- --enable-newline-is-cr
-.sp
-to the \fBconfigure\fP command. There is also a --enable-newline-is-lf option,
-which explicitly specifies linefeed as the newline character.
-.sp
-Alternatively, you can specify that line endings are to be indicated by the two
-character sequence CRLF. If you want this, add
-.sp
- --enable-newline-is-crlf
-.sp
-to the \fBconfigure\fP command. There is a fourth option, specified by
-.sp
- --enable-newline-is-anycrlf
-.sp
-which causes PCRE to recognize any of the three sequences CR, LF, or CRLF as
-indicating a line ending. Finally, a fifth option, specified by
-.sp
- --enable-newline-is-any
-.sp
-causes PCRE to recognize any Unicode newline sequence.
-.P
-Whatever line ending convention is selected when PCRE is built can be
-overridden when the library functions are called. At build time it is
-conventional to use the standard for your operating system.
-.
-.
-.SH "WHAT \eR MATCHES"
-.rs
-.sp
-By default, the sequence \eR in a pattern matches any Unicode newline sequence,
-whatever has been selected as the line ending sequence. If you specify
-.sp
- --enable-bsr-anycrlf
-.sp
-the default is changed so that \eR matches only CR, LF, or CRLF. Whatever is
-selected when PCRE is built can be overridden when the library functions are
-called.
-.
-.
-.SH "POSIX MALLOC USAGE"
-.rs
-.sp
-When the 8-bit library is called through the POSIX interface (see the
-.\" HREF
-\fBpcreposix\fP
-.\"
-documentation), additional working storage is required for holding the pointers
-to capturing substrings, because PCRE requires three integers per substring,
-whereas the POSIX interface provides only two. If the number of expected
-substrings is small, the wrapper function uses space on the stack, because this
-is faster than using \fBmalloc()\fP for each call. The default threshold above
-which the stack is no longer used is 10; it can be changed by adding a setting
-such as
-.sp
- --with-posix-malloc-threshold=20
-.sp
-to the \fBconfigure\fP command.
-.
-.
-.SH "HANDLING VERY LARGE PATTERNS"
-.rs
-.sp
-Within a compiled pattern, offset values are used to point from one part to
-another (for example, from an opening parenthesis to an alternation
-metacharacter). By default, two-byte values are used for these offsets, leading
-to a maximum size for a compiled pattern of around 64K. This is sufficient to
-handle all but the most gigantic patterns. Nevertheless, some people do want to
-process truly enormous patterns, so it is possible to compile PCRE to use
-three-byte or four-byte offsets by adding a setting such as
-.sp
- --with-link-size=3
-.sp
-to the \fBconfigure\fP command. The value given must be 2, 3, or 4. For the
-16-bit library, a value of 3 is rounded up to 4. Using longer offsets slows
-down the operation of PCRE because it has to load additional data when handling
-them.
-.
-.
-.SH "AVOIDING EXCESSIVE STACK USAGE"
-.rs
-.sp
-When matching with the \fBpcre_exec()\fP function, PCRE implements backtracking
-by making recursive calls to an internal function called \fBmatch()\fP. In
-environments where the size of the stack is limited, this can severely limit
-PCRE's operation. (The Unix environment does not usually suffer from this
-problem, but it may sometimes be necessary to increase the maximum stack size.
-There is a discussion in the
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation.) An alternative approach to recursion that uses memory from the
-heap to remember data, instead of using recursive function calls, has been
-implemented to work round the problem of limited stack size. If you want to
-build a version of PCRE that works this way, add
-.sp
- --disable-stack-for-recursion
-.sp
-to the \fBconfigure\fP command. With this configuration, PCRE will use the
-\fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP variables to call memory
-management functions. By default these point to \fBmalloc()\fP and
-\fBfree()\fP, but you can replace the pointers so that your own functions are
-used instead.
-.P
-Separate functions are provided rather than using \fBpcre_malloc\fP and
-\fBpcre_free\fP because the usage is very predictable: the block sizes
-requested are always the same, and the blocks are always freed in reverse
-order. A calling program might be able to implement optimized functions that
-perform better than \fBmalloc()\fP and \fBfree()\fP. PCRE runs noticeably more
-slowly when built in this way. This option affects only the \fBpcre_exec()\fP
-function; it is not relevant for \fBpcre_dfa_exec()\fP.
-.
-.
-.SH "LIMITING PCRE RESOURCE USAGE"
-.rs
-.sp
-Internally, PCRE has a function called \fBmatch()\fP, which it calls repeatedly
-(sometimes recursively) when matching a pattern with the \fBpcre_exec()\fP
-function. By controlling the maximum number of times this function may be
-called during a single matching operation, a limit can be placed on the
-resources used by a single call to \fBpcre_exec()\fP. The limit can be changed
-at run time, as described in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation. The default is 10 million, but this can be changed by adding a
-setting such as
-.sp
- --with-match-limit=500000
-.sp
-to the \fBconfigure\fP command. This setting has no effect on the
-\fBpcre_dfa_exec()\fP matching function.
-.P
-In some environments it is desirable to limit the depth of recursive calls of
-\fBmatch()\fP more strictly than the total number of calls, in order to
-restrict the maximum amount of stack (or heap, if --disable-stack-for-recursion
-is specified) that is used. A second limit controls this; it defaults to the
-value that is set for --with-match-limit, which imposes no additional
-constraints. However, you can set a lower limit by adding, for example,
-.sp
- --with-match-limit-recursion=10000
-.sp
-to the \fBconfigure\fP command. This value can also be overridden at run time.
-.
-.
-.SH "CREATING CHARACTER TABLES AT BUILD TIME"
-.rs
-.sp
-PCRE uses fixed tables for processing characters whose code values are less
-than 256. By default, PCRE is built with a set of tables that are distributed
-in the file \fIpcre_chartables.c.dist\fP. These tables are for ASCII codes
-only. If you add
-.sp
- --enable-rebuild-chartables
-.sp
-to the \fBconfigure\fP command, the distributed tables are no longer used.
-Instead, a program called \fBdftables\fP is compiled and run. This outputs the
-source for new set of tables, created in the default locale of your C runtime
-system. (This method of replacing the tables does not work if you are cross
-compiling, because \fBdftables\fP is run on the local host. If you need to
-create alternative tables when cross compiling, you will have to do so "by
-hand".)
-.
-.
-.SH "USING EBCDIC CODE"
-.rs
-.sp
-PCRE assumes by default that it will run in an environment where the character
-code is ASCII (or Unicode, which is a superset of ASCII). This is the case for
-most computer operating systems. PCRE can, however, be compiled to run in an
-EBCDIC environment by adding
-.sp
- --enable-ebcdic
-.sp
-to the \fBconfigure\fP command. This setting implies
---enable-rebuild-chartables. You should only use it if you know that you are in
-an EBCDIC environment (for example, an IBM mainframe operating system). The
---enable-ebcdic option is incompatible with --enable-utf.
-.
-.
-.SH "PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT"
-.rs
-.sp
-By default, \fBpcregrep\fP reads all files as plain text. You can build it so
-that it recognizes files whose names end in \fB.gz\fP or \fB.bz2\fP, and reads
-them with \fBlibz\fP or \fBlibbz2\fP, respectively, by adding one or both of
-.sp
- --enable-pcregrep-libz
- --enable-pcregrep-libbz2
-.sp
-to the \fBconfigure\fP command. These options naturally require that the
-relevant libraries are installed on your system. Configuration will fail if
-they are not.
-.
-.
-.SH "PCREGREP BUFFER SIZE"
-.rs
-.sp
-\fBpcregrep\fP uses an internal buffer to hold a "window" on the file it is
-scanning, in order to be able to output "before" and "after" lines when it
-finds a match. The size of the buffer is controlled by a parameter whose
-default value is 20K. The buffer itself is three times this size, but because
-of the way it is used for holding "before" lines, the longest line that is
-guaranteed to be processable is the parameter size. You can change the default
-parameter value by adding, for example,
-.sp
- --with-pcregrep-bufsize=50K
-.sp
-to the \fBconfigure\fP command. The caller of \fPpcregrep\fP can, however,
-override this value by specifying a run-time option.
-.
-.
-.SH "PCRETEST OPTION FOR LIBREADLINE SUPPORT"
-.rs
-.sp
-If you add
-.sp
- --enable-pcretest-libreadline
-.sp
-to the \fBconfigure\fP command, \fBpcretest\fP is linked with the
-\fBlibreadline\fP library, and when its input is from a terminal, it reads it
-using the \fBreadline()\fP function. This provides line-editing and history
-facilities. Note that \fBlibreadline\fP is GPL-licensed, so if you distribute a
-binary of \fBpcretest\fP linked in this way, there may be licensing issues.
-.P
-Setting this option causes the \fB-lreadline\fP option to be added to the
-\fBpcretest\fP build. In many operating environments with a sytem-installed
-\fBlibreadline\fP this is sufficient. However, in some environments (e.g.
-if an unmodified distribution version of readline is in use), some extra
-configuration may be necessary. The INSTALL file for \fBlibreadline\fP says
-this:
-.sp
- "Readline uses the termcap functions, but does not link with the
- termcap or curses library itself, allowing applications which link
- with readline the to choose an appropriate library."
-.sp
-If your environment has not been set up so that an appropriate library is
-automatically included, you may need to add something like
-.sp
- LIBS="-ncurses"
-.sp
-immediately before the \fBconfigure\fP command.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcreapi\fP(3), \fBpcre16\fP, \fBpcre_config\fP(3).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 07 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcrecallout.3 b/src/third_party/pcre-8.30/doc/pcrecallout.3
deleted file mode 100644
index 7421d54e6b5..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrecallout.3
+++ /dev/null
@@ -1,203 +0,0 @@
-.TH PCRECALLOUT 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE CALLOUTS"
-.rs
-.sp
-.B int (*pcre_callout)(pcre_callout_block *);
-.PP
-.B int (*pcre16_callout)(pcre16_callout_block *);
-.PP
-PCRE provides a feature called "callout", which is a means of temporarily
-passing control to the caller of PCRE in the middle of pattern matching. The
-caller of PCRE provides an external function by putting its entry point in the
-global variable \fIpcre_callout\fP (\fIpcre16_callout\fP for the 16-bit
-library). By default, this variable contains NULL, which disables all calling
-out.
-.P
-Within a regular expression, (?C) indicates the points at which the external
-function is to be called. Different callout points can be identified by putting
-a number less than 256 after the letter C. The default value is zero.
-For example, this pattern has two callout points:
-.sp
- (?C1)abc(?C2)def
-.sp
-If the PCRE_AUTO_CALLOUT option bit is set when a pattern is compiled, PCRE
-automatically inserts callouts, all with number 255, before each item in the
-pattern. For example, if PCRE_AUTO_CALLOUT is used with the pattern
-.sp
- A(\ed{2}|--)
-.sp
-it is processed as if it were
-.sp
-(?C255)A(?C255)((?C255)\ed{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
-.sp
-Notice that there is a callout before and after each parenthesis and
-alternation bar. Automatic callouts can be used for tracking the progress of
-pattern matching. The
-.\" HREF
-\fBpcretest\fP
-.\"
-command has an option that sets automatic callouts; when it is used, the output
-indicates how the pattern is matched. This is useful information when you are
-trying to optimize the performance of a particular pattern.
-.P
-The use of callouts in a pattern makes it ineligible for optimization by the
-just-in-time compiler. Studying such a pattern with the PCRE_STUDY_JIT_COMPILE
-option always fails.
-.
-.
-.SH "MISSING CALLOUTS"
-.rs
-.sp
-You should be aware that, because of optimizations in the way PCRE matches
-patterns by default, callouts sometimes do not happen. For example, if the
-pattern is
-.sp
- ab(?C4)cd
-.sp
-PCRE knows that any matching string must contain the letter "d". If the subject
-string is "abyz", the lack of "d" means that matching doesn't ever start, and
-the callout is never reached. However, with "abyd", though the result is still
-no match, the callout is obeyed.
-.P
-If the pattern is studied, PCRE knows the minimum length of a matching string,
-and will immediately give a "no match" return without actually running a match
-if the subject is not long enough, or, for unanchored patterns, if it has
-been scanned far enough.
-.P
-You can disable these optimizations by passing the PCRE_NO_START_OPTIMIZE
-option to the matching function, or by starting the pattern with
-(*NO_START_OPT). This slows down the matching process, but does ensure that
-callouts such as the example above are obeyed.
-.
-.
-.SH "THE CALLOUT INTERFACE"
-.rs
-.sp
-During matching, when PCRE reaches a callout point, the external function
-defined by \fIpcre_callout\fP or \fIpcre16_callout\fP is called (if it is set).
-This applies to both normal and DFA matching. The only argument to the callout
-function is a pointer to a \fBpcre_callout\fP or \fBpcre16_callout\fP block.
-These structures contains the following fields:
-.sp
- int \fIversion\fP;
- int \fIcallout_number\fP;
- int *\fIoffset_vector\fP;
- const char *\fIsubject\fP; (8-bit version)
- PCRE_SPTR16 \fIsubject\fP; (16-bit version)
- int \fIsubject_length\fP;
- int \fIstart_match\fP;
- int \fIcurrent_position\fP;
- int \fIcapture_top\fP;
- int \fIcapture_last\fP;
- void *\fIcallout_data\fP;
- int \fIpattern_position\fP;
- int \fInext_item_length\fP;
- const unsigned char *\fImark\fP; (8-bit version)
- const PCRE_UCHAR16 *\fImark\fP; (16-bit version)
-.sp
-The \fIversion\fP field is an integer containing the version number of the
-block format. The initial version was 0; the current version is 2. The version
-number will change again in future if additional fields are added, but the
-intention is never to remove any of the existing fields.
-.P
-The \fIcallout_number\fP field contains the number of the callout, as compiled
-into the pattern (that is, the number after ?C for manual callouts, and 255 for
-automatically generated callouts).
-.P
-The \fIoffset_vector\fP field is a pointer to the vector of offsets that was
-passed by the caller to the matching function. When \fBpcre_exec()\fP or
-\fBpcre16_exec()\fP is used, the contents can be inspected, in order to extract
-substrings that have been matched so far, in the same way as for extracting
-substrings after a match has completed. For the DFA matching functions, this
-field is not useful.
-.P
-The \fIsubject\fP and \fIsubject_length\fP fields contain copies of the values
-that were passed to the matching function.
-.P
-The \fIstart_match\fP field normally contains the offset within the subject at
-which the current match attempt started. However, if the escape sequence \eK
-has been encountered, this value is changed to reflect the modified starting
-point. If the pattern is not anchored, the callout function may be called
-several times from the same point in the pattern for different starting points
-in the subject.
-.P
-The \fIcurrent_position\fP field contains the offset within the subject of the
-current match pointer.
-.P
-When the \fBpcre_exec()\fP or \fBpcre16_exec()\fP is used, the
-\fIcapture_top\fP field contains one more than the number of the highest
-numbered captured substring so far. If no substrings have been captured, the
-value of \fIcapture_top\fP is one. This is always the case when the DFA
-functions are used, because they do not support captured substrings.
-.P
-The \fIcapture_last\fP field contains the number of the most recently captured
-substring. If no substrings have been captured, its value is -1. This is always
-the case for the DFA matching functions.
-.P
-The \fIcallout_data\fP field contains a value that is passed to a matching
-function specifically so that it can be passed back in callouts. It is passed
-in the \fIcallout_data\fP field of a \fBpcre_extra\fP or \fBpcre16_extra\fP
-data structure. If no such data was passed, the value of \fIcallout_data\fP in
-a callout block is NULL. There is a description of the \fBpcre_extra\fP
-structure in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.P
-The \fIpattern_position\fP field is present from version 1 of the callout
-structure. It contains the offset to the next item to be matched in the pattern
-string.
-.P
-The \fInext_item_length\fP field is present from version 1 of the callout
-structure. It contains the length of the next item to be matched in the pattern
-string. When the callout immediately precedes an alternation bar, a closing
-parenthesis, or the end of the pattern, the length is zero. When the callout
-precedes an opening parenthesis, the length is that of the entire subpattern.
-.P
-The \fIpattern_position\fP and \fInext_item_length\fP fields are intended to
-help in distinguishing between different automatic callouts, which all have the
-same callout number. However, they are set for all callouts.
-.P
-The \fImark\fP field is present from version 2 of the callout structure. In
-callouts from \fBpcre_exec()\fP or \fBpcre16_exec()\fP it contains a pointer to
-the zero-terminated name of the most recently passed (*MARK), (*PRUNE), or
-(*THEN) item in the match, or NULL if no such items have been passed. Instances
-of (*PRUNE) or (*THEN) without a name do not obliterate a previous (*MARK). In
-callouts from the DFA matching functions this field always contains NULL.
-.
-.
-.SH "RETURN VALUES"
-.rs
-.sp
-The external callout function returns an integer to PCRE. If the value is zero,
-matching proceeds as normal. If the value is greater than zero, matching fails
-at the current point, but the testing of other matching possibilities goes
-ahead, just as if a lookahead assertion had failed. If the value is less than
-zero, the match is abandoned, the matching function returns the negative value.
-.P
-Negative values should normally be chosen from the set of PCRE_ERROR_xxx
-values. In particular, PCRE_ERROR_NOMATCH forces a standard "no match" failure.
-The error number PCRE_ERROR_CALLOUT is reserved for use by callout functions;
-it will never be used by PCRE itself.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 08 Janurary 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcrecompat.3 b/src/third_party/pcre-8.30/doc/pcrecompat.3
deleted file mode 100644
index b5a6d2f13eb..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrecompat.3
+++ /dev/null
@@ -1,180 +0,0 @@
-.TH PCRECOMPAT 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "DIFFERENCES BETWEEN PCRE AND PERL"
-.rs
-.sp
-This document describes the differences in the ways that PCRE and Perl handle
-regular expressions. The differences described here are with respect to Perl
-versions 5.10 and above.
-.P
-1. PCRE has only a subset of Perl's Unicode support. Details of what it does
-have are given in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page.
-.P
-2. PCRE allows repeat quantifiers only on parenthesized assertions, but they do
-not mean what you might think. For example, (?!a){3} does not assert that the
-next three characters are not "a". It just asserts that the next character is
-not "a" three times (in principle: PCRE optimizes this to run the assertion
-just once). Perl allows repeat quantifiers on other assertions such as \eb, but
-these do not seem to have any use.
-.P
-3. Capturing subpatterns that occur inside negative lookahead assertions are
-counted, but their entries in the offsets vector are never set. Perl sets its
-numerical variables from any such patterns that are matched before the
-assertion fails to match something (thereby succeeding), but only if the
-negative lookahead assertion contains just one branch.
-.P
-4. Though binary zero characters are supported in the subject string, they are
-not allowed in a pattern string because it is passed as a normal C string,
-terminated by zero. The escape sequence \e0 can be used in the pattern to
-represent a binary zero.
-.P
-5. The following Perl escape sequences are not supported: \el, \eu, \eL,
-\eU, and \eN when followed by a character name or Unicode value. (\eN on its
-own, matching a non-newline character, is supported.) In fact these are
-implemented by Perl's general string-handling and are not part of its pattern
-matching engine. If any of these are encountered by PCRE, an error is
-generated by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set,
-\eU and \eu are interpreted as JavaScript interprets them.
-.P
-6. The Perl escape sequences \ep, \eP, and \eX are supported only if PCRE is
-built with Unicode character property support. The properties that can be
-tested with \ep and \eP are limited to the general category properties such as
-Lu and Nd, script names such as Greek or Han, and the derived properties Any
-and L&. PCRE does support the Cs (surrogate) property, which Perl does not; the
-Perl documentation says "Because Perl hides the need for the user to understand
-the internal representation of Unicode characters, there is no need to
-implement the somewhat messy concept of surrogates."
-.P
-7. PCRE implements a simpler version of \eX than Perl, which changed to make
-\eX match what Unicode calls an "extended grapheme cluster". This is more
-complicated than an extended Unicode sequence, which is what PCRE matches.
-.P
-8. PCRE does support the \eQ...\eE escape for quoting substrings. Characters in
-between are treated as literals. This is slightly different from Perl in that $
-and @ are also handled as literals inside the quotes. In Perl, they cause
-variable interpolation (but of course PCRE does not have variables). Note the
-following examples:
-.sp
- Pattern PCRE matches Perl matches
-.sp
-.\" JOIN
- \eQabc$xyz\eE abc$xyz abc followed by the
- contents of $xyz
- \eQabc\e$xyz\eE abc\e$xyz abc\e$xyz
- \eQabc\eE\e$\eQxyz\eE abc$xyz abc$xyz
-.sp
-The \eQ...\eE sequence is recognized both inside and outside character classes.
-.P
-9. Fairly obviously, PCRE does not support the (?{code}) and (??{code})
-constructions. However, there is support for recursive patterns. This is not
-available in Perl 5.8, but it is in Perl 5.10. Also, the PCRE "callout"
-feature allows an external function to be called during pattern matching. See
-the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation for details.
-.P
-10. Subpatterns that are called as subroutines (whether or not recursively) are
-always treated as atomic groups in PCRE. This is like Python, but unlike Perl.
-Captured values that are set outside a subroutine call can be reference from
-inside in PCRE, but not in Perl. There is a discussion that explains these
-differences in more detail in the
-.\" HTML <a href="pcrepattern.html#recursiondifference">
-.\" </a>
-section on recursion differences from Perl
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-page.
-.P
-11. If (*THEN) is present in a group that is called as a subroutine, its action
-is limited to that group, even if the group does not contain any | characters.
-.P
-12. There are some differences that are concerned with the settings of captured
-strings when part of a pattern is repeated. For example, matching "aba" against
-the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b".
-.P
-13. PCRE's handling of duplicate subpattern numbers and duplicate subpattern
-names is not as general as Perl's. This is a consequence of the fact the PCRE
-works internally just with numbers, using an external table to translate
-between numbers and names. In particular, a pattern such as (?|(?<a>A)|(?<b)B),
-where the two capturing parentheses have the same number but different names,
-is not supported, and causes an error at compile time. If it were allowed, it
-would not be possible to distinguish which parentheses matched, because both
-names map to capturing subpattern number 1. To avoid this confusing situation,
-an error is given at compile time.
-.P
-14. Perl recognizes comments in some places that PCRE does not, for example,
-between the ( and ? at the start of a subpattern. If the /x modifier is set,
-Perl allows whitespace between ( and ? but PCRE never does, even if the
-PCRE_EXTENDED option is set.
-.P
-15. PCRE provides some extensions to the Perl regular expression facilities.
-Perl 5.10 includes new features that are not in earlier versions of Perl, some
-of which (such as named parentheses) have been in PCRE for some time. This list
-is with respect to Perl 5.10:
-.sp
-(a) Although lookbehind assertions in PCRE must match fixed length strings,
-each alternative branch of a lookbehind assertion can match a different length
-of string. Perl requires them all to have the same length.
-.sp
-(b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
-meta-character matches only at the very end of the string.
-.sp
-(c) If PCRE_EXTRA is set, a backslash followed by a letter with no special
-meaning is faulted. Otherwise, like Perl, the backslash is quietly ignored.
-(Perl can be made to issue a warning.)
-.sp
-(d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is
-inverted, that is, by default they are not greedy, but if followed by a
-question mark they are.
-.sp
-(e) PCRE_ANCHORED can be used at matching time to force a pattern to be tried
-only at the first matching position in the subject string.
-.sp
-(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, and
-PCRE_NO_AUTO_CAPTURE options for \fBpcre_exec()\fP have no Perl equivalents.
-.sp
-(g) The \eR escape sequence can be restricted to match only CR, LF, or CRLF
-by the PCRE_BSR_ANYCRLF option.
-.sp
-(h) The callout facility is PCRE-specific.
-.sp
-(i) The partial matching facility is PCRE-specific.
-.sp
-(j) Patterns compiled by PCRE can be saved and re-used at a later time, even on
-different hosts that have the other endianness. However, this does not apply to
-optimized data created by the just-in-time compiler.
-.sp
-(k) The alternative matching functions (\fBpcre_dfa_exec()\fP and
-\fBpcre16_dfa_exec()\fP) match in a different way and are not Perl-compatible.
-.sp
-(l) PCRE recognizes some special sequences such as (*CR) at the start of
-a pattern that set overall options that cannot be changed within the pattern.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 08 Januray 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcrecpp.3 b/src/third_party/pcre-8.30/doc/pcrecpp.3
deleted file mode 100644
index 772ce928bc4..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrecpp.3
+++ /dev/null
@@ -1,348 +0,0 @@
-.TH PCRECPP 3
-.SH NAME
-PCRE - Perl-compatible regular expressions.
-.SH "SYNOPSIS OF C++ WRAPPER"
-.rs
-.sp
-.B #include <pcrecpp.h>
-.
-.SH DESCRIPTION
-.rs
-.sp
-The C++ wrapper for PCRE was provided by Google Inc. Some additional
-functionality was added by Giuseppe Maxia. This brief man page was constructed
-from the notes in the \fIpcrecpp.h\fP file, which should be consulted for
-further details. Note that the C++ wrapper supports only the original 8-bit
-PCRE library. There is no 16-bit support at present.
-.
-.
-.SH "MATCHING INTERFACE"
-.rs
-.sp
-The "FullMatch" operation checks that supplied text matches a supplied pattern
-exactly. If pointer arguments are supplied, it copies matched sub-strings that
-match sub-patterns into them.
-.sp
- Example: successful match
- pcrecpp::RE re("h.*o");
- re.FullMatch("hello");
-.sp
- Example: unsuccessful match (requires full match):
- pcrecpp::RE re("e");
- !re.FullMatch("hello");
-.sp
- Example: creating a temporary RE object:
- pcrecpp::RE("h.*o").FullMatch("hello");
-.sp
-You can pass in a "const char*" or a "string" for "text". The examples below
-tend to use a const char*. You can, as in the different examples above, store
-the RE object explicitly in a variable or use a temporary RE object. The
-examples below use one mode or the other arbitrarily. Either could correctly be
-used for any of these examples.
-.P
-You must supply extra pointer arguments to extract matched subpieces.
-.sp
- Example: extracts "ruby" into "s" and 1234 into "i"
- int i;
- string s;
- pcrecpp::RE re("(\e\ew+):(\e\ed+)");
- re.FullMatch("ruby:1234", &s, &i);
-.sp
- Example: does not try to extract any extra sub-patterns
- re.FullMatch("ruby:1234", &s);
-.sp
- Example: does not try to extract into NULL
- re.FullMatch("ruby:1234", NULL, &i);
-.sp
- Example: integer overflow causes failure
- !re.FullMatch("ruby:1234567891234", NULL, &i);
-.sp
- Example: fails because there aren't enough sub-patterns:
- !pcrecpp::RE("\e\ew+:\e\ed+").FullMatch("ruby:1234", &s);
-.sp
- Example: fails because string cannot be stored in integer
- !pcrecpp::RE("(.*)").FullMatch("ruby", &i);
-.sp
-The provided pointer arguments can be pointers to any scalar numeric
-type, or one of:
-.sp
- string (matched piece is copied to string)
- StringPiece (StringPiece is mutated to point to matched piece)
- T (where "bool T::ParseFrom(const char*, int)" exists)
- NULL (the corresponding matched sub-pattern is not copied)
-.sp
-The function returns true iff all of the following conditions are satisfied:
-.sp
- a. "text" matches "pattern" exactly;
-.sp
- b. The number of matched sub-patterns is >= number of supplied
- pointers;
-.sp
- c. The "i"th argument has a suitable type for holding the
- string captured as the "i"th sub-pattern. If you pass in
- void * NULL for the "i"th argument, or a non-void * NULL
- of the correct type, or pass fewer arguments than the
- number of sub-patterns, "i"th captured sub-pattern is
- ignored.
-.sp
-CAVEAT: An optional sub-pattern that does not exist in the matched
-string is assigned the empty string. Therefore, the following will
-return false (because the empty string is not a valid number):
-.sp
- int number;
- pcrecpp::RE::FullMatch("abc", "[a-z]+(\e\ed+)?", &number);
-.sp
-The matching interface supports at most 16 arguments per call.
-If you need more, consider using the more general interface
-\fBpcrecpp::RE::DoMatch\fP. See \fBpcrecpp.h\fP for the signature for
-\fBDoMatch\fP.
-.P
-NOTE: Do not use \fBno_arg\fP, which is used internally to mark the end of a
-list of optional arguments, as a placeholder for missing arguments, as this can
-lead to segfaults.
-.
-.
-.SH "QUOTING METACHARACTERS"
-.rs
-.sp
-You can use the "QuoteMeta" operation to insert backslashes before all
-potentially meaningful characters in a string. The returned string, used as a
-regular expression, will exactly match the original string.
-.sp
- Example:
- string quoted = RE::QuoteMeta(unquoted);
-.sp
-Note that it's legal to escape a character even if it has no special meaning in
-a regular expression -- so this function does that. (This also makes it
-identical to the perl function of the same name; see "perldoc -f quotemeta".)
-For example, "1.5-2.0?" becomes "1\e.5\e-2\e.0\e?".
-.
-.SH "PARTIAL MATCHES"
-.rs
-.sp
-You can use the "PartialMatch" operation when you want the pattern
-to match any substring of the text.
-.sp
- Example: simple search for a string:
- pcrecpp::RE("ell").PartialMatch("hello");
-.sp
- Example: find first number in a string:
- int number;
- pcrecpp::RE re("(\e\ed+)");
- re.PartialMatch("x*100 + 20", &number);
- assert(number == 100);
-.
-.
-.SH "UTF-8 AND THE MATCHING INTERFACE"
-.rs
-.sp
-By default, pattern and text are plain text, one byte per character. The UTF8
-flag, passed to the constructor, causes both pattern and string to be treated
-as UTF-8 text, still a byte stream but potentially multiple bytes per
-character. In practice, the text is likelier to be UTF-8 than the pattern, but
-the match returned may depend on the UTF8 flag, so always use it when matching
-UTF8 text. For example, "." will match one byte normally but with UTF8 set may
-match up to three bytes of a multi-byte character.
-.sp
- Example:
- pcrecpp::RE_Options options;
- options.set_utf8();
- pcrecpp::RE re(utf8_pattern, options);
- re.FullMatch(utf8_string);
-.sp
- Example: using the convenience function UTF8():
- pcrecpp::RE re(utf8_pattern, pcrecpp::UTF8());
- re.FullMatch(utf8_string);
-.sp
-NOTE: The UTF8 flag is ignored if pcre was not configured with the
- --enable-utf8 flag.
-.
-.
-.SH "PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE"
-.rs
-.sp
-PCRE defines some modifiers to change the behavior of the regular expression
-engine. The C++ wrapper defines an auxiliary class, RE_Options, as a vehicle to
-pass such modifiers to a RE class. Currently, the following modifiers are
-supported:
-.sp
- modifier description Perl corresponding
-.sp
- PCRE_CASELESS case insensitive match /i
- PCRE_MULTILINE multiple lines match /m
- PCRE_DOTALL dot matches newlines /s
- PCRE_DOLLAR_ENDONLY $ matches only at end N/A
- PCRE_EXTRA strict escape parsing N/A
- PCRE_EXTENDED ignore whitespaces /x
- PCRE_UTF8 handles UTF8 chars built-in
- PCRE_UNGREEDY reverses * and *? N/A
- PCRE_NO_AUTO_CAPTURE disables capturing parens N/A (*)
-.sp
-(*) Both Perl and PCRE allow non capturing parentheses by means of the
-"?:" modifier within the pattern itself. e.g. (?:ab|cd) does not
-capture, while (ab|cd) does.
-.P
-For a full account on how each modifier works, please check the
-PCRE API reference page.
-.P
-For each modifier, there are two member functions whose name is made
-out of the modifier in lowercase, without the "PCRE_" prefix. For
-instance, PCRE_CASELESS is handled by
-.sp
- bool caseless()
-.sp
-which returns true if the modifier is set, and
-.sp
- RE_Options & set_caseless(bool)
-.sp
-which sets or unsets the modifier. Moreover, PCRE_EXTRA_MATCH_LIMIT can be
-accessed through the \fBset_match_limit()\fP and \fBmatch_limit()\fP member
-functions. Setting \fImatch_limit\fP to a non-zero value will limit the
-execution of pcre to keep it from doing bad things like blowing the stack or
-taking an eternity to return a result. A value of 5000 is good enough to stop
-stack blowup in a 2MB thread stack. Setting \fImatch_limit\fP to zero disables
-match limiting. Alternatively, you can call \fBmatch_limit_recursion()\fP
-which uses PCRE_EXTRA_MATCH_LIMIT_RECURSION to limit how much PCRE
-recurses. \fBmatch_limit()\fP limits the number of matches PCRE does;
-\fBmatch_limit_recursion()\fP limits the depth of internal recursion, and
-therefore the amount of stack that is used.
-.P
-Normally, to pass one or more modifiers to a RE class, you declare
-a \fIRE_Options\fP object, set the appropriate options, and pass this
-object to a RE constructor. Example:
-.sp
- RE_Options opt;
- opt.set_caseless(true);
- if (RE("HELLO", opt).PartialMatch("hello world")) ...
-.sp
-RE_options has two constructors. The default constructor takes no arguments and
-creates a set of flags that are off by default. The optional parameter
-\fIoption_flags\fP is to facilitate transfer of legacy code from C programs.
-This lets you do
-.sp
- RE(pattern,
- RE_Options(PCRE_CASELESS|PCRE_MULTILINE)).PartialMatch(str);
-.sp
-However, new code is better off doing
-.sp
- RE(pattern,
- RE_Options().set_caseless(true).set_multiline(true))
- .PartialMatch(str);
-.sp
-If you are going to pass one of the most used modifiers, there are some
-convenience functions that return a RE_Options class with the
-appropriate modifier already set: \fBCASELESS()\fP, \fBUTF8()\fP,
-\fBMULTILINE()\fP, \fBDOTALL\fP(), and \fBEXTENDED()\fP.
-.P
-If you need to set several options at once, and you don't want to go through
-the pains of declaring a RE_Options object and setting several options, there
-is a parallel method that give you such ability on the fly. You can concatenate
-several \fBset_xxxxx()\fP member functions, since each of them returns a
-reference to its class object. For example, to pass PCRE_CASELESS,
-PCRE_EXTENDED, and PCRE_MULTILINE to a RE with one statement, you may write:
-.sp
- RE(" ^ xyz \e\es+ .* blah$",
- RE_Options()
- .set_caseless(true)
- .set_extended(true)
- .set_multiline(true)).PartialMatch(sometext);
-.sp
-.
-.
-.SH "SCANNING TEXT INCREMENTALLY"
-.rs
-.sp
-The "Consume" operation may be useful if you want to repeatedly
-match regular expressions at the front of a string and skip over
-them as they match. This requires use of the "StringPiece" type,
-which represents a sub-range of a real string. Like RE, StringPiece
-is defined in the pcrecpp namespace.
-.sp
- Example: read lines of the form "var = value" from a string.
- string contents = ...; // Fill string somehow
- pcrecpp::StringPiece input(contents); // Wrap in a StringPiece
-.sp
- string var;
- int value;
- pcrecpp::RE re("(\e\ew+) = (\e\ed+)\en");
- while (re.Consume(&input, &var, &value)) {
- ...;
- }
-.sp
-Each successful call to "Consume" will set "var/value", and also
-advance "input" so it points past the matched text.
-.P
-The "FindAndConsume" operation is similar to "Consume" but does not
-anchor your match at the beginning of the string. For example, you
-could extract all words from a string by repeatedly calling
-.sp
- pcrecpp::RE("(\e\ew+)").FindAndConsume(&input, &word)
-.
-.
-.SH "PARSING HEX/OCTAL/C-RADIX NUMBERS"
-.rs
-.sp
-By default, if you pass a pointer to a numeric value, the
-corresponding text is interpreted as a base-10 number. You can
-instead wrap the pointer with a call to one of the operators Hex(),
-Octal(), or CRadix() to interpret the text in another base. The
-CRadix operator interprets C-style "0" (base-8) and "0x" (base-16)
-prefixes, but defaults to base-10.
-.sp
- Example:
- int a, b, c, d;
- pcrecpp::RE re("(.*) (.*) (.*) (.*)");
- re.FullMatch("100 40 0100 0x40",
- pcrecpp::Octal(&a), pcrecpp::Hex(&b),
- pcrecpp::CRadix(&c), pcrecpp::CRadix(&d));
-.sp
-will leave 64 in a, b, c, and d.
-.
-.
-.SH "REPLACING PARTS OF STRINGS"
-.rs
-.sp
-You can replace the first match of "pattern" in "str" with "rewrite".
-Within "rewrite", backslash-escaped digits (\e1 to \e9) can be
-used to insert text matching corresponding parenthesized group
-from the pattern. \e0 in "rewrite" refers to the entire matching
-text. For example:
-.sp
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").Replace("d", &s);
-.sp
-will leave "s" containing "yada dabba doo". The result is true if the pattern
-matches and a replacement occurs, false otherwise.
-.P
-\fBGlobalReplace\fP is like \fBReplace\fP except that it replaces all
-occurrences of the pattern in the string with the rewrite. Replacements are
-not subject to re-matching. For example:
-.sp
- string s = "yabba dabba doo";
- pcrecpp::RE("b+").GlobalReplace("d", &s);
-.sp
-will leave "s" containing "yada dada doo". It returns the number of
-replacements made.
-.P
-\fBExtract\fP is like \fBReplace\fP, except that if the pattern matches,
-"rewrite" is copied into "out" (an additional argument) with substitutions.
-The non-matching portions of "text" are ignored. Returns true iff a match
-occurred and the extraction happened successfully; if no match occurs, the
-string is left unaffected.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-The C++ wrapper was contributed by Google Inc.
-Copyright (c) 2007 Google Inc.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 08 January 2012
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcregrep.1 b/src/third_party/pcre-8.30/doc/pcregrep.1
deleted file mode 100644
index 6ee4cc6a008..00000000000
--- a/src/third_party/pcre-8.30/doc/pcregrep.1
+++ /dev/null
@@ -1,582 +0,0 @@
-.TH PCREGREP 1
-.SH NAME
-pcregrep - a grep with Perl-compatible regular expressions.
-.SH SYNOPSIS
-.B pcregrep [options] [long options] [pattern] [path1 path2 ...]
-.
-.SH DESCRIPTION
-.rs
-.sp
-\fBpcregrep\fP searches files for character patterns, in the same way as other
-grep commands do, but it uses the PCRE regular expression library to support
-patterns that are compatible with the regular expressions of Perl 5. See
-.\" HREF
-\fBpcrepattern\fP(3)
-.\"
-for a full description of syntax and semantics of the regular expressions
-that PCRE supports.
-.P
-Patterns, whether supplied on the command line or in a separate file, are given
-without delimiters. For example:
-.sp
- pcregrep Thursday /etc/motd
-.sp
-If you attempt to use delimiters (for example, by surrounding a pattern with
-slashes, as is common in Perl scripts), they are interpreted as part of the
-pattern. Quotes can of course be used to delimit patterns on the command line
-because they are interpreted by the shell, and indeed they are required if a
-pattern contains white space or shell metacharacters.
-.P
-The first argument that follows any option settings is treated as the single
-pattern to be matched when neither \fB-e\fP nor \fB-f\fP is present.
-Conversely, when one or both of these options are used to specify patterns, all
-arguments are treated as path names. At least one of \fB-e\fP, \fB-f\fP, or an
-argument pattern must be provided.
-.P
-If no files are specified, \fBpcregrep\fP reads the standard input. The
-standard input can also be referenced by a name consisting of a single hyphen.
-For example:
-.sp
- pcregrep some-pattern /file1 - /file3
-.sp
-By default, each line that matches a pattern is copied to the standard
-output, and if there is more than one file, the file name is output at the
-start of each line, followed by a colon. However, there are options that can
-change how \fBpcregrep\fP behaves. In particular, the \fB-M\fP option makes it
-possible to search for patterns that span line boundaries. What defines a line
-boundary is controlled by the \fB-N\fP (\fB--newline\fP) option.
-.P
-The amount of memory used for buffering files that are being scanned is
-controlled by a parameter that can be set by the \fB--buffer-size\fP option.
-The default value for this parameter is specified when \fBpcregrep\fP is built,
-with the default default being 20K. A block of memory three times this size is
-used (to allow for buffering "before" and "after" lines). An error occurs if a
-line overflows the buffer.
-.P
-Patterns are limited to 8K or BUFSIZ bytes, whichever is the greater. BUFSIZ is
-defined in \fB<stdio.h>\fP. When there is more than one pattern (specified by
-the use of \fB-e\fP and/or \fB-f\fP), each pattern is applied to each line in
-the order in which they are defined, except that all the \fB-e\fP patterns are
-tried before the \fB-f\fP patterns.
-.P
-By default, as soon as one pattern matches (or fails to match when \fB-v\fP is
-used), no further patterns are considered. However, if \fB--colour\fP (or
-\fB--color\fP) is used to colour the matching substrings, or if
-\fB--only-matching\fP, \fB--file-offsets\fP, or \fB--line-offsets\fP is used to
-output only the part of the line that matched (either shown literally, or as an
-offset), scanning resumes immediately following the match, so that further
-matches on the same line can be found. If there are multiple patterns, they are
-all tried on the remainder of the line, but patterns that follow the one that
-matched are not tried on the earlier part of the line.
-.P
-This is the same behaviour as GNU grep, but it does mean that the order in
-which multiple patterns are specified can affect the output when one of the
-above options is used.
-.P
-Patterns that can match an empty string are accepted, but empty string
-matches are never recognized. An example is the pattern "(super)?(man)?", in
-which all components are optional. This pattern finds all occurrences of both
-"super" and "man"; the output differs from matching with "super|man" when only
-the matching substrings are being shown.
-.P
-If the \fBLC_ALL\fP or \fBLC_CTYPE\fP environment variable is set,
-\fBpcregrep\fP uses the value to set a locale when calling the PCRE library.
-The \fB--locale\fP option can be used to override this.
-.
-.
-.SH "SUPPORT FOR COMPRESSED FILES"
-.rs
-.sp
-It is possible to compile \fBpcregrep\fP so that it uses \fBlibz\fP or
-\fBlibbz2\fP to read files whose names end in \fB.gz\fP or \fB.bz2\fP,
-respectively. You can find out whether your binary has support for one or both
-of these file types by running it with the \fB--help\fP option. If the
-appropriate support is not present, files are treated as plain text. The
-standard input is always so treated.
-.
-.
-.SH OPTIONS
-.rs
-.sp
-The order in which some of the options appear can affect the output. For
-example, both the \fB-h\fP and \fB-l\fP options affect the printing of file
-names. Whichever comes later in the command line will be the one that takes
-effect. Numerical values for options may be followed by K or M, to signify
-multiplication by 1024 or 1024*1024 respectively.
-.TP 10
-\fB--\fP
-This terminates the list of options. It is useful if the next item on the
-command line starts with a hyphen but is not an option. This allows for the
-processing of patterns and filenames that start with hyphens.
-.TP
-\fB-A\fP \fInumber\fP, \fB--after-context=\fP\fInumber\fP
-Output \fInumber\fP lines of context after each matching line. If filenames
-and/or line numbers are being output, a hyphen separator is used instead of a
-colon for the context lines. A line containing "--" is output between each
-group of lines, unless they are in fact contiguous in the input file. The value
-of \fInumber\fP is expected to be relatively small. However, \fBpcregrep\fP
-guarantees to have up to 8K of following text available for context output.
-.TP
-\fB-B\fP \fInumber\fP, \fB--before-context=\fP\fInumber\fP
-Output \fInumber\fP lines of context before each matching line. If filenames
-and/or line numbers are being output, a hyphen separator is used instead of a
-colon for the context lines. A line containing "--" is output between each
-group of lines, unless they are in fact contiguous in the input file. The value
-of \fInumber\fP is expected to be relatively small. However, \fBpcregrep\fP
-guarantees to have up to 8K of preceding text available for context output.
-.TP
-\fB--buffer-size=\fP\fInumber\fP
-Set the parameter that controls how much memory is used for buffering files
-that are being scanned.
-.TP
-\fB-C\fP \fInumber\fP, \fB--context=\fP\fInumber\fP
-Output \fInumber\fP lines of context both before and after each matching line.
-This is equivalent to setting both \fB-A\fP and \fB-B\fP to the same value.
-.TP
-\fB-c\fP, \fB--count\fP
-Do not output individual lines from the files that are being scanned; instead
-output the number of lines that would otherwise have been shown. If no lines
-are selected, the number zero is output. If several files are are being
-scanned, a count is output for each of them. However, if the
-\fB--files-with-matches\fP option is also used, only those files whose counts
-are greater than zero are listed. When \fB-c\fP is used, the \fB-A\fP,
-\fB-B\fP, and \fB-C\fP options are ignored.
-.TP
-\fB--colour\fP, \fB--color\fP
-If this option is given without any data, it is equivalent to "--colour=auto".
-If data is required, it must be given in the same shell item, separated by an
-equals sign.
-.TP
-\fB--colour=\fP\fIvalue\fP, \fB--color=\fP\fIvalue\fP
-This option specifies under what circumstances the parts of a line that matched
-a pattern should be coloured in the output. By default, the output is not
-coloured. The value (which is optional, see above) may be "never", "always", or
-"auto". In the latter case, colouring happens only if the standard output is
-connected to a terminal. More resources are used when colouring is enabled,
-because \fBpcregrep\fP has to search for all possible matches in a line, not
-just one, in order to colour them all.
-.sp
-The colour that is used can be specified by setting the environment variable
-PCREGREP_COLOUR or PCREGREP_COLOR. The value of this variable should be a
-string of two numbers, separated by a semicolon. They are copied directly into
-the control string for setting colour on a terminal, so it is your
-responsibility to ensure that they make sense. If neither of the environment
-variables is set, the default is "1;31", which gives red.
-.TP
-\fB-D\fP \fIaction\fP, \fB--devices=\fP\fIaction\fP
-If an input path is not a regular file or a directory, "action" specifies how
-it is to be processed. Valid values are "read" (the default) or "skip"
-(silently skip the path).
-.TP
-\fB-d\fP \fIaction\fP, \fB--directories=\fP\fIaction\fP
-If an input path is a directory, "action" specifies how it is to be processed.
-Valid values are "read" (the default), "recurse" (equivalent to the \fB-r\fP
-option), or "skip" (silently skip the path). In the default case, directories
-are read as if they were ordinary files. In some operating systems the effect
-of reading a directory like this is an immediate end-of-file.
-.TP
-\fB-e\fP \fIpattern\fP, \fB--regex=\fP\fIpattern\fP, \fB--regexp=\fP\fIpattern\fP
-Specify a pattern to be matched. This option can be used multiple times in
-order to specify several patterns. It can also be used as a way of specifying a
-single pattern that starts with a hyphen. When \fB-e\fP is used, no argument
-pattern is taken from the command line; all arguments are treated as file
-names. There is an overall maximum of 100 patterns. They are applied to each
-line in the order in which they are defined until one matches (or fails to
-match if \fB-v\fP is used). If \fB-f\fP is used with \fB-e\fP, the command line
-patterns are matched first, followed by the patterns from the file, independent
-of the order in which these options are specified. Note that multiple use of
-\fB-e\fP is not the same as a single pattern with alternatives. For example,
-X|Y finds the first character in a line that is X or Y, whereas if the two
-patterns are given separately, \fBpcregrep\fP finds X if it is present, even if
-it follows Y in the line. It finds Y only if there is no X in the line. This
-really matters only if you are using \fB-o\fP to show the part(s) of the line
-that matched.
-.TP
-\fB--exclude\fP=\fIpattern\fP
-When \fBpcregrep\fP is searching the files in a directory as a consequence of
-the \fB-r\fP (recursive search) option, any regular files whose names match the
-pattern are excluded. Subdirectories are not excluded by this option; they are
-searched recursively, subject to the \fB--exclude-dir\fP and
-\fB--include_dir\fP options. The pattern is a PCRE regular expression, and is
-matched against the final component of the file name (not the entire path). If
-a file name matches both \fB--include\fP and \fB--exclude\fP, it is excluded.
-There is no short form for this option.
-.TP
-\fB--exclude-dir\fP=\fIpattern\fP
-When \fBpcregrep\fP is searching the contents of a directory as a consequence
-of the \fB-r\fP (recursive search) option, any subdirectories whose names match
-the pattern are excluded. (Note that the \fP--exclude\fP option does not affect
-subdirectories.) The pattern is a PCRE regular expression, and is matched
-against the final component of the name (not the entire path). If a
-subdirectory name matches both \fB--include-dir\fP and \fB--exclude-dir\fP, it
-is excluded. There is no short form for this option.
-.TP
-\fB-F\fP, \fB--fixed-strings\fP
-Interpret each pattern as a list of fixed strings, separated by newlines,
-instead of as a regular expression. The \fB-w\fP (match as a word) and \fB-x\fP
-(match whole line) options can be used with \fB-F\fP. They apply to each of the
-fixed strings. A line is selected if any of the fixed strings are found in it
-(subject to \fB-w\fP or \fB-x\fP, if present).
-.TP
-\fB-f\fP \fIfilename\fP, \fB--file=\fP\fIfilename\fP
-Read a number of patterns from the file, one per line, and match them against
-each line of input. A data line is output if any of the patterns match it. The
-filename can be given as "-" to refer to the standard input. When \fB-f\fP is
-used, patterns specified on the command line using \fB-e\fP may also be
-present; they are tested before the file's patterns. However, no other pattern
-is taken from the command line; all arguments are treated as file names. There
-is an overall maximum of 100 patterns. Trailing white space is removed from
-each line, and blank lines are ignored. An empty file contains no patterns and
-therefore matches nothing. See also the comments about multiple patterns versus
-a single pattern with alternatives in the description of \fB-e\fP above.
-.TP
-\fB--file-offsets\fP
-Instead of showing lines or parts of lines that match, show each match as an
-offset from the start of the file and a length, separated by a comma. In this
-mode, no context is shown. That is, the \fB-A\fP, \fB-B\fP, and \fB-C\fP
-options are ignored. If there is more than one match in a line, each of them is
-shown separately. This option is mutually exclusive with \fB--line-offsets\fP
-and \fB--only-matching\fP.
-.TP
-\fB-H\fP, \fB--with-filename\fP
-Force the inclusion of the filename at the start of output lines when searching
-a single file. By default, the filename is not shown in this case. For matching
-lines, the filename is followed by a colon; for context lines, a hyphen
-separator is used. If a line number is also being output, it follows the file
-name.
-.TP
-\fB-h\fP, \fB--no-filename\fP
-Suppress the output filenames when searching multiple files. By default,
-filenames are shown when multiple files are searched. For matching lines, the
-filename is followed by a colon; for context lines, a hyphen separator is used.
-If a line number is also being output, it follows the file name.
-.TP
-\fB--help\fP
-Output a help message, giving brief details of the command options and file
-type support, and then exit.
-.TP
-\fB-i\fP, \fB--ignore-case\fP
-Ignore upper/lower case distinctions during comparisons.
-.TP
-\fB--include\fP=\fIpattern\fP
-When \fBpcregrep\fP is searching the files in a directory as a consequence of
-the \fB-r\fP (recursive search) option, only those regular files whose names
-match the pattern are included. Subdirectories are always included and searched
-recursively, subject to the \fP--include-dir\fP and \fB--exclude-dir\fP
-options. The pattern is a PCRE regular expression, and is matched against the
-final component of the file name (not the entire path). If a file name matches
-both \fB--include\fP and \fB--exclude\fP, it is excluded. There is no short
-form for this option.
-.TP
-\fB--include-dir\fP=\fIpattern\fP
-When \fBpcregrep\fP is searching the contents of a directory as a consequence
-of the \fB-r\fP (recursive search) option, only those subdirectories whose
-names match the pattern are included. (Note that the \fB--include\fP option
-does not affect subdirectories.) The pattern is a PCRE regular expression, and
-is matched against the final component of the name (not the entire path). If a
-subdirectory name matches both \fB--include-dir\fP and \fB--exclude-dir\fP, it
-is excluded. There is no short form for this option.
-.TP
-\fB-L\fP, \fB--files-without-match\fP
-Instead of outputting lines from the files, just output the names of the files
-that do not contain any lines that would have been output. Each file name is
-output once, on a separate line.
-.TP
-\fB-l\fP, \fB--files-with-matches\fP
-Instead of outputting lines from the files, just output the names of the files
-containing lines that would have been output. Each file name is output
-once, on a separate line. Searching normally stops as soon as a matching line
-is found in a file. However, if the \fB-c\fP (count) option is also used,
-matching continues in order to obtain the correct count, and those files that
-have at least one match are listed along with their counts. Using this option
-with \fB-c\fP is a way of suppressing the listing of files with no matches.
-.TP
-\fB--label\fP=\fIname\fP
-This option supplies a name to be used for the standard input when file names
-are being output. If not supplied, "(standard input)" is used. There is no
-short form for this option.
-.TP
-\fB--line-buffered\fP
-When this option is given, input is read and processed line by line, and the
-output is flushed after each write. By default, input is read in large chunks,
-unless \fBpcregrep\fP can determine that it is reading from a terminal (which
-is currently possible only in Unix environments). Output to terminal is
-normally automatically flushed by the operating system. This option can be
-useful when the input or output is attached to a pipe and you do not want
-\fBpcregrep\fP to buffer up large amounts of data. However, its use will affect
-performance, and the \fB-M\fP (multiline) option ceases to work.
-.TP
-\fB--line-offsets\fP
-Instead of showing lines or parts of lines that match, show each match as a
-line number, the offset from the start of the line, and a length. The line
-number is terminated by a colon (as usual; see the \fB-n\fP option), and the
-offset and length are separated by a comma. In this mode, no context is shown.
-That is, the \fB-A\fP, \fB-B\fP, and \fB-C\fP options are ignored. If there is
-more than one match in a line, each of them is shown separately. This option is
-mutually exclusive with \fB--file-offsets\fP and \fB--only-matching\fP.
-.TP
-\fB--locale\fP=\fIlocale-name\fP
-This option specifies a locale to be used for pattern matching. It overrides
-the value in the \fBLC_ALL\fP or \fBLC_CTYPE\fP environment variables. If no
-locale is specified, the PCRE library's default (usually the "C" locale) is
-used. There is no short form for this option.
-.TP
-\fB--match-limit\fP=\fInumber\fP
-Processing some regular expression patterns can require a very large amount of
-memory, leading in some cases to a program crash if not enough is available.
-Other patterns may take a very long time to search for all possible matching
-strings. The \fBpcre_exec()\fP function that is called by \fBpcregrep\fP to do
-the matching has two parameters that can limit the resources that it uses.
-.sp
-The \fB--match-limit\fP option provides a means of limiting resource usage
-when processing patterns that are not going to match, but which have a very
-large number of possibilities in their search trees. The classic example is a
-pattern that uses nested unlimited repeats. Internally, PCRE uses a function
-called \fBmatch()\fP which it calls repeatedly (sometimes recursively). The
-limit set by \fB--match-limit\fP is imposed on the number of times this
-function is called during a match, which has the effect of limiting the amount
-of backtracking that can take place.
-.sp
-The \fB--recursion-limit\fP option is similar to \fB--match-limit\fP, but
-instead of limiting the total number of times that \fBmatch()\fP is called, it
-limits the depth of recursive calls, which in turn limits the amount of memory
-that can be used. The recursion depth is a smaller number than the total number
-of calls, because not all calls to \fBmatch()\fP are recursive. This limit is
-of use only if it is set smaller than \fB--match-limit\fP.
-.sp
-There are no short forms for these options. The default settings are specified
-when the PCRE library is compiled, with the default default being 10 million.
-.TP
-\fB-M\fP, \fB--multiline\fP
-Allow patterns to match more than one line. When this option is given, patterns
-may usefully contain literal newline characters and internal occurrences of ^
-and $ characters. The output for a successful match may consist of more than
-one line, the last of which is the one in which the match ended. If the matched
-string ends with a newline sequence the output ends at the end of that line.
-.sp
-When this option is set, the PCRE library is called in "multiline" mode.
-There is a limit to the number of lines that can be matched, imposed by the way
-that \fBpcregrep\fP buffers the input file as it scans it. However,
-\fBpcregrep\fP ensures that at least 8K characters or the rest of the document
-(whichever is the shorter) are available for forward matching, and similarly
-the previous 8K characters (or all the previous characters, if fewer than 8K)
-are guaranteed to be available for lookbehind assertions. This option does not
-work when input is read line by line (see \fP--line-buffered\fP.)
-.TP
-\fB-N\fP \fInewline-type\fP, \fB--newline\fP=\fInewline-type\fP
-The PCRE library supports five different conventions for indicating
-the ends of lines. They are the single-character sequences CR (carriage return)
-and LF (linefeed), the two-character sequence CRLF, an "anycrlf" convention,
-which recognizes any of the preceding three types, and an "any" convention, in
-which any Unicode line ending sequence is assumed to end a line. The Unicode
-sequences are the three just mentioned, plus VT (vertical tab, U+000B), FF
-(form feed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and
-PS (paragraph separator, U+2029).
-.sp
-When the PCRE library is built, a default line-ending sequence is specified.
-This is normally the standard sequence for the operating system. Unless
-otherwise specified by this option, \fBpcregrep\fP uses the library's default.
-The possible values for this option are CR, LF, CRLF, ANYCRLF, or ANY. This
-makes it possible to use \fBpcregrep\fP on files that have come from other
-environments without having to modify their line endings. If the data that is
-being scanned does not agree with the convention set by this option,
-\fBpcregrep\fP may behave in strange ways.
-.TP
-\fB-n\fP, \fB--line-number\fP
-Precede each output line by its line number in the file, followed by a colon
-for matching lines or a hyphen for context lines. If the filename is also being
-output, it precedes the line number. This option is forced if
-\fB--line-offsets\fP is used.
-.TP
-\fB--no-jit\fP
-If the PCRE library is built with support for just-in-time compiling (which
-speeds up matching), \fBpcregrep\fP automatically makes use of this, unless it
-was explicitly disabled at build time. This option can be used to disable the
-use of JIT at run time. It is provided for testing and working round problems.
-It should never be needed in normal use.
-.TP
-\fB-o\fP, \fB--only-matching\fP
-Show only the part of the line that matched a pattern instead of the whole
-line. In this mode, no context is shown. That is, the \fB-A\fP, \fB-B\fP, and
-\fB-C\fP options are ignored. If there is more than one match in a line, each
-of them is shown separately. If \fB-o\fP is combined with \fB-v\fP (invert the
-sense of the match to find non-matching lines), no output is generated, but the
-return code is set appropriately. If the matched portion of the line is empty,
-nothing is output unless the file name or line number are being printed, in
-which case they are shown on an otherwise empty line. This option is mutually
-exclusive with \fB--file-offsets\fP and \fB--line-offsets\fP.
-.TP
-\fB-o\fP\fInumber\fP, \fB--only-matching\fP=\fInumber\fP
-Show only the part of the line that matched the capturing parentheses of the
-given number. Up to 32 capturing parentheses are supported. Because these
-options can be given without an argument (see above), if an argument is
-present, it must be given in the same shell item, for example, -o3 or
---only-matching=2. The comments given for the non-argument case above also
-apply to this case. If the specified capturing parentheses do not exist in the
-pattern, or were not set in the match, nothing is output unless the file name
-or line number are being printed.
-.TP
-\fB-q\fP, \fB--quiet\fP
-Work quietly, that is, display nothing except error messages. The exit
-status indicates whether or not any matches were found.
-.TP
-\fB-r\fP, \fB--recursive\fP
-If any given path is a directory, recursively scan the files it contains,
-taking note of any \fB--include\fP and \fB--exclude\fP settings. By default, a
-directory is read as a normal file; in some operating systems this gives an
-immediate end-of-file. This option is a shorthand for setting the \fB-d\fP
-option to "recurse".
-.TP
-\fB--recursion-limit\fP=\fInumber\fP
-See \fB--match-limit\fP above.
-.TP
-\fB-s\fP, \fB--no-messages\fP
-Suppress error messages about non-existent or unreadable files. Such files are
-quietly skipped. However, the return code is still 2, even if matches were
-found in other files.
-.TP
-\fB-u\fP, \fB--utf-8\fP
-Operate in UTF-8 mode. This option is available only if PCRE has been compiled
-with UTF-8 support. Both patterns and subject lines must be valid strings of
-UTF-8 characters.
-.TP
-\fB-V\fP, \fB--version\fP
-Write the version numbers of \fBpcregrep\fP and the PCRE library that is being
-used to the standard error stream.
-.TP
-\fB-v\fP, \fB--invert-match\fP
-Invert the sense of the match, so that lines which do \fInot\fP match any of
-the patterns are the ones that are found.
-.TP
-\fB-w\fP, \fB--word-regex\fP, \fB--word-regexp\fP
-Force the patterns to match only whole words. This is equivalent to having \eb
-at the start and end of the pattern.
-.TP
-\fB-x\fP, \fB--line-regex\fP, \fB--line-regexp\fP
-Force the patterns to be anchored (each must start matching at the beginning of
-a line) and in addition, require them to match entire lines. This is
-equivalent to having ^ and $ characters at the start and end of each
-alternative branch in every pattern.
-.
-.
-.SH "ENVIRONMENT VARIABLES"
-.rs
-.sp
-The environment variables \fBLC_ALL\fP and \fBLC_CTYPE\fP are examined, in that
-order, for a locale. The first one that is set is used. This can be overridden
-by the \fB--locale\fP option. If no locale is set, the PCRE library's default
-(usually the "C" locale) is used.
-.
-.
-.SH "NEWLINES"
-.rs
-.sp
-The \fB-N\fP (\fB--newline\fP) option allows \fBpcregrep\fP to scan files with
-different newline conventions from the default. However, the setting of this
-option does not affect the way in which \fBpcregrep\fP writes information to
-the standard error and output streams. It uses the string "\en" in C
-\fBprintf()\fP calls to indicate newlines, relying on the C I/O library to
-convert this to an appropriate sequence if the output is sent to a file.
-.
-.
-.SH "OPTIONS COMPATIBILITY"
-.rs
-.sp
-Many of the short and long forms of \fBpcregrep\fP's options are the same
-as in the GNU \fBgrep\fP program (version 2.5.4). Any long option of the form
-\fB--xxx-regexp\fP (GNU terminology) is also available as \fB--xxx-regex\fP
-(PCRE terminology). However, the \fB--file-offsets\fP, \fB--include-dir\fP,
-\fB--line-offsets\fP, \fB--locale\fP, \fB--match-limit\fP, \fB-M\fP,
-\fB--multiline\fP, \fB-N\fP, \fB--newline\fP, \fB--recursion-limit\fP,
-\fB-u\fP, and \fB--utf-8\fP options are specific to \fBpcregrep\fP, as is the
-use of the \fB--only-matching\fP option with a capturing parentheses number.
-.P
-Although most of the common options work the same way, a few are different in
-\fBpcregrep\fP. For example, the \fB--include\fP option's argument is a glob
-for GNU \fBgrep\fP, but a regular expression for \fBpcregrep\fP. If both the
-\fB-c\fP and \fB-l\fP options are given, GNU grep lists only file names,
-without counts, but \fBpcregrep\fP gives the counts.
-.
-.
-.SH "OPTIONS WITH DATA"
-.rs
-.sp
-There are four different ways in which an option with data can be specified.
-If a short form option is used, the data may follow immediately, or (with one
-exception) in the next command line item. For example:
-.sp
- -f/some/file
- -f /some/file
-.sp
-The exception is the \fB-o\fP option, which may appear with or without data.
-Because of this, if data is present, it must follow immediately in the same
-item, for example -o3.
-.P
-If a long form option is used, the data may appear in the same command line
-item, separated by an equals character, or (with two exceptions) it may appear
-in the next command line item. For example:
-.sp
- --file=/some/file
- --file /some/file
-.sp
-Note, however, that if you want to supply a file name beginning with ~ as data
-in a shell command, and have the shell expand ~ to a home directory, you must
-separate the file name from the option, because the shell does not treat ~
-specially unless it is at the start of an item.
-.P
-The exceptions to the above are the \fB--colour\fP (or \fB--color\fP) and
-\fB--only-matching\fP options, for which the data is optional. If one of these
-options does have data, it must be given in the first form, using an equals
-character. Otherwise \fBpcregrep\fP will assume that it has no data.
-.
-.
-.SH "MATCHING ERRORS"
-.rs
-.sp
-It is possible to supply a regular expression that takes a very long time to
-fail to match certain lines. Such patterns normally involve nested indefinite
-repeats, for example: (a+)*\ed when matched against a line of a's with no final
-digit. The PCRE matching function has a resource limit that causes it to abort
-in these circumstances. If this happens, \fBpcregrep\fP outputs an error
-message and the line that caused the problem to the standard error stream. If
-there are more than 20 such errors, \fBpcregrep\fP gives up.
-.P
-The \fB--match-limit\fP option of \fBpcregrep\fP can be used to set the overall
-resource limit; there is a second option called \fB--recursion-limit\fP that
-sets a limit on the amount of memory (usually stack) that is used (see the
-discussion of these options above).
-.
-.
-.SH DIAGNOSTICS
-.rs
-.sp
-Exit status is 0 if any matches were found, 1 if no matches were found, and 2
-for syntax errors, overlong lines, non-existent or inaccessible files (even if
-matches were found in other files) or too many matching errors. Using the
-\fB-s\fP option to suppress error messages about inaccessible files does not
-affect the return code.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcrepattern\fP(3), \fBpcretest\fP(1).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 06 September 2011
-Copyright (c) 1997-2011 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcregrep.txt b/src/third_party/pcre-8.30/doc/pcregrep.txt
deleted file mode 100644
index bc7d5a0c424..00000000000
--- a/src/third_party/pcre-8.30/doc/pcregrep.txt
+++ /dev/null
@@ -1,630 +0,0 @@
-PCREGREP(1) PCREGREP(1)
-
-
-NAME
- pcregrep - a grep with Perl-compatible regular expressions.
-
-
-SYNOPSIS
- pcregrep [options] [long options] [pattern] [path1 path2 ...]
-
-
-DESCRIPTION
-
- pcregrep searches files for character patterns, in the same way as
- other grep commands do, but it uses the PCRE regular expression library
- to support patterns that are compatible with the regular expressions of
- Perl 5. See pcrepattern(3) for a full description of syntax and seman-
- tics of the regular expressions that PCRE supports.
-
- Patterns, whether supplied on the command line or in a separate file,
- are given without delimiters. For example:
-
- pcregrep Thursday /etc/motd
-
- If you attempt to use delimiters (for example, by surrounding a pattern
- with slashes, as is common in Perl scripts), they are interpreted as
- part of the pattern. Quotes can of course be used to delimit patterns
- on the command line because they are interpreted by the shell, and
- indeed they are required if a pattern contains white space or shell
- metacharacters.
-
- The first argument that follows any option settings is treated as the
- single pattern to be matched when neither -e nor -f is present. Con-
- versely, when one or both of these options are used to specify pat-
- terns, all arguments are treated as path names. At least one of -e, -f,
- or an argument pattern must be provided.
-
- If no files are specified, pcregrep reads the standard input. The stan-
- dard input can also be referenced by a name consisting of a single
- hyphen. For example:
-
- pcregrep some-pattern /file1 - /file3
-
- By default, each line that matches a pattern is copied to the standard
- output, and if there is more than one file, the file name is output at
- the start of each line, followed by a colon. However, there are options
- that can change how pcregrep behaves. In particular, the -M option
- makes it possible to search for patterns that span line boundaries.
- What defines a line boundary is controlled by the -N (--newline)
- option.
-
- The amount of memory used for buffering files that are being scanned is
- controlled by a parameter that can be set by the --buffer-size option.
- The default value for this parameter is specified when pcregrep is
- built, with the default default being 20K. A block of memory three
- times this size is used (to allow for buffering "before" and "after"
- lines). An error occurs if a line overflows the buffer.
-
- Patterns are limited to 8K or BUFSIZ bytes, whichever is the greater.
- BUFSIZ is defined in <stdio.h>. When there is more than one pattern
- (specified by the use of -e and/or -f), each pattern is applied to each
- line in the order in which they are defined, except that all the -e
- patterns are tried before the -f patterns.
-
- By default, as soon as one pattern matches (or fails to match when -v
- is used), no further patterns are considered. However, if --colour (or
- --color) is used to colour the matching substrings, or if --only-match-
- ing, --file-offsets, or --line-offsets is used to output only the part
- of the line that matched (either shown literally, or as an offset),
- scanning resumes immediately following the match, so that further
- matches on the same line can be found. If there are multiple patterns,
- they are all tried on the remainder of the line, but patterns that fol-
- low the one that matched are not tried on the earlier part of the line.
-
- This is the same behaviour as GNU grep, but it does mean that the order
- in which multiple patterns are specified can affect the output when one
- of the above options is used.
-
- Patterns that can match an empty string are accepted, but empty string
- matches are never recognized. An example is the pattern
- "(super)?(man)?", in which all components are optional. This pattern
- finds all occurrences of both "super" and "man"; the output differs
- from matching with "super|man" when only the matching substrings are
- being shown.
-
- If the LC_ALL or LC_CTYPE environment variable is set, pcregrep uses
- the value to set a locale when calling the PCRE library. The --locale
- option can be used to override this.
-
-
-SUPPORT FOR COMPRESSED FILES
-
- It is possible to compile pcregrep so that it uses libz or libbz2 to
- read files whose names end in .gz or .bz2, respectively. You can find
- out whether your binary has support for one or both of these file types
- by running it with the --help option. If the appropriate support is not
- present, files are treated as plain text. The standard input is always
- so treated.
-
-
-OPTIONS
-
- The order in which some of the options appear can affect the output.
- For example, both the -h and -l options affect the printing of file
- names. Whichever comes later in the command line will be the one that
- takes effect. Numerical values for options may be followed by K or M,
- to signify multiplication by 1024 or 1024*1024 respectively.
-
- -- This terminates the list of options. It is useful if the next
- item on the command line starts with a hyphen but is not an
- option. This allows for the processing of patterns and file-
- names that start with hyphens.
-
- -A number, --after-context=number
- Output number lines of context after each matching line. If
- filenames and/or line numbers are being output, a hyphen sep-
- arator is used instead of a colon for the context lines. A
- line containing "--" is output between each group of lines,
- unless they are in fact contiguous in the input file. The
- value of number is expected to be relatively small. However,
- pcregrep guarantees to have up to 8K of following text avail-
- able for context output.
-
- -B number, --before-context=number
- Output number lines of context before each matching line. If
- filenames and/or line numbers are being output, a hyphen sep-
- arator is used instead of a colon for the context lines. A
- line containing "--" is output between each group of lines,
- unless they are in fact contiguous in the input file. The
- value of number is expected to be relatively small. However,
- pcregrep guarantees to have up to 8K of preceding text avail-
- able for context output.
-
- --buffer-size=number
- Set the parameter that controls how much memory is used for
- buffering files that are being scanned.
-
- -C number, --context=number
- Output number lines of context both before and after each
- matching line. This is equivalent to setting both -A and -B
- to the same value.
-
- -c, --count
- Do not output individual lines from the files that are being
- scanned; instead output the number of lines that would other-
- wise have been shown. If no lines are selected, the number
- zero is output. If several files are are being scanned, a
- count is output for each of them. However, if the --files-
- with-matches option is also used, only those files whose
- counts are greater than zero are listed. When -c is used, the
- -A, -B, and -C options are ignored.
-
- --colour, --color
- If this option is given without any data, it is equivalent to
- "--colour=auto". If data is required, it must be given in
- the same shell item, separated by an equals sign.
-
- --colour=value, --color=value
- This option specifies under what circumstances the parts of a
- line that matched a pattern should be coloured in the output.
- By default, the output is not coloured. The value (which is
- optional, see above) may be "never", "always", or "auto". In
- the latter case, colouring happens only if the standard out-
- put is connected to a terminal. More resources are used when
- colouring is enabled, because pcregrep has to search for all
- possible matches in a line, not just one, in order to colour
- them all.
-
- The colour that is used can be specified by setting the envi-
- ronment variable PCREGREP_COLOUR or PCREGREP_COLOR. The value
- of this variable should be a string of two numbers, separated
- by a semicolon. They are copied directly into the control
- string for setting colour on a terminal, so it is your
- responsibility to ensure that they make sense. If neither of
- the environment variables is set, the default is "1;31",
- which gives red.
-
- -D action, --devices=action
- If an input path is not a regular file or a directory,
- "action" specifies how it is to be processed. Valid values
- are "read" (the default) or "skip" (silently skip the path).
-
- -d action, --directories=action
- If an input path is a directory, "action" specifies how it is
- to be processed. Valid values are "read" (the default),
- "recurse" (equivalent to the -r option), or "skip" (silently
- skip the path). In the default case, directories are read as
- if they were ordinary files. In some operating systems the
- effect of reading a directory like this is an immediate end-
- of-file.
-
- -e pattern, --regex=pattern, --regexp=pattern
- Specify a pattern to be matched. This option can be used mul-
- tiple times in order to specify several patterns. It can also
- be used as a way of specifying a single pattern that starts
- with a hyphen. When -e is used, no argument pattern is taken
- from the command line; all arguments are treated as file
- names. There is an overall maximum of 100 patterns. They are
- applied to each line in the order in which they are defined
- until one matches (or fails to match if -v is used). If -f is
- used with -e, the command line patterns are matched first,
- followed by the patterns from the file, independent of the
- order in which these options are specified. Note that multi-
- ple use of -e is not the same as a single pattern with alter-
- natives. For example, X|Y finds the first character in a line
- that is X or Y, whereas if the two patterns are given sepa-
- rately, pcregrep finds X if it is present, even if it follows
- Y in the line. It finds Y only if there is no X in the line.
- This really matters only if you are using -o to show the
- part(s) of the line that matched.
-
- --exclude=pattern
- When pcregrep is searching the files in a directory as a con-
- sequence of the -r (recursive search) option, any regular
- files whose names match the pattern are excluded. Subdirecto-
- ries are not excluded by this option; they are searched
- recursively, subject to the --exclude-dir and --include_dir
- options. The pattern is a PCRE regular expression, and is
- matched against the final component of the file name (not the
- entire path). If a file name matches both --include and
- --exclude, it is excluded. There is no short form for this
- option.
-
- --exclude-dir=pattern
- When pcregrep is searching the contents of a directory as a
- consequence of the -r (recursive search) option, any subdi-
- rectories whose names match the pattern are excluded. (Note
- that the --exclude option does not affect subdirectories.)
- The pattern is a PCRE regular expression, and is matched
- against the final component of the name (not the entire
- path). If a subdirectory name matches both --include-dir and
- --exclude-dir, it is excluded. There is no short form for
- this option.
-
- -F, --fixed-strings
- Interpret each pattern as a list of fixed strings, separated
- by newlines, instead of as a regular expression. The -w
- (match as a word) and -x (match whole line) options can be
- used with -F. They apply to each of the fixed strings. A line
- is selected if any of the fixed strings are found in it (sub-
- ject to -w or -x, if present).
-
- -f filename, --file=filename
- Read a number of patterns from the file, one per line, and
- match them against each line of input. A data line is output
- if any of the patterns match it. The filename can be given as
- "-" to refer to the standard input. When -f is used, patterns
- specified on the command line using -e may also be present;
- they are tested before the file's patterns. However, no other
- pattern is taken from the command line; all arguments are
- treated as file names. There is an overall maximum of 100
- patterns. Trailing white space is removed from each line, and
- blank lines are ignored. An empty file contains no patterns
- and therefore matches nothing. See also the comments about
- multiple patterns versus a single pattern with alternatives
- in the description of -e above.
-
- --file-offsets
- Instead of showing lines or parts of lines that match, show
- each match as an offset from the start of the file and a
- length, separated by a comma. In this mode, no context is
- shown. That is, the -A, -B, and -C options are ignored. If
- there is more than one match in a line, each of them is shown
- separately. This option is mutually exclusive with --line-
- offsets and --only-matching.
-
- -H, --with-filename
- Force the inclusion of the filename at the start of output
- lines when searching a single file. By default, the filename
- is not shown in this case. For matching lines, the filename
- is followed by a colon; for context lines, a hyphen separator
- is used. If a line number is also being output, it follows
- the file name.
-
- -h, --no-filename
- Suppress the output filenames when searching multiple files.
- By default, filenames are shown when multiple files are
- searched. For matching lines, the filename is followed by a
- colon; for context lines, a hyphen separator is used. If a
- line number is also being output, it follows the file name.
-
- --help Output a help message, giving brief details of the command
- options and file type support, and then exit.
-
- -i, --ignore-case
- Ignore upper/lower case distinctions during comparisons.
-
- --include=pattern
- When pcregrep is searching the files in a directory as a con-
- sequence of the -r (recursive search) option, only those reg-
- ular files whose names match the pattern are included. Subdi-
- rectories are always included and searched recursively, sub-
- ject to the --include-dir and --exclude-dir options. The pat-
- tern is a PCRE regular expression, and is matched against the
- final component of the file name (not the entire path). If a
- file name matches both --include and --exclude, it is
- excluded. There is no short form for this option.
-
- --include-dir=pattern
- When pcregrep is searching the contents of a directory as a
- consequence of the -r (recursive search) option, only those
- subdirectories whose names match the pattern are included.
- (Note that the --include option does not affect subdirecto-
- ries.) The pattern is a PCRE regular expression, and is
- matched against the final component of the name (not the
- entire path). If a subdirectory name matches both --include-
- dir and --exclude-dir, it is excluded. There is no short form
- for this option.
-
- -L, --files-without-match
- Instead of outputting lines from the files, just output the
- names of the files that do not contain any lines that would
- have been output. Each file name is output once, on a sepa-
- rate line.
-
- -l, --files-with-matches
- Instead of outputting lines from the files, just output the
- names of the files containing lines that would have been out-
- put. Each file name is output once, on a separate line.
- Searching normally stops as soon as a matching line is found
- in a file. However, if the -c (count) option is also used,
- matching continues in order to obtain the correct count, and
- those files that have at least one match are listed along
- with their counts. Using this option with -c is a way of sup-
- pressing the listing of files with no matches.
-
- --label=name
- This option supplies a name to be used for the standard input
- when file names are being output. If not supplied, "(standard
- input)" is used. There is no short form for this option.
-
- --line-buffered
- When this option is given, input is read and processed line
- by line, and the output is flushed after each write. By
- default, input is read in large chunks, unless pcregrep can
- determine that it is reading from a terminal (which is cur-
- rently possible only in Unix environments). Output to termi-
- nal is normally automatically flushed by the operating sys-
- tem. This option can be useful when the input or output is
- attached to a pipe and you do not want pcregrep to buffer up
- large amounts of data. However, its use will affect perfor-
- mance, and the -M (multiline) option ceases to work.
-
- --line-offsets
- Instead of showing lines or parts of lines that match, show
- each match as a line number, the offset from the start of the
- line, and a length. The line number is terminated by a colon
- (as usual; see the -n option), and the offset and length are
- separated by a comma. In this mode, no context is shown.
- That is, the -A, -B, and -C options are ignored. If there is
- more than one match in a line, each of them is shown sepa-
- rately. This option is mutually exclusive with --file-offsets
- and --only-matching.
-
- --locale=locale-name
- This option specifies a locale to be used for pattern match-
- ing. It overrides the value in the LC_ALL or LC_CTYPE envi-
- ronment variables. If no locale is specified, the PCRE
- library's default (usually the "C" locale) is used. There is
- no short form for this option.
-
- --match-limit=number
- Processing some regular expression patterns can require a
- very large amount of memory, leading in some cases to a pro-
- gram crash if not enough is available. Other patterns may
- take a very long time to search for all possible matching
- strings. The pcre_exec() function that is called by pcregrep
- to do the matching has two parameters that can limit the
- resources that it uses.
-
- The --match-limit option provides a means of limiting
- resource usage when processing patterns that are not going to
- match, but which have a very large number of possibilities in
- their search trees. The classic example is a pattern that
- uses nested unlimited repeats. Internally, PCRE uses a func-
- tion called match() which it calls repeatedly (sometimes
- recursively). The limit set by --match-limit is imposed on
- the number of times this function is called during a match,
- which has the effect of limiting the amount of backtracking
- that can take place.
-
- The --recursion-limit option is similar to --match-limit, but
- instead of limiting the total number of times that match() is
- called, it limits the depth of recursive calls, which in turn
- limits the amount of memory that can be used. The recursion
- depth is a smaller number than the total number of calls,
- because not all calls to match() are recursive. This limit is
- of use only if it is set smaller than --match-limit.
-
- There are no short forms for these options. The default set-
- tings are specified when the PCRE library is compiled, with
- the default default being 10 million.
-
- -M, --multiline
- Allow patterns to match more than one line. When this option
- is given, patterns may usefully contain literal newline char-
- acters and internal occurrences of ^ and $ characters. The
- output for a successful match may consist of more than one
- line, the last of which is the one in which the match ended.
- If the matched string ends with a newline sequence the output
- ends at the end of that line.
-
- When this option is set, the PCRE library is called in "mul-
- tiline" mode. There is a limit to the number of lines that
- can be matched, imposed by the way that pcregrep buffers the
- input file as it scans it. However, pcregrep ensures that at
- least 8K characters or the rest of the document (whichever is
- the shorter) are available for forward matching, and simi-
- larly the previous 8K characters (or all the previous charac-
- ters, if fewer than 8K) are guaranteed to be available for
- lookbehind assertions. This option does not work when input
- is read line by line (see --line-buffered.)
-
- -N newline-type, --newline=newline-type
- The PCRE library supports five different conventions for
- indicating the ends of lines. They are the single-character
- sequences CR (carriage return) and LF (linefeed), the two-
- character sequence CRLF, an "anycrlf" convention, which rec-
- ognizes any of the preceding three types, and an "any" con-
- vention, in which any Unicode line ending sequence is assumed
- to end a line. The Unicode sequences are the three just men-
- tioned, plus VT (vertical tab, U+000B), FF (form feed,
- U+000C), NEL (next line, U+0085), LS (line separator,
- U+2028), and PS (paragraph separator, U+2029).
-
- When the PCRE library is built, a default line-ending
- sequence is specified. This is normally the standard
- sequence for the operating system. Unless otherwise specified
- by this option, pcregrep uses the library's default. The
- possible values for this option are CR, LF, CRLF, ANYCRLF, or
- ANY. This makes it possible to use pcregrep on files that
- have come from other environments without having to modify
- their line endings. If the data that is being scanned does
- not agree with the convention set by this option, pcregrep
- may behave in strange ways.
-
- -n, --line-number
- Precede each output line by its line number in the file, fol-
- lowed by a colon for matching lines or a hyphen for context
- lines. If the filename is also being output, it precedes the
- line number. This option is forced if --line-offsets is used.
-
- --no-jit If the PCRE library is built with support for just-in-time
- compiling (which speeds up matching), pcregrep automatically
- makes use of this, unless it was explicitly disabled at build
- time. This option can be used to disable the use of JIT at
- run time. It is provided for testing and working round prob-
- lems. It should never be needed in normal use.
-
- -o, --only-matching
- Show only the part of the line that matched a pattern instead
- of the whole line. In this mode, no context is shown. That
- is, the -A, -B, and -C options are ignored. If there is more
- than one match in a line, each of them is shown separately.
- If -o is combined with -v (invert the sense of the match to
- find non-matching lines), no output is generated, but the
- return code is set appropriately. If the matched portion of
- the line is empty, nothing is output unless the file name or
- line number are being printed, in which case they are shown
- on an otherwise empty line. This option is mutually exclusive
- with --file-offsets and --line-offsets.
-
- -onumber, --only-matching=number
- Show only the part of the line that matched the capturing
- parentheses of the given number. Up to 32 capturing parenthe-
- ses are supported. Because these options can be given without
- an argument (see above), if an argument is present, it must
- be given in the same shell item, for example, -o3 or --only-
- matching=2. The comments given for the non-argument case
- above also apply to this case. If the specified capturing
- parentheses do not exist in the pattern, or were not set in
- the match, nothing is output unless the file name or line
- number are being printed.
-
- -q, --quiet
- Work quietly, that is, display nothing except error messages.
- The exit status indicates whether or not any matches were
- found.
-
- -r, --recursive
- If any given path is a directory, recursively scan the files
- it contains, taking note of any --include and --exclude set-
- tings. By default, a directory is read as a normal file; in
- some operating systems this gives an immediate end-of-file.
- This option is a shorthand for setting the -d option to
- "recurse".
-
- --recursion-limit=number
- See --match-limit above.
-
- -s, --no-messages
- Suppress error messages about non-existent or unreadable
- files. Such files are quietly skipped. However, the return
- code is still 2, even if matches were found in other files.
-
- -u, --utf-8
- Operate in UTF-8 mode. This option is available only if PCRE
- has been compiled with UTF-8 support. Both patterns and sub-
- ject lines must be valid strings of UTF-8 characters.
-
- -V, --version
- Write the version numbers of pcregrep and the PCRE library
- that is being used to the standard error stream.
-
- -v, --invert-match
- Invert the sense of the match, so that lines which do not
- match any of the patterns are the ones that are found.
-
- -w, --word-regex, --word-regexp
- Force the patterns to match only whole words. This is equiva-
- lent to having \b at the start and end of the pattern.
-
- -x, --line-regex, --line-regexp
- Force the patterns to be anchored (each must start matching
- at the beginning of a line) and in addition, require them to
- match entire lines. This is equivalent to having ^ and $
- characters at the start and end of each alternative branch in
- every pattern.
-
-
-ENVIRONMENT VARIABLES
-
- The environment variables LC_ALL and LC_CTYPE are examined, in that
- order, for a locale. The first one that is set is used. This can be
- overridden by the --locale option. If no locale is set, the PCRE
- library's default (usually the "C" locale) is used.
-
-
-NEWLINES
-
- The -N (--newline) option allows pcregrep to scan files with different
- newline conventions from the default. However, the setting of this
- option does not affect the way in which pcregrep writes information to
- the standard error and output streams. It uses the string "\n" in C
- printf() calls to indicate newlines, relying on the C I/O library to
- convert this to an appropriate sequence if the output is sent to a
- file.
-
-
-OPTIONS COMPATIBILITY
-
- Many of the short and long forms of pcregrep's options are the same as
- in the GNU grep program (version 2.5.4). Any long option of the form
- --xxx-regexp (GNU terminology) is also available as --xxx-regex (PCRE
- terminology). However, the --file-offsets, --include-dir, --line-off-
- sets, --locale, --match-limit, -M, --multiline, -N, --newline, --recur-
- sion-limit, -u, and --utf-8 options are specific to pcregrep, as is the
- use of the --only-matching option with a capturing parentheses number.
-
- Although most of the common options work the same way, a few are dif-
- ferent in pcregrep. For example, the --include option's argument is a
- glob for GNU grep, but a regular expression for pcregrep. If both the
- -c and -l options are given, GNU grep lists only file names, without
- counts, but pcregrep gives the counts.
-
-
-OPTIONS WITH DATA
-
- There are four different ways in which an option with data can be spec-
- ified. If a short form option is used, the data may follow immedi-
- ately, or (with one exception) in the next command line item. For exam-
- ple:
-
- -f/some/file
- -f /some/file
-
- The exception is the -o option, which may appear with or without data.
- Because of this, if data is present, it must follow immediately in the
- same item, for example -o3.
-
- If a long form option is used, the data may appear in the same command
- line item, separated by an equals character, or (with two exceptions)
- it may appear in the next command line item. For example:
-
- --file=/some/file
- --file /some/file
-
- Note, however, that if you want to supply a file name beginning with ~
- as data in a shell command, and have the shell expand ~ to a home
- directory, you must separate the file name from the option, because the
- shell does not treat ~ specially unless it is at the start of an item.
-
- The exceptions to the above are the --colour (or --color) and --only-
- matching options, for which the data is optional. If one of these
- options does have data, it must be given in the first form, using an
- equals character. Otherwise pcregrep will assume that it has no data.
-
-
-MATCHING ERRORS
-
- It is possible to supply a regular expression that takes a very long
- time to fail to match certain lines. Such patterns normally involve
- nested indefinite repeats, for example: (a+)*\d when matched against a
- line of a's with no final digit. The PCRE matching function has a
- resource limit that causes it to abort in these circumstances. If this
- happens, pcregrep outputs an error message and the line that caused the
- problem to the standard error stream. If there are more than 20 such
- errors, pcregrep gives up.
-
- The --match-limit option of pcregrep can be used to set the overall
- resource limit; there is a second option called --recursion-limit that
- sets a limit on the amount of memory (usually stack) that is used (see
- the discussion of these options above).
-
-
-DIAGNOSTICS
-
- Exit status is 0 if any matches were found, 1 if no matches were found,
- and 2 for syntax errors, overlong lines, non-existent or inaccessible
- files (even if matches were found in other files) or too many matching
- errors. Using the -s option to suppress error messages about inaccessi-
- ble files does not affect the return code.
-
-
-SEE ALSO
-
- pcrepattern(3), pcretest(1).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 06 September 2011
- Copyright (c) 1997-2011 University of Cambridge.
diff --git a/src/third_party/pcre-8.30/doc/pcrejit.3 b/src/third_party/pcre-8.30/doc/pcrejit.3
deleted file mode 100644
index 0a32a111ecd..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrejit.3
+++ /dev/null
@@ -1,372 +0,0 @@
-.TH PCREJIT 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE JUST-IN-TIME COMPILER SUPPORT"
-.rs
-.sp
-Just-in-time compiling is a heavyweight optimization that can greatly speed up
-pattern matching. However, it comes at the cost of extra processing before the
-match is performed. Therefore, it is of most benefit when the same pattern is
-going to be matched many times. This does not necessarily mean many calls of a
-matching function; if the pattern is not anchored, matching attempts may take
-place many times at various positions in the subject, even for a single call.
-Therefore, if the subject string is very long, it may still pay to use JIT for
-one-off matches.
-.P
-JIT support applies only to the traditional Perl-compatible matching function.
-It does not apply when the DFA matching function is being used. The code for
-this support was written by Zoltan Herczeg.
-.
-.
-.SH "8-BIT and 16-BIT SUPPORT"
-.rs
-.sp
-JIT support is available for both the 8-bit and 16-bit PCRE libraries. To keep
-this documentation simple, only the 8-bit interface is described in what
-follows. If you are using the 16-bit library, substitute the 16-bit functions
-and 16-bit structures (for example, \fIpcre16_jit_stack\fP instead of
-\fIpcre_jit_stack\fP).
-.
-.
-.SH "AVAILABILITY OF JIT SUPPORT"
-.rs
-.sp
-JIT support is an optional feature of PCRE. The "configure" option --enable-jit
-(or equivalent CMake option) must be set when PCRE is built if you want to use
-JIT. The support is limited to the following hardware platforms:
-.sp
- ARM v5, v7, and Thumb2
- Intel x86 32-bit and 64-bit
- MIPS 32-bit
- Power PC 32-bit and 64-bit
-.sp
-The Power PC support is designated as experimental because it has not been
-fully tested. If --enable-jit is set on an unsupported platform, compilation
-fails.
-.P
-A program that is linked with PCRE 8.20 or later can tell if JIT support is
-available by calling \fBpcre_config()\fP with the PCRE_CONFIG_JIT option. The
-result is 1 when JIT is available, and 0 otherwise. However, a simple program
-does not need to check this in order to use JIT. The API is implemented in a
-way that falls back to the ordinary PCRE code if JIT is not available.
-.P
-If your program may sometimes be linked with versions of PCRE that are older
-than 8.20, but you want to use JIT when it is available, you can test
-the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such
-as PCRE_CONFIG_JIT, for compile-time control of your code.
-.
-.
-.SH "SIMPLE USE OF JIT"
-.rs
-.sp
-You have to do two things to make use of the JIT support in the simplest way:
-.sp
- (1) Call \fBpcre_study()\fP with the PCRE_STUDY_JIT_COMPILE option for
- each compiled pattern, and pass the resulting \fBpcre_extra\fP block to
- \fBpcre_exec()\fP.
-.sp
- (2) Use \fBpcre_free_study()\fP to free the \fBpcre_extra\fP block when it is
- no longer needed instead of just freeing it yourself. This
- ensures that any JIT data is also freed.
-.sp
-For a program that may be linked with pre-8.20 versions of PCRE, you can insert
-.sp
- #ifndef PCRE_STUDY_JIT_COMPILE
- #define PCRE_STUDY_JIT_COMPILE 0
- #endif
-.sp
-so that no option is passed to \fBpcre_study()\fP, and then use something like
-this to free the study data:
-.sp
- #ifdef PCRE_CONFIG_JIT
- pcre_free_study(study_ptr);
- #else
- pcre_free(study_ptr);
- #endif
-.sp
-In some circumstances you may need to call additional functions. These are
-described in the section entitled
-.\" HTML <a href="#stackcontrol">
-.\" </a>
-"Controlling the JIT stack"
-.\"
-below.
-.P
-If JIT support is not available, PCRE_STUDY_JIT_COMPILE is ignored, and no JIT
-data is set up. Otherwise, the compiled pattern is passed to the JIT compiler,
-which turns it into machine code that executes much faster than the normal
-interpretive code. When \fBpcre_exec()\fP is passed a \fBpcre_extra\fP block
-containing a pointer to JIT code, it obeys that instead of the normal code. The
-result is identical, but the code runs much faster.
-.P
-There are some \fBpcre_exec()\fP options that are not supported for JIT
-execution. There are also some pattern items that JIT cannot handle. Details
-are given below. In both cases, execution automatically falls back to the
-interpretive code.
-.P
-If the JIT compiler finds an unsupported item, no JIT data is generated. You
-can find out if JIT execution is available after studying a pattern by calling
-\fBpcre_fullinfo()\fP with the PCRE_INFO_JIT option. A result of 1 means that
-JIT compilation was successful. A result of 0 means that JIT support is not
-available, or the pattern was not studied with PCRE_STUDY_JIT_COMPILE, or the
-JIT compiler was not able to handle the pattern.
-.P
-Once a pattern has been studied, with or without JIT, it can be used as many
-times as you like for matching different subject strings.
-.
-.
-.SH "UNSUPPORTED OPTIONS AND PATTERN ITEMS"
-.rs
-.sp
-The only \fBpcre_exec()\fP options that are supported for JIT execution are
-PCRE_NO_UTF8_CHECK, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and
-PCRE_NOTEMPTY_ATSTART. Note in particular that partial matching is not
-supported.
-.P
-The unsupported pattern items are:
-.sp
- \eC match a single byte; not supported in UTF-8 mode
- (?Cn) callouts
- (*COMMIT) )
- (*MARK) )
- (*PRUNE) ) the backtracking control verbs
- (*SKIP) )
- (*THEN) )
-.sp
-Support for some of these may be added in future.
-.
-.
-.SH "RETURN VALUES FROM JIT EXECUTION"
-.rs
-.sp
-When a pattern is matched using JIT execution, the return values are the same
-as those given by the interpretive \fBpcre_exec()\fP code, with the addition of
-one new error code: PCRE_ERROR_JIT_STACKLIMIT. This means that the memory used
-for the JIT stack was insufficient. See
-.\" HTML <a href="#stackcontrol">
-.\" </a>
-"Controlling the JIT stack"
-.\"
-below for a discussion of JIT stack usage. For compatibility with the
-interpretive \fBpcre_exec()\fP code, no more than two-thirds of the
-\fIovector\fP argument is used for passing back captured substrings.
-.P
-The error code PCRE_ERROR_MATCHLIMIT is returned by the JIT code if searching a
-very large pattern tree goes on for too long, as it is in the same circumstance
-when JIT is not used, but the details of exactly what is counted are not the
-same. The PCRE_ERROR_RECURSIONLIMIT error code is never returned by JIT
-execution.
-.
-.
-.SH "SAVING AND RESTORING COMPILED PATTERNS"
-.rs
-.sp
-The code that is generated by the JIT compiler is architecture-specific, and is
-also position dependent. For those reasons it cannot be saved (in a file or
-database) and restored later like the bytecode and other data of a compiled
-pattern. Saving and restoring compiled patterns is not something many people
-do. More detail about this facility is given in the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation. It should be possible to run \fBpcre_study()\fP on a saved and
-restored pattern, and thereby recreate the JIT data, but because JIT
-compilation uses significant resources, it is probably not worth doing this;
-you might as well recompile the original pattern.
-.
-.
-.\" HTML <a name="stackcontrol"></a>
-.SH "CONTROLLING THE JIT STACK"
-.rs
-.sp
-When the compiled JIT code runs, it needs a block of memory to use as a stack.
-By default, it uses 32K on the machine stack. However, some large or
-complicated patterns need more than this. The error PCRE_ERROR_JIT_STACKLIMIT
-is given when there is not enough stack. Three functions are provided for
-managing blocks of memory for use as JIT stacks. There is further discussion
-about the use of JIT stacks in the section entitled
-.\" HTML <a href="#stackcontrol">
-.\" </a>
-"JIT stack FAQ"
-.\"
-below.
-.P
-The \fBpcre_jit_stack_alloc()\fP function creates a JIT stack. Its arguments
-are a starting size and a maximum size, and it returns a pointer to an opaque
-structure of type \fBpcre_jit_stack\fP, or NULL if there is an error. The
-\fBpcre_jit_stack_free()\fP function can be used to free a stack that is no
-longer needed. (For the technically minded: the address space is allocated by
-mmap or VirtualAlloc.)
-.P
-JIT uses far less memory for recursion than the interpretive code,
-and a maximum stack size of 512K to 1M should be more than enough for any
-pattern.
-.P
-The \fBpcre_assign_jit_stack()\fP function specifies which stack JIT code
-should use. Its arguments are as follows:
-.sp
- pcre_extra *extra
- pcre_jit_callback callback
- void *data
-.sp
-The \fIextra\fP argument must be the result of studying a pattern with
-PCRE_STUDY_JIT_COMPILE. There are three cases for the values of the other two
-options:
-.sp
- (1) If \fIcallback\fP is NULL and \fIdata\fP is NULL, an internal 32K block
- on the machine stack is used.
-.sp
- (2) If \fIcallback\fP is NULL and \fIdata\fP is not NULL, \fIdata\fP must be
- a valid JIT stack, the result of calling \fBpcre_jit_stack_alloc()\fP.
-.sp
- (3) If \fIcallback\fP not NULL, it must point to a function that is called
- with \fIdata\fP as an argument at the start of matching, in order to
- set up a JIT stack. If the result is NULL, the internal 32K stack
- is used; otherwise the return value must be a valid JIT stack,
- the result of calling \fBpcre_jit_stack_alloc()\fP.
-.sp
-You may safely assign the same JIT stack to more than one pattern, as long as
-they are all matched sequentially in the same thread. In a multithread
-application, each thread must use its own JIT stack.
-.P
-Strictly speaking, even more is allowed. You can assign the same stack to any
-number of patterns as long as they are not used for matching by multiple
-threads at the same time. For example, you can assign the same stack to all
-compiled patterns, and use a global mutex in the callback to wait until the
-stack is available for use. However, this is an inefficient solution, and
-not recommended.
-.P
-This is a suggestion for how a typical multithreaded program might operate:
-.sp
- During thread initalization
- thread_local_var = pcre_jit_stack_alloc(...)
-.sp
- During thread exit
- pcre_jit_stack_free(thread_local_var)
-.sp
- Use a one-line callback function
- return thread_local_var
-.sp
-All the functions described in this section do nothing if JIT is not available,
-and \fBpcre_assign_jit_stack()\fP does nothing unless the \fBextra\fP argument
-is non-NULL and points to a \fBpcre_extra\fP block that is the result of a
-successful study with PCRE_STUDY_JIT_COMPILE.
-.
-.
-.\" HTML <a name="stackfaq"></a>
-.SH "JIT STACK FAQ"
-.rs
-.sp
-(1) Why do we need JIT stacks?
-.sp
-PCRE (and JIT) is a recursive, depth-first engine, so it needs a stack where
-the local data of the current node is pushed before checking its child nodes.
-Allocating real machine stack on some platforms is difficult. For example, the
-stack chain needs to be updated every time if we extend the stack on PowerPC.
-Although it is possible, its updating time overhead decreases performance. So
-we do the recursion in memory.
-.P
-(2) Why don't we simply allocate blocks of memory with \fBmalloc()\fP?
-.sp
-Modern operating systems have a nice feature: they can reserve an address space
-instead of allocating memory. We can safely allocate memory pages inside this
-address space, so the stack could grow without moving memory data (this is
-important because of pointers). Thus we can allocate 1M address space, and use
-only a single memory page (usually 4K) if that is enough. However, we can still
-grow up to 1M anytime if needed.
-.P
-(3) Who "owns" a JIT stack?
-.sp
-The owner of the stack is the user program, not the JIT studied pattern or
-anything else. The user program must ensure that if a stack is used by
-\fBpcre_exec()\fP, (that is, it is assigned to the pattern currently running),
-that stack must not be used by any other threads (to avoid overwriting the same
-memory area). The best practice for multithreaded programs is to allocate a
-stack for each thread, and return this stack through the JIT callback function.
-.P
-(4) When should a JIT stack be freed?
-.sp
-You can free a JIT stack at any time, as long as it will not be used by
-\fBpcre_exec()\fP again. When you assign the stack to a pattern, only a pointer
-is set. There is no reference counting or any other magic. You can free the
-patterns and stacks in any order, anytime. Just \fIdo not\fP call
-\fBpcre_exec()\fP with a pattern pointing to an already freed stack, as that
-will cause SEGFAULT. (Also, do not free a stack currently used by
-\fBpcre_exec()\fP in another thread). You can also replace the stack for a
-pattern at any time. You can even free the previous stack before assigning a
-replacement.
-.P
-(5) Should I allocate/free a stack every time before/after calling
-\fBpcre_exec()\fP?
-.sp
-No, because this is too costly in terms of resources. However, you could
-implement some clever idea which release the stack if it is not used in let's
-say two minutes. The JIT callback can help to achive this without keeping a
-list of the currently JIT studied patterns.
-.P
-(6) OK, the stack is for long term memory allocation. But what happens if a
-pattern causes stack overflow with a stack of 1M? Is that 1M kept until the
-stack is freed?
-.sp
-Especially on embedded sytems, it might be a good idea to release
-memory sometimes without freeing the stack. There is no API for this at the
-moment. Probably a function call which returns with the currently allocated
-memory for any stack and another which allows releasing memory (shrinking the
-stack) would be a good idea if someone needs this.
-.P
-(7) This is too much of a headache. Isn't there any better solution for JIT
-stack handling?
-.sp
-No, thanks to Windows. If POSIX threads were used everywhere, we could throw
-out this complicated API.
-.
-.
-.SH "EXAMPLE CODE"
-.rs
-.sp
-This is a single-threaded example that specifies a JIT stack without using a
-callback.
-.sp
- int rc;
- int ovector[30];
- pcre *re;
- pcre_extra *extra;
- pcre_jit_stack *jit_stack;
-.sp
- re = pcre_compile(pattern, 0, &error, &erroffset, NULL);
- /* Check for errors */
- extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
- jit_stack = pcre_jit_stack_alloc(32*1024, 512*1024);
- /* Check for error (NULL) */
- pcre_assign_jit_stack(extra, NULL, jit_stack);
- rc = pcre_exec(re, extra, subject, length, 0, 0, ovector, 30);
- /* Check results */
- pcre_free(re);
- pcre_free_study(extra);
- pcre_jit_stack_free(jit_stack);
-.sp
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcreapi\fP(3)
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel (FAQ by Zoltan Herczeg)
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 08 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcrelimits.3 b/src/third_party/pcre-8.30/doc/pcrelimits.3
deleted file mode 100644
index db1a3337ddf..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrelimits.3
+++ /dev/null
@@ -1,63 +0,0 @@
-.TH PCRELIMITS 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "SIZE AND OTHER LIMITATIONS"
-.rs
-.sp
-There are some size limitations in PCRE but it is hoped that they will never in
-practice be relevant.
-.P
-The maximum length of a compiled pattern is approximately 64K data units (bytes
-for the 8-bit library, 16-bit units for the 16-bit library) if PCRE is compiled
-with the default internal linkage size of 2 bytes. If you want to process
-regular expressions that are truly enormous, you can compile PCRE with an
-internal linkage size of 3 or 4 (when building the 16-bit library, 3 is rounded
-up to 4). See the \fBREADME\fP file in the source distribution and the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation for details. In these cases the limit is substantially larger.
-However, the speed of execution is slower.
-.P
-All values in repeating quantifiers must be less than 65536.
-.P
-There is no limit to the number of parenthesized subpatterns, but there can be
-no more than 65535 capturing subpatterns.
-.P
-There is a limit to the number of forward references to subsequent subpatterns
-of around 200,000. Repeated forward references with fixed upper limits, for
-example, (?2){0,100} when subpattern number 2 is to the right, are included in
-the count. There is no limit to the number of backward references.
-.P
-The maximum length of name for a named subpattern is 32 characters, and the
-maximum number of named subpatterns is 10000.
-.P
-The maximum length of a subject string is the largest positive number that an
-integer variable can hold. However, when using the traditional matching
-function, PCRE uses recursion to handle subpatterns and indefinite repetition.
-This means that the available stack space may limit the size of a subject
-string that can be processed by certain patterns. For a discussion of stack
-issues, see the
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 08 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcrematching.3 b/src/third_party/pcre-8.30/doc/pcrematching.3
deleted file mode 100644
index 7ec2f5bee79..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrematching.3
+++ /dev/null
@@ -1,205 +0,0 @@
-.TH PCREMATCHING 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE MATCHING ALGORITHMS"
-.rs
-.sp
-This document describes the two different algorithms that are available in PCRE
-for matching a compiled regular expression against a given subject string. The
-"standard" algorithm is the one provided by the \fBpcre_exec()\fP and
-\fBpcre16_exec()\fP functions. These work in the same was as Perl's matching
-function, and provide a Perl-compatible matching operation. The just-in-time
-(JIT) optimization that is described in the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation is compatible with these functions.
-.P
-An alternative algorithm is provided by the \fBpcre_dfa_exec()\fP and
-\fBpcre16_dfa_exec()\fP functions; they operate in a different way, and are not
-Perl-compatible. This alternative has advantages and disadvantages compared
-with the standard algorithm, and these are described below.
-.P
-When there is only one possible way in which a given subject string can match a
-pattern, the two algorithms give the same answer. A difference arises, however,
-when there are multiple possibilities. For example, if the pattern
-.sp
- ^<.*>
-.sp
-is matched against the string
-.sp
- <something> <something else> <something further>
-.sp
-there are three possible answers. The standard algorithm finds only one of
-them, whereas the alternative algorithm finds all three.
-.
-.
-.SH "REGULAR EXPRESSIONS AS TREES"
-.rs
-.sp
-The set of strings that are matched by a regular expression can be represented
-as a tree structure. An unlimited repetition in the pattern makes the tree of
-infinite size, but it is still a tree. Matching the pattern to a given subject
-string (from a given starting point) can be thought of as a search of the tree.
-There are two ways to search a tree: depth-first and breadth-first, and these
-correspond to the two matching algorithms provided by PCRE.
-.
-.
-.SH "THE STANDARD MATCHING ALGORITHM"
-.rs
-.sp
-In the terminology of Jeffrey Friedl's book "Mastering Regular
-Expressions", the standard algorithm is an "NFA algorithm". It conducts a
-depth-first search of the pattern tree. That is, it proceeds along a single
-path through the tree, checking that the subject matches what is required. When
-there is a mismatch, the algorithm tries any alternatives at the current point,
-and if they all fail, it backs up to the previous branch point in the tree, and
-tries the next alternative branch at that level. This often involves backing up
-(moving to the left) in the subject string as well. The order in which
-repetition branches are tried is controlled by the greedy or ungreedy nature of
-the quantifier.
-.P
-If a leaf node is reached, a matching string has been found, and at that point
-the algorithm stops. Thus, if there is more than one possible match, this
-algorithm returns the first one that it finds. Whether this is the shortest,
-the longest, or some intermediate length depends on the way the greedy and
-ungreedy repetition quantifiers are specified in the pattern.
-.P
-Because it ends up with a single path through the tree, it is relatively
-straightforward for this algorithm to keep track of the substrings that are
-matched by portions of the pattern in parentheses. This provides support for
-capturing parentheses and back references.
-.
-.
-.SH "THE ALTERNATIVE MATCHING ALGORITHM"
-.rs
-.sp
-This algorithm conducts a breadth-first search of the tree. Starting from the
-first matching point in the subject, it scans the subject string from left to
-right, once, character by character, and as it does this, it remembers all the
-paths through the tree that represent valid matches. In Friedl's terminology,
-this is a kind of "DFA algorithm", though it is not implemented as a
-traditional finite state machine (it keeps multiple states active
-simultaneously).
-.P
-Although the general principle of this matching algorithm is that it scans the
-subject string only once, without backtracking, there is one exception: when a
-lookaround assertion is encountered, the characters following or preceding the
-current point have to be independently inspected.
-.P
-The scan continues until either the end of the subject is reached, or there are
-no more unterminated paths. At this point, terminated paths represent the
-different matching possibilities (if there are none, the match has failed).
-Thus, if there is more than one possible match, this algorithm finds all of
-them, and in particular, it finds the longest. The matches are returned in
-decreasing order of length. There is an option to stop the algorithm after the
-first match (which is necessarily the shortest) is found.
-.P
-Note that all the matches that are found start at the same point in the
-subject. If the pattern
-.sp
- cat(er(pillar)?)?
-.sp
-is matched against the string "the caterpillar catchment", the result will be
-the three strings "caterpillar", "cater", and "cat" that start at the fifth
-character of the subject. The algorithm does not automatically move on to find
-matches that start at later positions.
-.P
-There are a number of features of PCRE regular expressions that are not
-supported by the alternative matching algorithm. They are as follows:
-.P
-1. Because the algorithm finds all possible matches, the greedy or ungreedy
-nature of repetition quantifiers is not relevant. Greedy and ungreedy
-quantifiers are treated in exactly the same way. However, possessive
-quantifiers can make a difference when what follows could also match what is
-quantified, for example in a pattern like this:
-.sp
- ^a++\ew!
-.sp
-This pattern matches "aaab!" but not "aaa!", which would be matched by a
-non-possessive quantifier. Similarly, if an atomic group is present, it is
-matched as if it were a standalone pattern at the current point, and the
-longest match is then "locked in" for the rest of the overall pattern.
-.P
-2. When dealing with multiple paths through the tree simultaneously, it is not
-straightforward to keep track of captured substrings for the different matching
-possibilities, and PCRE's implementation of this algorithm does not attempt to
-do this. This means that no captured substrings are available.
-.P
-3. Because no substrings are captured, back references within the pattern are
-not supported, and cause errors if encountered.
-.P
-4. For the same reason, conditional expressions that use a backreference as the
-condition or test for a specific group recursion are not supported.
-.P
-5. Because many paths through the tree may be active, the \eK escape sequence,
-which resets the start of the match when encountered (but may be on some paths
-and not on others), is not supported. It causes an error if encountered.
-.P
-6. Callouts are supported, but the value of the \fIcapture_top\fP field is
-always 1, and the value of the \fIcapture_last\fP field is always -1.
-.P
-7. The \eC escape sequence, which (in the standard algorithm) always matches a
-single data unit, even in UTF-8 or UTF-16 modes, is not supported in these
-modes, because the alternative algorithm moves through the subject string one
-character (not data unit) at a time, for all active paths through the tree.
-.P
-8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE) are not
-supported. (*FAIL) is supported, and behaves like a failing negative assertion.
-.
-.
-.SH "ADVANTAGES OF THE ALTERNATIVE ALGORITHM"
-.rs
-.sp
-Using the alternative matching algorithm provides the following advantages:
-.P
-1. All possible matches (at a single point in the subject) are automatically
-found, and in particular, the longest match is found. To find more than one
-match using the standard algorithm, you have to do kludgy things with
-callouts.
-.P
-2. Because the alternative algorithm scans the subject string just once, and
-never needs to backtrack (except for lookbehinds), it is possible to pass very
-long subject strings to the matching function in several pieces, checking for
-partial matching each time. Although it is possible to do multi-segment
-matching using the standard algorithm by retaining partially matched
-substrings, it is more complicated. The
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation gives details of partial matching and discusses multi-segment
-matching.
-.
-.
-.SH "DISADVANTAGES OF THE ALTERNATIVE ALGORITHM"
-.rs
-.sp
-The alternative algorithm suffers from a number of disadvantages:
-.P
-1. It is substantially slower than the standard algorithm. This is partly
-because it has to search for all possible matches, but is also because it is
-less susceptible to optimization.
-.P
-2. Capturing parentheses and back references are not supported.
-.P
-3. Although atomic groups are supported, their use does not provide the
-performance advantage that it does for the standard algorithm.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 08 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcrepartial.3 b/src/third_party/pcre-8.30/doc/pcrepartial.3
deleted file mode 100644
index 356fd612d90..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrepartial.3
+++ /dev/null
@@ -1,417 +0,0 @@
-.TH PCREPARTIAL 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PARTIAL MATCHING IN PCRE"
-.rs
-.sp
-In normal use of PCRE, if the subject string that is passed to a matching
-function matches as far as it goes, but is too short to match the entire
-pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances where it might
-be helpful to distinguish this case from other cases in which there is no
-match.
-.P
-Consider, for example, an application where a human is required to type in data
-for a field with specific formatting requirements. An example might be a date
-in the form \fIddmmmyy\fP, defined by this pattern:
-.sp
- ^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$
-.sp
-If the application sees the user's keystrokes one by one, and can check that
-what has been typed so far is potentially valid, it is able to raise an error
-as soon as a mistake is made, by beeping and not reflecting the character that
-has been typed, for example. This immediate feedback is likely to be a better
-user interface than a check that is delayed until the entire string has been
-entered. Partial matching can also be useful when the subject string is very
-long and is not all available at once.
-.P
-PCRE supports partial matching by means of the PCRE_PARTIAL_SOFT and
-PCRE_PARTIAL_HARD options, which can be set when calling any of the matching
-functions. For backwards compatibility, PCRE_PARTIAL is a synonym for
-PCRE_PARTIAL_SOFT. The essential difference between the two options is whether
-or not a partial match is preferred to an alternative complete match, though
-the details differ between the two types of matching function. If both options
-are set, PCRE_PARTIAL_HARD takes precedence.
-.P
-Setting a partial matching option disables the use of any just-in-time code
-that was set up by studying the compiled pattern with the
-PCRE_STUDY_JIT_COMPILE option. It also disables two of PCRE's standard
-optimizations. PCRE remembers the last literal data unit in a pattern, and
-abandons matching immediately if it is not present in the subject string. This
-optimization cannot be used for a subject string that might match only
-partially. If the pattern was studied, PCRE knows the minimum length of a
-matching string, and does not bother to run the matching function on shorter
-strings. This optimization is also disabled for partial matching.
-.
-.
-.SH "PARTIAL MATCHING USING pcre_exec() OR pcre16_exec()"
-.rs
-.sp
-A partial match occurs during a call to \fBpcre_exec()\fP or
-\fBpcre16_exec()\fP when the end of the subject string is reached successfully,
-but matching cannot continue because more characters are needed. However, at
-least one character in the subject must have been inspected. This character
-need not form part of the final matched string; lookbehind assertions and the
-\eK escape sequence provide ways of inspecting characters before the start of a
-matched substring. The requirement for inspecting at least one character exists
-because an empty string can always be matched; without such a restriction there
-would always be a partial match of an empty string at the end of the subject.
-.P
-If there are at least two slots in the offsets vector when a partial match is
-returned, the first slot is set to the offset of the earliest character that
-was inspected. For convenience, the second offset points to the end of the
-subject so that a substring can easily be identified.
-.P
-For the majority of patterns, the first offset identifies the start of the
-partially matched string. However, for patterns that contain lookbehind
-assertions, or \eK, or begin with \eb or \eB, earlier characters have been
-inspected while carrying out the match. For example:
-.sp
- /(?<=abc)123/
-.sp
-This pattern matches "123", but only if it is preceded by "abc". If the subject
-string is "xyzabc12", the offsets after a partial match are for the substring
-"abc12", because all these characters are needed if another match is tried
-with extra characters added to the subject.
-.P
-What happens when a partial match is identified depends on which of the two
-partial matching options are set.
-.
-.
-.SS "PCRE_PARTIAL_SOFT WITH pcre_exec() OR pcre16_exec()"
-.rs
-.sp
-If PCRE_PARTIAL_SOFT is set when \fBpcre_exec()\fP or \fBpcre16_exec()\fP
-identifies a partial match, the partial match is remembered, but matching
-continues as normal, and other alternatives in the pattern are tried. If no
-complete match can be found, PCRE_ERROR_PARTIAL is returned instead of
-PCRE_ERROR_NOMATCH.
-.P
-This option is "soft" because it prefers a complete match over a partial match.
-All the various matching items in a pattern behave as if the subject string is
-potentially complete. For example, \ez, \eZ, and $ match at the end of the
-subject, as normal, and for \eb and \eB the end of the subject is treated as a
-non-alphanumeric.
-.P
-If there is more than one partial match, the first one that was found provides
-the data that is returned. Consider this pattern:
-.sp
- /123\ew+X|dogY/
-.sp
-If this is matched against the subject string "abc123dog", both
-alternatives fail to match, but the end of the subject is reached during
-matching, so PCRE_ERROR_PARTIAL is returned. The offsets are set to 3 and 9,
-identifying "123dog" as the first partial match that was found. (In this
-example, there are two partial matches, because "dog" on its own partially
-matches the second alternative.)
-.
-.
-.SS "PCRE_PARTIAL_HARD WITH pcre_exec() OR pcre16_exec()"
-.rs
-.sp
-If PCRE_PARTIAL_HARD is set for \fBpcre_exec()\fP or \fBpcre16_exec()\fP,
-PCRE_ERROR_PARTIAL is returned as soon as a partial match is found, without
-continuing to search for possible complete matches. This option is "hard"
-because it prefers an earlier partial match over a later complete match. For
-this reason, the assumption is made that the end of the supplied subject string
-may not be the true end of the available data, and so, if \ez, \eZ, \eb, \eB,
-or $ are encountered at the end of the subject, the result is
-PCRE_ERROR_PARTIAL, provided that at least one character in the subject has
-been inspected.
-.P
-Setting PCRE_PARTIAL_HARD also affects the way UTF-8 and UTF-16
-subject strings are checked for validity. Normally, an invalid sequence
-causes the error PCRE_ERROR_BADUTF8 or PCRE_ERROR_BADUTF16. However, in the
-special case of a truncated character at the end of the subject,
-PCRE_ERROR_SHORTUTF8 or PCRE_ERROR_SHORTUTF16 is returned when
-PCRE_PARTIAL_HARD is set.
-.
-.
-.SS "Comparing hard and soft partial matching"
-.rs
-.sp
-The difference between the two partial matching options can be illustrated by a
-pattern such as:
-.sp
- /dog(sbody)?/
-.sp
-This matches either "dog" or "dogsbody", greedily (that is, it prefers the
-longer string if possible). If it is matched against the string "dog" with
-PCRE_PARTIAL_SOFT, it yields a complete match for "dog". However, if
-PCRE_PARTIAL_HARD is set, the result is PCRE_ERROR_PARTIAL. On the other hand,
-if the pattern is made ungreedy the result is different:
-.sp
- /dog(sbody)??/
-.sp
-In this case the result is always a complete match because that is found first,
-and matching never continues after finding a complete match. It might be easier
-to follow this explanation by thinking of the two patterns like this:
-.sp
- /dog(sbody)?/ is the same as /dogsbody|dog/
- /dog(sbody)??/ is the same as /dog|dogsbody/
-.sp
-The second pattern will never match "dogsbody", because it will always find the
-shorter match first.
-.
-.
-.SH "PARTIAL MATCHING USING pcre_dfa_exec() OR pcre16_dfa_exec()"
-.rs
-.sp
-The DFA functions move along the subject string character by character, without
-backtracking, searching for all possible matches simultaneously. If the end of
-the subject is reached before the end of the pattern, there is the possibility
-of a partial match, again provided that at least one character has been
-inspected.
-.P
-When PCRE_PARTIAL_SOFT is set, PCRE_ERROR_PARTIAL is returned only if there
-have been no complete matches. Otherwise, the complete matches are returned.
-However, if PCRE_PARTIAL_HARD is set, a partial match takes precedence over any
-complete matches. The portion of the string that was inspected when the longest
-partial match was found is set as the first matching string, provided there are
-at least two slots in the offsets vector.
-.P
-Because the DFA functions always search for all possible matches, and there is
-no difference between greedy and ungreedy repetition, their behaviour is
-different from the standard functions when PCRE_PARTIAL_HARD is set. Consider
-the string "dog" matched against the ungreedy pattern shown above:
-.sp
- /dog(sbody)??/
-.sp
-Whereas the standard functions stop as soon as they find the complete match for
-"dog", the DFA functions also find the partial match for "dogsbody", and so
-return that when PCRE_PARTIAL_HARD is set.
-.
-.
-.SH "PARTIAL MATCHING AND WORD BOUNDARIES"
-.rs
-.sp
-If a pattern ends with one of sequences \eb or \eB, which test for word
-boundaries, partial matching with PCRE_PARTIAL_SOFT can give counter-intuitive
-results. Consider this pattern:
-.sp
- /\ebcat\eb/
-.sp
-This matches "cat", provided there is a word boundary at either end. If the
-subject string is "the cat", the comparison of the final "t" with a following
-character cannot take place, so a partial match is found. However, normal
-matching carries on, and \eb matches at the end of the subject when the last
-character is a letter, so a complete match is found. The result, therefore, is
-\fInot\fP PCRE_ERROR_PARTIAL. Using PCRE_PARTIAL_HARD in this case does yield
-PCRE_ERROR_PARTIAL, because then the partial match takes precedence.
-.
-.
-.SH "FORMERLY RESTRICTED PATTERNS"
-.rs
-.sp
-For releases of PCRE prior to 8.00, because of the way certain internal
-optimizations were implemented in the \fBpcre_exec()\fP function, the
-PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be used with
-all patterns. From release 8.00 onwards, the restrictions no longer apply, and
-partial matching with can be requested for any pattern.
-.P
-Items that were formerly restricted were repeated single characters and
-repeated metasequences. If PCRE_PARTIAL was set for a pattern that did not
-conform to the restrictions, \fBpcre_exec()\fP returned the error code
-PCRE_ERROR_BADPARTIAL (-13). This error code is no longer in use. The
-PCRE_INFO_OKPARTIAL call to \fBpcre_fullinfo()\fP to find out if a compiled
-pattern can be used for partial matching now always returns 1.
-.
-.
-.SH "EXAMPLE OF PARTIAL MATCHING USING PCRETEST"
-.rs
-.sp
-If the escape sequence \eP is present in a \fBpcretest\fP data line, the
-PCRE_PARTIAL_SOFT option is used for the match. Here is a run of \fBpcretest\fP
-that uses the date example quoted above:
-.sp
- re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/
- data> 25jun04\eP
- 0: 25jun04
- 1: jun
- data> 25dec3\eP
- Partial match: 23dec3
- data> 3ju\eP
- Partial match: 3ju
- data> 3juj\eP
- No match
- data> j\eP
- No match
-.sp
-The first data string is matched completely, so \fBpcretest\fP shows the
-matched substrings. The remaining four strings do not match the complete
-pattern, but the first two are partial matches. Similar output is obtained
-if DFA matching is used.
-.P
-If the escape sequence \eP is present more than once in a \fBpcretest\fP data
-line, the PCRE_PARTIAL_HARD option is set for the match.
-.
-.
-.SH "MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre16_dfa_exec()"
-.rs
-.sp
-When a partial match has been found using a DFA matching function, it is
-possible to continue the match by providing additional subject data and calling
-the function again with the same compiled regular expression, this time setting
-the PCRE_DFA_RESTART option. You must pass the same working space as before,
-because this is where details of the previous partial match are stored. Here is
-an example using \fBpcretest\fP, using the \eR escape sequence to set the
-PCRE_DFA_RESTART option (\eD specifies the use of the DFA matching function):
-.sp
- re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/
- data> 23ja\eP\eD
- Partial match: 23ja
- data> n05\eR\eD
- 0: n05
-.sp
-The first call has "23ja" as the subject, and requests partial matching; the
-second call has "n05" as the subject for the continued (restarted) match.
-Notice that when the match is complete, only the last part is shown; PCRE does
-not retain the previously partially-matched string. It is up to the calling
-program to do that if it needs to.
-.P
-You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with
-PCRE_DFA_RESTART to continue partial matching over multiple segments. This
-facility can be used to pass very long subject strings to the DFA matching
-functions.
-.
-.
-.SH "MULTI-SEGMENT MATCHING WITH pcre_exec() OR pcre16_exec()"
-.rs
-.sp
-From release 8.00, the standard matching functions can also be used to do
-multi-segment matching. Unlike the DFA functions, it is not possible to
-restart the previous match with a new segment of data. Instead, new data must
-be added to the previous subject string, and the entire match re-run, starting
-from the point where the partial match occurred. Earlier data can be discarded.
-.P
-It is best to use PCRE_PARTIAL_HARD in this situation, because it does not
-treat the end of a segment as the end of the subject when matching \ez, \eZ,
-\eb, \eB, and $. Consider an unanchored pattern that matches dates:
-.sp
- re> /\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed/
- data> The date is 23ja\eP\eP
- Partial match: 23ja
-.sp
-At this stage, an application could discard the text preceding "23ja", add on
-text from the next segment, and call the matching function again. Unlike the
-DFA matching functions the entire matching string must always be available, and
-the complete matching process occurs for each call, so more memory and more
-processing time is needed.
-.P
-\fBNote:\fP If the pattern contains lookbehind assertions, or \eK, or starts
-with \eb or \eB, the string that is returned for a partial match includes
-characters that precede the partially matched string itself, because these must
-be retained when adding on more characters for a subsequent matching attempt.
-.
-.
-.SH "ISSUES WITH MULTI-SEGMENT MATCHING"
-.rs
-.sp
-Certain types of pattern may give problems with multi-segment matching,
-whichever matching function is used.
-.P
-1. If the pattern contains a test for the beginning of a line, you need to pass
-the PCRE_NOTBOL option when the subject string for any call does start at the
-beginning of a line. There is also a PCRE_NOTEOL option, but in practice when
-doing multi-segment matching you should be using PCRE_PARTIAL_HARD, which
-includes the effect of PCRE_NOTEOL.
-.P
-2. Lookbehind assertions at the start of a pattern are catered for in the
-offsets that are returned for a partial match. However, in theory, a lookbehind
-assertion later in the pattern could require even earlier characters to be
-inspected, and it might not have been reached when a partial match occurs. This
-is probably an extremely unlikely case; you could guard against it to a certain
-extent by always including extra characters at the start.
-.P
-3. Matching a subject string that is split into multiple segments may not
-always produce exactly the same result as matching over one single long string,
-especially when PCRE_PARTIAL_SOFT is used. The section "Partial Matching and
-Word Boundaries" above describes an issue that arises if the pattern ends with
-\eb or \eB. Another kind of difference may occur when there are multiple
-matching possibilities, because (for PCRE_PARTIAL_SOFT) a partial match result
-is given only when there are no completed matches. This means that as soon as
-the shortest match has been found, continuation to a new subject segment is no
-longer possible. Consider again this \fBpcretest\fP example:
-.sp
- re> /dog(sbody)?/
- data> dogsb\eP
- 0: dog
- data> do\eP\eD
- Partial match: do
- data> gsb\eR\eP\eD
- 0: g
- data> dogsbody\eD
- 0: dogsbody
- 1: dog
-.sp
-The first data line passes the string "dogsb" to a standard matching function,
-setting the PCRE_PARTIAL_SOFT option. Although the string is a partial match
-for "dogsbody", the result is not PCRE_ERROR_PARTIAL, because the shorter
-string "dog" is a complete match. Similarly, when the subject is presented to
-a DFA matching function in several parts ("do" and "gsb" being the first two)
-the match stops when "dog" has been found, and it is not possible to continue.
-On the other hand, if "dogsbody" is presented as a single string, a DFA
-matching function finds both matches.
-.P
-Because of these problems, it is best to use PCRE_PARTIAL_HARD when matching
-multi-segment data. The example above then behaves differently:
-.sp
- re> /dog(sbody)?/
- data> dogsb\eP\eP
- Partial match: dogsb
- data> do\eP\eD
- Partial match: do
- data> gsb\eR\eP\eP\eD
- Partial match: gsb
-.sp
-4. Patterns that contain alternatives at the top level which do not all start
-with the same pattern item may not work as expected when PCRE_DFA_RESTART is
-used. For example, consider this pattern:
-.sp
- 1234|3789
-.sp
-If the first part of the subject is "ABC123", a partial match of the first
-alternative is found at offset 3. There is no partial match for the second
-alternative, because such a match does not start at the same point in the
-subject string. Attempting to continue with the string "7890" does not yield a
-match because only those alternatives that match at one point in the subject
-are remembered. The problem arises because the start of the second alternative
-matches within the first alternative. There is no problem with anchored
-patterns or patterns such as:
-.sp
- 1234|ABCD
-.sp
-where no string can be a partial match for both alternatives. This is not a
-problem if a standard matching function is used, because the entire match has
-to be rerun each time:
-.sp
- re> /1234|3789/
- data> ABC123\eP\eP
- Partial match: 123
- data> 1237890
- 0: 3789
-.sp
-Of course, instead of using PCRE_DFA_RESTART, the same technique of re-running
-the entire match can also be used with the DFA matching functions. Another
-possibility is to work with two buffers. If a partial match at offset \fIn\fP
-in the first buffer is followed by "no match" when PCRE_DFA_RESTART is used on
-the second buffer, you can then try a new match starting at offset \fIn+1\fP in
-the first buffer.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 21 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcrepattern.3 b/src/third_party/pcre-8.30/doc/pcrepattern.3
deleted file mode 100644
index 5ffadb7f38e..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrepattern.3
+++ /dev/null
@@ -1,2881 +0,0 @@
-.TH PCREPATTERN 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE REGULAR EXPRESSION DETAILS"
-.rs
-.sp
-The syntax and semantics of the regular expressions that are supported by PCRE
-are described in detail below. There is a quick-reference syntax summary in the
-.\" HREF
-\fBpcresyntax\fP
-.\"
-page. PCRE tries to match Perl syntax and semantics as closely as it can. PCRE
-also supports some alternative regular expression syntax (which does not
-conflict with the Perl syntax) in order to provide some compatibility with
-regular expressions in Python, .NET, and Oniguruma.
-.P
-Perl's regular expressions are described in its own documentation, and
-regular expressions in general are covered in a number of books, some of which
-have copious examples. Jeffrey Friedl's "Mastering Regular Expressions",
-published by O'Reilly, covers regular expressions in great detail. This
-description of PCRE's regular expressions is intended as reference material.
-.P
-The original operation of PCRE was on strings of one-byte characters. However,
-there is now also support for UTF-8 strings in the original library, and a
-second library that supports 16-bit and UTF-16 character strings. To use these
-features, PCRE must be built to include appropriate support. When using UTF
-strings you must either call the compiling function with the PCRE_UTF8 or
-PCRE_UTF16 option, or the pattern must start with one of these special
-sequences:
-.sp
- (*UTF8)
- (*UTF16)
-.sp
-Starting a pattern with such a sequence is equivalent to setting the relevant
-option. This feature is not Perl-compatible. How setting a UTF mode affects
-pattern matching is mentioned in several places below. There is also a summary
-of features in the
-.\" HREF
-\fBpcreunicode\fP
-.\"
-page.
-.P
-Another special sequence that may appear at the start of a pattern or in
-combination with (*UTF8) or (*UTF16) is:
-.sp
- (*UCP)
-.sp
-This has the same effect as setting the PCRE_UCP option: it causes sequences
-such as \ed and \ew to use Unicode properties to determine character types,
-instead of recognizing only characters with codes less than 128 via a lookup
-table.
-.P
-If a pattern starts with (*NO_START_OPT), it has the same effect as setting the
-PCRE_NO_START_OPTIMIZE option either at compile or matching time. There are
-also some more of these special sequences that are concerned with the handling
-of newlines; they are described below.
-.P
-The remainder of this document discusses the patterns that are supported by
-PCRE when one its main matching functions, \fBpcre_exec()\fP (8-bit) or
-\fBpcre16_exec()\fP (16-bit), is used. PCRE also has alternative matching
-functions, \fBpcre_dfa_exec()\fP and \fBpcre16_dfa_exec()\fP, which match using
-a different algorithm that is not Perl-compatible. Some of the features
-discussed below are not available when DFA matching is used. The advantages and
-disadvantages of the alternative functions, and how they differ from the normal
-functions, are discussed in the
-.\" HREF
-\fBpcrematching\fP
-.\"
-page.
-.
-.
-.\" HTML <a name="newlines"></a>
-.SH "NEWLINE CONVENTIONS"
-.rs
-.sp
-PCRE supports five different conventions for indicating line breaks in
-strings: a single CR (carriage return) character, a single LF (linefeed)
-character, the two-character sequence CRLF, any of the three preceding, or any
-Unicode newline sequence. The
-.\" HREF
-\fBpcreapi\fP
-.\"
-page has
-.\" HTML <a href="pcreapi.html#newlines">
-.\" </a>
-further discussion
-.\"
-about newlines, and shows how to set the newline convention in the
-\fIoptions\fP arguments for the compiling and matching functions.
-.P
-It is also possible to specify a newline convention by starting a pattern
-string with one of the following five sequences:
-.sp
- (*CR) carriage return
- (*LF) linefeed
- (*CRLF) carriage return, followed by linefeed
- (*ANYCRLF) any of the three above
- (*ANY) all Unicode newline sequences
-.sp
-These override the default and the options given to the compiling function. For
-example, on a Unix system where LF is the default newline sequence, the pattern
-.sp
- (*CR)a.b
-.sp
-changes the convention to CR. That pattern matches "a\enb" because LF is no
-longer a newline. Note that these special settings, which are not
-Perl-compatible, are recognized only at the very start of a pattern, and that
-they must be in upper case. If more than one of them is present, the last one
-is used.
-.P
-The newline convention affects the interpretation of the dot metacharacter when
-PCRE_DOTALL is not set, and also the behaviour of \eN. However, it does not
-affect what the \eR escape sequence matches. By default, this is any Unicode
-newline sequence, for Perl compatibility. However, this can be changed; see the
-description of \eR in the section entitled
-.\" HTML <a href="#newlineseq">
-.\" </a>
-"Newline sequences"
-.\"
-below. A change of \eR setting can be combined with a change of newline
-convention.
-.
-.
-.SH "CHARACTERS AND METACHARACTERS"
-.rs
-.sp
-A regular expression is a pattern that is matched against a subject string from
-left to right. Most characters stand for themselves in a pattern, and match the
-corresponding characters in the subject. As a trivial example, the pattern
-.sp
- The quick brown fox
-.sp
-matches a portion of a subject string that is identical to itself. When
-caseless matching is specified (the PCRE_CASELESS option), letters are matched
-independently of case. In a UTF mode, PCRE always understands the concept of
-case for characters whose values are less than 128, so caseless matching is
-always possible. For characters with higher values, the concept of case is
-supported if PCRE is compiled with Unicode property support, but not otherwise.
-If you want to use caseless matching for characters 128 and above, you must
-ensure that PCRE is compiled with Unicode property support as well as with
-UTF support.
-.P
-The power of regular expressions comes from the ability to include alternatives
-and repetitions in the pattern. These are encoded in the pattern by the use of
-\fImetacharacters\fP, which do not stand for themselves but instead are
-interpreted in some special way.
-.P
-There are two different sets of metacharacters: those that are recognized
-anywhere in the pattern except within square brackets, and those that are
-recognized within square brackets. Outside square brackets, the metacharacters
-are as follows:
-.sp
- \e general escape character with several uses
- ^ assert start of string (or line, in multiline mode)
- $ assert end of string (or line, in multiline mode)
- . match any character except newline (by default)
- [ start character class definition
- | start of alternative branch
- ( start subpattern
- ) end subpattern
- ? extends the meaning of (
- also 0 or 1 quantifier
- also quantifier minimizer
- * 0 or more quantifier
- + 1 or more quantifier
- also "possessive quantifier"
- { start min/max quantifier
-.sp
-Part of a pattern that is in square brackets is called a "character class". In
-a character class the only metacharacters are:
-.sp
- \e general escape character
- ^ negate the class, but only if the first character
- - indicates character range
-.\" JOIN
- [ POSIX character class (only if followed by POSIX
- syntax)
- ] terminates the character class
-.sp
-The following sections describe the use of each of the metacharacters.
-.
-.
-.SH BACKSLASH
-.rs
-.sp
-The backslash character has several uses. Firstly, if it is followed by a
-character that is not a number or a letter, it takes away any special meaning
-that character may have. This use of backslash as an escape character applies
-both inside and outside character classes.
-.P
-For example, if you want to match a * character, you write \e* in the pattern.
-This escaping action applies whether or not the following character would
-otherwise be interpreted as a metacharacter, so it is always safe to precede a
-non-alphanumeric with backslash to specify that it stands for itself. In
-particular, if you want to match a backslash, you write \e\e.
-.P
-In a UTF mode, only ASCII numbers and letters have any special meaning after a
-backslash. All other characters (in particular, those whose codepoints are
-greater than 127) are treated as literals.
-.P
-If a pattern is compiled with the PCRE_EXTENDED option, whitespace in the
-pattern (other than in a character class) and characters between a # outside
-a character class and the next newline are ignored. An escaping backslash can
-be used to include a whitespace or # character as part of the pattern.
-.P
-If you want to remove the special meaning from a sequence of characters, you
-can do so by putting them between \eQ and \eE. This is different from Perl in
-that $ and @ are handled as literals in \eQ...\eE sequences in PCRE, whereas in
-Perl, $ and @ cause variable interpolation. Note the following examples:
-.sp
- Pattern PCRE matches Perl matches
-.sp
-.\" JOIN
- \eQabc$xyz\eE abc$xyz abc followed by the
- contents of $xyz
- \eQabc\e$xyz\eE abc\e$xyz abc\e$xyz
- \eQabc\eE\e$\eQxyz\eE abc$xyz abc$xyz
-.sp
-The \eQ...\eE sequence is recognized both inside and outside character classes.
-An isolated \eE that is not preceded by \eQ is ignored. If \eQ is not followed
-by \eE later in the pattern, the literal interpretation continues to the end of
-the pattern (that is, \eE is assumed at the end). If the isolated \eQ is inside
-a character class, this causes an error, because the character class is not
-terminated.
-.
-.
-.\" HTML <a name="digitsafterbackslash"></a>
-.SS "Non-printing characters"
-.rs
-.sp
-A second use of backslash provides a way of encoding non-printing characters
-in patterns in a visible manner. There is no restriction on the appearance of
-non-printing characters, apart from the binary zero that terminates a pattern,
-but when a pattern is being prepared by text editing, it is often easier to use
-one of the following escape sequences than the binary character it represents:
-.sp
- \ea alarm, that is, the BEL character (hex 07)
- \ecx "control-x", where x is any ASCII character
- \ee escape (hex 1B)
- \ef formfeed (hex 0C)
- \en linefeed (hex 0A)
- \er carriage return (hex 0D)
- \et tab (hex 09)
- \eddd character with octal code ddd, or back reference
- \exhh character with hex code hh
- \ex{hhh..} character with hex code hhh.. (non-JavaScript mode)
- \euhhhh character with hex code hhhh (JavaScript mode only)
-.sp
-The precise effect of \ecx is as follows: if x is a lower case letter, it
-is converted to upper case. Then bit 6 of the character (hex 40) is inverted.
-Thus \ecz becomes hex 1A (z is 7A), but \ec{ becomes hex 3B ({ is 7B), while
-\ec; becomes hex 7B (; is 3B). If the byte following \ec has a value greater
-than 127, a compile-time error occurs. This locks out non-ASCII characters in
-all modes. (When PCRE is compiled in EBCDIC mode, all byte values are valid. A
-lower case letter is converted to upper case, and then the 0xc0 bits are
-flipped.)
-.P
-By default, after \ex, from zero to two hexadecimal digits are read (letters
-can be in upper or lower case). Any number of hexadecimal digits may appear
-between \ex{ and }, but the character code is constrained as follows:
-.sp
- 8-bit non-UTF mode less than 0x100
- 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint
- 16-bit non-UTF mode less than 0x10000
- 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint
-.sp
-Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called
-"surrogate" codepoints).
-.P
-If characters other than hexadecimal digits appear between \ex{ and }, or if
-there is no terminating }, this form of escape is not recognized. Instead, the
-initial \ex will be interpreted as a basic hexadecimal escape, with no
-following digits, giving a character whose value is zero.
-.P
-If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \ex is
-as just described only when it is followed by two hexadecimal digits.
-Otherwise, it matches a literal "x" character. In JavaScript mode, support for
-code points greater than 256 is provided by \eu, which must be followed by
-four hexadecimal digits; otherwise it matches a literal "u" character.
-.P
-Characters whose value is less than 256 can be defined by either of the two
-syntaxes for \ex (or by \eu in JavaScript mode). There is no difference in the
-way they are handled. For example, \exdc is exactly the same as \ex{dc} (or
-\eu00dc in JavaScript mode).
-.P
-After \e0 up to two further octal digits are read. If there are fewer than two
-digits, just those that are present are used. Thus the sequence \e0\ex\e07
-specifies two binary zeros followed by a BEL character (code value 7). Make
-sure you supply two digits after the initial zero if the pattern character that
-follows is itself an octal digit.
-.P
-The handling of a backslash followed by a digit other than 0 is complicated.
-Outside a character class, PCRE reads it and any following digits as a decimal
-number. If the number is less than 10, or if there have been at least that many
-previous capturing left parentheses in the expression, the entire sequence is
-taken as a \fIback reference\fP. A description of how this works is given
-.\" HTML <a href="#backreferences">
-.\" </a>
-later,
-.\"
-following the discussion of
-.\" HTML <a href="#subpattern">
-.\" </a>
-parenthesized subpatterns.
-.\"
-.P
-Inside a character class, or if the decimal number is greater than 9 and there
-have not been that many capturing subpatterns, PCRE re-reads up to three octal
-digits following the backslash, and uses them to generate a data character. Any
-subsequent digits stand for themselves. The value of the character is
-constrained in the same way as characters specified in hexadecimal.
-For example:
-.sp
- \e040 is another way of writing a space
-.\" JOIN
- \e40 is the same, provided there are fewer than 40
- previous capturing subpatterns
- \e7 is always a back reference
-.\" JOIN
- \e11 might be a back reference, or another way of
- writing a tab
- \e011 is always a tab
- \e0113 is a tab followed by the character "3"
-.\" JOIN
- \e113 might be a back reference, otherwise the
- character with octal code 113
-.\" JOIN
- \e377 might be a back reference, otherwise
- the value 255 (decimal)
-.\" JOIN
- \e81 is either a back reference, or a binary zero
- followed by the two characters "8" and "1"
-.sp
-Note that octal values of 100 or greater must not be introduced by a leading
-zero, because no more than three octal digits are ever read.
-.P
-All the sequences that define a single character value can be used both inside
-and outside character classes. In addition, inside a character class, \eb is
-interpreted as the backspace character (hex 08).
-.P
-\eN is not allowed in a character class. \eB, \eR, and \eX are not special
-inside a character class. Like other unrecognized escape sequences, they are
-treated as the literal characters "B", "R", and "X" by default, but cause an
-error if the PCRE_EXTRA option is set. Outside a character class, these
-sequences have different meanings.
-.
-.
-.SS "Unsupported escape sequences"
-.rs
-.sp
-In Perl, the sequences \el, \eL, \eu, and \eU are recognized by its string
-handler and used to modify the case of following characters. By default, PCRE
-does not support these escape sequences. However, if the PCRE_JAVASCRIPT_COMPAT
-option is set, \eU matches a "U" character, and \eu can be used to define a
-character by code point, as described in the previous section.
-.
-.
-.SS "Absolute and relative back references"
-.rs
-.sp
-The sequence \eg followed by an unsigned or a negative number, optionally
-enclosed in braces, is an absolute or relative back reference. A named back
-reference can be coded as \eg{name}. Back references are discussed
-.\" HTML <a href="#backreferences">
-.\" </a>
-later,
-.\"
-following the discussion of
-.\" HTML <a href="#subpattern">
-.\" </a>
-parenthesized subpatterns.
-.\"
-.
-.
-.SS "Absolute and relative subroutine calls"
-.rs
-.sp
-For compatibility with Oniguruma, the non-Perl syntax \eg followed by a name or
-a number enclosed either in angle brackets or single quotes, is an alternative
-syntax for referencing a subpattern as a "subroutine". Details are discussed
-.\" HTML <a href="#onigurumasubroutines">
-.\" </a>
-later.
-.\"
-Note that \eg{...} (Perl syntax) and \eg<...> (Oniguruma syntax) are \fInot\fP
-synonymous. The former is a back reference; the latter is a
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-subroutine
-.\"
-call.
-.
-.
-.\" HTML <a name="genericchartypes"></a>
-.SS "Generic character types"
-.rs
-.sp
-Another use of backslash is for specifying generic character types:
-.sp
- \ed any decimal digit
- \eD any character that is not a decimal digit
- \eh any horizontal whitespace character
- \eH any character that is not a horizontal whitespace character
- \es any whitespace character
- \eS any character that is not a whitespace character
- \ev any vertical whitespace character
- \eV any character that is not a vertical whitespace character
- \ew any "word" character
- \eW any "non-word" character
-.sp
-There is also the single sequence \eN, which matches a non-newline character.
-This is the same as
-.\" HTML <a href="#fullstopdot">
-.\" </a>
-the "." metacharacter
-.\"
-when PCRE_DOTALL is not set. Perl also uses \eN to match characters by name;
-PCRE does not support this.
-.P
-Each pair of lower and upper case escape sequences partitions the complete set
-of characters into two disjoint sets. Any given character matches one, and only
-one, of each pair. The sequences can appear both inside and outside character
-classes. They each match one character of the appropriate type. If the current
-matching point is at the end of the subject string, all of them fail, because
-there is no character to match.
-.P
-For compatibility with Perl, \es does not match the VT character (code 11).
-This makes it different from the the POSIX "space" class. The \es characters
-are HT (9), LF (10), FF (12), CR (13), and space (32). If "use locale;" is
-included in a Perl script, \es may match the VT character. In PCRE, it never
-does.
-.P
-A "word" character is an underscore or any character that is a letter or digit.
-By default, the definition of letters and digits is controlled by PCRE's
-low-valued character tables, and may vary if locale-specific matching is taking
-place (see
-.\" HTML <a href="pcreapi.html#localesupport">
-.\" </a>
-"Locale support"
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page). For example, in a French locale such as "fr_FR" in Unix-like systems,
-or "french" in Windows, some character codes greater than 128 are used for
-accented letters, and these are then matched by \ew. The use of locales with
-Unicode is discouraged.
-.P
-By default, in a UTF mode, characters with values greater than 128 never match
-\ed, \es, or \ew, and always match \eD, \eS, and \eW. These sequences retain
-their original meanings from before UTF support was available, mainly for
-efficiency reasons. However, if PCRE is compiled with Unicode property support,
-and the PCRE_UCP option is set, the behaviour is changed so that Unicode
-properties are used to determine character types, as follows:
-.sp
- \ed any character that \ep{Nd} matches (decimal digit)
- \es any character that \ep{Z} matches, plus HT, LF, FF, CR
- \ew any character that \ep{L} or \ep{N} matches, plus underscore
-.sp
-The upper case escapes match the inverse sets of characters. Note that \ed
-matches only decimal digits, whereas \ew matches any Unicode digit, as well as
-any Unicode letter, and underscore. Note also that PCRE_UCP affects \eb, and
-\eB because they are defined in terms of \ew and \eW. Matching these sequences
-is noticeably slower when PCRE_UCP is set.
-.P
-The sequences \eh, \eH, \ev, and \eV are features that were added to Perl at
-release 5.10. In contrast to the other sequences, which match only ASCII
-characters by default, these always match certain high-valued codepoints,
-whether or not PCRE_UCP is set. The horizontal space characters are:
-.sp
- U+0009 Horizontal tab
- U+0020 Space
- U+00A0 Non-break space
- U+1680 Ogham space mark
- U+180E Mongolian vowel separator
- U+2000 En quad
- U+2001 Em quad
- U+2002 En space
- U+2003 Em space
- U+2004 Three-per-em space
- U+2005 Four-per-em space
- U+2006 Six-per-em space
- U+2007 Figure space
- U+2008 Punctuation space
- U+2009 Thin space
- U+200A Hair space
- U+202F Narrow no-break space
- U+205F Medium mathematical space
- U+3000 Ideographic space
-.sp
-The vertical space characters are:
-.sp
- U+000A Linefeed
- U+000B Vertical tab
- U+000C Formfeed
- U+000D Carriage return
- U+0085 Next line
- U+2028 Line separator
- U+2029 Paragraph separator
-.sp
-In 8-bit, non-UTF-8 mode, only the characters with codepoints less than 256 are
-relevant.
-.
-.
-.\" HTML <a name="newlineseq"></a>
-.SS "Newline sequences"
-.rs
-.sp
-Outside a character class, by default, the escape sequence \eR matches any
-Unicode newline sequence. In 8-bit non-UTF-8 mode \eR is equivalent to the
-following:
-.sp
- (?>\er\en|\en|\ex0b|\ef|\er|\ex85)
-.sp
-This is an example of an "atomic group", details of which are given
-.\" HTML <a href="#atomicgroup">
-.\" </a>
-below.
-.\"
-This particular group matches either the two-character sequence CR followed by
-LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab,
-U+000B), FF (formfeed, U+000C), CR (carriage return, U+000D), or NEL (next
-line, U+0085). The two-character sequence is treated as a single unit that
-cannot be split.
-.P
-In other modes, two additional characters whose codepoints are greater than 255
-are added: LS (line separator, U+2028) and PS (paragraph separator, U+2029).
-Unicode character property support is not needed for these characters to be
-recognized.
-.P
-It is possible to restrict \eR to match only CR, LF, or CRLF (instead of the
-complete set of Unicode line endings) by setting the option PCRE_BSR_ANYCRLF
-either at compile time or when the pattern is matched. (BSR is an abbrevation
-for "backslash R".) This can be made the default when PCRE is built; if this is
-the case, the other behaviour can be requested via the PCRE_BSR_UNICODE option.
-It is also possible to specify these settings by starting a pattern string with
-one of the following sequences:
-.sp
- (*BSR_ANYCRLF) CR, LF, or CRLF only
- (*BSR_UNICODE) any Unicode newline sequence
-.sp
-These override the default and the options given to the compiling function, but
-they can themselves be overridden by options given to a matching function. Note
-that these special settings, which are not Perl-compatible, are recognized only
-at the very start of a pattern, and that they must be in upper case. If more
-than one of them is present, the last one is used. They can be combined with a
-change of newline convention; for example, a pattern can start with:
-.sp
- (*ANY)(*BSR_ANYCRLF)
-.sp
-They can also be combined with the (*UTF8), (*UTF16), or (*UCP) special
-sequences. Inside a character class, \eR is treated as an unrecognized escape
-sequence, and so matches the letter "R" by default, but causes an error if
-PCRE_EXTRA is set.
-.
-.
-.\" HTML <a name="uniextseq"></a>
-.SS Unicode character properties
-.rs
-.sp
-When PCRE is built with Unicode character property support, three additional
-escape sequences that match characters with specific properties are available.
-When in 8-bit non-UTF-8 mode, these sequences are of course limited to testing
-characters whose codepoints are less than 256, but they do work in this mode.
-The extra escape sequences are:
-.sp
- \ep{\fIxx\fP} a character with the \fIxx\fP property
- \eP{\fIxx\fP} a character without the \fIxx\fP property
- \eX an extended Unicode sequence
-.sp
-The property names represented by \fIxx\fP above are limited to the Unicode
-script names, the general category properties, "Any", which matches any
-character (including newline), and some special PCRE properties (described
-in the
-.\" HTML <a href="#extraprops">
-.\" </a>
-next section).
-.\"
-Other Perl properties such as "InMusicalSymbols" are not currently supported by
-PCRE. Note that \eP{Any} does not match any characters, so always causes a
-match failure.
-.P
-Sets of Unicode characters are defined as belonging to certain scripts. A
-character from one of these sets can be matched using a script name. For
-example:
-.sp
- \ep{Greek}
- \eP{Han}
-.sp
-Those that are not part of an identified script are lumped together as
-"Common". The current list of scripts is:
-.P
-Arabic,
-Armenian,
-Avestan,
-Balinese,
-Bamum,
-Bengali,
-Bopomofo,
-Braille,
-Buginese,
-Buhid,
-Canadian_Aboriginal,
-Carian,
-Cham,
-Cherokee,
-Common,
-Coptic,
-Cuneiform,
-Cypriot,
-Cyrillic,
-Deseret,
-Devanagari,
-Egyptian_Hieroglyphs,
-Ethiopic,
-Georgian,
-Glagolitic,
-Gothic,
-Greek,
-Gujarati,
-Gurmukhi,
-Han,
-Hangul,
-Hanunoo,
-Hebrew,
-Hiragana,
-Imperial_Aramaic,
-Inherited,
-Inscriptional_Pahlavi,
-Inscriptional_Parthian,
-Javanese,
-Kaithi,
-Kannada,
-Katakana,
-Kayah_Li,
-Kharoshthi,
-Khmer,
-Lao,
-Latin,
-Lepcha,
-Limbu,
-Linear_B,
-Lisu,
-Lycian,
-Lydian,
-Malayalam,
-Meetei_Mayek,
-Mongolian,
-Myanmar,
-New_Tai_Lue,
-Nko,
-Ogham,
-Old_Italic,
-Old_Persian,
-Old_South_Arabian,
-Old_Turkic,
-Ol_Chiki,
-Oriya,
-Osmanya,
-Phags_Pa,
-Phoenician,
-Rejang,
-Runic,
-Samaritan,
-Saurashtra,
-Shavian,
-Sinhala,
-Sundanese,
-Syloti_Nagri,
-Syriac,
-Tagalog,
-Tagbanwa,
-Tai_Le,
-Tai_Tham,
-Tai_Viet,
-Tamil,
-Telugu,
-Thaana,
-Thai,
-Tibetan,
-Tifinagh,
-Ugaritic,
-Vai,
-Yi.
-.P
-Each character has exactly one Unicode general category property, specified by
-a two-letter abbreviation. For compatibility with Perl, negation can be
-specified by including a circumflex between the opening brace and the property
-name. For example, \ep{^Lu} is the same as \eP{Lu}.
-.P
-If only one letter is specified with \ep or \eP, it includes all the general
-category properties that start with that letter. In this case, in the absence
-of negation, the curly brackets in the escape sequence are optional; these two
-examples have the same effect:
-.sp
- \ep{L}
- \epL
-.sp
-The following general category property codes are supported:
-.sp
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-.sp
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
-.sp
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-.sp
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-.sp
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-.sp
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-.sp
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-.sp
-The special property L& is also supported: it matches a character that has
-the Lu, Ll, or Lt property, in other words, a letter that is not classified as
-a modifier or "other".
-.P
-The Cs (Surrogate) property applies only to characters in the range U+D800 to
-U+DFFF. Such characters are not valid in Unicode strings and so
-cannot be tested by PCRE, unless UTF validity checking has been turned off
-(see the discussion of PCRE_NO_UTF8_CHECK and PCRE_NO_UTF16_CHECK in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-page). Perl does not support the Cs property.
-.P
-The long synonyms for property names that Perl supports (such as \ep{Letter})
-are not supported by PCRE, nor is it permitted to prefix any of these
-properties with "Is".
-.P
-No character that is in the Unicode table has the Cn (unassigned) property.
-Instead, this property is assumed for any code point that is not in the
-Unicode table.
-.P
-Specifying caseless matching does not affect these escape sequences. For
-example, \ep{Lu} always matches only upper case letters.
-.P
-The \eX escape matches any number of Unicode characters that form an extended
-Unicode sequence. \eX is equivalent to
-.sp
- (?>\ePM\epM*)
-.sp
-That is, it matches a character without the "mark" property, followed by zero
-or more characters with the "mark" property, and treats the sequence as an
-atomic group
-.\" HTML <a href="#atomicgroup">
-.\" </a>
-(see below).
-.\"
-Characters with the "mark" property are typically accents that affect the
-preceding character. None of them have codepoints less than 256, so in
-8-bit non-UTF-8 mode \eX matches any one character.
-.P
-Note that recent versions of Perl have changed \eX to match what Unicode calls
-an "extended grapheme cluster", which has a more complicated definition.
-.P
-Matching characters by Unicode property is not fast, because PCRE has to search
-a structure that contains data for over fifteen thousand characters. That is
-why the traditional escape sequences such as \ed and \ew do not use Unicode
-properties in PCRE by default, though you can make them do so by setting the
-PCRE_UCP option or by starting the pattern with (*UCP).
-.
-.
-.\" HTML <a name="extraprops"></a>
-.SS PCRE's additional properties
-.rs
-.sp
-As well as the standard Unicode properties described in the previous
-section, PCRE supports four more that make it possible to convert traditional
-escape sequences such as \ew and \es and POSIX character classes to use Unicode
-properties. PCRE uses these non-standard, non-Perl properties internally when
-PCRE_UCP is set. They are:
-.sp
- Xan Any alphanumeric character
- Xps Any POSIX space character
- Xsp Any Perl space character
- Xwd Any Perl "word" character
-.sp
-Xan matches characters that have either the L (letter) or the N (number)
-property. Xps matches the characters tab, linefeed, vertical tab, formfeed, or
-carriage return, and any other character that has the Z (separator) property.
-Xsp is the same as Xps, except that vertical tab is excluded. Xwd matches the
-same characters as Xan, plus underscore.
-.
-.
-.\" HTML <a name="resetmatchstart"></a>
-.SS "Resetting the match start"
-.rs
-.sp
-The escape sequence \eK causes any previously matched characters not to be
-included in the final matched sequence. For example, the pattern:
-.sp
- foo\eKbar
-.sp
-matches "foobar", but reports that it has matched "bar". This feature is
-similar to a lookbehind assertion
-.\" HTML <a href="#lookbehind">
-.\" </a>
-(described below).
-.\"
-However, in this case, the part of the subject before the real match does not
-have to be of fixed length, as lookbehind assertions do. The use of \eK does
-not interfere with the setting of
-.\" HTML <a href="#subpattern">
-.\" </a>
-captured substrings.
-.\"
-For example, when the pattern
-.sp
- (foo)\eKbar
-.sp
-matches "foobar", the first substring is still set to "foo".
-.P
-Perl documents that the use of \eK within assertions is "not well defined". In
-PCRE, \eK is acted upon when it occurs inside positive assertions, but is
-ignored in negative assertions.
-.
-.
-.\" HTML <a name="smallassertions"></a>
-.SS "Simple assertions"
-.rs
-.sp
-The final use of backslash is for certain simple assertions. An assertion
-specifies a condition that has to be met at a particular point in a match,
-without consuming any characters from the subject string. The use of
-subpatterns for more complicated assertions is described
-.\" HTML <a href="#bigassertions">
-.\" </a>
-below.
-.\"
-The backslashed assertions are:
-.sp
- \eb matches at a word boundary
- \eB matches when not at a word boundary
- \eA matches at the start of the subject
- \eZ matches at the end of the subject
- also matches before a newline at the end of the subject
- \ez matches only at the end of the subject
- \eG matches at the first matching position in the subject
-.sp
-Inside a character class, \eb has a different meaning; it matches the backspace
-character. If any other of these assertions appears in a character class, by
-default it matches the corresponding literal character (for example, \eB
-matches the letter B). However, if the PCRE_EXTRA option is set, an "invalid
-escape sequence" error is generated instead.
-.P
-A word boundary is a position in the subject string where the current character
-and the previous character do not both match \ew or \eW (i.e. one matches
-\ew and the other matches \eW), or the start or end of the string if the
-first or last character matches \ew, respectively. In a UTF mode, the meanings
-of \ew and \eW can be changed by setting the PCRE_UCP option. When this is
-done, it also affects \eb and \eB. Neither PCRE nor Perl has a separate "start
-of word" or "end of word" metasequence. However, whatever follows \eb normally
-determines which it is. For example, the fragment \eba matches "a" at the start
-of a word.
-.P
-The \eA, \eZ, and \ez assertions differ from the traditional circumflex and
-dollar (described in the next section) in that they only ever match at the very
-start and end of the subject string, whatever options are set. Thus, they are
-independent of multiline mode. These three assertions are not affected by the
-PCRE_NOTBOL or PCRE_NOTEOL options, which affect only the behaviour of the
-circumflex and dollar metacharacters. However, if the \fIstartoffset\fP
-argument of \fBpcre_exec()\fP is non-zero, indicating that matching is to start
-at a point other than the beginning of the subject, \eA can never match. The
-difference between \eZ and \ez is that \eZ matches before a newline at the end
-of the string as well as at the very end, whereas \ez matches only at the end.
-.P
-The \eG assertion is true only when the current matching position is at the
-start point of the match, as specified by the \fIstartoffset\fP argument of
-\fBpcre_exec()\fP. It differs from \eA when the value of \fIstartoffset\fP is
-non-zero. By calling \fBpcre_exec()\fP multiple times with appropriate
-arguments, you can mimic Perl's /g option, and it is in this kind of
-implementation where \eG can be useful.
-.P
-Note, however, that PCRE's interpretation of \eG, as the start of the current
-match, is subtly different from Perl's, which defines it as the end of the
-previous match. In Perl, these can be different when the previously matched
-string was empty. Because PCRE does just one match at a time, it cannot
-reproduce this behaviour.
-.P
-If all the alternatives of a pattern begin with \eG, the expression is anchored
-to the starting match position, and the "anchored" flag is set in the compiled
-regular expression.
-.
-.
-.SH "CIRCUMFLEX AND DOLLAR"
-.rs
-.sp
-Outside a character class, in the default matching mode, the circumflex
-character is an assertion that is true only if the current matching point is
-at the start of the subject string. If the \fIstartoffset\fP argument of
-\fBpcre_exec()\fP is non-zero, circumflex can never match if the PCRE_MULTILINE
-option is unset. Inside a character class, circumflex has an entirely different
-meaning
-.\" HTML <a href="#characterclass">
-.\" </a>
-(see below).
-.\"
-.P
-Circumflex need not be the first character of the pattern if a number of
-alternatives are involved, but it should be the first thing in each alternative
-in which it appears if the pattern is ever to match that branch. If all
-possible alternatives start with a circumflex, that is, if the pattern is
-constrained to match only at the start of the subject, it is said to be an
-"anchored" pattern. (There are also other constructs that can cause a pattern
-to be anchored.)
-.P
-A dollar character is an assertion that is true only if the current matching
-point is at the end of the subject string, or immediately before a newline
-at the end of the string (by default). Dollar need not be the last character of
-the pattern if a number of alternatives are involved, but it should be the last
-item in any branch in which it appears. Dollar has no special meaning in a
-character class.
-.P
-The meaning of dollar can be changed so that it matches only at the very end of
-the string, by setting the PCRE_DOLLAR_ENDONLY option at compile time. This
-does not affect the \eZ assertion.
-.P
-The meanings of the circumflex and dollar characters are changed if the
-PCRE_MULTILINE option is set. When this is the case, a circumflex matches
-immediately after internal newlines as well as at the start of the subject
-string. It does not match after a newline that ends the string. A dollar
-matches before any newlines in the string, as well as at the very end, when
-PCRE_MULTILINE is set. When newline is specified as the two-character
-sequence CRLF, isolated CR and LF characters do not indicate newlines.
-.P
-For example, the pattern /^abc$/ matches the subject string "def\enabc" (where
-\en represents a newline) in multiline mode, but not otherwise. Consequently,
-patterns that are anchored in single line mode because all branches start with
-^ are not anchored in multiline mode, and a match for circumflex is possible
-when the \fIstartoffset\fP argument of \fBpcre_exec()\fP is non-zero. The
-PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set.
-.P
-Note that the sequences \eA, \eZ, and \ez can be used to match the start and
-end of the subject in both modes, and if all branches of a pattern start with
-\eA it is always anchored, whether or not PCRE_MULTILINE is set.
-.
-.
-.\" HTML <a name="fullstopdot"></a>
-.SH "FULL STOP (PERIOD, DOT) AND \eN"
-.rs
-.sp
-Outside a character class, a dot in the pattern matches any one character in
-the subject string except (by default) a character that signifies the end of a
-line.
-.P
-When a line ending is defined as a single character, dot never matches that
-character; when the two-character sequence CRLF is used, dot does not match CR
-if it is immediately followed by LF, but otherwise it matches all characters
-(including isolated CRs and LFs). When any Unicode line endings are being
-recognized, dot does not match CR or LF or any of the other line ending
-characters.
-.P
-The behaviour of dot with regard to newlines can be changed. If the PCRE_DOTALL
-option is set, a dot matches any one character, without exception. If the
-two-character sequence CRLF is present in the subject string, it takes two dots
-to match it.
-.P
-The handling of dot is entirely independent of the handling of circumflex and
-dollar, the only relationship being that they both involve newlines. Dot has no
-special meaning in a character class.
-.P
-The escape sequence \eN behaves like a dot, except that it is not affected by
-the PCRE_DOTALL option. In other words, it matches any character except one
-that signifies the end of a line. Perl also uses \eN to match characters by
-name; PCRE does not support this.
-.
-.
-.SH "MATCHING A SINGLE DATA UNIT"
-.rs
-.sp
-Outside a character class, the escape sequence \eC matches any one data unit,
-whether or not a UTF mode is set. In the 8-bit library, one data unit is one
-byte; in the 16-bit library it is a 16-bit unit. Unlike a dot, \eC always
-matches line-ending characters. The feature is provided in Perl in order to
-match individual bytes in UTF-8 mode, but it is unclear how it can usefully be
-used. Because \eC breaks up characters into individual data units, matching one
-unit with \eC in a UTF mode means that the rest of the string may start with a
-malformed UTF character. This has undefined results, because PCRE assumes that
-it is dealing with valid UTF strings (and by default it checks this at the
-start of processing unless the PCRE_NO_UTF8_CHECK option is used).
-.P
-PCRE does not allow \eC to appear in lookbehind assertions
-.\" HTML <a href="#lookbehind">
-.\" </a>
-(described below)
-.\"
-in a UTF mode, because this would make it impossible to calculate the length of
-the lookbehind.
-.P
-In general, the \eC escape sequence is best avoided. However, one
-way of using it that avoids the problem of malformed UTF characters is to use a
-lookahead to check the length of the next character, as in this pattern, which
-could be used with a UTF-8 string (ignore white space and line breaks):
-.sp
- (?| (?=[\ex00-\ex7f])(\eC) |
- (?=[\ex80-\ex{7ff}])(\eC)(\eC) |
- (?=[\ex{800}-\ex{ffff}])(\eC)(\eC)(\eC) |
- (?=[\ex{10000}-\ex{1fffff}])(\eC)(\eC)(\eC)(\eC))
-.sp
-A group that starts with (?| resets the capturing parentheses numbers in each
-alternative (see
-.\" HTML <a href="#dupsubpatternnumber">
-.\" </a>
-"Duplicate Subpattern Numbers"
-.\"
-below). The assertions at the start of each branch check the next UTF-8
-character for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
-character's individual bytes are then captured by the appropriate number of
-groups.
-.
-.
-.\" HTML <a name="characterclass"></a>
-.SH "SQUARE BRACKETS AND CHARACTER CLASSES"
-.rs
-.sp
-An opening square bracket introduces a character class, terminated by a closing
-square bracket. A closing square bracket on its own is not special by default.
-However, if the PCRE_JAVASCRIPT_COMPAT option is set, a lone closing square
-bracket causes a compile-time error. If a closing square bracket is required as
-a member of the class, it should be the first data character in the class
-(after an initial circumflex, if present) or escaped with a backslash.
-.P
-A character class matches a single character in the subject. In a UTF mode, the
-character may be more than one data unit long. A matched character must be in
-the set of characters defined by the class, unless the first character in the
-class definition is a circumflex, in which case the subject character must not
-be in the set defined by the class. If a circumflex is actually required as a
-member of the class, ensure it is not the first character, or escape it with a
-backslash.
-.P
-For example, the character class [aeiou] matches any lower case vowel, while
-[^aeiou] matches any character that is not a lower case vowel. Note that a
-circumflex is just a convenient notation for specifying the characters that
-are in the class by enumerating those that are not. A class that starts with a
-circumflex is not an assertion; it still consumes a character from the subject
-string, and therefore it fails if the current pointer is at the end of the
-string.
-.P
-In UTF-8 (UTF-16) mode, characters with values greater than 255 (0xffff) can be
-included in a class as a literal string of data units, or by using the \ex{
-escaping mechanism.
-.P
-When caseless matching is set, any letters in a class represent both their
-upper case and lower case versions, so for example, a caseless [aeiou] matches
-"A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a
-caseful version would. In a UTF mode, PCRE always understands the concept of
-case for characters whose values are less than 128, so caseless matching is
-always possible. For characters with higher values, the concept of case is
-supported if PCRE is compiled with Unicode property support, but not otherwise.
-If you want to use caseless matching in a UTF mode for characters 128 and
-above, you must ensure that PCRE is compiled with Unicode property support as
-well as with UTF support.
-.P
-Characters that might indicate line breaks are never treated in any special way
-when matching character classes, whatever line-ending sequence is in use, and
-whatever setting of the PCRE_DOTALL and PCRE_MULTILINE options is used. A class
-such as [^a] always matches one of these characters.
-.P
-The minus (hyphen) character can be used to specify a range of characters in a
-character class. For example, [d-m] matches any letter between d and m,
-inclusive. If a minus character is required in a class, it must be escaped with
-a backslash or appear in a position where it cannot be interpreted as
-indicating a range, typically as the first or last character in the class.
-.P
-It is not possible to have the literal character "]" as the end character of a
-range. A pattern such as [W-]46] is interpreted as a class of two characters
-("W" and "-") followed by a literal string "46]", so it would match "W46]" or
-"-46]". However, if the "]" is escaped with a backslash it is interpreted as
-the end of range, so [W-\e]46] is interpreted as a class containing a range
-followed by two other characters. The octal or hexadecimal representation of
-"]" can also be used to end a range.
-.P
-Ranges operate in the collating sequence of character values. They can also be
-used for characters specified numerically, for example [\e000-\e037]. Ranges
-can include any characters that are valid for the current mode.
-.P
-If a range that includes letters is used when caseless matching is set, it
-matches the letters in either case. For example, [W-c] is equivalent to
-[][\e\e^_`wxyzabc], matched caselessly, and in a non-UTF mode, if character
-tables for a French locale are in use, [\exc8-\excb] matches accented E
-characters in both cases. In UTF modes, PCRE supports the concept of case for
-characters with values greater than 128 only when it is compiled with Unicode
-property support.
-.P
-The character escape sequences \ed, \eD, \eh, \eH, \ep, \eP, \es, \eS, \ev,
-\eV, \ew, and \eW may appear in a character class, and add the characters that
-they match to the class. For example, [\edABCDEF] matches any hexadecimal
-digit. In UTF modes, the PCRE_UCP option affects the meanings of \ed, \es, \ew
-and their upper case partners, just as it does when they appear outside a
-character class, as described in the section entitled
-.\" HTML <a href="#genericchartypes">
-.\" </a>
-"Generic character types"
-.\"
-above. The escape sequence \eb has a different meaning inside a character
-class; it matches the backspace character. The sequences \eB, \eN, \eR, and \eX
-are not special inside a character class. Like any other unrecognized escape
-sequences, they are treated as the literal characters "B", "N", "R", and "X" by
-default, but cause an error if the PCRE_EXTRA option is set.
-.P
-A circumflex can conveniently be used with the upper case character types to
-specify a more restricted set of characters than the matching lower case type.
-For example, the class [^\eW_] matches any letter or digit, but not underscore,
-whereas [\ew] includes underscore. A positive character class should be read as
-"something OR something OR ..." and a negative class as "NOT something AND NOT
-something AND NOT ...".
-.P
-The only metacharacters that are recognized in character classes are backslash,
-hyphen (only where it can be interpreted as specifying a range), circumflex
-(only at the start), opening square bracket (only when it can be interpreted as
-introducing a POSIX class name - see the next section), and the terminating
-closing square bracket. However, escaping other non-alphanumeric characters
-does no harm.
-.
-.
-.SH "POSIX CHARACTER CLASSES"
-.rs
-.sp
-Perl supports the POSIX notation for character classes. This uses names
-enclosed by [: and :] within the enclosing square brackets. PCRE also supports
-this notation. For example,
-.sp
- [01[:alpha:]%]
-.sp
-matches "0", "1", any alphabetic character, or "%". The supported class names
-are:
-.sp
- alnum letters and digits
- alpha letters
- ascii character codes 0 - 127
- blank space or tab only
- cntrl control characters
- digit decimal digits (same as \ed)
- graph printing characters, excluding space
- lower lower case letters
- print printing characters, including space
- punct printing characters, excluding letters and digits and space
- space white space (not quite the same as \es)
- upper upper case letters
- word "word" characters (same as \ew)
- xdigit hexadecimal digits
-.sp
-The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), and
-space (32). Notice that this list includes the VT character (code 11). This
-makes "space" different to \es, which does not include VT (for Perl
-compatibility).
-.P
-The name "word" is a Perl extension, and "blank" is a GNU extension from Perl
-5.8. Another Perl extension is negation, which is indicated by a ^ character
-after the colon. For example,
-.sp
- [12[:^digit:]]
-.sp
-matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the POSIX
-syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not
-supported, and an error is given if they are encountered.
-.P
-By default, in UTF modes, characters with values greater than 128 do not match
-any of the POSIX character classes. However, if the PCRE_UCP option is passed
-to \fBpcre_compile()\fP, some of the classes are changed so that Unicode
-character properties are used. This is achieved by replacing the POSIX classes
-by other sequences, as follows:
-.sp
- [:alnum:] becomes \ep{Xan}
- [:alpha:] becomes \ep{L}
- [:blank:] becomes \eh
- [:digit:] becomes \ep{Nd}
- [:lower:] becomes \ep{Ll}
- [:space:] becomes \ep{Xps}
- [:upper:] becomes \ep{Lu}
- [:word:] becomes \ep{Xwd}
-.sp
-Negated versions, such as [:^alpha:] use \eP instead of \ep. The other POSIX
-classes are unchanged, and match only characters with code points less than
-128.
-.
-.
-.SH "VERTICAL BAR"
-.rs
-.sp
-Vertical bar characters are used to separate alternative patterns. For example,
-the pattern
-.sp
- gilbert|sullivan
-.sp
-matches either "gilbert" or "sullivan". Any number of alternatives may appear,
-and an empty alternative is permitted (matching the empty string). The matching
-process tries each alternative in turn, from left to right, and the first one
-that succeeds is used. If the alternatives are within a subpattern
-.\" HTML <a href="#subpattern">
-.\" </a>
-(defined below),
-.\"
-"succeeds" means matching the rest of the main pattern as well as the
-alternative in the subpattern.
-.
-.
-.SH "INTERNAL OPTION SETTING"
-.rs
-.sp
-The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
-PCRE_EXTENDED options (which are Perl-compatible) can be changed from within
-the pattern by a sequence of Perl option letters enclosed between "(?" and ")".
-The option letters are
-.sp
- i for PCRE_CASELESS
- m for PCRE_MULTILINE
- s for PCRE_DOTALL
- x for PCRE_EXTENDED
-.sp
-For example, (?im) sets caseless, multiline matching. It is also possible to
-unset these options by preceding the letter with a hyphen, and a combined
-setting and unsetting such as (?im-sx), which sets PCRE_CASELESS and
-PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, is also
-permitted. If a letter appears both before and after the hyphen, the option is
-unset.
-.P
-The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA can be
-changed in the same way as the Perl-compatible options by using the characters
-J, U and X respectively.
-.P
-When one of these option changes occurs at top level (that is, not inside
-subpattern parentheses), the change applies to the remainder of the pattern
-that follows. If the change is placed right at the start of a pattern, PCRE
-extracts it into the global options (and it will therefore show up in data
-extracted by the \fBpcre_fullinfo()\fP function).
-.P
-An option change within a subpattern (see below for a description of
-subpatterns) affects only that part of the subpattern that follows it, so
-.sp
- (a(?i)b)c
-.sp
-matches abc and aBc and no other strings (assuming PCRE_CASELESS is not used).
-By this means, options can be made to have different settings in different
-parts of the pattern. Any changes made in one alternative do carry on
-into subsequent branches within the same subpattern. For example,
-.sp
- (a(?i)b|c)
-.sp
-matches "ab", "aB", "c", and "C", even though when matching "C" the first
-branch is abandoned before the option setting. This is because the effects of
-option settings happen at compile time. There would be some very weird
-behaviour otherwise.
-.P
-\fBNote:\fP There are other PCRE-specific options that can be set by the
-application when the compiling or matching functions are called. In some cases
-the pattern can contain special leading sequences such as (*CRLF) to override
-what the application has set or what has been defaulted. Details are given in
-the section entitled
-.\" HTML <a href="#newlineseq">
-.\" </a>
-"Newline sequences"
-.\"
-above. There are also the (*UTF8), (*UTF16), and (*UCP) leading sequences that
-can be used to set UTF and Unicode property modes; they are equivalent to
-setting the PCRE_UTF8, PCRE_UTF16, and the PCRE_UCP options, respectively.
-.
-.
-.\" HTML <a name="subpattern"></a>
-.SH SUBPATTERNS
-.rs
-.sp
-Subpatterns are delimited by parentheses (round brackets), which can be nested.
-Turning part of a pattern into a subpattern does two things:
-.sp
-1. It localizes a set of alternatives. For example, the pattern
-.sp
- cat(aract|erpillar|)
-.sp
-matches "cataract", "caterpillar", or "cat". Without the parentheses, it would
-match "cataract", "erpillar" or an empty string.
-.sp
-2. It sets up the subpattern as a capturing subpattern. This means that, when
-the whole pattern matches, that portion of the subject string that matched the
-subpattern is passed back to the caller via the \fIovector\fP argument of the
-matching function. (This applies only to the traditional matching functions;
-the DFA matching functions do not support capturing.)
-.P
-Opening parentheses are counted from left to right (starting from 1) to obtain
-numbers for the capturing subpatterns. For example, if the string "the red
-king" is matched against the pattern
-.sp
- the ((red|white) (king|queen))
-.sp
-the captured substrings are "red king", "red", and "king", and are numbered 1,
-2, and 3, respectively.
-.P
-The fact that plain parentheses fulfil two functions is not always helpful.
-There are often times when a grouping subpattern is required without a
-capturing requirement. If an opening parenthesis is followed by a question mark
-and a colon, the subpattern does not do any capturing, and is not counted when
-computing the number of any subsequent capturing subpatterns. For example, if
-the string "the white queen" is matched against the pattern
-.sp
- the ((?:red|white) (king|queen))
-.sp
-the captured substrings are "white queen" and "queen", and are numbered 1 and
-2. The maximum number of capturing subpatterns is 65535.
-.P
-As a convenient shorthand, if any option settings are required at the start of
-a non-capturing subpattern, the option letters may appear between the "?" and
-the ":". Thus the two patterns
-.sp
- (?i:saturday|sunday)
- (?:(?i)saturday|sunday)
-.sp
-match exactly the same set of strings. Because alternative branches are tried
-from left to right, and options are not reset until the end of the subpattern
-is reached, an option setting in one branch does affect subsequent branches, so
-the above patterns match "SUNDAY" as well as "Saturday".
-.
-.
-.\" HTML <a name="dupsubpatternnumber"></a>
-.SH "DUPLICATE SUBPATTERN NUMBERS"
-.rs
-.sp
-Perl 5.10 introduced a feature whereby each alternative in a subpattern uses
-the same numbers for its capturing parentheses. Such a subpattern starts with
-(?| and is itself a non-capturing subpattern. For example, consider this
-pattern:
-.sp
- (?|(Sat)ur|(Sun))day
-.sp
-Because the two alternatives are inside a (?| group, both sets of capturing
-parentheses are numbered one. Thus, when the pattern matches, you can look
-at captured substring number one, whichever alternative matched. This construct
-is useful when you want to capture part, but not all, of one of a number of
-alternatives. Inside a (?| group, parentheses are numbered as usual, but the
-number is reset at the start of each branch. The numbers of any capturing
-parentheses that follow the subpattern start after the highest number used in
-any branch. The following example is taken from the Perl documentation. The
-numbers underneath show in which buffer the captured content will be stored.
-.sp
- # before ---------------branch-reset----------- after
- / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
- # 1 2 2 3 2 3 4
-.sp
-A back reference to a numbered subpattern uses the most recent value that is
-set for that number by any subpattern. The following pattern matches "abcabc"
-or "defdef":
-.sp
- /(?|(abc)|(def))\e1/
-.sp
-In contrast, a subroutine call to a numbered subpattern always refers to the
-first one in the pattern with the given number. The following pattern matches
-"abcabc" or "defabc":
-.sp
- /(?|(abc)|(def))(?1)/
-.sp
-If a
-.\" HTML <a href="#conditions">
-.\" </a>
-condition test
-.\"
-for a subpattern's having matched refers to a non-unique number, the test is
-true if any of the subpatterns of that number have matched.
-.P
-An alternative approach to using this "branch reset" feature is to use
-duplicate named subpatterns, as described in the next section.
-.
-.
-.SH "NAMED SUBPATTERNS"
-.rs
-.sp
-Identifying capturing parentheses by number is simple, but it can be very hard
-to keep track of the numbers in complicated regular expressions. Furthermore,
-if an expression is modified, the numbers may change. To help with this
-difficulty, PCRE supports the naming of subpatterns. This feature was not
-added to Perl until release 5.10. Python had the feature earlier, and PCRE
-introduced it at release 4.0, using the Python syntax. PCRE now supports both
-the Perl and the Python syntax. Perl allows identically numbered subpatterns to
-have different names, but PCRE does not.
-.P
-In PCRE, a subpattern can be named in one of three ways: (?<name>...) or
-(?'name'...) as in Perl, or (?P<name>...) as in Python. References to capturing
-parentheses from other parts of the pattern, such as
-.\" HTML <a href="#backreferences">
-.\" </a>
-back references,
-.\"
-.\" HTML <a href="#recursion">
-.\" </a>
-recursion,
-.\"
-and
-.\" HTML <a href="#conditions">
-.\" </a>
-conditions,
-.\"
-can be made by name as well as by number.
-.P
-Names consist of up to 32 alphanumeric characters and underscores. Named
-capturing parentheses are still allocated numbers as well as names, exactly as
-if the names were not present. The PCRE API provides function calls for
-extracting the name-to-number translation table from a compiled pattern. There
-is also a convenience function for extracting a captured substring by name.
-.P
-By default, a name must be unique within a pattern, but it is possible to relax
-this constraint by setting the PCRE_DUPNAMES option at compile time. (Duplicate
-names are also always permitted for subpatterns with the same number, set up as
-described in the previous section.) Duplicate names can be useful for patterns
-where only one instance of the named parentheses can match. Suppose you want to
-match the name of a weekday, either as a 3-letter abbreviation or as the full
-name, and in both cases you want to extract the abbreviation. This pattern
-(ignoring the line breaks) does the job:
-.sp
- (?<DN>Mon|Fri|Sun)(?:day)?|
- (?<DN>Tue)(?:sday)?|
- (?<DN>Wed)(?:nesday)?|
- (?<DN>Thu)(?:rsday)?|
- (?<DN>Sat)(?:urday)?
-.sp
-There are five capturing substrings, but only one is ever set after a match.
-(An alternative way of solving this problem is to use a "branch reset"
-subpattern, as described in the previous section.)
-.P
-The convenience function for extracting the data by name returns the substring
-for the first (and in this example, the only) subpattern of that name that
-matched. This saves searching to find which numbered subpattern it was.
-.P
-If you make a back reference to a non-unique named subpattern from elsewhere in
-the pattern, the one that corresponds to the first occurrence of the name is
-used. In the absence of duplicate numbers (see the previous section) this is
-the one with the lowest number. If you use a named reference in a condition
-test (see the
-.\"
-.\" HTML <a href="#conditions">
-.\" </a>
-section about conditions
-.\"
-below), either to check whether a subpattern has matched, or to check for
-recursion, all subpatterns with the same name are tested. If the condition is
-true for any one of them, the overall condition is true. This is the same
-behaviour as testing by number. For further details of the interfaces for
-handling named subpatterns, see the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.P
-\fBWarning:\fP You cannot use different names to distinguish between two
-subpatterns with the same number because PCRE uses only the numbers when
-matching. For this reason, an error is given at compile time if different names
-are given to subpatterns with the same number. However, you can give the same
-name to subpatterns with the same number, even when PCRE_DUPNAMES is not set.
-.
-.
-.SH REPETITION
-.rs
-.sp
-Repetition is specified by quantifiers, which can follow any of the following
-items:
-.sp
- a literal data character
- the dot metacharacter
- the \eC escape sequence
- the \eX escape sequence
- the \eR escape sequence
- an escape such as \ed or \epL that matches a single character
- a character class
- a back reference (see next section)
- a parenthesized subpattern (including assertions)
- a subroutine call to a subpattern (recursive or otherwise)
-.sp
-The general repetition quantifier specifies a minimum and maximum number of
-permitted matches, by giving the two numbers in curly brackets (braces),
-separated by a comma. The numbers must be less than 65536, and the first must
-be less than or equal to the second. For example:
-.sp
- z{2,4}
-.sp
-matches "zz", "zzz", or "zzzz". A closing brace on its own is not a special
-character. If the second number is omitted, but the comma is present, there is
-no upper limit; if the second number and the comma are both omitted, the
-quantifier specifies an exact number of required matches. Thus
-.sp
- [aeiou]{3,}
-.sp
-matches at least 3 successive vowels, but may match many more, while
-.sp
- \ed{8}
-.sp
-matches exactly 8 digits. An opening curly bracket that appears in a position
-where a quantifier is not allowed, or one that does not match the syntax of a
-quantifier, is taken as a literal character. For example, {,6} is not a
-quantifier, but a literal string of four characters.
-.P
-In UTF modes, quantifiers apply to characters rather than to individual data
-units. Thus, for example, \ex{100}{2} matches two characters, each of
-which is represented by a two-byte sequence in a UTF-8 string. Similarly,
-\eX{3} matches three Unicode extended sequences, each of which may be several
-data units long (and they may be of different lengths).
-.P
-The quantifier {0} is permitted, causing the expression to behave as if the
-previous item and the quantifier were not present. This may be useful for
-subpatterns that are referenced as
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-subroutines
-.\"
-from elsewhere in the pattern (but see also the section entitled
-.\" HTML <a href="#subdefine">
-.\" </a>
-"Defining subpatterns for use by reference only"
-.\"
-below). Items other than subpatterns that have a {0} quantifier are omitted
-from the compiled pattern.
-.P
-For convenience, the three most common quantifiers have single-character
-abbreviations:
-.sp
- * is equivalent to {0,}
- + is equivalent to {1,}
- ? is equivalent to {0,1}
-.sp
-It is possible to construct infinite loops by following a subpattern that can
-match no characters with a quantifier that has no upper limit, for example:
-.sp
- (a?)*
-.sp
-Earlier versions of Perl and PCRE used to give an error at compile time for
-such patterns. However, because there are cases where this can be useful, such
-patterns are now accepted, but if any repetition of the subpattern does in fact
-match no characters, the loop is forcibly broken.
-.P
-By default, the quantifiers are "greedy", that is, they match as much as
-possible (up to the maximum number of permitted times), without causing the
-rest of the pattern to fail. The classic example of where this gives problems
-is in trying to match comments in C programs. These appear between /* and */
-and within the comment, individual * and / characters may appear. An attempt to
-match C comments by applying the pattern
-.sp
- /\e*.*\e*/
-.sp
-to the string
-.sp
- /* first comment */ not comment /* second comment */
-.sp
-fails, because it matches the entire string owing to the greediness of the .*
-item.
-.P
-However, if a quantifier is followed by a question mark, it ceases to be
-greedy, and instead matches the minimum number of times possible, so the
-pattern
-.sp
- /\e*.*?\e*/
-.sp
-does the right thing with the C comments. The meaning of the various
-quantifiers is not otherwise changed, just the preferred number of matches.
-Do not confuse this use of question mark with its use as a quantifier in its
-own right. Because it has two uses, it can sometimes appear doubled, as in
-.sp
- \ed??\ed
-.sp
-which matches one digit by preference, but can match two if that is the only
-way the rest of the pattern matches.
-.P
-If the PCRE_UNGREEDY option is set (an option that is not available in Perl),
-the quantifiers are not greedy by default, but individual ones can be made
-greedy by following them with a question mark. In other words, it inverts the
-default behaviour.
-.P
-When a parenthesized subpattern is quantified with a minimum repeat count that
-is greater than 1 or with a limited maximum, more memory is required for the
-compiled pattern, in proportion to the size of the minimum or maximum.
-.P
-If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equivalent
-to Perl's /s) is set, thus allowing the dot to match newlines, the pattern is
-implicitly anchored, because whatever follows will be tried against every
-character position in the subject string, so there is no point in retrying the
-overall match at any position after the first. PCRE normally treats such a
-pattern as though it were preceded by \eA.
-.P
-In cases where it is known that the subject string contains no newlines, it is
-worth setting PCRE_DOTALL in order to obtain this optimization, or
-alternatively using ^ to indicate anchoring explicitly.
-.P
-However, there is one situation where the optimization cannot be used. When .*
-is inside capturing parentheses that are the subject of a back reference
-elsewhere in the pattern, a match at the start may fail where a later one
-succeeds. Consider, for example:
-.sp
- (.*)abc\e1
-.sp
-If the subject is "xyz123abc123" the match point is the fourth character. For
-this reason, such a pattern is not implicitly anchored.
-.P
-When a capturing subpattern is repeated, the value captured is the substring
-that matched the final iteration. For example, after
-.sp
- (tweedle[dume]{3}\es*)+
-.sp
-has matched "tweedledum tweedledee" the value of the captured substring is
-"tweedledee". However, if there are nested capturing subpatterns, the
-corresponding captured values may have been set in previous iterations. For
-example, after
-.sp
- /(a|(b))+/
-.sp
-matches "aba" the value of the second captured substring is "b".
-.
-.
-.\" HTML <a name="atomicgroup"></a>
-.SH "ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS"
-.rs
-.sp
-With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy")
-repetition, failure of what follows normally causes the repeated item to be
-re-evaluated to see if a different number of repeats allows the rest of the
-pattern to match. Sometimes it is useful to prevent this, either to change the
-nature of the match, or to cause it fail earlier than it otherwise might, when
-the author of the pattern knows there is no point in carrying on.
-.P
-Consider, for example, the pattern \ed+foo when applied to the subject line
-.sp
- 123456bar
-.sp
-After matching all 6 digits and then failing to match "foo", the normal
-action of the matcher is to try again with only 5 digits matching the \ed+
-item, and then with 4, and so on, before ultimately failing. "Atomic grouping"
-(a term taken from Jeffrey Friedl's book) provides the means for specifying
-that once a subpattern has matched, it is not to be re-evaluated in this way.
-.P
-If we use atomic grouping for the previous example, the matcher gives up
-immediately on failing to match "foo" the first time. The notation is a kind of
-special parenthesis, starting with (?> as in this example:
-.sp
- (?>\ed+)foo
-.sp
-This kind of parenthesis "locks up" the part of the pattern it contains once
-it has matched, and a failure further into the pattern is prevented from
-backtracking into it. Backtracking past it to previous items, however, works as
-normal.
-.P
-An alternative description is that a subpattern of this type matches the string
-of characters that an identical standalone pattern would match, if anchored at
-the current point in the subject string.
-.P
-Atomic grouping subpatterns are not capturing subpatterns. Simple cases such as
-the above example can be thought of as a maximizing repeat that must swallow
-everything it can. So, while both \ed+ and \ed+? are prepared to adjust the
-number of digits they match in order to make the rest of the pattern match,
-(?>\ed+) can only match an entire sequence of digits.
-.P
-Atomic groups in general can of course contain arbitrarily complicated
-subpatterns, and can be nested. However, when the subpattern for an atomic
-group is just a single repeated item, as in the example above, a simpler
-notation, called a "possessive quantifier" can be used. This consists of an
-additional + character following a quantifier. Using this notation, the
-previous example can be rewritten as
-.sp
- \ed++foo
-.sp
-Note that a possessive quantifier can be used with an entire group, for
-example:
-.sp
- (abc|xyz){2,3}+
-.sp
-Possessive quantifiers are always greedy; the setting of the PCRE_UNGREEDY
-option is ignored. They are a convenient notation for the simpler forms of
-atomic group. However, there is no difference in the meaning of a possessive
-quantifier and the equivalent atomic group, though there may be a performance
-difference; possessive quantifiers should be slightly faster.
-.P
-The possessive quantifier syntax is an extension to the Perl 5.8 syntax.
-Jeffrey Friedl originated the idea (and the name) in the first edition of his
-book. Mike McCloskey liked it, so implemented it when he built Sun's Java
-package, and PCRE copied it from there. It ultimately found its way into Perl
-at release 5.10.
-.P
-PCRE has an optimization that automatically "possessifies" certain simple
-pattern constructs. For example, the sequence A+B is treated as A++B because
-there is no point in backtracking into a sequence of A's when B must follow.
-.P
-When a pattern contains an unlimited repeat inside a subpattern that can itself
-be repeated an unlimited number of times, the use of an atomic group is the
-only way to avoid some failing matches taking a very long time indeed. The
-pattern
-.sp
- (\eD+|<\ed+>)*[!?]
-.sp
-matches an unlimited number of substrings that either consist of non-digits, or
-digits enclosed in <>, followed by either ! or ?. When it matches, it runs
-quickly. However, if it is applied to
-.sp
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-.sp
-it takes a long time before reporting failure. This is because the string can
-be divided between the internal \eD+ repeat and the external * repeat in a
-large number of ways, and all have to be tried. (The example uses [!?] rather
-than a single character at the end, because both PCRE and Perl have an
-optimization that allows for fast failure when a single character is used. They
-remember the last single character that is required for a match, and fail early
-if it is not present in the string.) If the pattern is changed so that it uses
-an atomic group, like this:
-.sp
- ((?>\eD+)|<\ed+>)*[!?]
-.sp
-sequences of non-digits cannot be broken, and failure happens quickly.
-.
-.
-.\" HTML <a name="backreferences"></a>
-.SH "BACK REFERENCES"
-.rs
-.sp
-Outside a character class, a backslash followed by a digit greater than 0 (and
-possibly further digits) is a back reference to a capturing subpattern earlier
-(that is, to its left) in the pattern, provided there have been that many
-previous capturing left parentheses.
-.P
-However, if the decimal number following the backslash is less than 10, it is
-always taken as a back reference, and causes an error only if there are not
-that many capturing left parentheses in the entire pattern. In other words, the
-parentheses that are referenced need not be to the left of the reference for
-numbers less than 10. A "forward back reference" of this type can make sense
-when a repetition is involved and the subpattern to the right has participated
-in an earlier iteration.
-.P
-It is not possible to have a numerical "forward back reference" to a subpattern
-whose number is 10 or more using this syntax because a sequence such as \e50 is
-interpreted as a character defined in octal. See the subsection entitled
-"Non-printing characters"
-.\" HTML <a href="#digitsafterbackslash">
-.\" </a>
-above
-.\"
-for further details of the handling of digits following a backslash. There is
-no such problem when named parentheses are used. A back reference to any
-subpattern is possible using named parentheses (see below).
-.P
-Another way of avoiding the ambiguity inherent in the use of digits following a
-backslash is to use the \eg escape sequence. This escape must be followed by an
-unsigned number or a negative number, optionally enclosed in braces. These
-examples are all identical:
-.sp
- (ring), \e1
- (ring), \eg1
- (ring), \eg{1}
-.sp
-An unsigned number specifies an absolute reference without the ambiguity that
-is present in the older syntax. It is also useful when literal digits follow
-the reference. A negative number is a relative reference. Consider this
-example:
-.sp
- (abc(def)ghi)\eg{-1}
-.sp
-The sequence \eg{-1} is a reference to the most recently started capturing
-subpattern before \eg, that is, is it equivalent to \e2 in this example.
-Similarly, \eg{-2} would be equivalent to \e1. The use of relative references
-can be helpful in long patterns, and also in patterns that are created by
-joining together fragments that contain references within themselves.
-.P
-A back reference matches whatever actually matched the capturing subpattern in
-the current subject string, rather than anything matching the subpattern
-itself (see
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-"Subpatterns as subroutines"
-.\"
-below for a way of doing that). So the pattern
-.sp
- (sens|respons)e and \e1ibility
-.sp
-matches "sense and sensibility" and "response and responsibility", but not
-"sense and responsibility". If caseful matching is in force at the time of the
-back reference, the case of letters is relevant. For example,
-.sp
- ((?i)rah)\es+\e1
-.sp
-matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original
-capturing subpattern is matched caselessly.
-.P
-There are several different ways of writing back references to named
-subpatterns. The .NET syntax \ek{name} and the Perl syntax \ek<name> or
-\ek'name' are supported, as is the Python syntax (?P=name). Perl 5.10's unified
-back reference syntax, in which \eg can be used for both numeric and named
-references, is also supported. We could rewrite the above example in any of
-the following ways:
-.sp
- (?<p1>(?i)rah)\es+\ek<p1>
- (?'p1'(?i)rah)\es+\ek{p1}
- (?P<p1>(?i)rah)\es+(?P=p1)
- (?<p1>(?i)rah)\es+\eg{p1}
-.sp
-A subpattern that is referenced by name may appear in the pattern before or
-after the reference.
-.P
-There may be more than one back reference to the same subpattern. If a
-subpattern has not actually been used in a particular match, any back
-references to it always fail by default. For example, the pattern
-.sp
- (a|(bc))\e2
-.sp
-always fails if it starts to match "a" rather than "bc". However, if the
-PCRE_JAVASCRIPT_COMPAT option is set at compile time, a back reference to an
-unset value matches an empty string.
-.P
-Because there may be many capturing parentheses in a pattern, all digits
-following a backslash are taken as part of a potential back reference number.
-If the pattern continues with a digit character, some delimiter must be used to
-terminate the back reference. If the PCRE_EXTENDED option is set, this can be
-whitespace. Otherwise, the \eg{ syntax or an empty comment (see
-.\" HTML <a href="#comments">
-.\" </a>
-"Comments"
-.\"
-below) can be used.
-.
-.SS "Recursive back references"
-.rs
-.sp
-A back reference that occurs inside the parentheses to which it refers fails
-when the subpattern is first used, so, for example, (a\e1) never matches.
-However, such references can be useful inside repeated subpatterns. For
-example, the pattern
-.sp
- (a|b\e1)+
-.sp
-matches any number of "a"s and also "aba", "ababbaa" etc. At each iteration of
-the subpattern, the back reference matches the character string corresponding
-to the previous iteration. In order for this to work, the pattern must be such
-that the first iteration does not need to match the back reference. This can be
-done using alternation, as in the example above, or by a quantifier with a
-minimum of zero.
-.P
-Back references of this type cause the group that they reference to be treated
-as an
-.\" HTML <a href="#atomicgroup">
-.\" </a>
-atomic group.
-.\"
-Once the whole group has been matched, a subsequent matching failure cannot
-cause backtracking into the middle of the group.
-.
-.
-.\" HTML <a name="bigassertions"></a>
-.SH ASSERTIONS
-.rs
-.sp
-An assertion is a test on the characters following or preceding the current
-matching point that does not actually consume any characters. The simple
-assertions coded as \eb, \eB, \eA, \eG, \eZ, \ez, ^ and $ are described
-.\" HTML <a href="#smallassertions">
-.\" </a>
-above.
-.\"
-.P
-More complicated assertions are coded as subpatterns. There are two kinds:
-those that look ahead of the current position in the subject string, and those
-that look behind it. An assertion subpattern is matched in the normal way,
-except that it does not cause the current matching position to be changed.
-.P
-Assertion subpatterns are not capturing subpatterns. If such an assertion
-contains capturing subpatterns within it, these are counted for the purposes of
-numbering the capturing subpatterns in the whole pattern. However, substring
-capturing is carried out only for positive assertions, because it does not make
-sense for negative assertions.
-.P
-For compatibility with Perl, assertion subpatterns may be repeated; though
-it makes no sense to assert the same thing several times, the side effect of
-capturing parentheses may occasionally be useful. In practice, there only three
-cases:
-.sp
-(1) If the quantifier is {0}, the assertion is never obeyed during matching.
-However, it may contain internal capturing parenthesized groups that are called
-from elsewhere via the
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-subroutine mechanism.
-.\"
-.sp
-(2) If quantifier is {0,n} where n is greater than zero, it is treated as if it
-were {0,1}. At run time, the rest of the pattern match is tried with and
-without the assertion, the order depending on the greediness of the quantifier.
-.sp
-(3) If the minimum repetition is greater than zero, the quantifier is ignored.
-The assertion is obeyed just once when encountered during matching.
-.
-.
-.SS "Lookahead assertions"
-.rs
-.sp
-Lookahead assertions start with (?= for positive assertions and (?! for
-negative assertions. For example,
-.sp
- \ew+(?=;)
-.sp
-matches a word followed by a semicolon, but does not include the semicolon in
-the match, and
-.sp
- foo(?!bar)
-.sp
-matches any occurrence of "foo" that is not followed by "bar". Note that the
-apparently similar pattern
-.sp
- (?!foo)bar
-.sp
-does not find an occurrence of "bar" that is preceded by something other than
-"foo"; it finds any occurrence of "bar" whatsoever, because the assertion
-(?!foo) is always true when the next three characters are "bar". A
-lookbehind assertion is needed to achieve the other effect.
-.P
-If you want to force a matching failure at some point in a pattern, the most
-convenient way to do it is with (?!) because an empty string always matches, so
-an assertion that requires there not to be an empty string must always fail.
-The backtracking control verb (*FAIL) or (*F) is a synonym for (?!).
-.
-.
-.\" HTML <a name="lookbehind"></a>
-.SS "Lookbehind assertions"
-.rs
-.sp
-Lookbehind assertions start with (?<= for positive assertions and (?<! for
-negative assertions. For example,
-.sp
- (?<!foo)bar
-.sp
-does find an occurrence of "bar" that is not preceded by "foo". The contents of
-a lookbehind assertion are restricted such that all the strings it matches must
-have a fixed length. However, if there are several top-level alternatives, they
-do not all have to have the same fixed length. Thus
-.sp
- (?<=bullock|donkey)
-.sp
-is permitted, but
-.sp
- (?<!dogs?|cats?)
-.sp
-causes an error at compile time. Branches that match different length strings
-are permitted only at the top level of a lookbehind assertion. This is an
-extension compared with Perl, which requires all branches to match the same
-length of string. An assertion such as
-.sp
- (?<=ab(c|de))
-.sp
-is not permitted, because its single top-level branch can match two different
-lengths, but it is acceptable to PCRE if rewritten to use two top-level
-branches:
-.sp
- (?<=abc|abde)
-.sp
-In some cases, the escape sequence \eK
-.\" HTML <a href="#resetmatchstart">
-.\" </a>
-(see above)
-.\"
-can be used instead of a lookbehind assertion to get round the fixed-length
-restriction.
-.P
-The implementation of lookbehind assertions is, for each alternative, to
-temporarily move the current position back by the fixed length and then try to
-match. If there are insufficient characters before the current position, the
-assertion fails.
-.P
-In a UTF mode, PCRE does not allow the \eC escape (which matches a single data
-unit even in a UTF mode) to appear in lookbehind assertions, because it makes
-it impossible to calculate the length of the lookbehind. The \eX and \eR
-escapes, which can match different numbers of data units, are also not
-permitted.
-.P
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-"Subroutine"
-.\"
-calls (see below) such as (?2) or (?&X) are permitted in lookbehinds, as long
-as the subpattern matches a fixed-length string.
-.\" HTML <a href="#recursion">
-.\" </a>
-Recursion,
-.\"
-however, is not supported.
-.P
-Possessive quantifiers can be used in conjunction with lookbehind assertions to
-specify efficient matching of fixed-length strings at the end of subject
-strings. Consider a simple pattern such as
-.sp
- abcd$
-.sp
-when applied to a long string that does not match. Because matching proceeds
-from left to right, PCRE will look for each "a" in the subject and then see if
-what follows matches the rest of the pattern. If the pattern is specified as
-.sp
- ^.*abcd$
-.sp
-the initial .* matches the entire string at first, but when this fails (because
-there is no following "a"), it backtracks to match all but the last character,
-then all but the last two characters, and so on. Once again the search for "a"
-covers the entire string, from right to left, so we are no better off. However,
-if the pattern is written as
-.sp
- ^.*+(?<=abcd)
-.sp
-there can be no backtracking for the .*+ item; it can match only the entire
-string. The subsequent lookbehind assertion does a single test on the last four
-characters. If it fails, the match fails immediately. For long strings, this
-approach makes a significant difference to the processing time.
-.
-.
-.SS "Using multiple assertions"
-.rs
-.sp
-Several assertions (of any sort) may occur in succession. For example,
-.sp
- (?<=\ed{3})(?<!999)foo
-.sp
-matches "foo" preceded by three digits that are not "999". Notice that each of
-the assertions is applied independently at the same point in the subject
-string. First there is a check that the previous three characters are all
-digits, and then there is a check that the same three characters are not "999".
-This pattern does \fInot\fP match "foo" preceded by six characters, the first
-of which are digits and the last three of which are not "999". For example, it
-doesn't match "123abcfoo". A pattern to do that is
-.sp
- (?<=\ed{3}...)(?<!999)foo
-.sp
-This time the first assertion looks at the preceding six characters, checking
-that the first three are digits, and then the second assertion checks that the
-preceding three characters are not "999".
-.P
-Assertions can be nested in any combination. For example,
-.sp
- (?<=(?<!foo)bar)baz
-.sp
-matches an occurrence of "baz" that is preceded by "bar" which in turn is not
-preceded by "foo", while
-.sp
- (?<=\ed{3}(?!999)...)foo
-.sp
-is another pattern that matches "foo" preceded by three digits and any three
-characters that are not "999".
-.
-.
-.\" HTML <a name="conditions"></a>
-.SH "CONDITIONAL SUBPATTERNS"
-.rs
-.sp
-It is possible to cause the matching process to obey a subpattern
-conditionally or to choose between two alternative subpatterns, depending on
-the result of an assertion, or whether a specific capturing subpattern has
-already been matched. The two possible forms of conditional subpattern are:
-.sp
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-.sp
-If the condition is satisfied, the yes-pattern is used; otherwise the
-no-pattern (if present) is used. If there are more than two alternatives in the
-subpattern, a compile-time error occurs. Each of the two alternatives may
-itself contain nested subpatterns of any form, including conditional
-subpatterns; the restriction to two alternatives applies only at the level of
-the condition. This pattern fragment is an example where the alternatives are
-complex:
-.sp
- (?(1) (A|B|C) | (D | (?(2)E|F) | E) )
-.sp
-.P
-There are four kinds of condition: references to subpatterns, references to
-recursion, a pseudo-condition called DEFINE, and assertions.
-.
-.SS "Checking for a used subpattern by number"
-.rs
-.sp
-If the text between the parentheses consists of a sequence of digits, the
-condition is true if a capturing subpattern of that number has previously
-matched. If there is more than one capturing subpattern with the same number
-(see the earlier
-.\"
-.\" HTML <a href="#recursion">
-.\" </a>
-section about duplicate subpattern numbers),
-.\"
-the condition is true if any of them have matched. An alternative notation is
-to precede the digits with a plus or minus sign. In this case, the subpattern
-number is relative rather than absolute. The most recently opened parentheses
-can be referenced by (?(-1), the next most recent by (?(-2), and so on. Inside
-loops it can also make sense to refer to subsequent groups. The next
-parentheses to be opened can be referenced as (?(+1), and so on. (The value
-zero in any of these forms is not used; it provokes a compile-time error.)
-.P
-Consider the following pattern, which contains non-significant white space to
-make it more readable (assume the PCRE_EXTENDED option) and to divide it into
-three parts for ease of discussion:
-.sp
- ( \e( )? [^()]+ (?(1) \e) )
-.sp
-The first part matches an optional opening parenthesis, and if that
-character is present, sets it as the first captured substring. The second part
-matches one or more characters that are not parentheses. The third part is a
-conditional subpattern that tests whether or not the first set of parentheses
-matched. If they did, that is, if subject started with an opening parenthesis,
-the condition is true, and so the yes-pattern is executed and a closing
-parenthesis is required. Otherwise, since no-pattern is not present, the
-subpattern matches nothing. In other words, this pattern matches a sequence of
-non-parentheses, optionally enclosed in parentheses.
-.P
-If you were embedding this pattern in a larger one, you could use a relative
-reference:
-.sp
- ...other stuff... ( \e( )? [^()]+ (?(-1) \e) ) ...
-.sp
-This makes the fragment independent of the parentheses in the larger pattern.
-.
-.SS "Checking for a used subpattern by name"
-.rs
-.sp
-Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a used
-subpattern by name. For compatibility with earlier versions of PCRE, which had
-this facility before Perl, the syntax (?(name)...) is also recognized. However,
-there is a possible ambiguity with this syntax, because subpattern names may
-consist entirely of digits. PCRE looks first for a named subpattern; if it
-cannot find one and the name consists entirely of digits, PCRE looks for a
-subpattern of that number, which must be greater than zero. Using subpattern
-names that consist entirely of digits is not recommended.
-.P
-Rewriting the above example to use a named subpattern gives this:
-.sp
- (?<OPEN> \e( )? [^()]+ (?(<OPEN>) \e) )
-.sp
-If the name used in a condition of this kind is a duplicate, the test is
-applied to all subpatterns of the same name, and is true if any one of them has
-matched.
-.
-.SS "Checking for pattern recursion"
-.rs
-.sp
-If the condition is the string (R), and there is no subpattern with the name R,
-the condition is true if a recursive call to the whole pattern or any
-subpattern has been made. If digits or a name preceded by ampersand follow the
-letter R, for example:
-.sp
- (?(R3)...) or (?(R&name)...)
-.sp
-the condition is true if the most recent recursion is into a subpattern whose
-number or name is given. This condition does not check the entire recursion
-stack. If the name used in a condition of this kind is a duplicate, the test is
-applied to all subpatterns of the same name, and is true if any one of them is
-the most recent recursion.
-.P
-At "top level", all these recursion test conditions are false.
-.\" HTML <a href="#recursion">
-.\" </a>
-The syntax for recursive patterns
-.\"
-is described below.
-.
-.\" HTML <a name="subdefine"></a>
-.SS "Defining subpatterns for use by reference only"
-.rs
-.sp
-If the condition is the string (DEFINE), and there is no subpattern with the
-name DEFINE, the condition is always false. In this case, there may be only one
-alternative in the subpattern. It is always skipped if control reaches this
-point in the pattern; the idea of DEFINE is that it can be used to define
-subroutines that can be referenced from elsewhere. (The use of
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-subroutines
-.\"
-is described below.) For example, a pattern to match an IPv4 address such as
-"192.168.23.245" could be written like this (ignore whitespace and line
-breaks):
-.sp
- (?(DEFINE) (?<byte> 2[0-4]\ed | 25[0-5] | 1\ed\ed | [1-9]?\ed) )
- \eb (?&byte) (\e.(?&byte)){3} \eb
-.sp
-The first part of the pattern is a DEFINE group inside which a another group
-named "byte" is defined. This matches an individual component of an IPv4
-address (a number less than 256). When matching takes place, this part of the
-pattern is skipped because DEFINE acts like a false condition. The rest of the
-pattern uses references to the named group to match the four dot-separated
-components of an IPv4 address, insisting on a word boundary at each end.
-.
-.SS "Assertion conditions"
-.rs
-.sp
-If the condition is not in any of the above formats, it must be an assertion.
-This may be a positive or negative lookahead or lookbehind assertion. Consider
-this pattern, again containing non-significant white space, and with the two
-alternatives on the second line:
-.sp
- (?(?=[^a-z]*[a-z])
- \ed{2}-[a-z]{3}-\ed{2} | \ed{2}-\ed{2}-\ed{2} )
-.sp
-The condition is a positive lookahead assertion that matches an optional
-sequence of non-letters followed by a letter. In other words, it tests for the
-presence of at least one letter in the subject. If a letter is found, the
-subject is matched against the first alternative; otherwise it is matched
-against the second. This pattern matches strings in one of the two forms
-dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.
-.
-.
-.\" HTML <a name="comments"></a>
-.SH COMMENTS
-.rs
-.sp
-There are two ways of including comments in patterns that are processed by
-PCRE. In both cases, the start of the comment must not be in a character class,
-nor in the middle of any other sequence of related characters such as (?: or a
-subpattern name or number. The characters that make up a comment play no part
-in the pattern matching.
-.P
-The sequence (?# marks the start of a comment that continues up to the next
-closing parenthesis. Nested parentheses are not permitted. If the PCRE_EXTENDED
-option is set, an unescaped # character also introduces a comment, which in
-this case continues to immediately after the next newline character or
-character sequence in the pattern. Which characters are interpreted as newlines
-is controlled by the options passed to a compiling function or by a special
-sequence at the start of the pattern, as described in the section entitled
-.\" HTML <a href="#newlines">
-.\" </a>
-"Newline conventions"
-.\"
-above. Note that the end of this type of comment is a literal newline sequence
-in the pattern; escape sequences that happen to represent a newline do not
-count. For example, consider this pattern when PCRE_EXTENDED is set, and the
-default newline convention is in force:
-.sp
- abc #comment \en still comment
-.sp
-On encountering the # character, \fBpcre_compile()\fP skips along, looking for
-a newline in the pattern. The sequence \en is still literal at this stage, so
-it does not terminate the comment. Only an actual character with the code value
-0x0a (the default newline) does so.
-.
-.
-.\" HTML <a name="recursion"></a>
-.SH "RECURSIVE PATTERNS"
-.rs
-.sp
-Consider the problem of matching a string in parentheses, allowing for
-unlimited nested parentheses. Without the use of recursion, the best that can
-be done is to use a pattern that matches up to some fixed depth of nesting. It
-is not possible to handle an arbitrary nesting depth.
-.P
-For some time, Perl has provided a facility that allows regular expressions to
-recurse (amongst other things). It does this by interpolating Perl code in the
-expression at run time, and the code can refer to the expression itself. A Perl
-pattern using code interpolation to solve the parentheses problem can be
-created like this:
-.sp
- $re = qr{\e( (?: (?>[^()]+) | (?p{$re}) )* \e)}x;
-.sp
-The (?p{...}) item interpolates Perl code at run time, and in this case refers
-recursively to the pattern in which it appears.
-.P
-Obviously, PCRE cannot support the interpolation of Perl code. Instead, it
-supports special syntax for recursion of the entire pattern, and also for
-individual subpattern recursion. After its introduction in PCRE and Python,
-this kind of recursion was subsequently introduced into Perl at release 5.10.
-.P
-A special item that consists of (? followed by a number greater than zero and a
-closing parenthesis is a recursive subroutine call of the subpattern of the
-given number, provided that it occurs inside that subpattern. (If not, it is a
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-non-recursive subroutine
-.\"
-call, which is described in the next section.) The special item (?R) or (?0) is
-a recursive call of the entire regular expression.
-.P
-This PCRE pattern solves the nested parentheses problem (assume the
-PCRE_EXTENDED option is set so that white space is ignored):
-.sp
- \e( ( [^()]++ | (?R) )* \e)
-.sp
-First it matches an opening parenthesis. Then it matches any number of
-substrings which can either be a sequence of non-parentheses, or a recursive
-match of the pattern itself (that is, a correctly parenthesized substring).
-Finally there is a closing parenthesis. Note the use of a possessive quantifier
-to avoid backtracking into sequences of non-parentheses.
-.P
-If this were part of a larger pattern, you would not want to recurse the entire
-pattern, so instead you could use this:
-.sp
- ( \e( ( [^()]++ | (?1) )* \e) )
-.sp
-We have put the pattern into parentheses, and caused the recursion to refer to
-them instead of the whole pattern.
-.P
-In a larger pattern, keeping track of parenthesis numbers can be tricky. This
-is made easier by the use of relative references. Instead of (?1) in the
-pattern above you can write (?-2) to refer to the second most recently opened
-parentheses preceding the recursion. In other words, a negative number counts
-capturing parentheses leftwards from the point at which it is encountered.
-.P
-It is also possible to refer to subsequently opened parentheses, by writing
-references such as (?+2). However, these cannot be recursive because the
-reference is not inside the parentheses that are referenced. They are always
-.\" HTML <a href="#subpatternsassubroutines">
-.\" </a>
-non-recursive subroutine
-.\"
-calls, as described in the next section.
-.P
-An alternative approach is to use named parentheses instead. The Perl syntax
-for this is (?&name); PCRE's earlier syntax (?P>name) is also supported. We
-could rewrite the above example as follows:
-.sp
- (?<pn> \e( ( [^()]++ | (?&pn) )* \e) )
-.sp
-If there is more than one subpattern with the same name, the earliest one is
-used.
-.P
-This particular example pattern that we have been looking at contains nested
-unlimited repeats, and so the use of a possessive quantifier for matching
-strings of non-parentheses is important when applying the pattern to strings
-that do not match. For example, when this pattern is applied to
-.sp
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-.sp
-it yields "no match" quickly. However, if a possessive quantifier is not used,
-the match runs for a very long time indeed because there are so many different
-ways the + and * repeats can carve up the subject, and all have to be tested
-before failure can be reported.
-.P
-At the end of a match, the values of capturing parentheses are those from
-the outermost level. If you want to obtain intermediate values, a callout
-function can be used (see below and the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation). If the pattern above is matched against
-.sp
- (ab(cd)ef)
-.sp
-the value for the inner capturing parentheses (numbered 2) is "ef", which is
-the last value taken on at the top level. If a capturing subpattern is not
-matched at the top level, its final captured value is unset, even if it was
-(temporarily) set at a deeper level during the matching process.
-.P
-If there are more than 15 capturing parentheses in a pattern, PCRE has to
-obtain extra memory to store data during a recursion, which it does by using
-\fBpcre_malloc\fP, freeing it via \fBpcre_free\fP afterwards. If no memory can
-be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
-.P
-Do not confuse the (?R) item with the condition (R), which tests for recursion.
-Consider this pattern, which matches text in angle brackets, allowing for
-arbitrary nesting. Only digits are allowed in nested brackets (that is, when
-recursing), whereas any characters are permitted at the outer level.
-.sp
- < (?: (?(R) \ed++ | [^<>]*+) | (?R)) * >
-.sp
-In this pattern, (?(R) is the start of a conditional subpattern, with two
-different alternatives for the recursive and non-recursive cases. The (?R) item
-is the actual recursive call.
-.
-.
-.\" HTML <a name="recursiondifference"></a>
-.SS "Differences in recursion processing between PCRE and Perl"
-.rs
-.sp
-Recursion processing in PCRE differs from Perl in two important ways. In PCRE
-(like Python, but unlike Perl), a recursive subpattern call is always treated
-as an atomic group. That is, once it has matched some of the subject string, it
-is never re-entered, even if it contains untried alternatives and there is a
-subsequent matching failure. This can be illustrated by the following pattern,
-which purports to match a palindromic string that contains an odd number of
-characters (for example, "a", "aba", "abcba", "abcdcba"):
-.sp
- ^(.|(.)(?1)\e2)$
-.sp
-The idea is that it either matches a single character, or two identical
-characters surrounding a sub-palindrome. In Perl, this pattern works; in PCRE
-it does not if the pattern is longer than three characters. Consider the
-subject string "abcba":
-.P
-At the top level, the first character is matched, but as it is not at the end
-of the string, the first alternative fails; the second alternative is taken
-and the recursion kicks in. The recursive call to subpattern 1 successfully
-matches the next character ("b"). (Note that the beginning and end of line
-tests are not part of the recursion).
-.P
-Back at the top level, the next character ("c") is compared with what
-subpattern 2 matched, which was "a". This fails. Because the recursion is
-treated as an atomic group, there are now no backtracking points, and so the
-entire match fails. (Perl is able, at this point, to re-enter the recursion and
-try the second alternative.) However, if the pattern is written with the
-alternatives in the other order, things are different:
-.sp
- ^((.)(?1)\e2|.)$
-.sp
-This time, the recursing alternative is tried first, and continues to recurse
-until it runs out of characters, at which point the recursion fails. But this
-time we do have another alternative to try at the higher level. That is the big
-difference: in the previous case the remaining alternative is at a deeper
-recursion level, which PCRE cannot use.
-.P
-To change the pattern so that it matches all palindromic strings, not just
-those with an odd number of characters, it is tempting to change the pattern to
-this:
-.sp
- ^((.)(?1)\e2|.?)$
-.sp
-Again, this works in Perl, but not in PCRE, and for the same reason. When a
-deeper recursion has matched a single character, it cannot be entered again in
-order to match an empty string. The solution is to separate the two cases, and
-write out the odd and even cases as alternatives at the higher level:
-.sp
- ^(?:((.)(?1)\e2|)|((.)(?3)\e4|.))
-.sp
-If you want to match typical palindromic phrases, the pattern has to ignore all
-non-word characters, which can be done like this:
-.sp
- ^\eW*+(?:((.)\eW*+(?1)\eW*+\e2|)|((.)\eW*+(?3)\eW*+\e4|\eW*+.\eW*+))\eW*+$
-.sp
-If run with the PCRE_CASELESS option, this pattern matches phrases such as "A
-man, a plan, a canal: Panama!" and it works well in both PCRE and Perl. Note
-the use of the possessive quantifier *+ to avoid backtracking into sequences of
-non-word characters. Without this, PCRE takes a great deal longer (ten times or
-more) to match typical phrases, and Perl takes so long that you think it has
-gone into a loop.
-.P
-\fBWARNING\fP: The palindrome-matching patterns above work only if the subject
-string does not start with a palindrome that is shorter than the entire string.
-For example, although "abcba" is correctly matched, if the subject is "ababa",
-PCRE finds the palindrome "aba" at the start, then fails at top level because
-the end of the string does not follow. Once again, it cannot jump back into the
-recursion to try other alternatives, so the entire match fails.
-.P
-The second way in which PCRE and Perl differ in their recursion processing is
-in the handling of captured values. In Perl, when a subpattern is called
-recursively or as a subpattern (see the next section), it has no access to any
-values that were captured outside the recursion, whereas in PCRE these values
-can be referenced. Consider this pattern:
-.sp
- ^(.)(\e1|a(?2))
-.sp
-In PCRE, this pattern matches "bab". The first capturing parentheses match "b",
-then in the second group, when the back reference \e1 fails to match "b", the
-second alternative matches "a" and then recurses. In the recursion, \e1 does
-now match "b" and so the whole match succeeds. In Perl, the pattern fails to
-match because inside the recursive call \e1 cannot access the externally set
-value.
-.
-.
-.\" HTML <a name="subpatternsassubroutines"></a>
-.SH "SUBPATTERNS AS SUBROUTINES"
-.rs
-.sp
-If the syntax for a recursive subpattern call (either by number or by
-name) is used outside the parentheses to which it refers, it operates like a
-subroutine in a programming language. The called subpattern may be defined
-before or after the reference. A numbered reference can be absolute or
-relative, as in these examples:
-.sp
- (...(absolute)...)...(?2)...
- (...(relative)...)...(?-1)...
- (...(?+1)...(relative)...
-.sp
-An earlier example pointed out that the pattern
-.sp
- (sens|respons)e and \e1ibility
-.sp
-matches "sense and sensibility" and "response and responsibility", but not
-"sense and responsibility". If instead the pattern
-.sp
- (sens|respons)e and (?1)ibility
-.sp
-is used, it does match "sense and responsibility" as well as the other two
-strings. Another example is given in the discussion of DEFINE above.
-.P
-All subroutine calls, whether recursive or not, are always treated as atomic
-groups. That is, once a subroutine has matched some of the subject string, it
-is never re-entered, even if it contains untried alternatives and there is a
-subsequent matching failure. Any capturing parentheses that are set during the
-subroutine call revert to their previous values afterwards.
-.P
-Processing options such as case-independence are fixed when a subpattern is
-defined, so if it is used as a subroutine, such options cannot be changed for
-different calls. For example, consider this pattern:
-.sp
- (abc)(?i:(?-1))
-.sp
-It matches "abcabc". It does not match "abcABC" because the change of
-processing option does not affect the called subpattern.
-.
-.
-.\" HTML <a name="onigurumasubroutines"></a>
-.SH "ONIGURUMA SUBROUTINE SYNTAX"
-.rs
-.sp
-For compatibility with Oniguruma, the non-Perl syntax \eg followed by a name or
-a number enclosed either in angle brackets or single quotes, is an alternative
-syntax for referencing a subpattern as a subroutine, possibly recursively. Here
-are two of the examples used above, rewritten using this syntax:
-.sp
- (?<pn> \e( ( (?>[^()]+) | \eg<pn> )* \e) )
- (sens|respons)e and \eg'1'ibility
-.sp
-PCRE supports an extension to Oniguruma: if a number is preceded by a
-plus or a minus sign it is taken as a relative reference. For example:
-.sp
- (abc)(?i:\eg<-1>)
-.sp
-Note that \eg{...} (Perl syntax) and \eg<...> (Oniguruma syntax) are \fInot\fP
-synonymous. The former is a back reference; the latter is a subroutine call.
-.
-.
-.SH CALLOUTS
-.rs
-.sp
-Perl has a feature whereby using the sequence (?{...}) causes arbitrary Perl
-code to be obeyed in the middle of matching a regular expression. This makes it
-possible, amongst other things, to extract different substrings that match the
-same pair of parentheses when there is a repetition.
-.P
-PCRE provides a similar feature, but of course it cannot obey arbitrary Perl
-code. The feature is called "callout". The caller of PCRE provides an external
-function by putting its entry point in the global variable \fIpcre_callout\fP
-(8-bit library) or \fIpcre16_callout\fP (16-bit library). By default, this
-variable contains NULL, which disables all calling out.
-.P
-Within a regular expression, (?C) indicates the points at which the external
-function is to be called. If you want to identify different callout points, you
-can put a number less than 256 after the letter C. The default value is zero.
-For example, this pattern has two callout points:
-.sp
- (?C1)abc(?C2)def
-.sp
-If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, callouts are
-automatically installed before each item in the pattern. They are all numbered
-255.
-.P
-During matching, when PCRE reaches a callout point, the external function is
-called. It is provided with the number of the callout, the position in the
-pattern, and, optionally, one item of data originally supplied by the caller of
-the matching function. The callout function may cause matching to proceed, to
-backtrack, or to fail altogether. A complete description of the interface to
-the callout function is given in the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.
-.
-.\" HTML <a name="backtrackcontrol"></a>
-.SH "BACKTRACKING CONTROL"
-.rs
-.sp
-Perl 5.10 introduced a number of "Special Backtracking Control Verbs", which
-are described in the Perl documentation as "experimental and subject to change
-or removal in a future version of Perl". It goes on to say: "Their usage in
-production code should be noted to avoid problems during upgrades." The same
-remarks apply to the PCRE features described in this section.
-.P
-Since these verbs are specifically related to backtracking, most of them can be
-used only when the pattern is to be matched using one of the traditional
-matching functions, which use a backtracking algorithm. With the exception of
-(*FAIL), which behaves like a failing negative assertion, they cause an error
-if encountered by a DFA matching function.
-.P
-If any of these verbs are used in an assertion or in a subpattern that is
-called as a subroutine (whether or not recursively), their effect is confined
-to that subpattern; it does not extend to the surrounding pattern, with one
-exception: the name from a *(MARK), (*PRUNE), or (*THEN) that is encountered in
-a successful positive assertion \fIis\fP passed back when a match succeeds
-(compare capturing parentheses in assertions). Note that such subpatterns are
-processed as anchored at the point where they are tested. Note also that Perl's
-treatment of subroutines is different in some cases.
-.P
-The new verbs make use of what was previously invalid syntax: an opening
-parenthesis followed by an asterisk. They are generally of the form
-(*VERB) or (*VERB:NAME). Some may take either form, with differing behaviour,
-depending on whether or not an argument is present. A name is any sequence of
-characters that does not include a closing parenthesis. If the name is empty,
-that is, if the closing parenthesis immediately follows the colon, the effect
-is as if the colon were not there. Any number of these verbs may occur in a
-pattern.
-.P
-PCRE contains some optimizations that are used to speed up matching by running
-some checks at the start of each match attempt. For example, it may know the
-minimum length of matching subject, or that a particular character must be
-present. When one of these optimizations suppresses the running of a match, any
-included backtracking verbs will not, of course, be processed. You can suppress
-the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option
-when calling \fBpcre_compile()\fP or \fBpcre_exec()\fP, or by starting the
-pattern with (*NO_START_OPT).
-.P
-Experiments with Perl suggest that it too has similar optimizations, sometimes
-leading to anomalous results.
-.
-.
-.SS "Verbs that act immediately"
-.rs
-.sp
-The following verbs act as soon as they are encountered. They may not be
-followed by a name.
-.sp
- (*ACCEPT)
-.sp
-This verb causes the match to end successfully, skipping the remainder of the
-pattern. However, when it is inside a subpattern that is called as a
-subroutine, only that subpattern is ended successfully. Matching then continues
-at the outer level. If (*ACCEPT) is inside capturing parentheses, the data so
-far is captured. For example:
-.sp
- A((?:A|B(*ACCEPT)|C)D)
-.sp
-This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is captured by
-the outer parentheses.
-.sp
- (*FAIL) or (*F)
-.sp
-This verb causes a matching failure, forcing backtracking to occur. It is
-equivalent to (?!) but easier to read. The Perl documentation notes that it is
-probably useful only when combined with (?{}) or (??{}). Those are, of course,
-Perl features that are not present in PCRE. The nearest equivalent is the
-callout feature, as for example in this pattern:
-.sp
- a+(?C)(*FAIL)
-.sp
-A match with the string "aaaa" always fails, but the callout is taken before
-each backtrack happens (in this example, 10 times).
-.
-.
-.SS "Recording which path was taken"
-.rs
-.sp
-There is one verb whose main purpose is to track how a match was arrived at,
-though it also has a secondary use in conjunction with advancing the match
-starting point (see (*SKIP) below).
-.sp
- (*MARK:NAME) or (*:NAME)
-.sp
-A name is always required with this verb. There may be as many instances of
-(*MARK) as you like in a pattern, and their names do not have to be unique.
-.P
-When a match succeeds, the name of the last-encountered (*MARK) on the matching
-path is passed back to the caller as described in the section entitled
-.\" HTML <a href="pcreapi.html#extradata">
-.\" </a>
-"Extra data for \fBpcre_exec()\fP"
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation. Here is an example of \fBpcretest\fP output, where the /K
-modifier requests the retrieval and outputting of (*MARK) data:
-.sp
- re> /X(*MARK:A)Y|X(*MARK:B)Z/K
- data> XY
- 0: XY
- MK: A
- XZ
- 0: XZ
- MK: B
-.sp
-The (*MARK) name is tagged with "MK:" in this output, and in this example it
-indicates which of the two alternatives matched. This is a more efficient way
-of obtaining this information than putting each alternative in its own
-capturing parentheses.
-.P
-If (*MARK) is encountered in a positive assertion, its name is recorded and
-passed back if it is the last-encountered. This does not happen for negative
-assertions.
-.P
-After a partial match or a failed match, the name of the last encountered
-(*MARK) in the entire match process is returned. For example:
-.sp
- re> /X(*MARK:A)Y|X(*MARK:B)Z/K
- data> XP
- No match, mark = B
-.sp
-Note that in this unanchored example the mark is retained from the match
-attempt that started at the letter "X". Subsequent match attempts starting at
-"P" and then with an empty string do not get as far as the (*MARK) item, but
-nevertheless do not reset it.
-.
-.
-.SS "Verbs that act after backtracking"
-.rs
-.sp
-The following verbs do nothing when they are encountered. Matching continues
-with what follows, but if there is no subsequent match, causing a backtrack to
-the verb, a failure is forced. That is, backtracking cannot pass to the left of
-the verb. However, when one of these verbs appears inside an atomic group, its
-effect is confined to that group, because once the group has been matched,
-there is never any backtracking into it. In this situation, backtracking can
-"jump back" to the left of the entire atomic group. (Remember also, as stated
-above, that this localization also applies in subroutine calls and assertions.)
-.P
-These verbs differ in exactly what kind of failure occurs when backtracking
-reaches them.
-.sp
- (*COMMIT)
-.sp
-This verb, which may not be followed by a name, causes the whole match to fail
-outright if the rest of the pattern does not match. Even if the pattern is
-unanchored, no further attempts to find a match by advancing the starting point
-take place. Once (*COMMIT) has been passed, \fBpcre_exec()\fP is committed to
-finding a match at the current starting point, or not at all. For example:
-.sp
- a+(*COMMIT)b
-.sp
-This matches "xxaab" but not "aacaab". It can be thought of as a kind of
-dynamic anchor, or "I've started, so I must finish." The name of the most
-recently passed (*MARK) in the path is passed back when (*COMMIT) forces a
-match failure.
-.P
-Note that (*COMMIT) at the start of a pattern is not the same as an anchor,
-unless PCRE's start-of-match optimizations are turned off, as shown in this
-\fBpcretest\fP example:
-.sp
- re> /(*COMMIT)abc/
- data> xyzabc
- 0: abc
- xyzabc\eY
- No match
-.sp
-PCRE knows that any match must start with "a", so the optimization skips along
-the subject to "a" before running the first match attempt, which succeeds. When
-the optimization is disabled by the \eY escape in the second subject, the match
-starts at "x" and so the (*COMMIT) causes it to fail without trying any other
-starting points.
-.sp
- (*PRUNE) or (*PRUNE:NAME)
-.sp
-This verb causes the match to fail at the current starting position in the
-subject if the rest of the pattern does not match. If the pattern is
-unanchored, the normal "bumpalong" advance to the next starting character then
-happens. Backtracking can occur as usual to the left of (*PRUNE), before it is
-reached, or when matching to the right of (*PRUNE), but if there is no match to
-the right, backtracking cannot cross (*PRUNE). In simple cases, the use of
-(*PRUNE) is just an alternative to an atomic group or possessive quantifier,
-but there are some uses of (*PRUNE) that cannot be expressed in any other way.
-The behaviour of (*PRUNE:NAME) is the same as (*MARK:NAME)(*PRUNE). In an
-anchored pattern (*PRUNE) has the same effect as (*COMMIT).
-.sp
- (*SKIP)
-.sp
-This verb, when given without a name, is like (*PRUNE), except that if the
-pattern is unanchored, the "bumpalong" advance is not to the next character,
-but to the position in the subject where (*SKIP) was encountered. (*SKIP)
-signifies that whatever text was matched leading up to it cannot be part of a
-successful match. Consider:
-.sp
- a+(*SKIP)b
-.sp
-If the subject is "aaaac...", after the first match attempt fails (starting at
-the first character in the string), the starting point skips on to start the
-next attempt at "c". Note that a possessive quantifer does not have the same
-effect as this example; although it would suppress backtracking during the
-first match attempt, the second attempt would start at the second character
-instead of skipping on to "c".
-.sp
- (*SKIP:NAME)
-.sp
-When (*SKIP) has an associated name, its behaviour is modified. If the
-following pattern fails to match, the previous path through the pattern is
-searched for the most recent (*MARK) that has the same name. If one is found,
-the "bumpalong" advance is to the subject position that corresponds to that
-(*MARK) instead of to where (*SKIP) was encountered. If no (*MARK) with a
-matching name is found, the (*SKIP) is ignored.
-.sp
- (*THEN) or (*THEN:NAME)
-.sp
-This verb causes a skip to the next innermost alternative if the rest of the
-pattern does not match. That is, it cancels pending backtracking, but only
-within the current alternative. Its name comes from the observation that it can
-be used for a pattern-based if-then-else block:
-.sp
- ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...
-.sp
-If the COND1 pattern matches, FOO is tried (and possibly further items after
-the end of the group if FOO succeeds); on failure, the matcher skips to the
-second alternative and tries COND2, without backtracking into COND1. The
-behaviour of (*THEN:NAME) is exactly the same as (*MARK:NAME)(*THEN).
-If (*THEN) is not inside an alternation, it acts like (*PRUNE).
-.P
-Note that a subpattern that does not contain a | character is just a part of
-the enclosing alternative; it is not a nested alternation with only one
-alternative. The effect of (*THEN) extends beyond such a subpattern to the
-enclosing alternative. Consider this pattern, where A, B, etc. are complex
-pattern fragments that do not contain any | characters at this level:
-.sp
- A (B(*THEN)C) | D
-.sp
-If A and B are matched, but there is a failure in C, matching does not
-backtrack into A; instead it moves to the next alternative, that is, D.
-However, if the subpattern containing (*THEN) is given an alternative, it
-behaves differently:
-.sp
- A (B(*THEN)C | (*FAIL)) | D
-.sp
-The effect of (*THEN) is now confined to the inner subpattern. After a failure
-in C, matching moves to (*FAIL), which causes the whole subpattern to fail
-because there are no more alternatives to try. In this case, matching does now
-backtrack into A.
-.P
-Note also that a conditional subpattern is not considered as having two
-alternatives, because only one is ever used. In other words, the | character in
-a conditional subpattern has a different meaning. Ignoring white space,
-consider:
-.sp
- ^.*? (?(?=a) a | b(*THEN)c )
-.sp
-If the subject is "ba", this pattern does not match. Because .*? is ungreedy,
-it initially matches zero characters. The condition (?=a) then fails, the
-character "b" is matched, but "c" is not. At this point, matching does not
-backtrack to .*? as might perhaps be expected from the presence of the |
-character. The conditional subpattern is part of the single alternative that
-comprises the whole pattern, and so the match fails. (If there was a backtrack
-into .*?, allowing it to match "b", the match would succeed.)
-.P
-The verbs just described provide four different "strengths" of control when
-subsequent matching fails. (*THEN) is the weakest, carrying on the match at the
-next alternative. (*PRUNE) comes next, failing the match at the current
-starting position, but allowing an advance to the next character (for an
-unanchored pattern). (*SKIP) is similar, except that the advance may be more
-than one character. (*COMMIT) is the strongest, causing the entire match to
-fail.
-.P
-If more than one such verb is present in a pattern, the "strongest" one wins.
-For example, consider this pattern, where A, B, etc. are complex pattern
-fragments:
-.sp
- (A(*COMMIT)B(*THEN)C|D)
-.sp
-Once A has matched, PCRE is committed to this match, at the current starting
-position. If subsequently B matches, but C does not, the normal (*THEN) action
-of trying the next alternative (that is, D) does not happen because (*COMMIT)
-overrides.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcreapi\fP(3), \fBpcrecallout\fP(3), \fBpcrematching\fP(3),
-\fBpcresyntax\fP(3), \fBpcre\fP(3), \fBpcre16(3)\fP.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 09 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcreperform.3 b/src/third_party/pcre-8.30/doc/pcreperform.3
deleted file mode 100644
index 6745af9cfda..00000000000
--- a/src/third_party/pcre-8.30/doc/pcreperform.3
+++ /dev/null
@@ -1,178 +0,0 @@
-.TH PCREPERFORM 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE PERFORMANCE"
-.rs
-.sp
-Two aspects of performance are discussed below: memory usage and processing
-time. The way you express your pattern as a regular expression can affect both
-of them.
-.
-.SH "COMPILED PATTERN MEMORY USAGE"
-.rs
-.sp
-Patterns are compiled by PCRE into a reasonably efficient interpretive code, so
-that most simple patterns do not use much memory. However, there is one case
-where the memory usage of a compiled pattern can be unexpectedly large. If a
-parenthesized subpattern has a quantifier with a minimum greater than 1 and/or
-a limited maximum, the whole subpattern is repeated in the compiled code. For
-example, the pattern
-.sp
- (abc|def){2,4}
-.sp
-is compiled as if it were
-.sp
- (abc|def)(abc|def)((abc|def)(abc|def)?)?
-.sp
-(Technical aside: It is done this way so that backtrack points within each of
-the repetitions can be independently maintained.)
-.P
-For regular expressions whose quantifiers use only small numbers, this is not
-usually a problem. However, if the numbers are large, and particularly if such
-repetitions are nested, the memory usage can become an embarrassment. For
-example, the very simple pattern
-.sp
- ((ab){1,1000}c){1,3}
-.sp
-uses 51K bytes when compiled using the 8-bit library. When PCRE is compiled
-with its default internal pointer size of two bytes, the size limit on a
-compiled pattern is 64K data units, and this is reached with the above pattern
-if the outer repetition is increased from 3 to 4. PCRE can be compiled to use
-larger internal pointers and thus handle larger compiled patterns, but it is
-better to try to rewrite your pattern to use less memory if you can.
-.P
-One way of reducing the memory usage for such patterns is to make use of PCRE's
-.\" HTML <a href="pcrepattern.html#subpatternsassubroutines">
-.\" </a>
-"subroutine"
-.\"
-facility. Re-writing the above pattern as
-.sp
- ((ab)(?2){0,999}c)(?1){0,2}
-.sp
-reduces the memory requirements to 18K, and indeed it remains under 20K even
-with the outer repetition increased to 100. However, this pattern is not
-exactly equivalent, because the "subroutine" calls are treated as
-.\" HTML <a href="pcrepattern.html#atomicgroup">
-.\" </a>
-atomic groups
-.\"
-into which there can be no backtracking if there is a subsequent matching
-failure. Therefore, PCRE cannot do this kind of rewriting automatically.
-Furthermore, there is a noticeable loss of speed when executing the modified
-pattern. Nevertheless, if the atomic grouping is not a problem and the loss of
-speed is acceptable, this kind of rewriting will allow you to process patterns
-that PCRE cannot otherwise handle.
-.
-.
-.SH "STACK USAGE AT RUN TIME"
-.rs
-.sp
-When \fBpcre_exec()\fP or \fBpcre16_exec()\fP is used for matching, certain
-kinds of pattern can cause it to use large amounts of the process stack. In
-some environments the default process stack is quite small, and if it runs out
-the result is often SIGSEGV. This issue is probably the most frequently raised
-problem with PCRE. Rewriting your pattern can often help. The
-.\" HREF
-\fBpcrestack\fP
-.\"
-documentation discusses this issue in detail.
-.
-.
-.SH "PROCESSING TIME"
-.rs
-.sp
-Certain items in regular expression patterns are processed more efficiently
-than others. It is more efficient to use a character class like [aeiou] than a
-set of single-character alternatives such as (a|e|i|o|u). In general, the
-simplest construction that provides the required behaviour is usually the most
-efficient. Jeffrey Friedl's book contains a lot of useful general discussion
-about optimizing regular expressions for efficient performance. This document
-contains a few observations about PCRE.
-.P
-Using Unicode character properties (the \ep, \eP, and \eX escapes) is slow,
-because PCRE has to scan a structure that contains data for over fifteen
-thousand characters whenever it needs a character's property. If you can find
-an alternative pattern that does not use character properties, it will probably
-be faster.
-.P
-By default, the escape sequences \eb, \ed, \es, and \ew, and the POSIX
-character classes such as [:alpha:] do not use Unicode properties, partly for
-backwards compatibility, and partly for performance reasons. However, you can
-set PCRE_UCP if you want Unicode character properties to be used. This can
-double the matching time for items such as \ed, when matched with
-a traditional matching function; the performance loss is less with
-a DFA matching function, and in both cases there is not much difference for
-\eb.
-.P
-When a pattern begins with .* not in parentheses, or in parentheses that are
-not the subject of a backreference, and the PCRE_DOTALL option is set, the
-pattern is implicitly anchored by PCRE, since it can match only at the start of
-a subject string. However, if PCRE_DOTALL is not set, PCRE cannot make this
-optimization, because the . metacharacter does not then match a newline, and if
-the subject string contains newlines, the pattern may match from the character
-immediately following one of them instead of from the very start. For example,
-the pattern
-.sp
- .*second
-.sp
-matches the subject "first\enand second" (where \en stands for a newline
-character), with the match starting at the seventh character. In order to do
-this, PCRE has to retry the match starting after every newline in the subject.
-.P
-If you are using such a pattern with subject strings that do not contain
-newlines, the best performance is obtained by setting PCRE_DOTALL, or starting
-the pattern with ^.* or ^.*? to indicate explicit anchoring. That saves PCRE
-from having to scan along the subject looking for a newline to restart at.
-.P
-Beware of patterns that contain nested indefinite repeats. These can take a
-long time to run when applied to a string that does not match. Consider the
-pattern fragment
-.sp
- ^(a+)*
-.sp
-This can match "aaaa" in 16 different ways, and this number increases very
-rapidly as the string gets longer. (The * repeat can match 0, 1, 2, 3, or 4
-times, and for each of those cases other than 0 or 4, the + repeats can match
-different numbers of times.) When the remainder of the pattern is such that the
-entire match is going to fail, PCRE has in principle to try every possible
-variation, and this can take an extremely long time, even for relatively short
-strings.
-.P
-An optimization catches some of the more simple cases such as
-.sp
- (a+)*b
-.sp
-where a literal character follows. Before embarking on the standard matching
-procedure, PCRE checks that there is a "b" later in the subject string, and if
-there is not, it fails the match immediately. However, when there is no
-following literal this optimization cannot be used. You can see the difference
-by comparing the behaviour of
-.sp
- (a+)*\ed
-.sp
-with the pattern above. The former gives a failure almost instantly when
-applied to a whole line of "a" characters, whereas the latter takes an
-appreciable time with strings longer than about 20 characters.
-.P
-In many cases, the solution to this kind of performance issue is to use an
-atomic group or a possessive quantifier.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 09 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcreposix.3 b/src/third_party/pcre-8.30/doc/pcreposix.3
deleted file mode 100644
index 7f08a1dddf1..00000000000
--- a/src/third_party/pcre-8.30/doc/pcreposix.3
+++ /dev/null
@@ -1,270 +0,0 @@
-.TH PCREPOSIX 3
-.SH NAME
-PCRE - Perl-compatible regular expressions.
-.SH "SYNOPSIS OF POSIX API"
-.rs
-.sp
-.B #include <pcreposix.h>
-.PP
-.SM
-.B int regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP,
-.ti +5n
-.B int \fIcflags\fP);
-.PP
-.B int regexec(regex_t *\fIpreg\fP, const char *\fIstring\fP,
-.ti +5n
-.B size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);
-.PP
-.B size_t regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP,
-.ti +5n
-.B char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);
-.PP
-.B void regfree(regex_t *\fIpreg\fP);
-.
-.SH DESCRIPTION
-.rs
-.sp
-This set of functions provides a POSIX-style API for the PCRE regular
-expression 8-bit library. See the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation for a description of PCRE's native API, which contains much
-additional functionality. There is no POSIX-style wrapper for PCRE's 16-bit
-library.
-.P
-The functions described here are just wrapper functions that ultimately call
-the PCRE native API. Their prototypes are defined in the \fBpcreposix.h\fP
-header file, and on Unix systems the library itself is called
-\fBpcreposix.a\fP, so can be accessed by adding \fB-lpcreposix\fP to the
-command for linking an application that uses them. Because the POSIX functions
-call the native ones, it is also necessary to add \fB-lpcre\fP.
-.P
-I have implemented only those POSIX option bits that can be reasonably mapped
-to PCRE native options. In addition, the option REG_EXTENDED is defined with
-the value zero. This has no effect, but since programs that are written to the
-POSIX interface often use it, this makes it easier to slot in PCRE as a
-replacement library. Other POSIX options are not even defined.
-.P
-There are also some other options that are not defined by POSIX. These have
-been added at the request of users who want to make use of certain
-PCRE-specific features via the POSIX calling interface.
-.P
-When PCRE is called via these functions, it is only the API that is POSIX-like
-in style. The syntax and semantics of the regular expressions themselves are
-still those of Perl, subject to the setting of various PCRE options, as
-described below. "POSIX-like in style" means that the API approximates to the
-POSIX definition; it is not fully POSIX-compatible, and in multi-byte encoding
-domains it is probably even less compatible.
-.P
-The header for these functions is supplied as \fBpcreposix.h\fP to avoid any
-potential clash with other POSIX libraries. It can, of course, be renamed or
-aliased as \fBregex.h\fP, which is the "correct" name. It provides two
-structure types, \fIregex_t\fP for compiled internal forms, and
-\fIregmatch_t\fP for returning captured substrings. It also defines some
-constants whose names start with "REG_"; these are used for setting options and
-identifying error codes.
-.
-.
-.SH "COMPILING A PATTERN"
-.rs
-.sp
-The function \fBregcomp()\fP is called to compile a pattern into an
-internal form. The pattern is a C string terminated by a binary zero, and
-is passed in the argument \fIpattern\fP. The \fIpreg\fP argument is a pointer
-to a \fBregex_t\fP structure that is used as a base for storing information
-about the compiled regular expression.
-.P
-The argument \fIcflags\fP is either zero, or contains one or more of the bits
-defined by the following macros:
-.sp
- REG_DOTALL
-.sp
-The PCRE_DOTALL option is set when the regular expression is passed for
-compilation to the native function. Note that REG_DOTALL is not part of the
-POSIX standard.
-.sp
- REG_ICASE
-.sp
-The PCRE_CASELESS option is set when the regular expression is passed for
-compilation to the native function.
-.sp
- REG_NEWLINE
-.sp
-The PCRE_MULTILINE option is set when the regular expression is passed for
-compilation to the native function. Note that this does \fInot\fP mimic the
-defined POSIX behaviour for REG_NEWLINE (see the following section).
-.sp
- REG_NOSUB
-.sp
-The PCRE_NO_AUTO_CAPTURE option is set when the regular expression is passed
-for compilation to the native function. In addition, when a pattern that is
-compiled with this flag is passed to \fBregexec()\fP for matching, the
-\fInmatch\fP and \fIpmatch\fP arguments are ignored, and no captured strings
-are returned.
-.sp
- REG_UCP
-.sp
-The PCRE_UCP option is set when the regular expression is passed for
-compilation to the native function. This causes PCRE to use Unicode properties
-when matchine \ed, \ew, etc., instead of just recognizing ASCII values. Note
-that REG_UTF8 is not part of the POSIX standard.
-.sp
- REG_UNGREEDY
-.sp
-The PCRE_UNGREEDY option is set when the regular expression is passed for
-compilation to the native function. Note that REG_UNGREEDY is not part of the
-POSIX standard.
-.sp
- REG_UTF8
-.sp
-The PCRE_UTF8 option is set when the regular expression is passed for
-compilation to the native function. This causes the pattern itself and all data
-strings used for matching it to be treated as UTF-8 strings. Note that REG_UTF8
-is not part of the POSIX standard.
-.P
-In the absence of these flags, no options are passed to the native function.
-This means the the regex is compiled with PCRE default semantics. In
-particular, the way it handles newline characters in the subject string is the
-Perl way, not the POSIX way. Note that setting PCRE_MULTILINE has only
-\fIsome\fP of the effects specified for REG_NEWLINE. It does not affect the way
-newlines are matched by . (they are not) or by a negative class such as [^a]
-(they are).
-.P
-The yield of \fBregcomp()\fP is zero on success, and non-zero otherwise. The
-\fIpreg\fP structure is filled in on success, and one member of the structure
-is public: \fIre_nsub\fP contains the number of capturing subpatterns in
-the regular expression. Various error codes are defined in the header file.
-.P
-NOTE: If the yield of \fBregcomp()\fP is non-zero, you must not attempt to
-use the contents of the \fIpreg\fP structure. If, for example, you pass it to
-\fBregexec()\fP, the result is undefined and your program is likely to crash.
-.
-.
-.SH "MATCHING NEWLINE CHARACTERS"
-.rs
-.sp
-This area is not simple, because POSIX and Perl take different views of things.
-It is not possible to get PCRE to obey POSIX semantics, but then PCRE was never
-intended to be a POSIX engine. The following table lists the different
-possibilities for matching newline characters in PCRE:
-.sp
- Default Change with
-.sp
- . matches newline no PCRE_DOTALL
- newline matches [^a] yes not changeable
- $ matches \en at end yes PCRE_DOLLARENDONLY
- $ matches \en in middle no PCRE_MULTILINE
- ^ matches \en in middle no PCRE_MULTILINE
-.sp
-This is the equivalent table for POSIX:
-.sp
- Default Change with
-.sp
- . matches newline yes REG_NEWLINE
- newline matches [^a] yes REG_NEWLINE
- $ matches \en at end no REG_NEWLINE
- $ matches \en in middle no REG_NEWLINE
- ^ matches \en in middle no REG_NEWLINE
-.sp
-PCRE's behaviour is the same as Perl's, except that there is no equivalent for
-PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is no way to stop
-newline from matching [^a].
-.P
-The default POSIX newline handling can be obtained by setting PCRE_DOTALL and
-PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE behave exactly as for the
-REG_NEWLINE action.
-.
-.
-.SH "MATCHING A PATTERN"
-.rs
-.sp
-The function \fBregexec()\fP is called to match a compiled pattern \fIpreg\fP
-against a given \fIstring\fP, which is by default terminated by a zero byte
-(but see REG_STARTEND below), subject to the options in \fIeflags\fP. These can
-be:
-.sp
- REG_NOTBOL
-.sp
-The PCRE_NOTBOL option is set when calling the underlying PCRE matching
-function.
-.sp
- REG_NOTEMPTY
-.sp
-The PCRE_NOTEMPTY option is set when calling the underlying PCRE matching
-function. Note that REG_NOTEMPTY is not part of the POSIX standard. However,
-setting this option can give more POSIX-like behaviour in some situations.
-.sp
- REG_NOTEOL
-.sp
-The PCRE_NOTEOL option is set when calling the underlying PCRE matching
-function.
-.sp
- REG_STARTEND
-.sp
-The string is considered to start at \fIstring\fP + \fIpmatch[0].rm_so\fP and
-to have a terminating NUL located at \fIstring\fP + \fIpmatch[0].rm_eo\fP
-(there need not actually be a NUL at that location), regardless of the value of
-\fInmatch\fP. This is a BSD extension, compatible with but not specified by
-IEEE Standard 1003.2 (POSIX.2), and should be used with caution in software
-intended to be portable to other systems. Note that a non-zero \fIrm_so\fP does
-not imply REG_NOTBOL; REG_STARTEND affects only the location of the string, not
-how it is matched.
-.P
-If the pattern was compiled with the REG_NOSUB flag, no data about any matched
-strings is returned. The \fInmatch\fP and \fIpmatch\fP arguments of
-\fBregexec()\fP are ignored.
-.P
-If the value of \fInmatch\fP is zero, or if the value \fIpmatch\fP is NULL,
-no data about any matched strings is returned.
-.P
-Otherwise,the portion of the string that was matched, and also any captured
-substrings, are returned via the \fIpmatch\fP argument, which points to an
-array of \fInmatch\fP structures of type \fIregmatch_t\fP, containing the
-members \fIrm_so\fP and \fIrm_eo\fP. These contain the offset to the first
-character of each substring and the offset to the first character after the end
-of each substring, respectively. The 0th element of the vector relates to the
-entire portion of \fIstring\fP that was matched; subsequent elements relate to
-the capturing subpatterns of the regular expression. Unused entries in the
-array have both structure members set to -1.
-.P
-A successful match yields a zero return; various error codes are defined in the
-header file, of which REG_NOMATCH is the "expected" failure code.
-.
-.
-.SH "ERROR MESSAGES"
-.rs
-.sp
-The \fBregerror()\fP function maps a non-zero errorcode from either
-\fBregcomp()\fP or \fBregexec()\fP to a printable message. If \fIpreg\fP is not
-NULL, the error should have arisen from the use of that structure. A message
-terminated by a binary zero is placed in \fIerrbuf\fP. The length of the
-message, including the zero, is limited to \fIerrbuf_size\fP. The yield of the
-function is the size of buffer needed to hold the whole message.
-.
-.
-.SH MEMORY USAGE
-.rs
-.sp
-Compiling a regular expression causes memory to be allocated and associated
-with the \fIpreg\fP structure. The function \fBregfree()\fP frees all such
-memory, after which \fIpreg\fP may no longer be used as a compiled expression.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 09 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcreprecompile.3 b/src/third_party/pcre-8.30/doc/pcreprecompile.3
deleted file mode 100644
index aafb7237762..00000000000
--- a/src/third_party/pcre-8.30/doc/pcreprecompile.3
+++ /dev/null
@@ -1,151 +0,0 @@
-.TH PCREPRECOMPILE 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "SAVING AND RE-USING PRECOMPILED PCRE PATTERNS"
-.rs
-.sp
-If you are running an application that uses a large number of regular
-expression patterns, it may be useful to store them in a precompiled form
-instead of having to compile them every time the application is run.
-If you are not using any private character tables (see the
-.\" HREF
-\fBpcre_maketables()\fP
-.\"
-documentation), this is relatively straightforward. If you are using private
-tables, it is a little bit more complicated. However, if you are using the
-just-in-time optimization feature, it is not possible to save and reload the
-JIT data.
-.P
-If you save compiled patterns to a file, you can copy them to a different host
-and run them there. If the two hosts have different endianness (byte order),
-you should run the \fBpcre[16]_pattern_to_host_byte_order()\fP function on the
-new host before trying to match the pattern. The matching functions return
-PCRE_ERROR_BADENDIANNESS if they detect a pattern with the wrong endianness.
-.P
-Compiling regular expressions with one version of PCRE for use with a different
-version is not guaranteed to work and may cause crashes, and saving and
-restoring a compiled pattern loses any JIT optimization data.
-.
-.
-.SH "SAVING A COMPILED PATTERN"
-.rs
-.sp
-The value returned by \fBpcre[16]_compile()\fP points to a single block of
-memory that holds the compiled pattern and associated data. You can find the
-length of this block in bytes by calling \fBpcre[16]_fullinfo()\fP with an
-argument of PCRE_INFO_SIZE. You can then save the data in any appropriate
-manner. Here is sample code for the 8-bit library that compiles a pattern and
-writes it to a file. It assumes that the variable \fIfd\fP refers to a file
-that is open for output:
-.sp
- int erroroffset, rc, size;
- char *error;
- pcre *re;
-.sp
- re = pcre_compile("my pattern", 0, &error, &erroroffset, NULL);
- if (re == NULL) { ... handle errors ... }
- rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
- if (rc < 0) { ... handle errors ... }
- rc = fwrite(re, 1, size, fd);
- if (rc != size) { ... handle errors ... }
-.sp
-In this example, the bytes that comprise the compiled pattern are copied
-exactly. Note that this is binary data that may contain any of the 256 possible
-byte values. On systems that make a distinction between binary and non-binary
-data, be sure that the file is opened for binary output.
-.P
-If you want to write more than one pattern to a file, you will have to devise a
-way of separating them. For binary data, preceding each pattern with its length
-is probably the most straightforward approach. Another possibility is to write
-out the data in hexadecimal instead of binary, one pattern to a line.
-.P
-Saving compiled patterns in a file is only one possible way of storing them for
-later use. They could equally well be saved in a database, or in the memory of
-some daemon process that passes them via sockets to the processes that want
-them.
-.P
-If the pattern has been studied, it is also possible to save the normal study
-data in a similar way to the compiled pattern itself. However, if the
-PCRE_STUDY_JIT_COMPILE was used, the just-in-time data that is created cannot
-be saved because it is too dependent on the current environment. When studying
-generates additional information, \fBpcre[16]_study()\fP returns a pointer to a
-\fBpcre[16]_extra\fP data block. Its format is defined in the
-.\" HTML <a href="pcreapi.html#extradata">
-.\" </a>
-section on matching a pattern
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation. The \fIstudy_data\fP field points to the binary study data, and
-this is what you must save (not the \fBpcre[16]_extra\fP block itself). The
-length of the study data can be obtained by calling \fBpcre[16]_fullinfo()\fP
-with an argument of PCRE_INFO_STUDYSIZE. Remember to check that
-\fBpcre[16]_study()\fP did return a non-NULL value before trying to save the
-study data.
-.
-.
-.SH "RE-USING A PRECOMPILED PATTERN"
-.rs
-.sp
-Re-using a precompiled pattern is straightforward. Having reloaded it into main
-memory, called \fBpcre[16]_pattern_to_host_byte_order()\fP if necessary,
-you pass its pointer to \fBpcre[16]_exec()\fP or \fBpcre[16]_dfa_exec()\fP in
-the usual way.
-.P
-However, if you passed a pointer to custom character tables when the pattern
-was compiled (the \fItableptr\fP argument of \fBpcre[16]_compile()\fP), you
-must now pass a similar pointer to \fBpcre[16]_exec()\fP or
-\fBpcre[16]_dfa_exec()\fP, because the value saved with the compiled pattern
-will obviously be nonsense. A field in a \fBpcre[16]_extra()\fP block is used
-to pass this data, as described in the
-.\" HTML <a href="pcreapi.html#extradata">
-.\" </a>
-section on matching a pattern
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.P
-If you did not provide custom character tables when the pattern was compiled,
-the pointer in the compiled pattern is NULL, which causes the matching
-functions to use PCRE's internal tables. Thus, you do not need to take any
-special action at run time in this case.
-.P
-If you saved study data with the compiled pattern, you need to create your own
-\fBpcre[16]_extra\fP data block and set the \fIstudy_data\fP field to point to the
-reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the
-\fIflags\fP field to indicate that study data is present. Then pass the
-\fBpcre[16]_extra\fP block to the matching function in the usual way. If the
-pattern was studied for just-in-time optimization, that data cannot be saved,
-and so is lost by a save/restore cycle.
-.
-.
-.SH "COMPATIBILITY WITH DIFFERENT PCRE RELEASES"
-.rs
-.sp
-In general, it is safest to recompile all saved patterns when you update to a
-new PCRE release, though not all updates actually require this.
-.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 10 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcresample.3 b/src/third_party/pcre-8.30/doc/pcresample.3
deleted file mode 100644
index 8a89472c3c9..00000000000
--- a/src/third_party/pcre-8.30/doc/pcresample.3
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH PCRESAMPLE 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE SAMPLE PROGRAM"
-.rs
-.sp
-A simple, complete demonstration program, to get you started with using PCRE,
-is supplied in the file \fIpcredemo.c\fP in the PCRE distribution. A listing of
-this program is given in the
-.\" HREF
-\fBpcredemo\fP
-.\"
-documentation. If you do not have a copy of the PCRE distribution, you can save
-this listing to re-create \fIpcredemo.c\fP.
-.P
-The demonstration program, which uses the original PCRE 8-bit library, compiles
-the regular expression that is its first argument, and matches it against the
-subject string in its second argument. No PCRE options are set, and default
-character tables are used. If matching succeeds, the program outputs the
-portion of the subject that matched, together with the contents of any captured
-substrings.
-.P
-If the -g option is given on the command line, the program then goes on to
-check for further matches of the same regular expression in the same subject
-string. The logic is a little bit tricky because of the possibility of matching
-an empty string. Comments in the code explain what is going on.
-.P
-If PCRE is installed in the standard include and library directories for your
-operating system, you should be able to compile the demonstration program using
-this command:
-.sp
- gcc -o pcredemo pcredemo.c -lpcre
-.sp
-If PCRE is installed elsewhere, you may need to add additional options to the
-command line. For example, on a Unix-like system that has PCRE installed in
-\fI/usr/local\fP, you can compile the demonstration program using a command
-like this:
-.sp
-.\" JOINSH
- gcc -o pcredemo -I/usr/local/include pcredemo.c \e
- -L/usr/local/lib -lpcre
-.sp
-In a Windows environment, if you want to statically link the program against a
-non-dll \fBpcre.a\fP file, you must uncomment the line that defines PCRE_STATIC
-before including \fBpcre.h\fP, because otherwise the \fBpcre_malloc()\fP and
-\fBpcre_free()\fP exported functions will be declared
-\fB__declspec(dllimport)\fP, with unwanted results.
-.P
-Once you have compiled and linked the demonstration program, you can run simple
-tests like this:
-.sp
- ./pcredemo 'cat|dog' 'the cat sat on the mat'
- ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
-.sp
-Note that there is a much more comprehensive test program, called
-.\" HREF
-\fBpcretest\fP,
-.\"
-which supports many more facilities for testing regular expressions and both
-PCRE libraries. The
-.\" HREF
-\fBpcredemo\fP
-.\"
-program is provided as a simple coding example.
-.P
-If you try to run
-.\" HREF
-\fBpcredemo\fP
-.\"
-when PCRE is not installed in the standard library directory, you may get an
-error like this on some operating systems (e.g. Solaris):
-.sp
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
-.sp
-This is caused by the way shared library support works on those systems. You
-need to add
-.sp
- -R/usr/local/lib
-.sp
-(for example) to the compile command to get round this problem.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 10 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcrestack.3 b/src/third_party/pcre-8.30/doc/pcrestack.3
deleted file mode 100644
index 12e5cbd4bd7..00000000000
--- a/src/third_party/pcre-8.30/doc/pcrestack.3
+++ /dev/null
@@ -1,215 +0,0 @@
-.TH PCRESTACK 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE DISCUSSION OF STACK USAGE"
-.rs
-.sp
-When you call \fBpcre[16]_exec()\fP, it makes use of an internal function
-called \fBmatch()\fP. This calls itself recursively at branch points in the
-pattern, in order to remember the state of the match so that it can back up and
-try a different alternative if the first one fails. As matching proceeds deeper
-and deeper into the tree of possibilities, the recursion depth increases. The
-\fBmatch()\fP function is also called in other circumstances, for example,
-whenever a parenthesized sub-pattern is entered, and in certain cases of
-repetition.
-.P
-Not all calls of \fBmatch()\fP increase the recursion depth; for an item such
-as a* it may be called several times at the same level, after matching
-different numbers of a's. Furthermore, in a number of cases where the result of
-the recursive call would immediately be passed back as the result of the
-current call (a "tail recursion"), the function is just restarted instead.
-.P
-The above comments apply when \fBpcre[16]_exec()\fP is run in its normal
-interpretive manner. If the pattern was studied with the
-PCRE_STUDY_JIT_COMPILE option, and just-in-time compiling was successful, and
-the options passed to \fBpcre[16]_exec()\fP were not incompatible, the matching
-process uses the JIT-compiled code instead of the \fBmatch()\fP function. In
-this case, the memory requirements are handled entirely differently. See the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation for details.
-.P
-The \fBpcre[16]_dfa_exec()\fP function operates in an entirely different way,
-and uses recursion only when there is a regular expression recursion or
-subroutine call in the pattern. This includes the processing of assertion and
-"once-only" subpatterns, which are handled like subroutine calls. Normally,
-these are never very deep, and the limit on the complexity of
-\fBpcre[16]_dfa_exec()\fP is controlled by the amount of workspace it is given.
-However, it is possible to write patterns with runaway infinite recursions;
-such patterns will cause \fBpcre[16]_dfa_exec()\fP to run out of stack. At
-present, there is no protection against this.
-.P
-The comments that follow do NOT apply to \fBpcre[16]_dfa_exec()\fP; they are
-relevant only for \fBpcre[16]_exec()\fP without the JIT optimization.
-.
-.
-.SS "Reducing \fBpcre[16]_exec()\fP's stack usage"
-.rs
-.sp
-Each time that \fBmatch()\fP is actually called recursively, it uses memory
-from the process stack. For certain kinds of pattern and data, very large
-amounts of stack may be needed, despite the recognition of "tail recursion".
-You can often reduce the amount of recursion, and therefore the amount of stack
-used, by modifying the pattern that is being matched. Consider, for example,
-this pattern:
-.sp
- ([^<]|<(?!inet))+
-.sp
-It matches from wherever it starts until it encounters "<inet" or the end of
-the data, and is the kind of pattern that might be used when processing an XML
-file. Each iteration of the outer parentheses matches either one character that
-is not "<" or a "<" that is not followed by "inet". However, each time a
-parenthesis is processed, a recursion occurs, so this formulation uses a stack
-frame for each matched character. For a long string, a lot of stack is
-required. Consider now this rewritten pattern, which matches exactly the same
-strings:
-.sp
- ([^<]++|<(?!inet))+
-.sp
-This uses very much less stack, because runs of characters that do not contain
-"<" are "swallowed" in one item inside the parentheses. Recursion happens only
-when a "<" character that is not followed by "inet" is encountered (and we
-assume this is relatively rare). A possessive quantifier is used to stop any
-backtracking into the runs of non-"<" characters, but that is not related to
-stack usage.
-.P
-This example shows that one way of avoiding stack problems when matching long
-subject strings is to write repeated parenthesized subpatterns to match more
-than one character whenever possible.
-.
-.
-.SS "Compiling PCRE to use heap instead of stack for \fBpcre[16]_exec()\fP"
-.rs
-.sp
-In environments where stack memory is constrained, you might want to compile
-PCRE to use heap memory instead of stack for remembering back-up points when
-\fBpcre[16]_exec()\fP is running. This makes it run a lot more slowly, however.
-Details of how to do this are given in the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation. When built in this way, instead of using the stack, PCRE obtains
-and frees memory by calling the functions that are pointed to by the
-\fBpcre[16]_stack_malloc\fP and \fBpcre[16]_stack_free\fP variables. By
-default, these point to \fBmalloc()\fP and \fBfree()\fP, but you can replace
-the pointers to cause PCRE to use your own functions. Since the block sizes are
-always the same, and are always freed in reverse order, it may be possible to
-implement customized memory handlers that are more efficient than the standard
-functions.
-.
-.
-.SS "Limiting \fBpcre[16]_exec()\fP's stack usage"
-.rs
-.sp
-You can set limits on the number of times that \fBmatch()\fP is called, both in
-total and recursively. If a limit is exceeded, \fBpcre[16]_exec()\fP returns an
-error code. Setting suitable limits should prevent it from running out of
-stack. The default values of the limits are very large, and unlikely ever to
-operate. They can be changed when PCRE is built, and they can also be set when
-\fBpcre[16]_exec()\fP is called. For details of these interfaces, see the
-.\" HREF
-\fBpcrebuild\fP
-.\"
-documentation and the
-.\" HTML <a href="pcreapi.html#extradata">
-.\" </a>
-section on extra data for \fBpcre[16]_exec()\fP
-.\"
-in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.P
-As a very rough rule of thumb, you should reckon on about 500 bytes per
-recursion. Thus, if you want to limit your stack usage to 8Mb, you should set
-the limit at 16000 recursions. A 64Mb stack, on the other hand, can support
-around 128000 recursions.
-.P
-In Unix-like environments, the \fBpcretest\fP test program has a command line
-option (\fB-S\fP) that can be used to increase the size of its stack. As long
-as the stack is large enough, another option (\fB-M\fP) can be used to find the
-smallest limits that allow a particular pattern to match a given subject
-string. This is done by calling \fBpcre[16]_exec()\fP repeatedly with different
-limits.
-.
-.
-.SS "Obtaining an estimate of stack usage"
-.rs
-.sp
-The actual amount of stack used per recursion can vary quite a lot, depending
-on the compiler that was used to build PCRE and the optimization or debugging
-options that were set for it. The rule of thumb value of 500 bytes mentioned
-above may be larger or smaller than what is actually needed. A better
-approximation can be obtained by running this command:
-.sp
- pcretest -m -C
-.sp
-The \fB-C\fP option causes \fBpcretest\fP to output information about the
-options with which PCRE was compiled. When \fB-m\fP is also given (before
-\fB-C\fP), information about stack use is given in a line like this:
-.sp
- Match recursion uses stack: approximate frame size = 640 bytes
-.sp
-The value is approximate because some recursions need a bit more (up to perhaps
-16 more bytes).
-.P
-If the above command is given when PCRE is compiled to use the heap instead of
-the stack for recursion, the value that is output is the size of each block
-that is obtained from the heap.
-.
-.
-.SS "Changing stack size in Unix-like systems"
-.rs
-.sp
-In Unix-like environments, there is not often a problem with the stack unless
-very long strings are involved, though the default limit on stack size varies
-from system to system. Values from 8Mb to 64Mb are common. You can find your
-default limit by running the command:
-.sp
- ulimit -s
-.sp
-Unfortunately, the effect of running out of stack is often SIGSEGV, though
-sometimes a more explicit error message is given. You can normally increase the
-limit on stack size by code such as this:
-.sp
- struct rlimit rlim;
- getrlimit(RLIMIT_STACK, &rlim);
- rlim.rlim_cur = 100*1024*1024;
- setrlimit(RLIMIT_STACK, &rlim);
-.sp
-This reads the current limits (soft and hard) using \fBgetrlimit()\fP, then
-attempts to increase the soft limit to 100Mb using \fBsetrlimit()\fP. You must
-do this before calling \fBpcre[16]_exec()\fP.
-.
-.
-.SS "Changing stack size in Mac OS X"
-.rs
-.sp
-Using \fBsetrlimit()\fP, as described above, should also work on Mac OS X. It
-is also possible to set a stack size when linking a program. There is a
-discussion about stack sizes in Mac OS X at this web site:
-.\" HTML <a href="http://developer.apple.com/qa/qa2005/qa1419.html">
-.\" </a>
-http://developer.apple.com/qa/qa2005/qa1419.html.
-.\"
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 21 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcresyntax.3 b/src/third_party/pcre-8.30/doc/pcresyntax.3
deleted file mode 100644
index 43ba1dbc5a2..00000000000
--- a/src/third_party/pcre-8.30/doc/pcresyntax.3
+++ /dev/null
@@ -1,484 +0,0 @@
-.TH PCRESYNTAX 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "PCRE REGULAR EXPRESSION SYNTAX SUMMARY"
-.rs
-.sp
-The full syntax and semantics of the regular expressions that are supported by
-PCRE are described in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation. This document contains a quick-reference summary of the syntax.
-.
-.
-.SH "QUOTING"
-.rs
-.sp
- \ex where x is non-alphanumeric is a literal x
- \eQ...\eE treat enclosed characters as literal
-.
-.
-.SH "CHARACTERS"
-.rs
-.sp
- \ea alarm, that is, the BEL character (hex 07)
- \ecx "control-x", where x is any ASCII character
- \ee escape (hex 1B)
- \ef formfeed (hex 0C)
- \en newline (hex 0A)
- \er carriage return (hex 0D)
- \et tab (hex 09)
- \eddd character with octal code ddd, or backreference
- \exhh character with hex code hh
- \ex{hhh..} character with hex code hhh..
-.
-.
-.SH "CHARACTER TYPES"
-.rs
-.sp
- . any character except newline;
- in dotall mode, any character whatsoever
- \eC one data unit, even in UTF mode (best avoided)
- \ed a decimal digit
- \eD a character that is not a decimal digit
- \eh a horizontal whitespace character
- \eH a character that is not a horizontal whitespace character
- \eN a character that is not a newline
- \ep{\fIxx\fP} a character with the \fIxx\fP property
- \eP{\fIxx\fP} a character without the \fIxx\fP property
- \eR a newline sequence
- \es a whitespace character
- \eS a character that is not a whitespace character
- \ev a vertical whitespace character
- \eV a character that is not a vertical whitespace character
- \ew a "word" character
- \eW a "non-word" character
- \eX an extended Unicode sequence
-.sp
-In PCRE, by default, \ed, \eD, \es, \eS, \ew, and \eW recognize only ASCII
-characters, even in a UTF mode. However, this can be changed by setting the
-PCRE_UCP option.
-.
-.
-.SH "GENERAL CATEGORY PROPERTIES FOR \ep and \eP"
-.rs
-.sp
- C Other
- Cc Control
- Cf Format
- Cn Unassigned
- Co Private use
- Cs Surrogate
-.sp
- L Letter
- Ll Lower case letter
- Lm Modifier letter
- Lo Other letter
- Lt Title case letter
- Lu Upper case letter
- L& Ll, Lu, or Lt
-.sp
- M Mark
- Mc Spacing mark
- Me Enclosing mark
- Mn Non-spacing mark
-.sp
- N Number
- Nd Decimal number
- Nl Letter number
- No Other number
-.sp
- P Punctuation
- Pc Connector punctuation
- Pd Dash punctuation
- Pe Close punctuation
- Pf Final punctuation
- Pi Initial punctuation
- Po Other punctuation
- Ps Open punctuation
-.sp
- S Symbol
- Sc Currency symbol
- Sk Modifier symbol
- Sm Mathematical symbol
- So Other symbol
-.sp
- Z Separator
- Zl Line separator
- Zp Paragraph separator
- Zs Space separator
-.
-.
-.SH "PCRE SPECIAL CATEGORY PROPERTIES FOR \ep and \eP"
-.rs
-.sp
- Xan Alphanumeric: union of properties L and N
- Xps POSIX space: property Z or tab, NL, VT, FF, CR
- Xsp Perl space: property Z or tab, NL, FF, CR
- Xwd Perl word: property Xan or underscore
-.
-.
-.SH "SCRIPT NAMES FOR \ep AND \eP"
-.rs
-.sp
-Arabic,
-Armenian,
-Avestan,
-Balinese,
-Bamum,
-Bengali,
-Bopomofo,
-Braille,
-Buginese,
-Buhid,
-Canadian_Aboriginal,
-Carian,
-Cham,
-Cherokee,
-Common,
-Coptic,
-Cuneiform,
-Cypriot,
-Cyrillic,
-Deseret,
-Devanagari,
-Egyptian_Hieroglyphs,
-Ethiopic,
-Georgian,
-Glagolitic,
-Gothic,
-Greek,
-Gujarati,
-Gurmukhi,
-Han,
-Hangul,
-Hanunoo,
-Hebrew,
-Hiragana,
-Imperial_Aramaic,
-Inherited,
-Inscriptional_Pahlavi,
-Inscriptional_Parthian,
-Javanese,
-Kaithi,
-Kannada,
-Katakana,
-Kayah_Li,
-Kharoshthi,
-Khmer,
-Lao,
-Latin,
-Lepcha,
-Limbu,
-Linear_B,
-Lisu,
-Lycian,
-Lydian,
-Malayalam,
-Meetei_Mayek,
-Mongolian,
-Myanmar,
-New_Tai_Lue,
-Nko,
-Ogham,
-Old_Italic,
-Old_Persian,
-Old_South_Arabian,
-Old_Turkic,
-Ol_Chiki,
-Oriya,
-Osmanya,
-Phags_Pa,
-Phoenician,
-Rejang,
-Runic,
-Samaritan,
-Saurashtra,
-Shavian,
-Sinhala,
-Sundanese,
-Syloti_Nagri,
-Syriac,
-Tagalog,
-Tagbanwa,
-Tai_Le,
-Tai_Tham,
-Tai_Viet,
-Tamil,
-Telugu,
-Thaana,
-Thai,
-Tibetan,
-Tifinagh,
-Ugaritic,
-Vai,
-Yi.
-.
-.
-.SH "CHARACTER CLASSES"
-.rs
-.sp
- [...] positive character class
- [^...] negative character class
- [x-y] range (can be used for hex characters)
- [[:xxx:]] positive POSIX named set
- [[:^xxx:]] negative POSIX named set
-.sp
- alnum alphanumeric
- alpha alphabetic
- ascii 0-127
- blank space or tab
- cntrl control character
- digit decimal digit
- graph printing, excluding space
- lower lower case letter
- print printing, including space
- punct printing, excluding alphanumeric
- space whitespace
- upper upper case letter
- word same as \ew
- xdigit hexadecimal digit
-.sp
-In PCRE, POSIX character set names recognize only ASCII characters by default,
-but some of them use Unicode properties if PCRE_UCP is set. You can use
-\eQ...\eE inside a character class.
-.
-.
-.SH "QUANTIFIERS"
-.rs
-.sp
- ? 0 or 1, greedy
- ?+ 0 or 1, possessive
- ?? 0 or 1, lazy
- * 0 or more, greedy
- *+ 0 or more, possessive
- *? 0 or more, lazy
- + 1 or more, greedy
- ++ 1 or more, possessive
- +? 1 or more, lazy
- {n} exactly n
- {n,m} at least n, no more than m, greedy
- {n,m}+ at least n, no more than m, possessive
- {n,m}? at least n, no more than m, lazy
- {n,} n or more, greedy
- {n,}+ n or more, possessive
- {n,}? n or more, lazy
-.
-.
-.SH "ANCHORS AND SIMPLE ASSERTIONS"
-.rs
-.sp
- \eb word boundary
- \eB not a word boundary
- ^ start of subject
- also after internal newline in multiline mode
- \eA start of subject
- $ end of subject
- also before newline at end of subject
- also before internal newline in multiline mode
- \eZ end of subject
- also before newline at end of subject
- \ez end of subject
- \eG first matching position in subject
-.
-.
-.SH "MATCH POINT RESET"
-.rs
-.sp
- \eK reset start of match
-.
-.
-.SH "ALTERNATION"
-.rs
-.sp
- expr|expr|expr...
-.
-.
-.SH "CAPTURING"
-.rs
-.sp
- (...) capturing group
- (?<name>...) named capturing group (Perl)
- (?'name'...) named capturing group (Perl)
- (?P<name>...) named capturing group (Python)
- (?:...) non-capturing group
- (?|...) non-capturing group; reset group numbers for
- capturing groups in each alternative
-.
-.
-.SH "ATOMIC GROUPS"
-.rs
-.sp
- (?>...) atomic, non-capturing group
-.
-.
-.
-.
-.SH "COMMENT"
-.rs
-.sp
- (?#....) comment (not nestable)
-.
-.
-.SH "OPTION SETTING"
-.rs
-.sp
- (?i) caseless
- (?J) allow duplicate names
- (?m) multiline
- (?s) single line (dotall)
- (?U) default ungreedy (lazy)
- (?x) extended (ignore white space)
- (?-...) unset option(s)
-.sp
-The following are recognized only at the start of a pattern or after one of the
-newline-setting options with similar syntax:
-.sp
- (*NO_START_OPT) no start-match optimization (PCRE_NO_START_OPTIMIZE)
- (*UTF8) set UTF-8 mode: 8-bit library (PCRE_UTF8)
- (*UTF16) set UTF-16 mode: 16-bit library (PCRE_UTF16)
- (*UCP) set PCRE_UCP (use Unicode properties for \ed etc)
-.
-.
-.SH "LOOKAHEAD AND LOOKBEHIND ASSERTIONS"
-.rs
-.sp
- (?=...) positive look ahead
- (?!...) negative look ahead
- (?<=...) positive look behind
- (?<!...) negative look behind
-.sp
-Each top-level branch of a look behind must be of a fixed length.
-.
-.
-.SH "BACKREFERENCES"
-.rs
-.sp
- \en reference by number (can be ambiguous)
- \egn reference by number
- \eg{n} reference by number
- \eg{-n} relative reference by number
- \ek<name> reference by name (Perl)
- \ek'name' reference by name (Perl)
- \eg{name} reference by name (Perl)
- \ek{name} reference by name (.NET)
- (?P=name) reference by name (Python)
-.
-.
-.SH "SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)"
-.rs
-.sp
- (?R) recurse whole pattern
- (?n) call subpattern by absolute number
- (?+n) call subpattern by relative number
- (?-n) call subpattern by relative number
- (?&name) call subpattern by name (Perl)
- (?P>name) call subpattern by name (Python)
- \eg<name> call subpattern by name (Oniguruma)
- \eg'name' call subpattern by name (Oniguruma)
- \eg<n> call subpattern by absolute number (Oniguruma)
- \eg'n' call subpattern by absolute number (Oniguruma)
- \eg<+n> call subpattern by relative number (PCRE extension)
- \eg'+n' call subpattern by relative number (PCRE extension)
- \eg<-n> call subpattern by relative number (PCRE extension)
- \eg'-n' call subpattern by relative number (PCRE extension)
-.
-.
-.SH "CONDITIONAL PATTERNS"
-.rs
-.sp
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-.sp
- (?(n)... absolute reference condition
- (?(+n)... relative reference condition
- (?(-n)... relative reference condition
- (?(<name>)... named reference condition (Perl)
- (?('name')... named reference condition (Perl)
- (?(name)... named reference condition (PCRE)
- (?(R)... overall recursion condition
- (?(Rn)... specific group recursion condition
- (?(R&name)... specific recursion condition
- (?(DEFINE)... define subpattern for reference
- (?(assert)... assertion condition
-.
-.
-.SH "BACKTRACKING CONTROL"
-.rs
-.sp
-The following act immediately they are reached:
-.sp
- (*ACCEPT) force successful match
- (*FAIL) force backtrack; synonym (*F)
- (*MARK:NAME) set name to be passed back; synonym (*:NAME)
-.sp
-The following act only when a subsequent match failure causes a backtrack to
-reach them. They all force a match failure, but they differ in what happens
-afterwards. Those that advance the start-of-match point do so only if the
-pattern is not anchored.
-.sp
- (*COMMIT) overall failure, no advance of starting point
- (*PRUNE) advance to next starting character
- (*PRUNE:NAME) equivalent to (*MARK:NAME)(*PRUNE)
- (*SKIP) advance to current matching position
- (*SKIP:NAME) advance to position corresponding to an earlier
- (*MARK:NAME); if not found, the (*SKIP) is ignored
- (*THEN) local failure, backtrack to next alternation
- (*THEN:NAME) equivalent to (*MARK:NAME)(*THEN)
-.
-.
-.SH "NEWLINE CONVENTIONS"
-.rs
-.sp
-These are recognized only at the very start of the pattern or after a
-(*BSR_...), (*UTF8), (*UTF16) or (*UCP) option.
-.sp
- (*CR) carriage return only
- (*LF) linefeed only
- (*CRLF) carriage return followed by linefeed
- (*ANYCRLF) all three of the above
- (*ANY) any Unicode newline sequence
-.
-.
-.SH "WHAT \eR MATCHES"
-.rs
-.sp
-These are recognized only at the very start of the pattern or after a
-(*...) option that sets the newline convention or a UTF or UCP mode.
-.sp
- (*BSR_ANYCRLF) CR, LF, or CRLF
- (*BSR_UNICODE) any Unicode newline sequence
-.
-.
-.SH "CALLOUTS"
-.rs
-.sp
- (?C) callout
- (?Cn) callout with data n
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcrepattern\fP(3), \fBpcreapi\fP(3), \fBpcrecallout\fP(3),
-\fBpcrematching\fP(3), \fBpcre\fP(3).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 10 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcretest.1 b/src/third_party/pcre-8.30/doc/pcretest.1
deleted file mode 100644
index beb9d170771..00000000000
--- a/src/third_party/pcre-8.30/doc/pcretest.1
+++ /dev/null
@@ -1,941 +0,0 @@
-.TH PCRETEST 1
-.SH NAME
-pcretest - a program for testing Perl-compatible regular expressions.
-.SH SYNOPSIS
-.rs
-.sp
-.B pcretest "[options] [input file [output file]]"
-.sp
-\fBpcretest\fP was written as a test program for the PCRE regular expression
-library itself, but it can also be used for experimenting with regular
-expressions. This document describes the features of the test program; for
-details of the regular expressions themselves, see the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation. For details of the PCRE library function calls and their
-options, see the
-.\" HREF
-\fBpcreapi\fP
-.\"
-and
-.\" HREF
-\fBpcre16\fP
-.\"
-documentation. The input for \fBpcretest\fP is a sequence of regular expression
-patterns and strings to be matched, as described below. The output shows the
-result of each match. Options on the command line and the patterns control PCRE
-options and exactly what is output.
-.
-.
-.SH "PCRE's 8-BIT and 16-BIT LIBRARIES"
-.rs
-.sp
-From release 8.30, two separate PCRE libraries can be built. The original one
-supports 8-bit character strings, whereas the newer 16-bit library supports
-character strings encoded in 16-bit units. The \fBpcretest\fP program can be
-used to test both libraries. However, it is itself still an 8-bit program,
-reading 8-bit input and writing 8-bit output. When testing the 16-bit library,
-the patterns and data strings are converted to 16-bit format before being
-passed to the PCRE library functions. Results are converted to 8-bit for
-output.
-.P
-References to functions and structures of the form \fBpcre[16]_xx\fP below
-mean "\fBpcre_xx\fP when using the 8-bit library or \fBpcre16_xx\fP when using
-the 16-bit library".
-.
-.
-.SH "COMMAND LINE OPTIONS"
-.rs
-.TP 10
-\fB-16\fP
-If both the 8-bit and the 16-bit libraries have been built, this option causes
-the 16-bit library to be used. If only the 16-bit library has been built, this
-is the default (so has no effect). If only the 8-bit library has been built,
-this option causes an error.
-.TP 10
-\fB-b\fP
-Behave as if each pattern has the \fB/B\fP (show byte code) modifier; the
-internal form is output after compilation.
-.TP 10
-\fB-C\fP
-Output the version number of the PCRE library, and all available information
-about the optional features that are included, and then exit. All other options
-are ignored.
-.TP 10
-\fB-C\fP \fIoption\fP
-Output information about a specific build-time option, then exit. This
-functionality is intended for use in scripts such as \fBRunTest\fP. The
-following options output the value indicated:
-.sp
- linksize the internal link size (2, 3, or 4)
- newline the default newline setting:
- CR, LF, CRLF, ANYCRLF, or ANY
-.sp
-The following options output 1 for true or zero for false:
-.sp
- jit just-in-time support is available
- pcre16 the 16-bit library was built
- pcre8 the 8-bit library was built
- ucp Unicode property support is available
- utf UTF-8 and/or UTF-16 support is available
-.TP 10
-\fB-d\fP
-Behave as if each pattern has the \fB/D\fP (debug) modifier; the internal
-form and information about the compiled pattern is output after compilation;
-\fB-d\fP is equivalent to \fB-b -i\fP.
-.TP 10
-\fB-dfa\fP
-Behave as if each data line contains the \eD escape sequence; this causes the
-alternative matching function, \fBpcre[16]_dfa_exec()\fP, to be used instead of
-the standard \fBpcre[16]_exec()\fP function (more detail is given below).
-.TP 10
-\fB-help\fP
-Output a brief summary these options and then exit.
-.TP 10
-\fB-i\fP
-Behave as if each pattern has the \fB/I\fP modifier; information about the
-compiled pattern is given after compilation.
-.TP 10
-\fB-M\fP
-Behave as if each data line contains the \eM escape sequence; this causes
-PCRE to discover the minimum MATCH_LIMIT and MATCH_LIMIT_RECURSION settings by
-calling \fBpcre[16]_exec()\fP repeatedly with different limits.
-.TP 10
-\fB-m\fP
-Output the size of each compiled pattern after it has been compiled. This is
-equivalent to adding \fB/M\fP to each regular expression. The size is given in
-bytes for both libraries.
-.TP 10
-\fB-o\fP \fIosize\fP
-Set the number of elements in the output vector that is used when calling
-\fBpcre[16]_exec()\fP or \fBpcre[16]_dfa_exec()\fP to be \fIosize\fP. The
-default value is 45, which is enough for 14 capturing subexpressions for
-\fBpcre[16]_exec()\fP or 22 different matches for \fBpcre[16]_dfa_exec()\fP.
-The vector size can be changed for individual matching calls by including \eO
-in the data line (see below).
-.TP 10
-\fB-p\fP
-Behave as if each pattern has the \fB/P\fP modifier; the POSIX wrapper API is
-used to call PCRE. None of the other options has any effect when \fB-p\fP is
-set. This option can be used only with the 8-bit library.
-.TP 10
-\fB-q\fP
-Do not output the version number of \fBpcretest\fP at the start of execution.
-.TP 10
-\fB-S\fP \fIsize\fP
-On Unix-like systems, set the size of the run-time stack to \fIsize\fP
-megabytes.
-.TP 10
-\fB-s\fP or \fB-s+\fP
-Behave as if each pattern has the \fB/S\fP modifier; in other words, force each
-pattern to be studied. If \fB-s+\fP is used, the PCRE_STUDY_JIT_COMPILE flag is
-passed to \fBpcre[16]_study()\fP, causing just-in-time optimization to be set
-up if it is available. If the \fB/I\fP or \fB/D\fP option is present on a
-pattern (requesting output about the compiled pattern), information about the
-result of studying is not included when studying is caused only by \fB-s\fP and
-neither \fB-i\fP nor \fB-d\fP is present on the command line. This behaviour
-means that the output from tests that are run with and without \fB-s\fP should
-be identical, except when options that output information about the actual
-running of a match are set.
-.sp
-The \fB-M\fP, \fB-t\fP, and \fB-tm\fP options, which give information about
-resources used, are likely to produce different output with and without
-\fB-s\fP. Output may also differ if the \fB/C\fP option is present on an
-individual pattern. This uses callouts to trace the the matching process, and
-this may be different between studied and non-studied patterns. If the pattern
-contains (*MARK) items there may also be differences, for the same reason. The
-\fB-s\fP command line option can be overridden for specific patterns that
-should never be studied (see the \fB/S\fP pattern modifier below).
-.TP 10
-\fB-t\fP
-Run each compile, study, and match many times with a timer, and output
-resulting time per compile or match (in milliseconds). Do not set \fB-m\fP with
-\fB-t\fP, because you will then get the size output a zillion times, and the
-timing will be distorted. You can control the number of iterations that are
-used for timing by following \fB-t\fP with a number (as a separate item on the
-command line). For example, "-t 1000" would iterate 1000 times. The default is
-to iterate 500000 times.
-.TP 10
-\fB-tm\fP
-This is like \fB-t\fP except that it times only the matching phase, not the
-compile or study phases.
-.
-.
-.SH DESCRIPTION
-.rs
-.sp
-If \fBpcretest\fP is given two filename arguments, it reads from the first and
-writes to the second. If it is given only one filename argument, it reads from
-that file and writes to stdout. Otherwise, it reads from stdin and writes to
-stdout, and prompts for each line of input, using "re>" to prompt for regular
-expressions, and "data>" to prompt for data lines.
-.P
-When \fBpcretest\fP is built, a configuration option can specify that it should
-be linked with the \fBlibreadline\fP library. When this is done, if the input
-is from a terminal, it is read using the \fBreadline()\fP function. This
-provides line-editing and history facilities. The output from the \fB-help\fP
-option states whether or not \fBreadline()\fP will be used.
-.P
-The program handles any number of sets of input on a single input file. Each
-set starts with a regular expression, and continues with any number of data
-lines to be matched against the pattern.
-.P
-Each data line is matched separately and independently. If you want to do
-multi-line matches, you have to use the \en escape sequence (or \er or \er\en,
-etc., depending on the newline setting) in a single line of input to encode the
-newline sequences. There is no limit on the length of data lines; the input
-buffer is automatically extended if it is too small.
-.P
-An empty line signals the end of the data lines, at which point a new regular
-expression is read. The regular expressions are given enclosed in any
-non-alphanumeric delimiters other than backslash, for example:
-.sp
- /(a|bc)x+yz/
-.sp
-White space before the initial delimiter is ignored. A regular expression may
-be continued over several input lines, in which case the newline characters are
-included within it. It is possible to include the delimiter within the pattern
-by escaping it, for example
-.sp
- /abc\e/def/
-.sp
-If you do so, the escape and the delimiter form part of the pattern, but since
-delimiters are always non-alphanumeric, this does not affect its interpretation.
-If the terminating delimiter is immediately followed by a backslash, for
-example,
-.sp
- /abc/\e
-.sp
-then a backslash is added to the end of the pattern. This is done to provide a
-way of testing the error condition that arises if a pattern finishes with a
-backslash, because
-.sp
- /abc\e/
-.sp
-is interpreted as the first line of a pattern that starts with "abc/", causing
-pcretest to read the next line as a continuation of the regular expression.
-.
-.
-.SH "PATTERN MODIFIERS"
-.rs
-.sp
-A pattern may be followed by any number of modifiers, which are mostly single
-characters. Following Perl usage, these are referred to below as, for example,
-"the \fB/i\fP modifier", even though the delimiter of the pattern need not
-always be a slash, and no slash is used when writing modifiers. White space may
-appear between the final pattern delimiter and the first modifier, and between
-the modifiers themselves.
-.P
-The \fB/i\fP, \fB/m\fP, \fB/s\fP, and \fB/x\fP modifiers set the PCRE_CASELESS,
-PCRE_MULTILINE, PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when
-\fBpcre[16]_compile()\fP is called. These four modifier letters have the same
-effect as they do in Perl. For example:
-.sp
- /caseless/i
-.sp
-The following table shows additional modifiers for setting PCRE compile-time
-options that do not correspond to anything in Perl:
-.sp
- \fB/8\fP PCRE_UTF8 ) when using the 8-bit
- \fB/?\fP PCRE_NO_UTF8_CHECK ) library
-.sp
- \fB/8\fP PCRE_UTF16 ) when using the 16-bit
- \fB/?\fP PCRE_NO_UTF16_CHECK ) library
-.sp
- \fB/A\fP PCRE_ANCHORED
- \fB/C\fP PCRE_AUTO_CALLOUT
- \fB/E\fP PCRE_DOLLAR_ENDONLY
- \fB/f\fP PCRE_FIRSTLINE
- \fB/J\fP PCRE_DUPNAMES
- \fB/N\fP PCRE_NO_AUTO_CAPTURE
- \fB/U\fP PCRE_UNGREEDY
- \fB/W\fP PCRE_UCP
- \fB/X\fP PCRE_EXTRA
- \fB/Y\fP PCRE_NO_START_OPTIMIZE
- \fB/<JS>\fP PCRE_JAVASCRIPT_COMPAT
- \fB/<cr>\fP PCRE_NEWLINE_CR
- \fB/<lf>\fP PCRE_NEWLINE_LF
- \fB/<crlf>\fP PCRE_NEWLINE_CRLF
- \fB/<anycrlf>\fP PCRE_NEWLINE_ANYCRLF
- \fB/<any>\fP PCRE_NEWLINE_ANY
- \fB/<bsr_anycrlf>\fP PCRE_BSR_ANYCRLF
- \fB/<bsr_unicode>\fP PCRE_BSR_UNICODE
-.sp
-The modifiers that are enclosed in angle brackets are literal strings as shown,
-including the angle brackets, but the letters within can be in either case.
-This example sets multiline matching with CRLF as the line ending sequence:
-.sp
- /^abc/m<CRLF>
-.sp
-As well as turning on the PCRE_UTF8/16 option, the \fB/8\fP modifier causes
-all non-printing characters in output strings to be printed using the
-\ex{hh...} notation. Otherwise, those less than 0x100 are output in hex without
-the curly brackets.
-.P
-Full details of the PCRE options are given in the
-.\" HREF
-\fBpcreapi\fP
-.\"
-documentation.
-.
-.
-.SS "Finding all matches in a string"
-.rs
-.sp
-Searching for all possible matches within each subject string can be requested
-by the \fB/g\fP or \fB/G\fP modifier. After finding a match, PCRE is called
-again to search the remainder of the subject string. The difference between
-\fB/g\fP and \fB/G\fP is that the former uses the \fIstartoffset\fP argument to
-\fBpcre[16]_exec()\fP to start searching at a new point within the entire
-string (which is in effect what Perl does), whereas the latter passes over a
-shortened substring. This makes a difference to the matching process if the
-pattern begins with a lookbehind assertion (including \eb or \eB).
-.P
-If any call to \fBpcre[16]_exec()\fP in a \fB/g\fP or \fB/G\fP sequence matches
-an empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and
-PCRE_ANCHORED flags set in order to search for another, non-empty, match at the
-same point. If this second match fails, the start offset is advanced, and the
-normal match is retried. This imitates the way Perl handles such cases when
-using the \fB/g\fP modifier or the \fBsplit()\fP function. Normally, the start
-offset is advanced by one character, but if the newline convention recognizes
-CRLF as a newline, and the current character is CR followed by LF, an advance
-of two is used.
-.
-.
-.SS "Other modifiers"
-.rs
-.sp
-There are yet more modifiers for controlling the way \fBpcretest\fP
-operates.
-.P
-The \fB/+\fP modifier requests that as well as outputting the substring that
-matched the entire pattern, \fBpcretest\fP should in addition output the
-remainder of the subject string. This is useful for tests where the subject
-contains multiple copies of the same substring. If the \fB+\fP modifier appears
-twice, the same action is taken for captured substrings. In each case the
-remainder is output on the following line with a plus character following the
-capture number. Note that this modifier must not immediately follow the /S
-modifier because /S+ has another meaning.
-.P
-The \fB/=\fP modifier requests that the values of all potential captured
-parentheses be output after a match. By default, only those up to the highest
-one actually used in the match are output (corresponding to the return code
-from \fBpcre[16]_exec()\fP). Values in the offsets vector corresponding to
-higher numbers should be set to -1, and these are output as "<unset>". This
-modifier gives a way of checking that this is happening.
-.P
-The \fB/B\fP modifier is a debugging feature. It requests that \fBpcretest\fP
-output a representation of the compiled code after compilation. Normally this
-information contains length and offset values; however, if \fB/Z\fP is also
-present, this data is replaced by spaces. This is a special feature for use in
-the automatic test scripts; it ensures that the same output is generated for
-different internal link sizes.
-.P
-The \fB/D\fP modifier is a PCRE debugging feature, and is equivalent to
-\fB/BI\fP, that is, both the \fB/B\fP and the \fB/I\fP modifiers.
-.P
-The \fB/F\fP modifier causes \fBpcretest\fP to flip the byte order of the
-2-byte and 4-byte fields in the compiled pattern. This facility is for testing
-the feature in PCRE that allows it to execute patterns that were compiled on a
-host with a different endianness. This feature is not available when the POSIX
-interface to PCRE is being used, that is, when the \fB/P\fP pattern modifier is
-specified. See also the section about saving and reloading compiled patterns
-below.
-.P
-The \fB/I\fP modifier requests that \fBpcretest\fP output information about the
-compiled pattern (whether it is anchored, has a fixed first character, and
-so on). It does this by calling \fBpcre[16]_fullinfo()\fP after compiling a
-pattern. If the pattern is studied, the results of that are also output.
-.P
-The \fB/K\fP modifier requests \fBpcretest\fP to show names from backtracking
-control verbs that are returned from calls to \fBpcre[16]_exec()\fP. It causes
-\fBpcretest\fP to create a \fBpcre[16]_extra\fP block if one has not already
-been created by a call to \fBpcre[16]_study()\fP, and to set the
-PCRE_EXTRA_MARK flag and the \fBmark\fP field within it, every time that
-\fBpcre[16]_exec()\fP is called. If the variable that the \fBmark\fP field
-points to is non-NULL for a match, non-match, or partial match, \fBpcretest\fP
-prints the string to which it points. For a match, this is shown on a line by
-itself, tagged with "MK:". For a non-match it is added to the message.
-.P
-The \fB/L\fP modifier must be followed directly by the name of a locale, for
-example,
-.sp
- /pattern/Lfr_FR
-.sp
-For this reason, it must be the last modifier. The given locale is set,
-\fBpcre[16]_maketables()\fP is called to build a set of character tables for
-the locale, and this is then passed to \fBpcre[16]_compile()\fP when compiling
-the regular expression. Without an \fB/L\fP (or \fB/T\fP) modifier, NULL is
-passed as the tables pointer; that is, \fB/L\fP applies only to the expression
-on which it appears.
-.P
-The \fB/M\fP modifier causes the size in bytes of the memory block used to hold
-the compiled pattern to be output. This does not include the size of the
-\fBpcre[16]\fP block; it is just the actual compiled data. If the pattern is
-successfully studied with the PCRE_STUDY_JIT_COMPILE option, the size of the
-JIT compiled code is also output.
-.P
-If the \fB/S\fP modifier appears once, it causes \fBpcre[16]_study()\fP to be
-called after the expression has been compiled, and the results used when the
-expression is matched. If \fB/S\fP appears twice, it suppresses studying, even
-if it was requested externally by the \fB-s\fP command line option. This makes
-it possible to specify that certain patterns are always studied, and others are
-never studied, independently of \fB-s\fP. This feature is used in the test
-files in a few cases where the output is different when the pattern is studied.
-.P
-If the \fB/S\fP modifier is immediately followed by a + character, the call to
-\fBpcre[16]_study()\fP is made with the PCRE_STUDY_JIT_COMPILE option,
-requesting just-in-time optimization support if it is available. Note that
-there is also a \fB/+\fP modifier; it must not be given immediately after
-\fB/S\fP because this will be misinterpreted. If JIT studying is successful, it
-will automatically be used when \fBpcre[16]_exec()\fP is run, except when
-incompatible run-time options are specified. These include the partial matching
-options; a complete list is given in the
-.\" HREF
-\fBpcrejit\fP
-.\"
-documentation. See also the \fB\eJ\fP escape sequence below for a way of
-setting the size of the JIT stack.
-.P
-The \fB/T\fP modifier must be followed by a single digit. It causes a specific
-set of built-in character tables to be passed to \fBpcre[16]_compile()\fP. It
-is used in the standard PCRE tests to check behaviour with different character
-tables. The digit specifies the tables as follows:
-.sp
- 0 the default ASCII tables, as distributed in
- pcre_chartables.c.dist
- 1 a set of tables defining ISO 8859 characters
-.sp
-In table 1, some characters whose codes are greater than 128 are identified as
-letters, digits, spaces, etc.
-.
-.
-.SS "Using the POSIX wrapper API"
-.rs
-.sp
-The \fB/P\fP modifier causes \fBpcretest\fP to call PCRE via the POSIX wrapper
-API rather than its native API. This supports only the 8-bit library. When
-\fB/P\fP is set, the following modifiers set options for the \fBregcomp()\fP
-function:
-.sp
- /i REG_ICASE
- /m REG_NEWLINE
- /N REG_NOSUB
- /s REG_DOTALL )
- /U REG_UNGREEDY ) These options are not part of
- /W REG_UCP ) the POSIX standard
- /8 REG_UTF8 )
-.sp
-The \fB/+\fP modifier works as described above. All other modifiers are
-ignored.
-.
-.
-.SH "DATA LINES"
-.rs
-.sp
-Before each data line is passed to \fBpcre[16]_exec()\fP, leading and trailing
-white space is removed, and it is then scanned for \e escapes. Some of these
-are pretty esoteric features, intended for checking out some of the more
-complicated features of PCRE. If you are just testing "ordinary" regular
-expressions, you probably don't need any of these. The following escapes are
-recognized:
-.sp
- \ea alarm (BEL, \ex07)
- \eb backspace (\ex08)
- \ee escape (\ex27)
- \ef form feed (\ex0c)
- \en newline (\ex0a)
-.\" JOIN
- \eqdd set the PCRE_MATCH_LIMIT limit to dd
- (any number of digits)
- \er carriage return (\ex0d)
- \et tab (\ex09)
- \ev vertical tab (\ex0b)
- \ennn octal character (up to 3 octal digits); always
- a byte unless > 255 in UTF-8 or 16-bit mode
- \exhh hexadecimal byte (up to 2 hex digits)
- \ex{hh...} hexadecimal character (any number of hex digits)
-.\" JOIN
- \eA pass the PCRE_ANCHORED option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \eB pass the PCRE_NOTBOL option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \eCdd call pcre[16]_copy_substring() for substring dd
- after a successful match (number less than 32)
-.\" JOIN
- \eCname call pcre[16]_copy_named_substring() for substring
- "name" after a successful match (name termin-
- ated by next non alphanumeric character)
-.\" JOIN
- \eC+ show the current captured substrings at callout
- time
- \eC- do not supply a callout function
-.\" JOIN
- \eC!n return 1 instead of 0 when callout number n is
- reached
-.\" JOIN
- \eC!n!m return 1 instead of 0 when callout number n is
- reached for the nth time
-.\" JOIN
- \eC*n pass the number n (may be negative) as callout
- data; this is used as the callout return value
- \eD use the \fBpcre[16]_dfa_exec()\fP match function
- \eF only shortest match for \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \eGdd call pcre[16]_get_substring() for substring dd
- after a successful match (number less than 32)
-.\" JOIN
- \eGname call pcre[16]_get_named_substring() for substring
- "name" after a successful match (name termin-
- ated by next non-alphanumeric character)
-.\" JOIN
- \eJdd set up a JIT stack of dd kilobytes maximum (any
- number of digits)
-.\" JOIN
- \eL call pcre[16]_get_substringlist() after a
- successful match
-.\" JOIN
- \eM discover the minimum MATCH_LIMIT and
- MATCH_LIMIT_RECURSION settings
-.\" JOIN
- \eN pass the PCRE_NOTEMPTY option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP; if used twice, pass the
- PCRE_NOTEMPTY_ATSTART option
-.\" JOIN
- \eOdd set the size of the output vector passed to
- \fBpcre[16]_exec()\fP to dd (any number of digits)
-.\" JOIN
- \eP pass the PCRE_PARTIAL_SOFT option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP; if used twice, pass the
- PCRE_PARTIAL_HARD option
-.\" JOIN
- \eQdd set the PCRE_MATCH_LIMIT_RECURSION limit to dd
- (any number of digits)
- \eR pass the PCRE_DFA_RESTART option to \fBpcre[16]_dfa_exec()\fP
- \eS output details of memory get/free calls during matching
-.\" JOIN
- \eY pass the PCRE_NO_START_OPTIMIZE option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \eZ pass the PCRE_NOTEOL option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \e? pass the PCRE_NO_UTF[8|16]_CHECK option to
- \fBpcre[16]_exec()\fP or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \e>dd start the match at offset dd (optional "-"; then
- any number of digits); this sets the \fIstartoffset\fP
- argument for \fBpcre[16]_exec()\fP or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \e<cr> pass the PCRE_NEWLINE_CR option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \e<lf> pass the PCRE_NEWLINE_LF option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \e<crlf> pass the PCRE_NEWLINE_CRLF option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \e<anycrlf> pass the PCRE_NEWLINE_ANYCRLF option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP
-.\" JOIN
- \e<any> pass the PCRE_NEWLINE_ANY option to \fBpcre[16]_exec()\fP
- or \fBpcre[16]_dfa_exec()\fP
-.sp
-The use of \ex{hh...} is not dependent on the use of the \fB/8\fP modifier on
-the pattern. It is recognized always. There may be any number of hexadecimal
-digits inside the braces; invalid values provoke error messages.
-.P
-Note that \exhh specifies one byte rather than one character in UTF-8 mode;
-this makes it possible to construct invalid UTF-8 sequences for testing
-purposes. On the other hand, \ex{hh} is interpreted as a UTF-8 character in
-UTF-8 mode, generating more than one byte if the value is greater than 127.
-When testing the 8-bit library not in UTF-8 mode, \ex{hh} generates one byte
-for values less than 256, and causes an error for greater values.
-.P
-In UTF-16 mode, all 4-digit \ex{hhhh} values are accepted. This makes it
-possible to construct invalid UTF-16 sequences for testing purposes.
-.P
-The escapes that specify line ending sequences are literal strings, exactly as
-shown. No more than one newline setting should be present in any data line.
-.P
-A backslash followed by anything else just escapes the anything else. If
-the very last character is a backslash, it is ignored. This gives a way of
-passing an empty line as data, since a real empty line terminates the data
-input.
-.P
-The \fB\eJ\fP escape provides a way of setting the maximum stack size that is
-used by the just-in-time optimization code. It is ignored if JIT optimization
-is not being used. Providing a stack that is larger than the default 32K is
-necessary only for very complicated patterns.
-.P
-If \eM is present, \fBpcretest\fP calls \fBpcre[16]_exec()\fP several times,
-with different values in the \fImatch_limit\fP and \fImatch_limit_recursion\fP
-fields of the \fBpcre[16]_extra\fP data structure, until it finds the minimum
-numbers for each parameter that allow \fBpcre[16]_exec()\fP to complete without
-error. Because this is testing a specific feature of the normal interpretive
-\fBpcre[16]_exec()\fP execution, the use of any JIT optimization that might
-have been set up by the \fB/S+\fP qualifier of \fB-s+\fP option is disabled.
-.P
-The \fImatch_limit\fP number is a measure of the amount of backtracking
-that takes place, and checking it out can be instructive. For most simple
-matches, the number is quite small, but for patterns with very large numbers of
-matching possibilities, it can become large very quickly with increasing length
-of subject string. The \fImatch_limit_recursion\fP number is a measure of how
-much stack (or, if PCRE is compiled with NO_RECURSE, how much heap) memory is
-needed to complete the match attempt.
-.P
-When \eO is used, the value specified may be higher or lower than the size set
-by the \fB-O\fP command line option (or defaulted to 45); \eO applies only to
-the call of \fBpcre[16]_exec()\fP for the line in which it appears.
-.P
-If the \fB/P\fP modifier was present on the pattern, causing the POSIX wrapper
-API to be used, the only option-setting sequences that have any effect are \eB,
-\eN, and \eZ, causing REG_NOTBOL, REG_NOTEMPTY, and REG_NOTEOL, respectively,
-to be passed to \fBregexec()\fP.
-.
-.
-.SH "THE ALTERNATIVE MATCHING FUNCTION"
-.rs
-.sp
-By default, \fBpcretest\fP uses the standard PCRE matching function,
-\fBpcre[16]_exec()\fP to match each data line. PCRE also supports an
-alternative matching function, \fBpcre[16]_dfa_test()\fP, which operates in a
-different way, and has some restrictions. The differences between the two
-functions are described in the
-.\" HREF
-\fBpcrematching\fP
-.\"
-documentation.
-.P
-If a data line contains the \eD escape sequence, or if the command line
-contains the \fB-dfa\fP option, the alternative matching function is used.
-This function finds all possible matches at a given point. If, however, the \eF
-escape sequence is present in the data line, it stops after the first match is
-found. This is always the shortest possible match.
-.
-.
-.SH "DEFAULT OUTPUT FROM PCRETEST"
-.rs
-.sp
-This section describes the output when the normal matching function,
-\fBpcre[16]_exec()\fP, is being used.
-.P
-When a match succeeds, \fBpcretest\fP outputs the list of captured substrings
-that \fBpcre[16]_exec()\fP returns, starting with number 0 for the string that
-matched the whole pattern. Otherwise, it outputs "No match" when the return is
-PCRE_ERROR_NOMATCH, and "Partial match:" followed by the partially matching
-substring when \fBpcre[16]_exec()\fP returns PCRE_ERROR_PARTIAL. (Note that
-this is the entire substring that was inspected during the partial match; it
-may include characters before the actual match start if a lookbehind assertion,
-\eK, \eb, or \eB was involved.) For any other return, \fBpcretest\fP outputs
-the PCRE negative error number and a short descriptive phrase. If the error is
-a failed UTF string check, the offset of the start of the failing character and
-the reason code are also output, provided that the size of the output vector is
-at least two. Here is an example of an interactive \fBpcretest\fP run.
-.sp
- $ pcretest
- PCRE version 8.13 2011-04-30
-.sp
- re> /^abc(\ed+)/
- data> abc123
- 0: abc123
- 1: 123
- data> xyz
- No match
-.sp
-Unset capturing substrings that are not followed by one that is set are not
-returned by \fBpcre[16]_exec()\fP, and are not shown by \fBpcretest\fP. In the
-following example, there are two capturing substrings, but when the first data
-line is matched, the second, unset substring is not shown. An "internal" unset
-substring is shown as "<unset>", as for the second data line.
-.sp
- re> /(a)|(b)/
- data> a
- 0: a
- 1: a
- data> b
- 0: b
- 1: <unset>
- 2: b
-.sp
-If the strings contain any non-printing characters, they are output as \exhh
-escapes if the value is less than 256 and UTF mode is not set. Otherwise they
-are output as \ex{hh...} escapes. See below for the definition of non-printing
-characters. If the pattern has the \fB/+\fP modifier, the output for substring
-0 is followed by the the rest of the subject string, identified by "0+" like
-this:
-.sp
- re> /cat/+
- data> cataract
- 0: cat
- 0+ aract
-.sp
-If the pattern has the \fB/g\fP or \fB/G\fP modifier, the results of successive
-matching attempts are output in sequence, like this:
-.sp
- re> /\eBi(\ew\ew)/g
- data> Mississippi
- 0: iss
- 1: ss
- 0: iss
- 1: ss
- 0: ipp
- 1: pp
-.sp
-"No match" is output only if the first match attempt fails. Here is an example
-of a failure message (the offset 4 that is specified by \e>4 is past the end of
-the subject string):
-.sp
- re> /xyz/
- data> xyz\e>4
- Error -24 (bad offset value)
-.P
-If any of the sequences \fB\eC\fP, \fB\eG\fP, or \fB\eL\fP are present in a
-data line that is successfully matched, the substrings extracted by the
-convenience functions are output with C, G, or L after the string number
-instead of a colon. This is in addition to the normal full list. The string
-length (that is, the return from the extraction function) is given in
-parentheses after each string for \fB\eC\fP and \fB\eG\fP.
-.P
-Note that whereas patterns can be continued over several lines (a plain ">"
-prompt is used for continuations), data lines may not. However newlines can be
-included in data by means of the \en escape (or \er, \er\en, etc., depending on
-the newline sequence setting).
-.
-.
-.
-.SH "OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION"
-.rs
-.sp
-When the alternative matching function, \fBpcre[16]_dfa_exec()\fP, is used (by
-means of the \eD escape sequence or the \fB-dfa\fP command line option), the
-output consists of a list of all the matches that start at the first point in
-the subject where there is at least one match. For example:
-.sp
- re> /(tang|tangerine|tan)/
- data> yellow tangerine\eD
- 0: tangerine
- 1: tang
- 2: tan
-.sp
-(Using the normal matching function on this data finds only "tang".) The
-longest matching string is always given first (and numbered zero). After a
-PCRE_ERROR_PARTIAL return, the output is "Partial match:", followed by the
-partially matching substring. (Note that this is the entire substring that was
-inspected during the partial match; it may include characters before the actual
-match start if a lookbehind assertion, \eK, \eb, or \eB was involved.)
-.P
-If \fB/g\fP is present on the pattern, the search for further matches resumes
-at the end of the longest match. For example:
-.sp
- re> /(tang|tangerine|tan)/g
- data> yellow tangerine and tangy sultana\eD
- 0: tangerine
- 1: tang
- 2: tan
- 0: tang
- 1: tan
- 0: tan
-.sp
-Since the matching function does not support substring capture, the escape
-sequences that are concerned with captured substrings are not relevant.
-.
-.
-.SH "RESTARTING AFTER A PARTIAL MATCH"
-.rs
-.sp
-When the alternative matching function has given the PCRE_ERROR_PARTIAL return,
-indicating that the subject partially matched the pattern, you can restart the
-match with additional subject data by means of the \eR escape sequence. For
-example:
-.sp
- re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/
- data> 23ja\eP\eD
- Partial match: 23ja
- data> n05\eR\eD
- 0: n05
-.sp
-For further information about partial matching, see the
-.\" HREF
-\fBpcrepartial\fP
-.\"
-documentation.
-.
-.
-.SH CALLOUTS
-.rs
-.sp
-If the pattern contains any callout requests, \fBpcretest\fP's callout function
-is called during matching. This works with both matching functions. By default,
-the called function displays the callout number, the start and current
-positions in the text at the callout time, and the next pattern item to be
-tested. For example:
-.sp
- --->pqrabcdef
- 0 ^ ^ \ed
-.sp
-This output indicates that callout number 0 occurred for a match attempt
-starting at the fourth character of the subject string, when the pointer was at
-the seventh character of the data, and when the next pattern item was \ed. Just
-one circumflex is output if the start and current positions are the same.
-.P
-Callouts numbered 255 are assumed to be automatic callouts, inserted as a
-result of the \fB/C\fP pattern modifier. In this case, instead of showing the
-callout number, the offset in the pattern, preceded by a plus, is output. For
-example:
-.sp
- re> /\ed?[A-E]\e*/C
- data> E*
- --->E*
- +0 ^ \ed?
- +3 ^ [A-E]
- +8 ^^ \e*
- +10 ^ ^
- 0: E*
-.sp
-If a pattern contains (*MARK) items, an additional line is output whenever
-a change of latest mark is passed to the callout function. For example:
-.sp
- re> /a(*MARK:X)bc/C
- data> abc
- --->abc
- +0 ^ a
- +1 ^^ (*MARK:X)
- +10 ^^ b
- Latest Mark: X
- +11 ^ ^ c
- +12 ^ ^
- 0: abc
-.sp
-The mark changes between matching "a" and "b", but stays the same for the rest
-of the match, so nothing more is output. If, as a result of backtracking, the
-mark reverts to being unset, the text "<unset>" is output.
-.P
-The callout function in \fBpcretest\fP returns zero (carry on matching) by
-default, but you can use a \eC item in a data line (as described above) to
-change this and other parameters of the callout.
-.P
-Inserting callouts can be helpful when using \fBpcretest\fP to check
-complicated regular expressions. For further information about callouts, see
-the
-.\" HREF
-\fBpcrecallout\fP
-.\"
-documentation.
-.
-.
-.
-.SH "NON-PRINTING CHARACTERS"
-.rs
-.sp
-When \fBpcretest\fP is outputting text in the compiled version of a pattern,
-bytes other than 32-126 are always treated as non-printing characters are are
-therefore shown as hex escapes.
-.P
-When \fBpcretest\fP is outputting text that is a matched part of a subject
-string, it behaves in the same way, unless a different locale has been set for
-the pattern (using the \fB/L\fP modifier). In this case, the \fBisprint()\fP
-function to distinguish printing and non-printing characters.
-.
-.
-.
-.SH "SAVING AND RELOADING COMPILED PATTERNS"
-.rs
-.sp
-The facilities described in this section are not available when the POSIX
-interface to PCRE is being used, that is, when the \fB/P\fP pattern modifier is
-specified.
-.P
-When the POSIX interface is not in use, you can cause \fBpcretest\fP to write a
-compiled pattern to a file, by following the modifiers with > and a file name.
-For example:
-.sp
- /pattern/im >/some/file
-.sp
-See the
-.\" HREF
-\fBpcreprecompile\fP
-.\"
-documentation for a discussion about saving and re-using compiled patterns.
-Note that if the pattern was successfully studied with JIT optimization, the
-JIT data cannot be saved.
-.P
-The data that is written is binary. The first eight bytes are the length of the
-compiled pattern data followed by the length of the optional study data, each
-written as four bytes in big-endian order (most significant byte first). If
-there is no study data (either the pattern was not studied, or studying did not
-return any data), the second length is zero. The lengths are followed by an
-exact copy of the compiled pattern. If there is additional study data, this
-(excluding any JIT data) follows immediately after the compiled pattern. After
-writing the file, \fBpcretest\fP expects to read a new pattern.
-.P
-A saved pattern can be reloaded into \fBpcretest\fP by specifying < and a file
-name instead of a pattern. The name of the file must not contain a < character,
-as otherwise \fBpcretest\fP will interpret the line as a pattern delimited by <
-characters.
-For example:
-.sp
- re> </some/file
- Compiled pattern loaded from /some/file
- No study data
-.sp
-If the pattern was previously studied with the JIT optimization, the JIT
-information cannot be saved and restored, and so is lost. When the pattern has
-been loaded, \fBpcretest\fP proceeds to read data lines in the usual way.
-.P
-You can copy a file written by \fBpcretest\fP to a different host and reload it
-there, even if the new host has opposite endianness to the one on which the
-pattern was compiled. For example, you can compile on an i86 machine and run on
-a SPARC machine. When a pattern is reloaded on a host with different
-endianness, the confirmation message is changed to:
-.sp
- Compiled pattern (byte-inverted) loaded from /some/file
-.sp
-The test suite contains some saved pre-compiled patterns with different
-endianness. These are reloaded using "<!" instead of just "<". This suppresses
-the "(byte-inverted)" text so that the output is the same on all hosts. It also
-forces debugging output once the pattern has been reloaded.
-.P
-File names for saving and reloading can be absolute or relative, but note that
-the shell facility of expanding a file name that starts with a tilde (~) is not
-available.
-.P
-The ability to save and reload files in \fBpcretest\fP is intended for testing
-and experimentation. It is not intended for production use because only a
-single pattern can be written to a file. Furthermore, there is no facility for
-supplying custom character tables for use with a reloaded pattern. If the
-original pattern was compiled with custom tables, an attempt to match a subject
-string using a reloaded pattern is likely to cause \fBpcretest\fP to crash.
-Finally, if you attempt to load a file that is not in the correct format, the
-result is undefined.
-.
-.
-.SH "SEE ALSO"
-.rs
-.sp
-\fBpcre\fP(3), \fBpcre16\fP(3), \fBpcreapi\fP(3), \fBpcrecallout\fP(3),
-\fBpcrejit\fP, \fBpcrematching\fP(3), \fBpcrepartial\fP(d),
-\fBpcrepattern\fP(3), \fBpcreprecompile\fP(3).
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 14 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/pcretest.txt b/src/third_party/pcre-8.30/doc/pcretest.txt
deleted file mode 100644
index 853415b9af4..00000000000
--- a/src/third_party/pcre-8.30/doc/pcretest.txt
+++ /dev/null
@@ -1,873 +0,0 @@
-PCRETEST(1) PCRETEST(1)
-
-
-NAME
- pcretest - a program for testing Perl-compatible regular expressions.
-
-
-SYNOPSIS
-
- pcretest [options] [input file [output file]]
-
- pcretest was written as a test program for the PCRE regular expression
- library itself, but it can also be used for experimenting with regular
- expressions. This document describes the features of the test program;
- for details of the regular expressions themselves, see the pcrepattern
- documentation. For details of the PCRE library function calls and their
- options, see the pcreapi and pcre16 documentation. The input for
- pcretest is a sequence of regular expression patterns and strings to be
- matched, as described below. The output shows the result of each match.
- Options on the command line and the patterns control PCRE options and
- exactly what is output.
-
-
-PCRE's 8-BIT and 16-BIT LIBRARIES
-
- From release 8.30, two separate PCRE libraries can be built. The origi-
- nal one supports 8-bit character strings, whereas the newer 16-bit
- library supports character strings encoded in 16-bit units. The
- pcretest program can be used to test both libraries. However, it is
- itself still an 8-bit program, reading 8-bit input and writing 8-bit
- output. When testing the 16-bit library, the patterns and data strings
- are converted to 16-bit format before being passed to the PCRE library
- functions. Results are converted to 8-bit for output.
-
- References to functions and structures of the form pcre[16]_xx below
- mean "pcre_xx when using the 8-bit library or pcre16_xx when using the
- 16-bit library".
-
-
-COMMAND LINE OPTIONS
-
- -16 If both the 8-bit and the 16-bit libraries have been built,
- this option causes the 16-bit library to be used. If only the
- 16-bit library has been built, this is the default (so has no
- effect). If only the 8-bit library has been built, this
- option causes an error.
-
- -b Behave as if each pattern has the /B (show byte code) modi-
- fier; the internal form is output after compilation.
-
- -C Output the version number of the PCRE library, and all avail-
- able information about the optional features that are
- included, and then exit. All other options are ignored.
-
- -C option Output information about a specific build-time option, then
- exit. This functionality is intended for use in scripts such
- as RunTest. The following options output the value indicated:
-
- linksize the internal link size (2, 3, or 4)
- newline the default newline setting:
- CR, LF, CRLF, ANYCRLF, or ANY
-
- The following options output 1 for true or zero for false:
-
- jit just-in-time support is available
- pcre16 the 16-bit library was built
- pcre8 the 8-bit library was built
- ucp Unicode property support is available
- utf UTF-8 and/or UTF-16 support is available
-
- -d Behave as if each pattern has the /D (debug) modifier; the
- internal form and information about the compiled pattern is
- output after compilation; -d is equivalent to -b -i.
-
- -dfa Behave as if each data line contains the \D escape sequence;
- this causes the alternative matching function,
- pcre[16]_dfa_exec(), to be used instead of the standard
- pcre[16]_exec() function (more detail is given below).
-
- -help Output a brief summary these options and then exit.
-
- -i Behave as if each pattern has the /I modifier; information
- about the compiled pattern is given after compilation.
-
- -M Behave as if each data line contains the \M escape sequence;
- this causes PCRE to discover the minimum MATCH_LIMIT and
- MATCH_LIMIT_RECURSION settings by calling pcre[16]_exec()
- repeatedly with different limits.
-
- -m Output the size of each compiled pattern after it has been
- compiled. This is equivalent to adding /M to each regular
- expression. The size is given in bytes for both libraries.
-
- -o osize Set the number of elements in the output vector that is used
- when calling pcre[16]_exec() or pcre[16]_dfa_exec() to be
- osize. The default value is 45, which is enough for 14 cap-
- turing subexpressions for pcre[16]_exec() or 22 different
- matches for pcre[16]_dfa_exec(). The vector size can be
- changed for individual matching calls by including \O in the
- data line (see below).
-
- -p Behave as if each pattern has the /P modifier; the POSIX
- wrapper API is used to call PCRE. None of the other options
- has any effect when -p is set. This option can be used only
- with the 8-bit library.
-
- -q Do not output the version number of pcretest at the start of
- execution.
-
- -S size On Unix-like systems, set the size of the run-time stack to
- size megabytes.
-
- -s or -s+ Behave as if each pattern has the /S modifier; in other
- words, force each pattern to be studied. If -s+ is used, the
- PCRE_STUDY_JIT_COMPILE flag is passed to pcre[16]_study(),
- causing just-in-time optimization to be set up if it is
- available. If the /I or /D option is present on a pattern
- (requesting output about the compiled pattern), information
- about the result of studying is not included when studying is
- caused only by -s and neither -i nor -d is present on the
- command line. This behaviour means that the output from tests
- that are run with and without -s should be identical, except
- when options that output information about the actual running
- of a match are set.
-
- The -M, -t, and -tm options, which give information about
- resources used, are likely to produce different output with
- and without -s. Output may also differ if the /C option is
- present on an individual pattern. This uses callouts to trace
- the the matching process, and this may be different between
- studied and non-studied patterns. If the pattern contains
- (*MARK) items there may also be differences, for the same
- reason. The -s command line option can be overridden for spe-
- cific patterns that should never be studied (see the /S pat-
- tern modifier below).
-
- -t Run each compile, study, and match many times with a timer,
- and output resulting time per compile or match (in millisec-
- onds). Do not set -m with -t, because you will then get the
- size output a zillion times, and the timing will be dis-
- torted. You can control the number of iterations that are
- used for timing by following -t with a number (as a separate
- item on the command line). For example, "-t 1000" would iter-
- ate 1000 times. The default is to iterate 500000 times.
-
- -tm This is like -t except that it times only the matching phase,
- not the compile or study phases.
-
-
-DESCRIPTION
-
- If pcretest is given two filename arguments, it reads from the first
- and writes to the second. If it is given only one filename argument, it
- reads from that file and writes to stdout. Otherwise, it reads from
- stdin and writes to stdout, and prompts for each line of input, using
- "re>" to prompt for regular expressions, and "data>" to prompt for data
- lines.
-
- When pcretest is built, a configuration option can specify that it
- should be linked with the libreadline library. When this is done, if
- the input is from a terminal, it is read using the readline() function.
- This provides line-editing and history facilities. The output from the
- -help option states whether or not readline() will be used.
-
- The program handles any number of sets of input on a single input file.
- Each set starts with a regular expression, and continues with any num-
- ber of data lines to be matched against the pattern.
-
- Each data line is matched separately and independently. If you want to
- do multi-line matches, you have to use the \n escape sequence (or \r or
- \r\n, etc., depending on the newline setting) in a single line of input
- to encode the newline sequences. There is no limit on the length of
- data lines; the input buffer is automatically extended if it is too
- small.
-
- An empty line signals the end of the data lines, at which point a new
- regular expression is read. The regular expressions are given enclosed
- in any non-alphanumeric delimiters other than backslash, for example:
-
- /(a|bc)x+yz/
-
- White space before the initial delimiter is ignored. A regular expres-
- sion may be continued over several input lines, in which case the new-
- line characters are included within it. It is possible to include the
- delimiter within the pattern by escaping it, for example
-
- /abc\/def/
-
- If you do so, the escape and the delimiter form part of the pattern,
- but since delimiters are always non-alphanumeric, this does not affect
- its interpretation. If the terminating delimiter is immediately fol-
- lowed by a backslash, for example,
-
- /abc/\
-
- then a backslash is added to the end of the pattern. This is done to
- provide a way of testing the error condition that arises if a pattern
- finishes with a backslash, because
-
- /abc\/
-
- is interpreted as the first line of a pattern that starts with "abc/",
- causing pcretest to read the next line as a continuation of the regular
- expression.
-
-
-PATTERN MODIFIERS
-
- A pattern may be followed by any number of modifiers, which are mostly
- single characters. Following Perl usage, these are referred to below
- as, for example, "the /i modifier", even though the delimiter of the
- pattern need not always be a slash, and no slash is used when writing
- modifiers. White space may appear between the final pattern delimiter
- and the first modifier, and between the modifiers themselves.
-
- The /i, /m, /s, and /x modifiers set the PCRE_CASELESS, PCRE_MULTILINE,
- PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when pcre[16]_com-
- pile() is called. These four modifier letters have the same effect as
- they do in Perl. For example:
-
- /caseless/i
-
- The following table shows additional modifiers for setting PCRE com-
- pile-time options that do not correspond to anything in Perl:
-
- /8 PCRE_UTF8 ) when using the 8-bit
- /? PCRE_NO_UTF8_CHECK ) library
-
- /8 PCRE_UTF16 ) when using the 16-bit
- /? PCRE_NO_UTF16_CHECK ) library
-
- /A PCRE_ANCHORED
- /C PCRE_AUTO_CALLOUT
- /E PCRE_DOLLAR_ENDONLY
- /f PCRE_FIRSTLINE
- /J PCRE_DUPNAMES
- /N PCRE_NO_AUTO_CAPTURE
- /U PCRE_UNGREEDY
- /W PCRE_UCP
- /X PCRE_EXTRA
- /Y PCRE_NO_START_OPTIMIZE
- /<JS> PCRE_JAVASCRIPT_COMPAT
- /<cr> PCRE_NEWLINE_CR
- /<lf> PCRE_NEWLINE_LF
- /<crlf> PCRE_NEWLINE_CRLF
- /<anycrlf> PCRE_NEWLINE_ANYCRLF
- /<any> PCRE_NEWLINE_ANY
- /<bsr_anycrlf> PCRE_BSR_ANYCRLF
- /<bsr_unicode> PCRE_BSR_UNICODE
-
- The modifiers that are enclosed in angle brackets are literal strings
- as shown, including the angle brackets, but the letters within can be
- in either case. This example sets multiline matching with CRLF as the
- line ending sequence:
-
- /^abc/m<CRLF>
-
- As well as turning on the PCRE_UTF8/16 option, the /8 modifier causes
- all non-printing characters in output strings to be printed using the
- \x{hh...} notation. Otherwise, those less than 0x100 are output in hex
- without the curly brackets.
-
- Full details of the PCRE options are given in the pcreapi documenta-
- tion.
-
- Finding all matches in a string
-
- Searching for all possible matches within each subject string can be
- requested by the /g or /G modifier. After finding a match, PCRE is
- called again to search the remainder of the subject string. The differ-
- ence between /g and /G is that the former uses the startoffset argument
- to pcre[16]_exec() to start searching at a new point within the entire
- string (which is in effect what Perl does), whereas the latter passes
- over a shortened substring. This makes a difference to the matching
- process if the pattern begins with a lookbehind assertion (including \b
- or \B).
-
- If any call to pcre[16]_exec() in a /g or /G sequence matches an empty
- string, the next call is done with the PCRE_NOTEMPTY_ATSTART and
- PCRE_ANCHORED flags set in order to search for another, non-empty,
- match at the same point. If this second match fails, the start offset
- is advanced, and the normal match is retried. This imitates the way
- Perl handles such cases when using the /g modifier or the split() func-
- tion. Normally, the start offset is advanced by one character, but if
- the newline convention recognizes CRLF as a newline, and the current
- character is CR followed by LF, an advance of two is used.
-
- Other modifiers
-
- There are yet more modifiers for controlling the way pcretest operates.
-
- The /+ modifier requests that as well as outputting the substring that
- matched the entire pattern, pcretest should in addition output the
- remainder of the subject string. This is useful for tests where the
- subject contains multiple copies of the same substring. If the + modi-
- fier appears twice, the same action is taken for captured substrings.
- In each case the remainder is output on the following line with a plus
- character following the capture number. Note that this modifier must
- not immediately follow the /S modifier because /S+ has another meaning.
-
- The /= modifier requests that the values of all potential captured
- parentheses be output after a match. By default, only those up to the
- highest one actually used in the match are output (corresponding to the
- return code from pcre[16]_exec()). Values in the offsets vector corre-
- sponding to higher numbers should be set to -1, and these are output as
- "<unset>". This modifier gives a way of checking that this is happen-
- ing.
-
- The /B modifier is a debugging feature. It requests that pcretest out-
- put a representation of the compiled code after compilation. Normally
- this information contains length and offset values; however, if /Z is
- also present, this data is replaced by spaces. This is a special fea-
- ture for use in the automatic test scripts; it ensures that the same
- output is generated for different internal link sizes.
-
- The /D modifier is a PCRE debugging feature, and is equivalent to /BI,
- that is, both the /B and the /I modifiers.
-
- The /F modifier causes pcretest to flip the byte order of the 2-byte
- and 4-byte fields in the compiled pattern. This facility is for testing
- the feature in PCRE that allows it to execute patterns that were com-
- piled on a host with a different endianness. This feature is not avail-
- able when the POSIX interface to PCRE is being used, that is, when the
- /P pattern modifier is specified. See also the section about saving and
- reloading compiled patterns below.
-
- The /I modifier requests that pcretest output information about the
- compiled pattern (whether it is anchored, has a fixed first character,
- and so on). It does this by calling pcre[16]_fullinfo() after compiling
- a pattern. If the pattern is studied, the results of that are also out-
- put.
-
- The /K modifier requests pcretest to show names from backtracking con-
- trol verbs that are returned from calls to pcre[16]_exec(). It causes
- pcretest to create a pcre[16]_extra block if one has not already been
- created by a call to pcre[16]_study(), and to set the PCRE_EXTRA_MARK
- flag and the mark field within it, every time that pcre[16]_exec() is
- called. If the variable that the mark field points to is non-NULL for a
- match, non-match, or partial match, pcretest prints the string to which
- it points. For a match, this is shown on a line by itself, tagged with
- "MK:". For a non-match it is added to the message.
-
- The /L modifier must be followed directly by the name of a locale, for
- example,
-
- /pattern/Lfr_FR
-
- For this reason, it must be the last modifier. The given locale is set,
- pcre[16]_maketables() is called to build a set of character tables for
- the locale, and this is then passed to pcre[16]_compile() when compil-
- ing the regular expression. Without an /L (or /T) modifier, NULL is
- passed as the tables pointer; that is, /L applies only to the expres-
- sion on which it appears.
-
- The /M modifier causes the size in bytes of the memory block used to
- hold the compiled pattern to be output. This does not include the size
- of the pcre[16] block; it is just the actual compiled data. If the pat-
- tern is successfully studied with the PCRE_STUDY_JIT_COMPILE option,
- the size of the JIT compiled code is also output.
-
- If the /S modifier appears once, it causes pcre[16]_study() to be
- called after the expression has been compiled, and the results used
- when the expression is matched. If /S appears twice, it suppresses
- studying, even if it was requested externally by the -s command line
- option. This makes it possible to specify that certain patterns are
- always studied, and others are never studied, independently of -s. This
- feature is used in the test files in a few cases where the output is
- different when the pattern is studied.
-
- If the /S modifier is immediately followed by a + character, the call
- to pcre[16]_study() is made with the PCRE_STUDY_JIT_COMPILE option,
- requesting just-in-time optimization support if it is available. Note
- that there is also a /+ modifier; it must not be given immediately
- after /S because this will be misinterpreted. If JIT studying is suc-
- cessful, it will automatically be used when pcre[16]_exec() is run,
- except when incompatible run-time options are specified. These include
- the partial matching options; a complete list is given in the pcrejit
- documentation. See also the \J escape sequence below for a way of set-
- ting the size of the JIT stack.
-
- The /T modifier must be followed by a single digit. It causes a spe-
- cific set of built-in character tables to be passed to pcre[16]_com-
- pile(). It is used in the standard PCRE tests to check behaviour with
- different character tables. The digit specifies the tables as follows:
-
- 0 the default ASCII tables, as distributed in
- pcre_chartables.c.dist
- 1 a set of tables defining ISO 8859 characters
-
- In table 1, some characters whose codes are greater than 128 are iden-
- tified as letters, digits, spaces, etc.
-
- Using the POSIX wrapper API
-
- The /P modifier causes pcretest to call PCRE via the POSIX wrapper API
- rather than its native API. This supports only the 8-bit library. When
- /P is set, the following modifiers set options for the regcomp() func-
- tion:
-
- /i REG_ICASE
- /m REG_NEWLINE
- /N REG_NOSUB
- /s REG_DOTALL )
- /U REG_UNGREEDY ) These options are not part of
- /W REG_UCP ) the POSIX standard
- /8 REG_UTF8 )
-
- The /+ modifier works as described above. All other modifiers are
- ignored.
-
-
-DATA LINES
-
- Before each data line is passed to pcre[16]_exec(), leading and trail-
- ing white space is removed, and it is then scanned for \ escapes. Some
- of these are pretty esoteric features, intended for checking out some
- of the more complicated features of PCRE. If you are just testing
- "ordinary" regular expressions, you probably don't need any of these.
- The following escapes are recognized:
-
- \a alarm (BEL, \x07)
- \b backspace (\x08)
- \e escape (\x27)
- \f form feed (\x0c)
- \n newline (\x0a)
- \qdd set the PCRE_MATCH_LIMIT limit to dd
- (any number of digits)
- \r carriage return (\x0d)
- \t tab (\x09)
- \v vertical tab (\x0b)
- \nnn octal character (up to 3 octal digits); always
- a byte unless > 255 in UTF-8 or 16-bit mode
- \xhh hexadecimal byte (up to 2 hex digits)
- \x{hh...} hexadecimal character (any number of hex digits)
- \A pass the PCRE_ANCHORED option to pcre[16]_exec()
- or pcre[16]_dfa_exec()
- \B pass the PCRE_NOTBOL option to pcre[16]_exec()
- or pcre[16]_dfa_exec()
- \Cdd call pcre[16]_copy_substring() for substring dd
- after a successful match (number less than 32)
- \Cname call pcre[16]_copy_named_substring() for substring
- "name" after a successful match (name termin-
- ated by next non alphanumeric character)
- \C+ show the current captured substrings at callout
- time
- \C- do not supply a callout function
- \C!n return 1 instead of 0 when callout number n is
- reached
- \C!n!m return 1 instead of 0 when callout number n is
- reached for the nth time
- \C*n pass the number n (may be negative) as callout
- data; this is used as the callout return value
- \D use the pcre[16]_dfa_exec() match function
- \F only shortest match for pcre[16]_dfa_exec()
- \Gdd call pcre[16]_get_substring() for substring dd
- after a successful match (number less than 32)
- \Gname call pcre[16]_get_named_substring() for substring
- "name" after a successful match (name termin-
- ated by next non-alphanumeric character)
- \Jdd set up a JIT stack of dd kilobytes maximum (any
- number of digits)
- \L call pcre[16]_get_substringlist() after a
- successful match
- \M discover the minimum MATCH_LIMIT and
- MATCH_LIMIT_RECURSION settings
- \N pass the PCRE_NOTEMPTY option to pcre[16]_exec()
- or pcre[16]_dfa_exec(); if used twice, pass the
- PCRE_NOTEMPTY_ATSTART option
- \Odd set the size of the output vector passed to
- pcre[16]_exec() to dd (any number of digits)
- \P pass the PCRE_PARTIAL_SOFT option to pcre[16]_exec()
- or pcre[16]_dfa_exec(); if used twice, pass the
- PCRE_PARTIAL_HARD option
- \Qdd set the PCRE_MATCH_LIMIT_RECURSION limit to dd
- (any number of digits)
- \R pass the PCRE_DFA_RESTART option to pcre[16]_dfa_exec()
- \S output details of memory get/free calls during matching
- \Y pass the PCRE_NO_START_OPTIMIZE option to pcre[16]_exec()
- or pcre[16]_dfa_exec()
- \Z pass the PCRE_NOTEOL option to pcre[16]_exec()
- or pcre[16]_dfa_exec()
- \? pass the PCRE_NO_UTF[8|16]_CHECK option to
- pcre[16]_exec() or pcre[16]_dfa_exec()
- \>dd start the match at offset dd (optional "-"; then
- any number of digits); this sets the startoffset
- argument for pcre[16]_exec() or pcre[16]_dfa_exec()
- \<cr> pass the PCRE_NEWLINE_CR option to pcre[16]_exec()
- or pcre[16]_dfa_exec()
- \<lf> pass the PCRE_NEWLINE_LF option to pcre[16]_exec()
- or pcre[16]_dfa_exec()
- \<crlf> pass the PCRE_NEWLINE_CRLF option to pcre[16]_exec()
- or pcre[16]_dfa_exec()
- \<anycrlf> pass the PCRE_NEWLINE_ANYCRLF option to pcre[16]_exec()
- or pcre[16]_dfa_exec()
- \<any> pass the PCRE_NEWLINE_ANY option to pcre[16]_exec()
- or pcre[16]_dfa_exec()
-
- The use of \x{hh...} is not dependent on the use of the /8 modifier on
- the pattern. It is recognized always. There may be any number of hexa-
- decimal digits inside the braces; invalid values provoke error mes-
- sages.
-
- Note that \xhh specifies one byte rather than one character in UTF-8
- mode; this makes it possible to construct invalid UTF-8 sequences for
- testing purposes. On the other hand, \x{hh} is interpreted as a UTF-8
- character in UTF-8 mode, generating more than one byte if the value is
- greater than 127. When testing the 8-bit library not in UTF-8 mode,
- \x{hh} generates one byte for values less than 256, and causes an error
- for greater values.
-
- In UTF-16 mode, all 4-digit \x{hhhh} values are accepted. This makes it
- possible to construct invalid UTF-16 sequences for testing purposes.
-
- The escapes that specify line ending sequences are literal strings,
- exactly as shown. No more than one newline setting should be present in
- any data line.
-
- A backslash followed by anything else just escapes the anything else.
- If the very last character is a backslash, it is ignored. This gives a
- way of passing an empty line as data, since a real empty line termi-
- nates the data input.
-
- The \J escape provides a way of setting the maximum stack size that is
- used by the just-in-time optimization code. It is ignored if JIT opti-
- mization is not being used. Providing a stack that is larger than the
- default 32K is necessary only for very complicated patterns.
-
- If \M is present, pcretest calls pcre[16]_exec() several times, with
- different values in the match_limit and match_limit_recursion fields of
- the pcre[16]_extra data structure, until it finds the minimum numbers
- for each parameter that allow pcre[16]_exec() to complete without
- error. Because this is testing a specific feature of the normal inter-
- pretive pcre[16]_exec() execution, the use of any JIT optimization that
- might have been set up by the /S+ qualifier of -s+ option is disabled.
-
- The match_limit number is a measure of the amount of backtracking that
- takes place, and checking it out can be instructive. For most simple
- matches, the number is quite small, but for patterns with very large
- numbers of matching possibilities, it can become large very quickly
- with increasing length of subject string. The match_limit_recursion
- number is a measure of how much stack (or, if PCRE is compiled with
- NO_RECURSE, how much heap) memory is needed to complete the match
- attempt.
-
- When \O is used, the value specified may be higher or lower than the
- size set by the -O command line option (or defaulted to 45); \O applies
- only to the call of pcre[16]_exec() for the line in which it appears.
-
- If the /P modifier was present on the pattern, causing the POSIX wrap-
- per API to be used, the only option-setting sequences that have any
- effect are \B, \N, and \Z, causing REG_NOTBOL, REG_NOTEMPTY, and
- REG_NOTEOL, respectively, to be passed to regexec().
-
-
-THE ALTERNATIVE MATCHING FUNCTION
-
- By default, pcretest uses the standard PCRE matching function,
- pcre[16]_exec() to match each data line. PCRE also supports an alterna-
- tive matching function, pcre[16]_dfa_test(), which operates in a dif-
- ferent way, and has some restrictions. The differences between the two
- functions are described in the pcrematching documentation.
-
- If a data line contains the \D escape sequence, or if the command line
- contains the -dfa option, the alternative matching function is used.
- This function finds all possible matches at a given point. If, however,
- the \F escape sequence is present in the data line, it stops after the
- first match is found. This is always the shortest possible match.
-
-
-DEFAULT OUTPUT FROM PCRETEST
-
- This section describes the output when the normal matching function,
- pcre[16]_exec(), is being used.
-
- When a match succeeds, pcretest outputs the list of captured substrings
- that pcre[16]_exec() returns, starting with number 0 for the string
- that matched the whole pattern. Otherwise, it outputs "No match" when
- the return is PCRE_ERROR_NOMATCH, and "Partial match:" followed by the
- partially matching substring when pcre[16]_exec() returns
- PCRE_ERROR_PARTIAL. (Note that this is the entire substring that was
- inspected during the partial match; it may include characters before
- the actual match start if a lookbehind assertion, \K, \b, or \B was
- involved.) For any other return, pcretest outputs the PCRE negative
- error number and a short descriptive phrase. If the error is a failed
- UTF string check, the offset of the start of the failing character and
- the reason code are also output, provided that the size of the output
- vector is at least two. Here is an example of an interactive pcretest
- run.
-
- $ pcretest
- PCRE version 8.13 2011-04-30
-
- re> /^abc(\d+)/
- data> abc123
- 0: abc123
- 1: 123
- data> xyz
- No match
-
- Unset capturing substrings that are not followed by one that is set are
- not returned by pcre[16]_exec(), and are not shown by pcretest. In the
- following example, there are two capturing substrings, but when the
- first data line is matched, the second, unset substring is not shown.
- An "internal" unset substring is shown as "<unset>", as for the second
- data line.
-
- re> /(a)|(b)/
- data> a
- 0: a
- 1: a
- data> b
- 0: b
- 1: <unset>
- 2: b
-
- If the strings contain any non-printing characters, they are output as
- \xhh escapes if the value is less than 256 and UTF mode is not set.
- Otherwise they are output as \x{hh...} escapes. See below for the defi-
- nition of non-printing characters. If the pattern has the /+ modifier,
- the output for substring 0 is followed by the the rest of the subject
- string, identified by "0+" like this:
-
- re> /cat/+
- data> cataract
- 0: cat
- 0+ aract
-
- If the pattern has the /g or /G modifier, the results of successive
- matching attempts are output in sequence, like this:
-
- re> /\Bi(\w\w)/g
- data> Mississippi
- 0: iss
- 1: ss
- 0: iss
- 1: ss
- 0: ipp
- 1: pp
-
- "No match" is output only if the first match attempt fails. Here is an
- example of a failure message (the offset 4 that is specified by \>4 is
- past the end of the subject string):
-
- re> /xyz/
- data> xyz\>4
- Error -24 (bad offset value)
-
- If any of the sequences \C, \G, or \L are present in a data line that
- is successfully matched, the substrings extracted by the convenience
- functions are output with C, G, or L after the string number instead of
- a colon. This is in addition to the normal full list. The string length
- (that is, the return from the extraction function) is given in paren-
- theses after each string for \C and \G.
-
- Note that whereas patterns can be continued over several lines (a plain
- ">" prompt is used for continuations), data lines may not. However new-
- lines can be included in data by means of the \n escape (or \r, \r\n,
- etc., depending on the newline sequence setting).
-
-
-OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION
-
- When the alternative matching function, pcre[16]_dfa_exec(), is used
- (by means of the \D escape sequence or the -dfa command line option),
- the output consists of a list of all the matches that start at the
- first point in the subject where there is at least one match. For exam-
- ple:
-
- re> /(tang|tangerine|tan)/
- data> yellow tangerine\D
- 0: tangerine
- 1: tang
- 2: tan
-
- (Using the normal matching function on this data finds only "tang".)
- The longest matching string is always given first (and numbered zero).
- After a PCRE_ERROR_PARTIAL return, the output is "Partial match:", fol-
- lowed by the partially matching substring. (Note that this is the
- entire substring that was inspected during the partial match; it may
- include characters before the actual match start if a lookbehind asser-
- tion, \K, \b, or \B was involved.)
-
- If /g is present on the pattern, the search for further matches resumes
- at the end of the longest match. For example:
-
- re> /(tang|tangerine|tan)/g
- data> yellow tangerine and tangy sultana\D
- 0: tangerine
- 1: tang
- 2: tan
- 0: tang
- 1: tan
- 0: tan
-
- Since the matching function does not support substring capture, the
- escape sequences that are concerned with captured substrings are not
- relevant.
-
-
-RESTARTING AFTER A PARTIAL MATCH
-
- When the alternative matching function has given the PCRE_ERROR_PARTIAL
- return, indicating that the subject partially matched the pattern, you
- can restart the match with additional subject data by means of the \R
- escape sequence. For example:
-
- re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
- data> 23ja\P\D
- Partial match: 23ja
- data> n05\R\D
- 0: n05
-
- For further information about partial matching, see the pcrepartial
- documentation.
-
-
-CALLOUTS
-
- If the pattern contains any callout requests, pcretest's callout func-
- tion is called during matching. This works with both matching func-
- tions. By default, the called function displays the callout number, the
- start and current positions in the text at the callout time, and the
- next pattern item to be tested. For example:
-
- --->pqrabcdef
- 0 ^ ^ \d
-
- This output indicates that callout number 0 occurred for a match
- attempt starting at the fourth character of the subject string, when
- the pointer was at the seventh character of the data, and when the next
- pattern item was \d. Just one circumflex is output if the start and
- current positions are the same.
-
- Callouts numbered 255 are assumed to be automatic callouts, inserted as
- a result of the /C pattern modifier. In this case, instead of showing
- the callout number, the offset in the pattern, preceded by a plus, is
- output. For example:
-
- re> /\d?[A-E]\*/C
- data> E*
- --->E*
- +0 ^ \d?
- +3 ^ [A-E]
- +8 ^^ \*
- +10 ^ ^
- 0: E*
-
- If a pattern contains (*MARK) items, an additional line is output when-
- ever a change of latest mark is passed to the callout function. For
- example:
-
- re> /a(*MARK:X)bc/C
- data> abc
- --->abc
- +0 ^ a
- +1 ^^ (*MARK:X)
- +10 ^^ b
- Latest Mark: X
- +11 ^ ^ c
- +12 ^ ^
- 0: abc
-
- The mark changes between matching "a" and "b", but stays the same for
- the rest of the match, so nothing more is output. If, as a result of
- backtracking, the mark reverts to being unset, the text "<unset>" is
- output.
-
- The callout function in pcretest returns zero (carry on matching) by
- default, but you can use a \C item in a data line (as described above)
- to change this and other parameters of the callout.
-
- Inserting callouts can be helpful when using pcretest to check compli-
- cated regular expressions. For further information about callouts, see
- the pcrecallout documentation.
-
-
-NON-PRINTING CHARACTERS
-
- When pcretest is outputting text in the compiled version of a pattern,
- bytes other than 32-126 are always treated as non-printing characters
- are are therefore shown as hex escapes.
-
- When pcretest is outputting text that is a matched part of a subject
- string, it behaves in the same way, unless a different locale has been
- set for the pattern (using the /L modifier). In this case, the
- isprint() function to distinguish printing and non-printing characters.
-
-
-SAVING AND RELOADING COMPILED PATTERNS
-
- The facilities described in this section are not available when the
- POSIX interface to PCRE is being used, that is, when the /P pattern
- modifier is specified.
-
- When the POSIX interface is not in use, you can cause pcretest to write
- a compiled pattern to a file, by following the modifiers with > and a
- file name. For example:
-
- /pattern/im >/some/file
-
- See the pcreprecompile documentation for a discussion about saving and
- re-using compiled patterns. Note that if the pattern was successfully
- studied with JIT optimization, the JIT data cannot be saved.
-
- The data that is written is binary. The first eight bytes are the
- length of the compiled pattern data followed by the length of the
- optional study data, each written as four bytes in big-endian order
- (most significant byte first). If there is no study data (either the
- pattern was not studied, or studying did not return any data), the sec-
- ond length is zero. The lengths are followed by an exact copy of the
- compiled pattern. If there is additional study data, this (excluding
- any JIT data) follows immediately after the compiled pattern. After
- writing the file, pcretest expects to read a new pattern.
-
- A saved pattern can be reloaded into pcretest by specifying < and a
- file name instead of a pattern. The name of the file must not contain a
- < character, as otherwise pcretest will interpret the line as a pattern
- delimited by < characters. For example:
-
- re> </some/file
- Compiled pattern loaded from /some/file
- No study data
-
- If the pattern was previously studied with the JIT optimization, the
- JIT information cannot be saved and restored, and so is lost. When the
- pattern has been loaded, pcretest proceeds to read data lines in the
- usual way.
-
- You can copy a file written by pcretest to a different host and reload
- it there, even if the new host has opposite endianness to the one on
- which the pattern was compiled. For example, you can compile on an i86
- machine and run on a SPARC machine. When a pattern is reloaded on a
- host with different endianness, the confirmation message is changed to:
-
- Compiled pattern (byte-inverted) loaded from /some/file
-
- The test suite contains some saved pre-compiled patterns with different
- endianness. These are reloaded using "<!" instead of just "<". This
- suppresses the "(byte-inverted)" text so that the output is the same on
- all hosts. It also forces debugging output once the pattern has been
- reloaded.
-
- File names for saving and reloading can be absolute or relative, but
- note that the shell facility of expanding a file name that starts with
- a tilde (~) is not available.
-
- The ability to save and reload files in pcretest is intended for test-
- ing and experimentation. It is not intended for production use because
- only a single pattern can be written to a file. Furthermore, there is
- no facility for supplying custom character tables for use with a
- reloaded pattern. If the original pattern was compiled with custom
- tables, an attempt to match a subject string using a reloaded pattern
- is likely to cause pcretest to crash. Finally, if you attempt to load
- a file that is not in the correct format, the result is undefined.
-
-
-SEE ALSO
-
- pcre(3), pcre16(3), pcreapi(3), pcrecallout(3), pcrejit, pcrematch-
- ing(3), pcrepartial(d), pcrepattern(3), pcreprecompile(3).
-
-
-AUTHOR
-
- Philip Hazel
- University Computing Service
- Cambridge CB2 3QH, England.
-
-
-REVISION
-
- Last updated: 14 January 2012
- Copyright (c) 1997-2012 University of Cambridge.
diff --git a/src/third_party/pcre-8.30/doc/pcreunicode.3 b/src/third_party/pcre-8.30/doc/pcreunicode.3
deleted file mode 100644
index 0f51d03dc48..00000000000
--- a/src/third_party/pcre-8.30/doc/pcreunicode.3
+++ /dev/null
@@ -1,222 +0,0 @@
-.TH PCREUNICODE 3
-.SH NAME
-PCRE - Perl-compatible regular expressions
-.SH "UTF-8, UTF-16, AND UNICODE PROPERTY SUPPORT"
-.rs
-.sp
-From Release 8.30, in addition to its previous UTF-8 support, PCRE also
-supports UTF-16 by means of a separate 16-bit library. This can be built as
-well as, or instead of, the 8-bit library.
-.
-.
-.SH "UTF-8 SUPPORT"
-.rs
-.sp
-In order process UTF-8 strings, you must build PCRE's 8-bit library with UTF
-support, and, in addition, you must call
-.\" HREF
-\fBpcre_compile()\fP
-.\"
-with the PCRE_UTF8 option flag, or the pattern must start with the sequence
-(*UTF8). When either of these is the case, both the pattern and any subject
-strings that are matched against it are treated as UTF-8 strings instead of
-strings of 1-byte characters.
-.
-.
-.SH "UTF-16 SUPPORT"
-.rs
-.sp
-In order process UTF-16 strings, you must build PCRE's 16-bit library with UTF
-support, and, in addition, you must call
-.\" HTML <a href="pcre_compile.html">
-.\" </a>
-\fBpcre16_compile()\fP
-.\"
-with the PCRE_UTF16 option flag, or the pattern must start with the sequence
-(*UTF16). When either of these is the case, both the pattern and any subject
-strings that are matched against it are treated as UTF-16 strings instead of
-strings of 16-bit characters.
-.
-.
-.SH "UTF SUPPORT OVERHEAD"
-.rs
-.sp
-If you compile PCRE with UTF support, but do not use it at run time, the
-library will be a bit bigger, but the additional run time overhead is limited
-to testing the PCRE_UTF8/16 flag occasionally, so should not be very big.
-.
-.
-.SH "UNICODE PROPERTY SUPPORT"
-.rs
-.sp
-If PCRE is built with Unicode character property support (which implies UTF
-support), the escape sequences \ep{..}, \eP{..}, and \eX can be used.
-The available properties that can be tested are limited to the general
-category properties such as Lu for an upper case letter or Nd for a decimal
-number, the Unicode script names such as Arabic or Han, and the derived
-properties Any and L&. A full list is given in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation. Only the short names for properties are supported. For example,
-\ep{L} matches a letter. Its Perl synonym, \ep{Letter}, is not supported.
-Furthermore, in Perl, many properties may optionally be prefixed by "Is", for
-compatibility with Perl 5.6. PCRE does not support this.
-.
-.
-.\" HTML <a name="utf8strings"></a>
-.SS "Validity of UTF-8 strings"
-.rs
-.sp
-When you set the PCRE_UTF8 flag, the byte strings passed as patterns and
-subjects are (by default) checked for validity on entry to the relevant
-functions. From release 7.3 of PCRE, the check is according the rules of RFC
-3629, which are themselves derived from the Unicode specification. Earlier
-releases of PCRE followed the rules of RFC 2279, which allows the full range of
-31-bit values (0 to 0x7FFFFFFF). The current check allows only values in the
-range U+0 to U+10FFFF, excluding U+D800 to U+DFFF.
-.P
-The excluded code points are the "Surrogate Area" of Unicode. They are reserved
-for use by UTF-16, where they are used in pairs to encode codepoints with
-values greater than 0xFFFF. The code points that are encoded by UTF-16 pairs
-are available independently in the UTF-8 encoding. (In other words, the whole
-surrogate thing is a fudge for UTF-16 which unfortunately messes up UTF-8.)
-.P
-If an invalid UTF-8 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first byte
-of the failing character. The runtime functions \fBpcre_exec()\fP and
-\fBpcre_dfa_exec()\fP also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-.P
-In some situations, you may already know that your strings are valid, and
-therefore want to skip these checks in order to improve performance. If you set
-the PCRE_NO_UTF8_CHECK flag at compile time or at run time, PCRE assumes that
-the pattern or subject it is given (respectively) contains only valid UTF-8
-codes. In this case, it does not diagnose an invalid UTF-8 string.
-.P
-If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set, what
-happens depends on why the string is invalid. If the string conforms to the
-"old" definition of UTF-8 (RFC 2279), it is processed as a string of characters
-in the range 0 to 0x7FFFFFFF by \fBpcre_dfa_exec()\fP and the interpreted
-version of \fBpcre_exec()\fP. In other words, apart from the initial validity
-test, these functions (when in UTF-8 mode) handle strings according to the more
-liberal rules of RFC 2279. However, the just-in-time (JIT) optimization for
-\fBpcre_exec()\fP supports only RFC 3629. If you are using JIT optimization, or
-if the string does not even conform to RFC 2279, the result is undefined. Your
-program may crash.
-.P
-If you want to process strings of values in the full range 0 to 0x7FFFFFFF,
-encoded in a UTF-8-like manner as per the old RFC, you can set
-PCRE_NO_UTF8_CHECK to bypass the more restrictive test. However, in this
-situation, you will have to apply your own validity check, and avoid the use of
-JIT optimization.
-.
-.
-.\" HTML <a name="utf16strings"></a>
-.SS "Validity of UTF-16 strings"
-.rs
-.sp
-When you set the PCRE_UTF16 flag, the strings of 16-bit data units that are
-passed as patterns and subjects are (by default) checked for validity on entry
-to the relevant functions. Values other than those in the surrogate range
-U+D800 to U+DFFF are independent code points. Values in the surrogate range
-must be used in pairs in the correct manner.
-.P
-If an invalid UTF-16 string is passed to PCRE, an error return is given. At
-compile time, the only additional information is the offset to the first data
-unit of the failing character. The runtime functions \fBpcre16_exec()\fP and
-\fBpcre16_dfa_exec()\fP also pass back this information, as well as a more
-detailed reason code if the caller has provided memory in which to do this.
-.P
-In some situations, you may already know that your strings are valid, and
-therefore want to skip these checks in order to improve performance. If you set
-the PCRE_NO_UTF16_CHECK flag at compile time or at run time, PCRE assumes that
-the pattern or subject it is given (respectively) contains only valid UTF-16
-sequences. In this case, it does not diagnose an invalid UTF-16 string.
-.
-.
-.SS "General comments about UTF modes"
-.rs
-.sp
-1. Codepoints less than 256 can be specified by either braced or unbraced
-hexadecimal escape sequences (for example, \ex{b3} or \exb3). Larger values
-have to use braced sequences.
-.P
-2. Octal numbers up to \e777 are recognized, and in UTF-8 mode, they match
-two-byte characters for values greater than \e177.
-.P
-3. Repeat quantifiers apply to complete UTF characters, not to individual
-data units, for example: \ex{100}{3}.
-.P
-4. The dot metacharacter matches one UTF character instead of a single data
-unit.
-.P
-5. The escape sequence \eC can be used to match a single byte in UTF-8 mode, or
-a single 16-bit data unit in UTF-16 mode, but its use can lead to some strange
-effects because it breaks up multi-unit characters (see the description of \eC
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation). The use of \eC is not supported in the alternative matching
-function \fBpcre[16]_dfa_exec()\fP, nor is it supported in UTF mode by the JIT
-optimization of \fBpcre[16]_exec()\fP. If JIT optimization is requested for a
-UTF pattern that contains \eC, it will not succeed, and so the matching will
-be carried out by the normal interpretive function.
-.P
-6. The character escapes \eb, \eB, \ed, \eD, \es, \eS, \ew, and \eW correctly
-test characters of any code value, but, by default, the characters that PCRE
-recognizes as digits, spaces, or word characters remain the same set as in
-non-UTF mode, all with values less than 256. This remains true even when PCRE
-is built to include Unicode property support, because to do otherwise would
-slow down PCRE in many common cases. Note in particular that this applies to
-\eb and \eB, because they are defined in terms of \ew and \eW. If you really
-want to test for a wider sense of, say, "digit", you can use explicit Unicode
-property tests such as \ep{Nd}. Alternatively, if you set the PCRE_UCP option,
-the way that the character escapes work is changed so that Unicode properties
-are used to determine which characters match. There are more details in the
-section on
-.\" HTML <a href="pcrepattern.html#genericchartypes">
-.\" </a>
-generic character types
-.\"
-in the
-.\" HREF
-\fBpcrepattern\fP
-.\"
-documentation.
-.P
-7. Similarly, characters that match the POSIX named character classes are all
-low-valued characters, unless the PCRE_UCP option is set.
-.P
-8. However, the horizontal and vertical whitespace matching escapes (\eh, \eH,
-\ev, and \eV) do match all the appropriate Unicode characters, whether or not
-PCRE_UCP is set.
-.P
-9. Case-insensitive matching applies only to characters whose values are less
-than 128, unless PCRE is built with Unicode property support. Even when Unicode
-property support is available, PCRE still uses its own character tables when
-checking the case of low-valued characters, so as not to degrade performance.
-The Unicode property information is used only for characters with higher
-values. Furthermore, PCRE supports case-insensitive matching only when there is
-a one-to-one mapping between a letter's cases. There are a small number of
-many-to-one mappings in Unicode; these are not supported by PCRE.
-.
-.
-.SH AUTHOR
-.rs
-.sp
-.nf
-Philip Hazel
-University Computing Service
-Cambridge CB2 3QH, England.
-.fi
-.
-.
-.SH REVISION
-.rs
-.sp
-.nf
-Last updated: 13 January 2012
-Copyright (c) 1997-2012 University of Cambridge.
-.fi
diff --git a/src/third_party/pcre-8.30/doc/perltest.txt b/src/third_party/pcre-8.30/doc/perltest.txt
deleted file mode 100644
index bb1a52a48e1..00000000000
--- a/src/third_party/pcre-8.30/doc/perltest.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-The perltest program
---------------------
-
-The perltest.pl script tests Perl's regular expressions; it has the same
-specification as pcretest, and so can be given identical input, except that
-input patterns can be followed only by Perl's lower case modifiers and certain
-other pcretest modifiers that are either handled or ignored:
-
- /+ recognized and handled by perltest
- /++ the second + is ignored
- /8 recognized and handled by perltest
- /J ignored
- /K ignored
- /W ignored
- /S ignored
- /SS ignored
- /Y ignored
-
-The pcretest \Y escape in data lines is removed before matching. The data lines
-are processed as Perl double-quoted strings, so if they contain " $ or @
-characters, these have to be escaped. For this reason, all such characters in
-the Perl-compatible testinput1 file are escaped so that they can be used for
-perltest as well as for pcretest. The special upper case pattern modifiers such
-as /A that pcretest recognizes, and its special data line escapes, are not used
-in the Perl-compatible test file. The output should be identical, apart from
-the initial identifying banner.
-
-The perltest.pl script can also test UTF-8 features. It recognizes the special
-modifier /8 that pcretest uses to invoke UTF-8 functionality. The testinput4
-and testinput6 files can be fed to perltest to run compatible UTF-8 tests.
-However, it is necessary to add "use utf8; require Encode" to the script to
-make this work correctly. I have not managed to find a way to handle this
-automatically.
-
-The other testinput files are not suitable for feeding to perltest.pl, since
-they make use of the special upper case modifiers and escapes that pcretest
-uses to test certain features of PCRE. Some of these files also contain
-malformed regular expressions, in order to check that PCRE diagnoses them
-correctly.
-
-Philip Hazel
-January 2012
diff --git a/src/third_party/pcre-8.30/sljit/sljitConfig.h b/src/third_party/pcre-8.30/sljit/sljitConfig.h
deleted file mode 100644
index c832dfe60da..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitConfig.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SLJIT_CONFIG_H_
-#define _SLJIT_CONFIG_H_
-
-/* --------------------------------------------------------------------- */
-/* Architecture */
-/* --------------------------------------------------------------------- */
-
-/* Architecture selection */
-/* #define SLJIT_CONFIG_X86_32 1 */
-/* #define SLJIT_CONFIG_X86_64 1 */
-/* #define SLJIT_CONFIG_ARM_V5 1 */
-/* #define SLJIT_CONFIG_ARM_V7 1 */
-/* #define SLJIT_CONFIG_ARM_THUMB2 1 */
-/* #define SLJIT_CONFIG_PPC_32 1 */
-/* #define SLJIT_CONFIG_PPC_64 1 */
-/* #define SLJIT_CONFIG_MIPS_32 1 */
-
-/* #define SLJIT_CONFIG_AUTO 1 */
-/* #define SLJIT_CONFIG_UNSUPPORTED 1 */
-
-/* --------------------------------------------------------------------- */
-/* Utilities */
-/* --------------------------------------------------------------------- */
-
-/* Useful for thread-safe compiling of global functions. */
-#ifndef SLJIT_UTIL_GLOBAL_LOCK
-/* Enabled by default */
-#define SLJIT_UTIL_GLOBAL_LOCK 1
-#endif
-
-/* Implements a stack like data structure (by using mmap / VirtualAlloc). */
-#ifndef SLJIT_UTIL_STACK
-/* Enabled by default */
-#define SLJIT_UTIL_STACK 1
-#endif
-
-/* --------------------------------------------------------------------- */
-/* Configuration */
-/* --------------------------------------------------------------------- */
-
-/* If SLJIT_STD_MACROS_DEFINED is not defined, the application should
- define SLJIT_MALLOC, SLJIT_FREE, SLJIT_MEMMOVE, and NULL. */
-#ifndef SLJIT_STD_MACROS_DEFINED
-/* Disabled by default. */
-#define SLJIT_STD_MACROS_DEFINED 0
-#endif
-
-/* Executable code allocation:
- If SLJIT_EXECUTABLE_ALLOCATOR is not defined, the application should
- define both SLJIT_MALLOC_EXEC and SLJIT_FREE_EXEC. */
-#ifndef SLJIT_EXECUTABLE_ALLOCATOR
-/* Enabled by default. */
-#define SLJIT_EXECUTABLE_ALLOCATOR 1
-#endif
-
-/* Debug checks (assertions, etc.). */
-#ifndef SLJIT_DEBUG
-/* Enabled by default */
-#define SLJIT_DEBUG 1
-#endif
-
-/* Verbose operations */
-#ifndef SLJIT_VERBOSE
-/* Enabled by default */
-#define SLJIT_VERBOSE 1
-#endif
-
-/* See the beginning of sljitConfigInternal.h */
-
-#endif
diff --git a/src/third_party/pcre-8.30/sljit/sljitConfigInternal.h b/src/third_party/pcre-8.30/sljit/sljitConfigInternal.h
deleted file mode 100644
index de6e9f07e20..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitConfigInternal.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SLJIT_CONFIG_INTERNAL_H_
-#define _SLJIT_CONFIG_INTERNAL_H_
-
-/*
- SLJIT defines the following macros depending on the target architecture:
-
- Feature detection (boolean) macros:
- SLJIT_32BIT_ARCHITECTURE : 32 bit architecture
- SLJIT_64BIT_ARCHITECTURE : 64 bit architecture
- SLJIT_WORD_SHIFT : the shift required to apply when accessing a sljit_w/sljit_uw array by index
- SLJIT_FLOAT_SHIFT : the shift required to apply when accessing a double array by index
- SLJIT_LITTLE_ENDIAN : little endian architecture
- SLJIT_BIG_ENDIAN : big endian architecture
- SLJIT_UNALIGNED : allows unaligned memory accesses for non-fpu operations (only!)
- SLJIT_INDIRECT_CALL : see SLJIT_FUNC_OFFSET() for more information
-
- Types and useful macros:
- sljit_b, sljit_ub : signed and unsigned 8 bit byte
- sljit_h, sljit_uh : signed and unsigned 16 bit half-word (short) type
- sljit_i, sljit_ui : signed and unsigned 32 bit integer type
- sljit_w, sljit_uw : signed and unsigned machine word, enough to store a pointer (same as intptr_t)
- SLJIT_CALL : C calling convention define for both calling JIT form C and C callbacks for JIT
- SLJIT_W(number) : defining 64 bit constants on 64 bit architectures (compiler independent helper)
-*/
-
-#if !((defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
- || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
- || (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) \
- || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
- || (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) \
- || (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
- || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) \
- || (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) \
- || (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO) \
- || (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED))
-#error "An architecture must be selected"
-#endif
-
-/* Sanity check. */
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
- + (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
- + (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) \
- + (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
- + (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) \
- + (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
- + (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) \
- + (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) \
- + (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO) \
- + (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) >= 2
-#error "Multiple architectures are selected"
-#endif
-
-/* Auto select option (requires compiler support) */
-#if (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO)
-
-#ifndef _WIN32
-
-#if defined(__i386__) || defined(__i386)
-#define SLJIT_CONFIG_X86_32 1
-#elif defined(__x86_64__)
-#define SLJIT_CONFIG_X86_64 1
-#elif defined(__arm__) || defined(__ARM__)
-#ifdef __thumb2__
-#define SLJIT_CONFIG_ARM_THUMB2 1
-#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__)
-#define SLJIT_CONFIG_ARM_V7 1
-#else
-#define SLJIT_CONFIG_ARM_V5 1
-#endif
-#elif defined(__ppc64__) || defined(__powerpc64__)
-#define SLJIT_CONFIG_PPC_64 1
-#elif defined(__ppc__) || defined(__powerpc__)
-#define SLJIT_CONFIG_PPC_32 1
-#elif defined(__mips__)
-#define SLJIT_CONFIG_MIPS_32 1
-#else
-/* Unsupported architecture */
-#define SLJIT_CONFIG_UNSUPPORTED 1
-#endif
-
-#else /* !_WIN32 */
-
-#if defined(_M_X64) || defined(__x86_64__)
-#define SLJIT_CONFIG_X86_64 1
-#elif defined(_ARM_)
-#define SLJIT_CONFIG_ARM_V5 1
-#else
-#define SLJIT_CONFIG_X86_32 1
-#endif
-
-#endif /* !WIN32 */
-#endif /* SLJIT_CONFIG_AUTO */
-
-#if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
-#undef SLJIT_EXECUTABLE_ALLOCATOR
-#endif
-
-#if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED)
-
-/* These libraries are needed for the macros below. */
-#include <stdlib.h>
-#include <string.h>
-
-#endif /* STD_MACROS_DEFINED */
-
-/* General macros:
- Note: SLJIT is designed to be independent from them as possible.
-
- In release mode (SLJIT_DEBUG is not defined) only the following macros are needed:
-*/
-
-#ifndef SLJIT_MALLOC
-#define SLJIT_MALLOC(size) malloc(size)
-#endif
-
-#ifndef SLJIT_FREE
-#define SLJIT_FREE(ptr) free(ptr)
-#endif
-
-#ifndef SLJIT_MEMMOVE
-#define SLJIT_MEMMOVE(dest, src, len) memmove(dest, src, len)
-#endif
-
-#ifndef SLJIT_ZEROMEM
-#define SLJIT_ZEROMEM(dest, len) memset(dest, 0, len)
-#endif
-
-#if !defined(SLJIT_LIKELY) && !defined(SLJIT_UNLIKELY)
-
-#if defined(__GNUC__) && (__GNUC__ >= 3)
-#define SLJIT_LIKELY(x) __builtin_expect((x), 1)
-#define SLJIT_UNLIKELY(x) __builtin_expect((x), 0)
-#else
-#define SLJIT_LIKELY(x) (x)
-#define SLJIT_UNLIKELY(x) (x)
-#endif
-
-#endif /* !defined(SLJIT_LIKELY) && !defined(SLJIT_UNLIKELY) */
-
-#ifndef SLJIT_INLINE
-/* Inline functions. */
-#define SLJIT_INLINE __inline
-#endif
-
-#ifndef SLJIT_CONST
-/* Const variables. */
-#define SLJIT_CONST const
-#endif
-
-#ifndef SLJIT_UNUSED_ARG
-/* Unused arguments. */
-#define SLJIT_UNUSED_ARG(arg) (void)arg
-#endif
-
-#if (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC)
-/* Static ABI functions. For all-in-one programs. */
-
-#if defined(__GNUC__)
-/* Disable unused warnings in gcc. */
-#define SLJIT_API_FUNC_ATTRIBUTE static __attribute__((unused))
-#else
-#define SLJIT_API_FUNC_ATTRIBUTE static
-#endif
-
-#else
-#define SLJIT_API_FUNC_ATTRIBUTE
-#endif /* (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC) */
-
-#ifndef SLJIT_CACHE_FLUSH
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-
-/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
-#define SLJIT_CACHE_FLUSH(from, to) \
- ppc_cache_flush((from), (to))
-
-#elif (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-
-/* Not required to implement on archs with unified caches. */
-#define SLJIT_CACHE_FLUSH(from, to)
-
-#else
-
-/* Calls __ARM_NR_cacheflush on ARM-Linux. */
-#define SLJIT_CACHE_FLUSH(from, to) \
- __clear_cache((char*)(from), (char*)(to))
-
-#endif
-
-#endif /* !SLJIT_CACHE_FLUSH */
-
-/* 8 bit byte type. */
-typedef unsigned char sljit_ub;
-typedef signed char sljit_b;
-
-/* 16 bit half-word type. */
-typedef unsigned short int sljit_uh;
-typedef signed short int sljit_h;
-
-/* 32 bit integer type. */
-typedef unsigned int sljit_ui;
-typedef signed int sljit_i;
-
-/* Machine word type. Can encapsulate a pointer.
- 32 bit for 32 bit machines.
- 64 bit for 64 bit machines. */
-#if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
-/* Just to have something. */
-#define SLJIT_WORD_SHIFT 0
-typedef unsigned long int sljit_uw;
-typedef long int sljit_w;
-#elif !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && !(defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define SLJIT_32BIT_ARCHITECTURE 1
-#define SLJIT_WORD_SHIFT 2
-typedef unsigned int sljit_uw;
-typedef int sljit_w;
-#else
-#define SLJIT_64BIT_ARCHITECTURE 1
-#define SLJIT_WORD_SHIFT 3
-#ifdef _WIN32
-typedef unsigned __int64 sljit_uw;
-typedef __int64 sljit_w;
-#else
-typedef unsigned long int sljit_uw;
-typedef long int sljit_w;
-#endif
-#endif
-
-/* Double precision. */
-#define SLJIT_FLOAT_SHIFT 3
-
-#ifndef SLJIT_W
-
-/* Defining long constants. */
-#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
-#define SLJIT_W(w) (w##ll)
-#else
-#define SLJIT_W(w) (w)
-#endif
-
-#endif /* !SLJIT_W */
-
-#ifndef SLJIT_CALL
-
-/* ABI (Application Binary Interface) types. */
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-
-#if defined(__GNUC__)
-
-#define SLJIT_CALL __attribute__ ((fastcall))
-#define SLJIT_X86_32_FASTCALL 1
-
-#elif defined(_WIN32)
-
-#ifdef __BORLANDC__
-#define SLJIT_CALL __msfastcall
-#else /* __BORLANDC__ */
-#define SLJIT_CALL __fastcall
-#endif /* __BORLANDC__ */
-#define SLJIT_X86_32_FASTCALL 1
-
-#else /* defined(_WIN32) */
-#define SLJIT_CALL __stdcall
-#endif
-
-#else /* Other architectures. */
-
-#define SLJIT_CALL
-
-#endif /* SLJIT_CONFIG_X86_32 */
-
-#endif /* !SLJIT_CALL */
-
-#if !defined(SLJIT_BIG_ENDIAN) && !defined(SLJIT_LITTLE_ENDIAN)
-
-/* These macros are useful for the application. */
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define SLJIT_BIG_ENDIAN 1
-
-#elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
-
-#ifdef __MIPSEL__
-#define SLJIT_LITTLE_ENDIAN 1
-#else
-#define SLJIT_BIG_ENDIAN 1
-#endif
-
-#else
-#define SLJIT_LITTLE_ENDIAN 1
-#endif
-
-#endif /* !defined(SLJIT_BIG_ENDIAN) && !defined(SLJIT_LITTLE_ENDIAN) */
-
-/* Sanity check. */
-#if (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN) && (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
-#error "Exactly one endianness must be selected"
-#endif
-
-#if !(defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN) && !(defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
-#error "Exactly one endianness must be selected"
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-/* It seems ppc64 compilers use an indirect addressing for functions.
- It makes things really complicated. */
-#define SLJIT_INDIRECT_CALL 1
-#endif
-
-#ifndef SLJIT_SSE2
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-/* Turn on SSE2 support on x86 (operating on doubles).
- (Better performance than legacy fpu instructions). */
-#define SLJIT_SSE2 1
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-/* Auto detect SSE2 support using CPUID.
- On 64 bit x86 cpus, sse2 must be present. */
-#define SLJIT_SSE2_AUTO 1
-#endif
-
-#endif /* (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) */
-
-#endif /* !SLJIT_SSE2 */
-
-#ifndef SLJIT_UNALIGNED
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
- || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
- || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
- || (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) \
- || (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
- || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define SLJIT_UNALIGNED 1
-#endif
-
-#endif /* !SLJIT_UNALIGNED */
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_malloc_exec(sljit_uw size);
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr);
-#define SLJIT_MALLOC_EXEC(size) sljit_malloc_exec(size)
-#define SLJIT_FREE_EXEC(ptr) sljit_free_exec(ptr)
-#endif
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG) || (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-#include <stdio.h>
-#endif
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-
-/* Feel free to redefine these two macros. */
-#ifndef SLJIT_ASSERT
-
-#define SLJIT_HALT_PROCESS() \
- *((int*)0) = 0
-
-#define SLJIT_ASSERT(x) \
- do { \
- if (SLJIT_UNLIKELY(!(x))) { \
- printf("Assertion failed at " __FILE__ ":%d\n", __LINE__); \
- SLJIT_HALT_PROCESS(); \
- } \
- } while (0)
-
-#endif /* !SLJIT_ASSERT */
-
-#ifndef SLJIT_ASSERT_STOP
-
-#define SLJIT_ASSERT_STOP() \
- do { \
- printf("Should never been reached " __FILE__ ":%d\n", __LINE__); \
- SLJIT_HALT_PROCESS(); \
- } while (0)
-
-#endif /* !SLJIT_ASSERT_STOP */
-
-#else /* (defined SLJIT_DEBUG && SLJIT_DEBUG) */
-
-#undef SLJIT_ASSERT
-#undef SLJIT_ASSERT_STOP
-
-#define SLJIT_ASSERT(x) \
- do { } while (0)
-#define SLJIT_ASSERT_STOP() \
- do { } while (0)
-
-#endif /* (defined SLJIT_DEBUG && SLJIT_DEBUG) */
-
-#ifndef SLJIT_COMPILE_ASSERT
-
-/* Should be improved eventually. */
-#define SLJIT_COMPILE_ASSERT(x, description) \
- SLJIT_ASSERT(x)
-
-#endif /* !SLJIT_COMPILE_ASSERT */
-
-#endif
diff --git a/src/third_party/pcre-8.30/sljit/sljitExecAllocator.c b/src/third_party/pcre-8.30/sljit/sljitExecAllocator.c
deleted file mode 100644
index f66744df826..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitExecAllocator.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- This file contains a simple executable memory allocator
-
- It is assumed, that executable code blocks are usually medium (or sometimes
- large) memory blocks, and the allocator is not too frequently called (less
- optimized than other allocators). Thus, using it as a generic allocator is
- not suggested.
-
- How does it work:
- Memory is allocated in continuous memory areas called chunks by alloc_chunk()
- Chunk format:
- [ block ][ block ] ... [ block ][ block terminator ]
-
- All blocks and the block terminator is started with block_header. The block
- header contains the size of the previous and the next block. These sizes
- can also contain special values.
- Block size:
- 0 - The block is a free_block, with a different size member.
- 1 - The block is a block terminator.
- n - The block is used at the moment, and the value contains its size.
- Previous block size:
- 0 - This is the first block of the memory chunk.
- n - The size of the previous block.
-
- Using these size values we can go forward or backward on the block chain.
- The unused blocks are stored in a chain list pointed by free_blocks. This
- list is useful if we need to find a suitable memory area when the allocator
- is called.
-
- When a block is freed, the new free block is connected to its adjacent free
- blocks if possible.
-
- [ free block ][ used block ][ free block ]
- and "used block" is freed, the three blocks are connected together:
- [ one big free block ]
-*/
-
-/* --------------------------------------------------------------------- */
-/* System (OS) functions */
-/* --------------------------------------------------------------------- */
-
-/* 64 KByte. */
-#define CHUNK_SIZE 0x10000
-
-/*
- alloc_chunk / free_chunk :
- * allocate executable system memory chunks
- * the size is always divisible by CHUNK_SIZE
- allocator_grab_lock / allocator_release_lock :
- * make the allocator thread safe
- * can be empty if the OS (or the application) does not support threading
- * only the allocator requires this lock, sljit is fully thread safe
- as it only uses local variables
-*/
-
-#ifdef _WIN32
-
-static SLJIT_INLINE void* alloc_chunk(sljit_uw size)
-{
- return VirtualAlloc(0, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
-}
-
-static SLJIT_INLINE void free_chunk(void* chunk, sljit_uw size)
-{
- SLJIT_UNUSED_ARG(size);
- VirtualFree(chunk, 0, MEM_RELEASE);
-}
-
-#else
-
-#include <sys/mman.h>
-
-static SLJIT_INLINE void* alloc_chunk(sljit_uw size)
-{
- void* retval = mmap(0, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0);
- return (retval != MAP_FAILED) ? retval : NULL;
-}
-
-static SLJIT_INLINE void free_chunk(void* chunk, sljit_uw size)
-{
- munmap(chunk, size);
-}
-
-#endif
-
-/* --------------------------------------------------------------------- */
-/* Common functions */
-/* --------------------------------------------------------------------- */
-
-#define CHUNK_MASK (~(CHUNK_SIZE - 1))
-
-struct block_header {
- sljit_uw size;
- sljit_uw prev_size;
-};
-
-struct free_block {
- struct block_header header;
- struct free_block *next;
- struct free_block *prev;
- sljit_uw size;
-};
-
-#define AS_BLOCK_HEADER(base, offset) \
- ((struct block_header*)(((sljit_ub*)base) + offset))
-#define AS_FREE_BLOCK(base, offset) \
- ((struct free_block*)(((sljit_ub*)base) + offset))
-#define MEM_START(base) ((void*)(((sljit_ub*)base) + sizeof(struct block_header)))
-#define ALIGN_SIZE(size) (((size) + sizeof(struct block_header) + 7) & ~7)
-
-static struct free_block* free_blocks;
-static sljit_uw allocated_size;
-static sljit_uw total_size;
-
-static SLJIT_INLINE void sljit_insert_free_block(struct free_block *free_block, sljit_uw size)
-{
- free_block->header.size = 0;
- free_block->size = size;
-
- free_block->next = free_blocks;
- free_block->prev = 0;
- if (free_blocks)
- free_blocks->prev = free_block;
- free_blocks = free_block;
-}
-
-static SLJIT_INLINE void sljit_remove_free_block(struct free_block *free_block)
-{
- if (free_block->next)
- free_block->next->prev = free_block->prev;
-
- if (free_block->prev)
- free_block->prev->next = free_block->next;
- else {
- SLJIT_ASSERT(free_blocks == free_block);
- free_blocks = free_block->next;
- }
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_malloc_exec(sljit_uw size)
-{
- struct block_header *header;
- struct block_header *next_header;
- struct free_block *free_block;
- sljit_uw chunk_size;
-
- allocator_grab_lock();
- if (size < sizeof(struct free_block))
- size = sizeof(struct free_block);
- size = ALIGN_SIZE(size);
-
- free_block = free_blocks;
- while (free_block) {
- if (free_block->size >= size) {
- chunk_size = free_block->size;
- if (chunk_size > size + 64) {
- /* We just cut a block from the end of the free block. */
- chunk_size -= size;
- free_block->size = chunk_size;
- header = AS_BLOCK_HEADER(free_block, chunk_size);
- header->prev_size = chunk_size;
- AS_BLOCK_HEADER(header, size)->prev_size = size;
- }
- else {
- sljit_remove_free_block(free_block);
- header = (struct block_header*)free_block;
- size = chunk_size;
- }
- allocated_size += size;
- header->size = size;
- allocator_release_lock();
- return MEM_START(header);
- }
- free_block = free_block->next;
- }
-
- chunk_size = (size + sizeof(struct block_header) + CHUNK_SIZE - 1) & CHUNK_MASK;
- header = (struct block_header*)alloc_chunk(chunk_size);
- PTR_FAIL_IF(!header);
-
- chunk_size -= sizeof(struct block_header);
- total_size += chunk_size;
-
- header->prev_size = 0;
- if (chunk_size > size + 64) {
- /* Cut the allocated space into a free and a used block. */
- allocated_size += size;
- header->size = size;
- chunk_size -= size;
-
- free_block = AS_FREE_BLOCK(header, size);
- free_block->header.prev_size = size;
- sljit_insert_free_block(free_block, chunk_size);
- next_header = AS_BLOCK_HEADER(free_block, chunk_size);
- }
- else {
- /* All space belongs to this allocation. */
- allocated_size += chunk_size;
- header->size = chunk_size;
- next_header = AS_BLOCK_HEADER(header, chunk_size);
- }
- next_header->size = 1;
- next_header->prev_size = chunk_size;
- allocator_release_lock();
- return MEM_START(header);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr)
-{
- struct block_header *header;
- struct free_block* free_block;
-
- allocator_grab_lock();
- header = AS_BLOCK_HEADER(ptr, -(sljit_w)sizeof(struct block_header));
- allocated_size -= header->size;
-
- /* Connecting free blocks together if possible. */
-
- /* If header->prev_size == 0, free_block will equal to header.
- In this case, free_block->header.size will be > 0. */
- free_block = AS_FREE_BLOCK(header, -(sljit_w)header->prev_size);
- if (SLJIT_UNLIKELY(!free_block->header.size)) {
- free_block->size += header->size;
- header = AS_BLOCK_HEADER(free_block, free_block->size);
- header->prev_size = free_block->size;
- }
- else {
- free_block = (struct free_block*)header;
- sljit_insert_free_block(free_block, header->size);
- }
-
- header = AS_BLOCK_HEADER(free_block, free_block->size);
- if (SLJIT_UNLIKELY(!header->size)) {
- free_block->size += ((struct free_block*)header)->size;
- sljit_remove_free_block((struct free_block*)header);
- header = AS_BLOCK_HEADER(free_block, free_block->size);
- header->prev_size = free_block->size;
- }
-
- /* The whole chunk is free. */
- if (SLJIT_UNLIKELY(!free_block->header.prev_size && header->size == 1)) {
- /* If this block is freed, we still have (allocated_size / 2) free space. */
- if (total_size - free_block->size > (allocated_size * 3 / 2)) {
- total_size -= free_block->size;
- sljit_remove_free_block(free_block);
- free_chunk(free_block, free_block->size + sizeof(struct block_header));
- }
- }
-
- allocator_release_lock();
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitLir.c b/src/third_party/pcre-8.30/sljit/sljitLir.c
deleted file mode 100644
index c1fa5e4af93..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitLir.c
+++ /dev/null
@@ -1,1594 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "sljitLir.h"
-
-#define CHECK_ERROR() \
- do { \
- if (SLJIT_UNLIKELY(compiler->error)) \
- return compiler->error; \
- } while (0)
-
-#define CHECK_ERROR_PTR() \
- do { \
- if (SLJIT_UNLIKELY(compiler->error)) \
- return NULL; \
- } while (0)
-
-#define CHECK_ERROR_VOID() \
- do { \
- if (SLJIT_UNLIKELY(compiler->error)) \
- return; \
- } while (0)
-
-#define FAIL_IF(expr) \
- do { \
- if (SLJIT_UNLIKELY(expr)) \
- return compiler->error; \
- } while (0)
-
-#define PTR_FAIL_IF(expr) \
- do { \
- if (SLJIT_UNLIKELY(expr)) \
- return NULL; \
- } while (0)
-
-#define FAIL_IF_NULL(ptr) \
- do { \
- if (SLJIT_UNLIKELY(!(ptr))) { \
- compiler->error = SLJIT_ERR_ALLOC_FAILED; \
- return SLJIT_ERR_ALLOC_FAILED; \
- } \
- } while (0)
-
-#define PTR_FAIL_IF_NULL(ptr) \
- do { \
- if (SLJIT_UNLIKELY(!(ptr))) { \
- compiler->error = SLJIT_ERR_ALLOC_FAILED; \
- return NULL; \
- } \
- } while (0)
-
-#define PTR_FAIL_WITH_EXEC_IF(ptr) \
- do { \
- if (SLJIT_UNLIKELY(!(ptr))) { \
- compiler->error = SLJIT_ERR_EX_ALLOC_FAILED; \
- return NULL; \
- } \
- } while (0)
-
-#if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
-
-#define GET_OPCODE(op) \
- ((op) & ~(SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))
-
-#define GET_FLAGS(op) \
- ((op) & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C))
-
-#define GET_ALL_FLAGS(op) \
- ((op) & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))
-
-#define BUF_SIZE 4096
-
-#if (defined SLJIT_32BIT_ARCHITECTURE && SLJIT_32BIT_ARCHITECTURE)
-#define ABUF_SIZE 2048
-#else
-#define ABUF_SIZE 4096
-#endif
-
-/* Jump flags. */
-#define JUMP_LABEL 0x1
-#define JUMP_ADDR 0x2
-/* SLJIT_REWRITABLE_JUMP is 0x1000. */
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- #define PATCH_MB 0x4
- #define PATCH_MW 0x8
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- #define PATCH_MD 0x10
-#endif
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
- #define IS_BL 0x4
- #define PATCH_B 0x8
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- #define CPOOL_SIZE 512
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
- #define IS_CONDITIONAL 0x04
- #define IS_BL 0x08
- /* cannot be encoded as branch */
- #define B_TYPE0 0x00
- /* conditional + imm8 */
- #define B_TYPE1 0x10
- /* conditional + imm20 */
- #define B_TYPE2 0x20
- /* IT + imm24 */
- #define B_TYPE3 0x30
- /* imm11 */
- #define B_TYPE4 0x40
- /* imm24 */
- #define B_TYPE5 0x50
- /* BL + imm24 */
- #define BL_TYPE6 0x60
- /* 0xf00 cc code for branches */
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- #define UNCOND_B 0x04
- #define PATCH_B 0x08
- #define ABSOLUTE_B 0x10
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- #define IS_MOVABLE 0x04
- #define IS_JAL 0x08
- #define IS_BIT26_COND 0x10
- #define IS_BIT16_COND 0x20
-
- #define IS_COND (IS_BIT26_COND | IS_BIT16_COND)
-
- #define PATCH_B 0x40
- #define PATCH_J 0x80
-
- /* instruction types */
- #define UNMOVABLE_INS 0
- /* 1 - 31 last destination register */
- #define FCSR_FCC 32
- /* no destination (i.e: store) */
- #define MOVABLE_INS 33
-#endif
-
-#endif /* !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) */
-
-/* Utils can still be used even if SLJIT_CONFIG_UNSUPPORTED is set. */
-#include "sljitUtils.c"
-
-#if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-#include "sljitExecAllocator.c"
-#endif
-
-#if (defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO) && !(defined SLJIT_SSE2 && SLJIT_SSE2)
-#error SLJIT_SSE2_AUTO cannot be enabled without SLJIT_SSE2
-#endif
-
-/* --------------------------------------------------------------------- */
-/* Public functions */
-/* --------------------------------------------------------------------- */
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || ((defined SLJIT_SSE2 && SLJIT_SSE2) && ((defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)))
-#define SLJIT_NEEDS_COMPILER_INIT 1
-static int compiler_initialized = 0;
-/* A thread safe initialization. */
-static void init_compiler(void);
-#endif
-
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void)
-{
- struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(sizeof(struct sljit_compiler));
- if (!compiler)
- return NULL;
- SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler));
-
- SLJIT_COMPILE_ASSERT(
- sizeof(sljit_b) == 1 && sizeof(sljit_ub) == 1
- && sizeof(sljit_h) == 2 && sizeof(sljit_uh) == 2
- && sizeof(sljit_i) == 4 && sizeof(sljit_ui) == 4
- && ((sizeof(sljit_w) == 4 && sizeof(sljit_uw) == 4) || (sizeof(sljit_w) == 8 && sizeof(sljit_uw) == 8)),
- invalid_integer_types);
-
- /* Only the non-zero members must be set. */
- compiler->error = SLJIT_SUCCESS;
-
- compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE);
- compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE);
-
- if (!compiler->buf || !compiler->abuf) {
- if (compiler->buf)
- SLJIT_FREE(compiler->buf);
- if (compiler->abuf)
- SLJIT_FREE(compiler->abuf);
- SLJIT_FREE(compiler);
- return NULL;
- }
-
- compiler->buf->next = NULL;
- compiler->buf->used_size = 0;
- compiler->abuf->next = NULL;
- compiler->abuf->used_size = 0;
-
- compiler->temporaries = -1;
- compiler->saveds = -1;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- compiler->args = -1;
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- compiler->cpool = (sljit_uw*)SLJIT_MALLOC(CPOOL_SIZE * sizeof(sljit_uw) + CPOOL_SIZE * sizeof(sljit_ub));
- if (!compiler->cpool) {
- SLJIT_FREE(compiler->buf);
- SLJIT_FREE(compiler->abuf);
- SLJIT_FREE(compiler);
- return NULL;
- }
- compiler->cpool_unique = (sljit_ub*)(compiler->cpool + CPOOL_SIZE);
- compiler->cpool_diff = 0xffffffff;
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- compiler->delay_slot = UNMOVABLE_INS;
-#endif
-
-#if (defined SLJIT_NEEDS_COMPILER_INIT && SLJIT_NEEDS_COMPILER_INIT)
- if (!compiler_initialized) {
- init_compiler();
- compiler_initialized = 1;
- }
-#endif
-
- return compiler;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler)
-{
- struct sljit_memory_fragment *buf;
- struct sljit_memory_fragment *curr;
-
- buf = compiler->buf;
- while (buf) {
- curr = buf;
- buf = buf->next;
- SLJIT_FREE(curr);
- }
-
- buf = compiler->abuf;
- while (buf) {
- curr = buf;
- buf = buf->next;
- SLJIT_FREE(curr);
- }
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- SLJIT_FREE(compiler->cpool);
-#endif
- SLJIT_FREE(compiler);
-}
-
-#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
-{
- /* Remove thumb mode flag. */
- SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~0x1));
-}
-#elif (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
-{
- /* Resolve indirection. */
- code = (void*)(*(sljit_uw*)code);
- SLJIT_FREE_EXEC(code);
-}
-#else
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
-{
- SLJIT_FREE_EXEC(code);
-}
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label)
-{
- if (SLJIT_LIKELY(!!jump) && SLJIT_LIKELY(!!label)) {
- jump->flags &= ~JUMP_ADDR;
- jump->flags |= JUMP_LABEL;
- jump->u.label = label;
- }
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target)
-{
- if (SLJIT_LIKELY(!!jump)) {
- SLJIT_ASSERT(jump->flags & SLJIT_REWRITABLE_JUMP);
-
- jump->flags &= ~JUMP_LABEL;
- jump->flags |= JUMP_ADDR;
- jump->u.target = target;
- }
-}
-
-/* --------------------------------------------------------------------- */
-/* Private functions */
-/* --------------------------------------------------------------------- */
-
-static void* ensure_buf(struct sljit_compiler *compiler, int size)
-{
- sljit_ub *ret;
- struct sljit_memory_fragment *new_frag;
-
- if (compiler->buf->used_size + size <= (int)(BUF_SIZE - sizeof(sljit_uw) - sizeof(void*))) {
- ret = compiler->buf->memory + compiler->buf->used_size;
- compiler->buf->used_size += size;
- return ret;
- }
- new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE);
- PTR_FAIL_IF_NULL(new_frag);
- new_frag->next = compiler->buf;
- compiler->buf = new_frag;
- new_frag->used_size = size;
- return new_frag->memory;
-}
-
-static void* ensure_abuf(struct sljit_compiler *compiler, int size)
-{
- sljit_ub *ret;
- struct sljit_memory_fragment *new_frag;
-
- if (compiler->abuf->used_size + size <= (int)(ABUF_SIZE - sizeof(sljit_uw) - sizeof(void*))) {
- ret = compiler->abuf->memory + compiler->abuf->used_size;
- compiler->abuf->used_size += size;
- return ret;
- }
- new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE);
- PTR_FAIL_IF_NULL(new_frag);
- new_frag->next = compiler->abuf;
- compiler->abuf = new_frag;
- new_frag->used_size = size;
- return new_frag->memory;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, int size)
-{
- CHECK_ERROR_PTR();
-
-#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
- if (size <= 0 || size > 128)
- return NULL;
- size = (size + 7) & ~7;
-#else
- if (size <= 0 || size > 64)
- return NULL;
- size = (size + 3) & ~3;
-#endif
- return ensure_abuf(compiler, size);
-}
-
-static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler)
-{
- struct sljit_memory_fragment *buf = compiler->buf;
- struct sljit_memory_fragment *prev = NULL;
- struct sljit_memory_fragment *tmp;
-
- do {
- tmp = buf->next;
- buf->next = prev;
- prev = buf;
- buf = tmp;
- } while (buf != NULL);
-
- compiler->buf = prev;
-}
-
-static SLJIT_INLINE void set_label(struct sljit_label *label, struct sljit_compiler *compiler)
-{
- label->next = NULL;
- label->size = compiler->size;
- if (compiler->last_label)
- compiler->last_label->next = label;
- else
- compiler->labels = label;
- compiler->last_label = label;
-}
-
-static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, int flags)
-{
- jump->next = NULL;
- jump->flags = flags;
- if (compiler->last_jump)
- compiler->last_jump->next = jump;
- else
- compiler->jumps = jump;
- compiler->last_jump = jump;
-}
-
-static SLJIT_INLINE void set_const(struct sljit_const *const_, struct sljit_compiler *compiler)
-{
- const_->next = NULL;
- const_->addr = compiler->size;
- if (compiler->last_const)
- compiler->last_const->next = const_;
- else
- compiler->consts = const_;
- compiler->last_const = const_;
-}
-
-#define ADDRESSING_DEPENDS_ON(exp, reg) \
- (((exp) & SLJIT_MEM) && (((exp) & 0xf) == reg || (((exp) >> 4) & 0xf) == reg))
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-#define FUNCTION_CHECK_OP() \
- SLJIT_ASSERT(!GET_FLAGS(op) || !(op & SLJIT_KEEP_FLAGS)); \
- switch (GET_OPCODE(op)) { \
- case SLJIT_NOT: \
- case SLJIT_CLZ: \
- case SLJIT_AND: \
- case SLJIT_OR: \
- case SLJIT_XOR: \
- case SLJIT_SHL: \
- case SLJIT_LSHR: \
- case SLJIT_ASHR: \
- SLJIT_ASSERT(!(op & (SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C))); \
- break; \
- case SLJIT_NEG: \
- SLJIT_ASSERT(!(op & (SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_C))); \
- break; \
- case SLJIT_MUL: \
- SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_C))); \
- break; \
- case SLJIT_FCMP: \
- SLJIT_ASSERT(!(op & (SLJIT_INT_OP | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
- SLJIT_ASSERT((op & (SLJIT_SET_E | SLJIT_SET_S))); \
- break; \
- case SLJIT_ADD: \
- SLJIT_ASSERT(!(op & (SLJIT_SET_S | SLJIT_SET_U))); \
- break; \
- case SLJIT_SUB: \
- break; \
- case SLJIT_ADDC: \
- case SLJIT_SUBC: \
- SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O))); \
- break; \
- default: \
- /* Nothing allowed */ \
- SLJIT_ASSERT(!(op & (SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
- break; \
- }
-
-#define FUNCTION_CHECK_IS_REG(r) \
- ((r) == SLJIT_UNUSED || (r) == SLJIT_LOCALS_REG || \
- ((r) >= SLJIT_TEMPORARY_REG1 && (r) <= SLJIT_TEMPORARY_REG3 && (r) <= SLJIT_TEMPORARY_REG1 - 1 + compiler->temporaries) || \
- ((r) >= SLJIT_SAVED_REG1 && (r) <= SLJIT_SAVED_REG3 && (r) <= SLJIT_SAVED_REG1 - 1 + compiler->saveds)) \
-
-#define FUNCTION_CHECK_SRC(p, i) \
- SLJIT_ASSERT(compiler->temporaries != -1 && compiler->saveds != -1); \
- if (((p) >= SLJIT_TEMPORARY_REG1 && (p) <= SLJIT_TEMPORARY_REG1 - 1 + compiler->temporaries) || \
- ((p) >= SLJIT_SAVED_REG1 && (p) <= SLJIT_SAVED_REG1 - 1 + compiler->saveds) || \
- (p) == SLJIT_LOCALS_REG) \
- SLJIT_ASSERT(i == 0); \
- else if ((p) == SLJIT_IMM) \
- ; \
- else if ((p) & SLJIT_MEM) { \
- SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & 0xf)); \
- if ((p) & 0xf0) { \
- SLJIT_ASSERT(FUNCTION_CHECK_IS_REG(((p) >> 4) & 0xf)); \
- SLJIT_ASSERT(((p) & 0xf0) != (SLJIT_LOCALS_REG << 4) && !(i & ~0x3)); \
- } else \
- SLJIT_ASSERT((((p) >> 4) & 0xf) == 0); \
- SLJIT_ASSERT(((p) >> 9) == 0); \
- } \
- else \
- SLJIT_ASSERT_STOP();
-
-#define FUNCTION_CHECK_DST(p, i) \
- SLJIT_ASSERT(compiler->temporaries != -1 && compiler->saveds != -1); \
- if (((p) >= SLJIT_TEMPORARY_REG1 && (p) <= SLJIT_TEMPORARY_REG1 - 1 + compiler->temporaries) || \
- ((p) >= SLJIT_SAVED_REG1 && (p) <= SLJIT_SAVED_REG1 - 1 + compiler->saveds) || \
- (p) == SLJIT_UNUSED) \
- SLJIT_ASSERT(i == 0); \
- else if ((p) & SLJIT_MEM) { \
- SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & 0xf)); \
- if ((p) & 0xf0) { \
- SLJIT_ASSERT(FUNCTION_CHECK_IS_REG(((p) >> 4) & 0xf)); \
- SLJIT_ASSERT(((p) & 0xf0) != (SLJIT_LOCALS_REG << 4) && !(i & ~0x3)); \
- } else \
- SLJIT_ASSERT((((p) >> 4) & 0xf) == 0); \
- SLJIT_ASSERT(((p) >> 9) == 0); \
- } \
- else \
- SLJIT_ASSERT_STOP();
-
-#define FUNCTION_FCHECK(p, i) \
- if ((p) >= SLJIT_FLOAT_REG1 && (p) <= SLJIT_FLOAT_REG4) \
- SLJIT_ASSERT(i == 0); \
- else if ((p) & SLJIT_MEM) { \
- SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & 0xf)); \
- if ((p) & 0xf0) { \
- SLJIT_ASSERT(FUNCTION_CHECK_IS_REG(((p) >> 4) & 0xf)); \
- SLJIT_ASSERT(((p) & 0xf0) != (SLJIT_LOCALS_REG << 4) && !(i & ~0x3)); \
- } else \
- SLJIT_ASSERT((((p) >> 4) & 0xf) == 0); \
- SLJIT_ASSERT(((p) >> 9) == 0); \
- } \
- else \
- SLJIT_ASSERT_STOP();
-
-#define FUNCTION_CHECK_OP1() \
- if (GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_MOVU_SI) { \
- SLJIT_ASSERT(!GET_ALL_FLAGS(op)); \
- } \
- if (GET_OPCODE(op) >= SLJIT_MOVU && GET_OPCODE(op) <= SLJIT_MOVU_SI) { \
- SLJIT_ASSERT(!(src & SLJIT_MEM) || (src & 0xf) != SLJIT_LOCALS_REG); \
- SLJIT_ASSERT(!(dst & SLJIT_MEM) || (dst & 0xf) != SLJIT_LOCALS_REG); \
- if ((src & SLJIT_MEM) && (src & 0xf)) \
- SLJIT_ASSERT((dst & 0xf) != (src & 0xf) && ((dst >> 4) & 0xf) != (src & 0xf)); \
- }
-
-#endif
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose)
-{
- compiler->verbose = verbose;
-}
-
-static char* reg_names[] = {
- (char*)"<noreg>", (char*)"t1", (char*)"t2", (char*)"t3",
- (char*)"te1", (char*)"te2", (char*)"s1", (char*)"s2",
- (char*)"s3", (char*)"se1", (char*)"se2", (char*)"lcr"
-};
-
-static char* freg_names[] = {
- (char*)"<noreg>", (char*)"float_r1", (char*)"float_r2", (char*)"float_r3", (char*)"float_r4"
-};
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#ifdef _WIN64
- #define SLJIT_PRINT_D "I64"
-#else
- #define SLJIT_PRINT_D "l"
-#endif
-#else
- #define SLJIT_PRINT_D ""
-#endif
-
-#define sljit_verbose_param(p, i) \
- if ((p) & SLJIT_IMM) \
- fprintf(compiler->verbose, "#%"SLJIT_PRINT_D"d", (i)); \
- else if ((p) & SLJIT_MEM) { \
- if ((p) & 0xf) { \
- if (i) { \
- if (((p) >> 4) & 0xf) \
- fprintf(compiler->verbose, "[%s + %s * %d]", reg_names[(p) & 0xF], reg_names[((p) >> 4)& 0xF], 1 << (i)); \
- else \
- fprintf(compiler->verbose, "[%s + #%"SLJIT_PRINT_D"d]", reg_names[(p) & 0xF], (i)); \
- } \
- else { \
- if (((p) >> 4) & 0xf) \
- fprintf(compiler->verbose, "[%s + %s]", reg_names[(p) & 0xF], reg_names[((p) >> 4)& 0xF]); \
- else \
- fprintf(compiler->verbose, "[%s]", reg_names[(p) & 0xF]); \
- } \
- } \
- else \
- fprintf(compiler->verbose, "[#%"SLJIT_PRINT_D"d]", (i)); \
- } else \
- fprintf(compiler->verbose, "%s", reg_names[p]);
-#define sljit_verbose_fparam(p, i) \
- if ((p) & SLJIT_MEM) { \
- if ((p) & 0xf) { \
- if (i) { \
- if (((p) >> 4) & 0xf) \
- fprintf(compiler->verbose, "[%s + %s * %d]", reg_names[(p) & 0xF], reg_names[((p) >> 4)& 0xF], 1 << (i)); \
- else \
- fprintf(compiler->verbose, "[%s + #%"SLJIT_PRINT_D"d]", reg_names[(p) & 0xF], (i)); \
- } \
- else { \
- if (((p) >> 4) & 0xF) \
- fprintf(compiler->verbose, "[%s + %s]", reg_names[(p) & 0xF], reg_names[((p) >> 4)& 0xF]); \
- else \
- fprintf(compiler->verbose, "[%s]", reg_names[(p) & 0xF]); \
- } \
- } \
- else \
- fprintf(compiler->verbose, "[#%"SLJIT_PRINT_D"d]", (i)); \
- } else \
- fprintf(compiler->verbose, "%s", freg_names[p]);
-
-static SLJIT_CONST char* op_names[] = {
- /* op0 */
- (char*)"breakpoint", (char*)"nop",
- (char*)"umul", (char*)"smul", (char*)"udiv", (char*)"sdiv",
- /* op1 */
- (char*)"mov", (char*)"mov.ub", (char*)"mov.sb", (char*)"mov.uh",
- (char*)"mov.sh", (char*)"mov.ui", (char*)"mov.si", (char*)"movu",
- (char*)"movu.ub", (char*)"movu.sb", (char*)"movu.uh", (char*)"movu.sh",
- (char*)"movu.ui", (char*)"movu.si", (char*)"not", (char*)"neg",
- (char*)"clz",
- /* op2 */
- (char*)"add", (char*)"addc", (char*)"sub", (char*)"subc",
- (char*)"mul", (char*)"and", (char*)"or", (char*)"xor",
- (char*)"shl", (char*)"lshr", (char*)"ashr",
- /* fop1 */
- (char*)"fcmp", (char*)"fmov", (char*)"fneg", (char*)"fabs",
- /* fop2 */
- (char*)"fadd", (char*)"fsub", (char*)"fmul", (char*)"fdiv"
-};
-
-static char* jump_names[] = {
- (char*)"c_equal", (char*)"c_not_equal",
- (char*)"c_less", (char*)"c_greater_equal",
- (char*)"c_greater", (char*)"c_less_equal",
- (char*)"c_sig_less", (char*)"c_sig_greater_equal",
- (char*)"c_sig_greater", (char*)"c_sig_less_equal",
- (char*)"c_overflow", (char*)"c_not_overflow",
- (char*)"c_mul_overflow", (char*)"c_mul_not_overflow",
- (char*)"c_float_equal", (char*)"c_float_not_equal",
- (char*)"c_float_less", (char*)"c_float_greater_equal",
- (char*)"c_float_greater", (char*)"c_float_less_equal",
- (char*)"c_float_nan", (char*)"c_float_not_nan",
- (char*)"jump", (char*)"fast_call",
- (char*)"call0", (char*)"call1", (char*)"call2", (char*)"call3"
-};
-
-#endif
-
-/* --------------------------------------------------------------------- */
-/* Arch dependent */
-/* --------------------------------------------------------------------- */
-
-static SLJIT_INLINE void check_sljit_generate_code(struct sljit_compiler *compiler)
-{
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- struct sljit_jump *jump;
-#endif
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
-
- SLJIT_ASSERT(compiler->size > 0);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- jump = compiler->jumps;
- while (jump) {
- /* All jumps have target. */
- SLJIT_ASSERT(jump->flags & (JUMP_LABEL | JUMP_ADDR));
- jump = jump->next;
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(args);
- SLJIT_UNUSED_ARG(temporaries);
- SLJIT_UNUSED_ARG(saveds);
- SLJIT_UNUSED_ARG(local_size);
-
- SLJIT_ASSERT(args >= 0 && args <= 3);
- SLJIT_ASSERT(temporaries >= 0 && temporaries <= SLJIT_NO_TMP_REGISTERS);
- SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
- SLJIT_ASSERT(args <= saveds);
- SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose))
- fprintf(compiler->verbose, " enter args=%d temporaries=%d saveds=%d local_size=%d\n", args, temporaries, saveds, local_size);
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(args);
- SLJIT_UNUSED_ARG(temporaries);
- SLJIT_UNUSED_ARG(saveds);
- SLJIT_UNUSED_ARG(local_size);
-
- SLJIT_ASSERT(args >= 0 && args <= 3);
- SLJIT_ASSERT(temporaries >= 0 && temporaries <= SLJIT_NO_TMP_REGISTERS);
- SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
- SLJIT_ASSERT(args <= saveds);
- SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose))
- fprintf(compiler->verbose, " fake_enter args=%d temporaries=%d saveds=%d local_size=%d\n", args, temporaries, saveds, local_size);
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- if (op != SLJIT_UNUSED) {
- SLJIT_ASSERT(op >= SLJIT_MOV && op <= SLJIT_MOV_SI);
- FUNCTION_CHECK_SRC(src, srcw);
- }
- else
- SLJIT_ASSERT(src == 0 && srcw == 0);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- if (op == SLJIT_UNUSED)
- fprintf(compiler->verbose, " return\n");
- else {
- fprintf(compiler->verbose, " return %s ", op_names[op]);
- sljit_verbose_param(src, srcw);
- fprintf(compiler->verbose, "\n");
- }
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(args);
- SLJIT_UNUSED_ARG(temporaries);
- SLJIT_UNUSED_ARG(saveds);
- SLJIT_UNUSED_ARG(local_size);
-
- SLJIT_ASSERT(args >= 0 && args <= 3);
- SLJIT_ASSERT(temporaries >= 0 && temporaries <= SLJIT_NO_TMP_REGISTERS);
- SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
- SLJIT_ASSERT(args <= saveds);
- SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
- FUNCTION_CHECK_DST(dst, dstw);
- compiler->temporaries = -1;
- compiler->saveds = -1;
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " fast_enter ");
- sljit_verbose_param(dst, dstw);
- fprintf(compiler->verbose, " args=%d temporaries=%d saveds=%d local_size=%d\n", args, temporaries, saveds, local_size);
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_CHECK_SRC(src, srcw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " fast_return ");
- sljit_verbose_param(src, srcw);
- fprintf(compiler->verbose, "\n");
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_op0(struct sljit_compiler *compiler, int op)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
-
- SLJIT_ASSERT((op >= SLJIT_BREAKPOINT && op <= SLJIT_SMUL)
- || ((op & ~SLJIT_INT_OP) >= SLJIT_UDIV && (op & ~SLJIT_INT_OP) <= SLJIT_SDIV));
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose))
- fprintf(compiler->verbose, " %s%s\n", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)]);
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_op1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- if (SLJIT_UNLIKELY(compiler->skip_checks)) {
- compiler->skip_checks = 0;
- return;
- }
-#endif
-
- SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_CLZ);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_CHECK_OP();
- FUNCTION_CHECK_SRC(src, srcw);
- FUNCTION_CHECK_DST(dst, dstw);
- FUNCTION_CHECK_OP1();
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)],
- !(op & SLJIT_SET_E) ? "" : "E", !(op & SLJIT_SET_S) ? "" : "S", !(op & SLJIT_SET_U) ? "" : "U", !(op & SLJIT_SET_O) ? "" : "O", !(op & SLJIT_SET_C) ? "" : "C", !(op & SLJIT_KEEP_FLAGS) ? "" : "K");
- sljit_verbose_param(dst, dstw);
- fprintf(compiler->verbose, ", ");
- sljit_verbose_param(src, srcw);
- fprintf(compiler->verbose, "\n");
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_op2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(src1);
- SLJIT_UNUSED_ARG(src1w);
- SLJIT_UNUSED_ARG(src2);
- SLJIT_UNUSED_ARG(src2w);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- if (SLJIT_UNLIKELY(compiler->skip_checks)) {
- compiler->skip_checks = 0;
- return;
- }
-#endif
-
- SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_ADD && GET_OPCODE(op) <= SLJIT_ASHR);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_CHECK_OP();
- FUNCTION_CHECK_SRC(src1, src1w);
- FUNCTION_CHECK_SRC(src2, src2w);
- FUNCTION_CHECK_DST(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)],
- !(op & SLJIT_SET_E) ? "" : "E", !(op & SLJIT_SET_S) ? "" : "S", !(op & SLJIT_SET_U) ? "" : "U", !(op & SLJIT_SET_O) ? "" : "O", !(op & SLJIT_SET_C) ? "" : "C", !(op & SLJIT_KEEP_FLAGS) ? "" : "K");
- sljit_verbose_param(dst, dstw);
- fprintf(compiler->verbose, ", ");
- sljit_verbose_param(src1, src1w);
- fprintf(compiler->verbose, ", ");
- sljit_verbose_param(src2, src2w);
- fprintf(compiler->verbose, "\n");
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_get_register_index(int reg)
-{
- SLJIT_UNUSED_ARG(reg);
- SLJIT_ASSERT(reg > 0 && reg <= SLJIT_NO_REGISTERS);
-}
-
-static SLJIT_INLINE void check_sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, int size)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(instruction);
- SLJIT_UNUSED_ARG(size);
- SLJIT_ASSERT(instruction);
-}
-
-static SLJIT_INLINE void check_sljit_emit_fop1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- if (SLJIT_UNLIKELY(compiler->skip_checks)) {
- compiler->skip_checks = 0;
- return;
- }
-#endif
-
- SLJIT_ASSERT(sljit_is_fpu_available());
- SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_FCMP && GET_OPCODE(op) <= SLJIT_FABS);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_CHECK_OP();
- FUNCTION_FCHECK(src, srcw);
- FUNCTION_FCHECK(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " %s%s%s ", op_names[GET_OPCODE(op)],
- !(op & SLJIT_SET_E) ? "" : "E", !(op & SLJIT_SET_S) ? "" : "S");
- sljit_verbose_fparam(dst, dstw);
- fprintf(compiler->verbose, ", ");
- sljit_verbose_fparam(src, srcw);
- fprintf(compiler->verbose, "\n");
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_fop2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(src1);
- SLJIT_UNUSED_ARG(src1w);
- SLJIT_UNUSED_ARG(src2);
- SLJIT_UNUSED_ARG(src2w);
-
- SLJIT_ASSERT(sljit_is_fpu_available());
- SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_FADD && GET_OPCODE(op) <= SLJIT_FDIV);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_CHECK_OP();
- FUNCTION_FCHECK(src1, src1w);
- FUNCTION_FCHECK(src2, src2w);
- FUNCTION_FCHECK(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " %s ", op_names[GET_OPCODE(op)]);
- sljit_verbose_fparam(dst, dstw);
- fprintf(compiler->verbose, ", ");
- sljit_verbose_fparam(src1, src1w);
- fprintf(compiler->verbose, ", ");
- sljit_verbose_fparam(src2, src2w);
- fprintf(compiler->verbose, "\n");
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_label(struct sljit_compiler *compiler)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose))
- fprintf(compiler->verbose, "label:\n");
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_jump(struct sljit_compiler *compiler, int type)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(type);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- if (SLJIT_UNLIKELY(compiler->skip_checks)) {
- compiler->skip_checks = 0;
- return;
- }
-#endif
-
- SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP)));
- SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_CALL3);
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose))
- fprintf(compiler->verbose, " jump%s <%s>\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]);
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_cmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(type);
- SLJIT_UNUSED_ARG(src1);
- SLJIT_UNUSED_ARG(src1w);
- SLJIT_UNUSED_ARG(src2);
- SLJIT_UNUSED_ARG(src2w);
-
- SLJIT_ASSERT(!(type & ~(0xff | SLJIT_INT_OP | SLJIT_REWRITABLE_JUMP)));
- SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_C_SIG_LESS_EQUAL);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_CHECK_SRC(src1, src1w);
- FUNCTION_CHECK_SRC(src2, src2w);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " %scmp%s <%s> ", !(type & SLJIT_INT_OP) ? "" : "i", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]);
- sljit_verbose_param(src1, src1w);
- fprintf(compiler->verbose, ", ");
- sljit_verbose_param(src2, src2w);
- fprintf(compiler->verbose, "\n");
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_fcmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(type);
- SLJIT_UNUSED_ARG(src1);
- SLJIT_UNUSED_ARG(src1w);
- SLJIT_UNUSED_ARG(src2);
- SLJIT_UNUSED_ARG(src2w);
-
- SLJIT_ASSERT(sljit_is_fpu_available());
- SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP)));
- SLJIT_ASSERT((type & 0xff) >= SLJIT_C_FLOAT_EQUAL && (type & 0xff) <= SLJIT_C_FLOAT_NOT_NAN);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_FCHECK(src1, src1w);
- FUNCTION_FCHECK(src2, src2w);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " fcmp%s <%s> ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]);
- sljit_verbose_fparam(src1, src1w);
- fprintf(compiler->verbose, ", ");
- sljit_verbose_fparam(src2, src2w);
- fprintf(compiler->verbose, "\n");
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(type);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
-
- SLJIT_ASSERT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_CHECK_SRC(src, srcw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " ijump <%s> ", jump_names[type]);
- sljit_verbose_param(src, srcw);
- fprintf(compiler->verbose, "\n");
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(type);
-
- SLJIT_ASSERT(type >= SLJIT_C_EQUAL && type < SLJIT_JUMP);
- SLJIT_ASSERT(op == SLJIT_MOV || GET_OPCODE(op) == SLJIT_OR);
- SLJIT_ASSERT(GET_ALL_FLAGS(op) == 0 || GET_ALL_FLAGS(op) == SLJIT_SET_E || GET_ALL_FLAGS(op) == SLJIT_KEEP_FLAGS);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_CHECK_DST(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " cond_set%s%s <%s> ", !(op & SLJIT_SET_E) ? "" : "E",
- !(op & SLJIT_KEEP_FLAGS) ? "" : "K", op_names[GET_OPCODE(op)]);
- sljit_verbose_param(dst, dstw);
- fprintf(compiler->verbose, ", <%s>\n", jump_names[type]);
- }
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)
-{
- /* If debug and verbose are disabled, all arguments are unused. */
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(init_value);
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
- FUNCTION_CHECK_DST(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- if (SLJIT_UNLIKELY(!!compiler->verbose)) {
- fprintf(compiler->verbose, " const ");
- sljit_verbose_param(dst, dstw);
- fprintf(compiler->verbose, ", #%"SLJIT_PRINT_D"d\n", init_value);
- }
-#endif
-}
-
-static SLJIT_INLINE int emit_mov_before_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)
-{
- /* Return if don't need to do anything. */
- if (op == SLJIT_UNUSED)
- return SLJIT_SUCCESS;
-
-#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
- if (src == SLJIT_RETURN_REG && op == SLJIT_MOV)
- return SLJIT_SUCCESS;
-#else
- if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_UI || op == SLJIT_MOV_SI))
- return SLJIT_SUCCESS;
-#endif
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw);
-}
-
-/* CPU description section */
-
-#if (defined SLJIT_32BIT_ARCHITECTURE && SLJIT_32BIT_ARCHITECTURE)
-#define SLJIT_CPUINFO_PART1 " 32bit ("
-#elif (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
-#define SLJIT_CPUINFO_PART1 " 64bit ("
-#else
-#error "Internal error: CPU type info missing"
-#endif
-
-#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
-#define SLJIT_CPUINFO_PART2 "little endian + "
-#elif (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN)
-#define SLJIT_CPUINFO_PART2 "big endian + "
-#else
-#error "Internal error: CPU type info missing"
-#endif
-
-#if (defined SLJIT_UNALIGNED && SLJIT_UNALIGNED)
-#define SLJIT_CPUINFO_PART3 "unaligned)"
-#else
-#define SLJIT_CPUINFO_PART3 "aligned)"
-#endif
-
-#define SLJIT_CPUINFO SLJIT_CPUINFO_PART1 SLJIT_CPUINFO_PART2 SLJIT_CPUINFO_PART3
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- #include "sljitNativeX86_common.c"
-#elif (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- #include "sljitNativeX86_common.c"
-#elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- #include "sljitNativeARM_v5.c"
-#elif (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
- #include "sljitNativeARM_v5.c"
-#elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
- #include "sljitNativeARM_Thumb2.c"
-#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- #include "sljitNativePPC_common.c"
-#elif (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- #include "sljitNativePPC_common.c"
-#elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- #include "sljitNativeMIPS_common.c"
-#endif
-
-#if !(defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- /* Default compare for most architectures. */
- int flags, tmp_src, condition;
- sljit_w tmp_srcw;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w);
-
- condition = type & 0xff;
- if (SLJIT_UNLIKELY((src1 & SLJIT_IMM) && !(src2 & SLJIT_IMM))) {
- /* Immediate is prefered as second argument by most architectures. */
- switch (condition) {
- case SLJIT_C_LESS:
- condition = SLJIT_C_GREATER;
- break;
- case SLJIT_C_GREATER_EQUAL:
- condition = SLJIT_C_LESS_EQUAL;
- break;
- case SLJIT_C_GREATER:
- condition = SLJIT_C_LESS;
- break;
- case SLJIT_C_LESS_EQUAL:
- condition = SLJIT_C_GREATER_EQUAL;
- break;
- case SLJIT_C_SIG_LESS:
- condition = SLJIT_C_SIG_GREATER;
- break;
- case SLJIT_C_SIG_GREATER_EQUAL:
- condition = SLJIT_C_SIG_LESS_EQUAL;
- break;
- case SLJIT_C_SIG_GREATER:
- condition = SLJIT_C_SIG_LESS;
- break;
- case SLJIT_C_SIG_LESS_EQUAL:
- condition = SLJIT_C_SIG_GREATER_EQUAL;
- break;
- }
- type = condition | (type & (SLJIT_INT_OP | SLJIT_REWRITABLE_JUMP));
- tmp_src = src1;
- src1 = src2;
- src2 = tmp_src;
- tmp_srcw = src1w;
- src1w = src2w;
- src2w = tmp_srcw;
- }
-
- if (condition <= SLJIT_C_NOT_ZERO)
- flags = SLJIT_SET_E;
- else if (condition <= SLJIT_C_LESS_EQUAL)
- flags = SLJIT_SET_U;
- else
- flags = SLJIT_SET_S;
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- PTR_FAIL_IF(sljit_emit_op2(compiler, SLJIT_SUB | flags | (type & SLJIT_INT_OP),
- SLJIT_UNUSED, 0, src1, src1w, src2, src2w));
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- int flags, condition;
-
- check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w);
-
- condition = type & 0xff;
- if (condition <= SLJIT_C_FLOAT_NOT_EQUAL)
- flags = SLJIT_SET_E;
- else
- flags = SLJIT_SET_S;
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- sljit_emit_fop1(compiler, SLJIT_FCMP | flags, src1, src1w, src2, src2w);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
-}
-
-#endif
-
-#else /* SLJIT_CONFIG_UNSUPPORTED */
-
-/* Empty function bodies for those machines, which are not (yet) supported. */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name()
-{
- return "unsupported";
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void)
-{
- SLJIT_ASSERT_STOP();
- return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, int size)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(size);
- SLJIT_ASSERT_STOP();
- return NULL;
-}
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(verbose);
- SLJIT_ASSERT_STOP();
-}
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_ASSERT_STOP();
- return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
-{
- SLJIT_UNUSED_ARG(code);
- SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(args);
- SLJIT_UNUSED_ARG(temporaries);
- SLJIT_UNUSED_ARG(saveds);
- SLJIT_UNUSED_ARG(local_size);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(args);
- SLJIT_UNUSED_ARG(temporaries);
- SLJIT_UNUSED_ARG(saveds);
- SLJIT_UNUSED_ARG(local_size);
- SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(args);
- SLJIT_UNUSED_ARG(temporaries);
- SLJIT_UNUSED_ARG(saveds);
- SLJIT_UNUSED_ARG(local_size);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(src1);
- SLJIT_UNUSED_ARG(src1w);
- SLJIT_UNUSED_ARG(src2);
- SLJIT_UNUSED_ARG(src2w);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
-{
- SLJIT_ASSERT_STOP();
- return reg;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, int size)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(instruction);
- SLJIT_UNUSED_ARG(size);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)
-{
- SLJIT_ASSERT_STOP();
- return 0;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(src1);
- SLJIT_UNUSED_ARG(src1w);
- SLJIT_UNUSED_ARG(src2);
- SLJIT_UNUSED_ARG(src2w);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_ASSERT_STOP();
- return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(type);
- SLJIT_ASSERT_STOP();
- return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(type);
- SLJIT_UNUSED_ARG(src1);
- SLJIT_UNUSED_ARG(src1w);
- SLJIT_UNUSED_ARG(src2);
- SLJIT_UNUSED_ARG(src2w);
- SLJIT_ASSERT_STOP();
- return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(type);
- SLJIT_UNUSED_ARG(src1);
- SLJIT_UNUSED_ARG(src1w);
- SLJIT_UNUSED_ARG(src2);
- SLJIT_UNUSED_ARG(src2w);
- SLJIT_ASSERT_STOP();
- return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label)
-{
- SLJIT_UNUSED_ARG(jump);
- SLJIT_UNUSED_ARG(label);
- SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target)
-{
- SLJIT_UNUSED_ARG(jump);
- SLJIT_UNUSED_ARG(target);
- SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(type);
- SLJIT_UNUSED_ARG(src);
- SLJIT_UNUSED_ARG(srcw);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(op);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(type);
- SLJIT_ASSERT_STOP();
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w initval)
-{
- SLJIT_UNUSED_ARG(compiler);
- SLJIT_UNUSED_ARG(dst);
- SLJIT_UNUSED_ARG(dstw);
- SLJIT_UNUSED_ARG(initval);
- SLJIT_ASSERT_STOP();
- return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
- SLJIT_UNUSED_ARG(addr);
- SLJIT_UNUSED_ARG(new_addr);
- SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant)
-{
- SLJIT_UNUSED_ARG(addr);
- SLJIT_UNUSED_ARG(new_constant);
- SLJIT_ASSERT_STOP();
-}
-
-#endif
diff --git a/src/third_party/pcre-8.30/sljit/sljitLir.h b/src/third_party/pcre-8.30/sljit/sljitLir.h
deleted file mode 100644
index 0cb1c1e589b..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitLir.h
+++ /dev/null
@@ -1,853 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SLJIT_LIR_H_
-#define _SLJIT_LIR_H_
-
-/*
- ------------------------------------------------------------------------
- Stack-Less JIT compiler for multiple architectures (x86, ARM, PowerPC)
- ------------------------------------------------------------------------
-
- Short description
- Advantages:
- - The execution can be continued from any LIR instruction
- In other words, jump into and out of the code is safe
- - Both target of (conditional) jump and call instructions
- and constants can be dynamically modified during runtime
- - although it is not suggested to do it frequently
- - very effective to cache an important value once
- - A fixed stack space can be allocated for local variables
- - The compiler is thread-safe
- Disadvantages:
- - Limited number of registers (only 6+4 integer registers, max 3+2
- temporary, max 3+2 saved and 4 floating point registers)
- In practice:
- - This approach is very effective for interpreters
- - One of the saved registers typically points to a stack interface
- - It can jump to any exception handler anytime (even for another
- function. It is safe for SLJIT.)
- - Fast paths can be modified during runtime reflecting the changes
- of the fastest execution path of the dynamic language
- - SLJIT supports complex memory addressing modes
- - mainly position independent code
- - Optimizations (perhaps later)
- - Only for basic blocks (when no labels inserted between LIR instructions)
-
- For valgrind users:
- - pass --smc-check=all argument to valgrind, since JIT is a "self-modifying code"
-*/
-
-#if !(defined SLJIT_NO_DEFAULT_CONFIG && SLJIT_NO_DEFAULT_CONFIG)
-#include "sljitConfig.h"
-#endif
-
-/* The following header file defines useful macros for fine tuning
-sljit based code generators. They are listed in the begining
-of sljitConfigInternal.h */
-
-#include "sljitConfigInternal.h"
-
-/* --------------------------------------------------------------------- */
-/* Error codes */
-/* --------------------------------------------------------------------- */
-
-/* Indicates no error. */
-#define SLJIT_SUCCESS 0
-/* After the call of sljit_generate_code(), the error code of the compiler
- is set to this value to avoid future sljit calls (in debug mode at least).
- The complier should be freed after sljit_generate_code(). */
-#define SLJIT_ERR_COMPILED 1
-/* Cannot allocate non executable memory. */
-#define SLJIT_ERR_ALLOC_FAILED 2
-/* Cannot allocate executable memory.
- Only for sljit_generate_code() */
-#define SLJIT_ERR_EX_ALLOC_FAILED 3
-/* return value for SLJIT_CONFIG_UNSUPPORTED empty architecture. */
-#define SLJIT_ERR_UNSUPPORTED 4
-
-/* --------------------------------------------------------------------- */
-/* Registers */
-/* --------------------------------------------------------------------- */
-
-#define SLJIT_UNUSED 0
-
-/* Temporary (scratch) registers may not preserve their values across function calls. */
-#define SLJIT_TEMPORARY_REG1 1
-#define SLJIT_TEMPORARY_REG2 2
-#define SLJIT_TEMPORARY_REG3 3
-/* Note: Extra Registers cannot be used for memory addressing. */
-/* Note: on x86-32, these registers are emulated (using stack loads & stores). */
-#define SLJIT_TEMPORARY_EREG1 4
-#define SLJIT_TEMPORARY_EREG2 5
-
-/* Saved registers whose preserve their values across function calls. */
-#define SLJIT_SAVED_REG1 6
-#define SLJIT_SAVED_REG2 7
-#define SLJIT_SAVED_REG3 8
-/* Note: Extra Registers cannot be used for memory addressing. */
-/* Note: on x86-32, these registers are emulated (using stack loads & stores). */
-#define SLJIT_SAVED_EREG1 9
-#define SLJIT_SAVED_EREG2 10
-
-/* Read-only register (cannot be the destination of an operation). */
-/* Note: SLJIT_MEM2( ... , SLJIT_LOCALS_REG) is not supported (x86 limitation). */
-/* Note: SLJIT_LOCALS_REG is not necessary the real stack pointer. See sljit_emit_enter. */
-#define SLJIT_LOCALS_REG 11
-
-/* Number of registers. */
-#define SLJIT_NO_TMP_REGISTERS 5
-#define SLJIT_NO_GEN_REGISTERS 5
-#define SLJIT_NO_REGISTERS 11
-
-/* Return with machine word. */
-
-#define SLJIT_RETURN_REG SLJIT_TEMPORARY_REG1
-
-/* x86 prefers specific registers for special purposes. In case of shift
- by register it supports only SLJIT_TEMPORARY_REG3 for shift argument
- (which is the src2 argument of sljit_emit_op2). If another register is
- used, sljit must exchange data between registers which cause a minor
- slowdown. Other architectures has no such limitation. */
-
-#define SLJIT_PREF_SHIFT_REG SLJIT_TEMPORARY_REG3
-
-/* --------------------------------------------------------------------- */
-/* Floating point registers */
-/* --------------------------------------------------------------------- */
-
-/* Note: SLJIT_UNUSED as destination is not valid for floating point
- operations, since they cannot be used for setting flags. */
-
-/* Floating point operations are performed on double precision values. */
-
-#define SLJIT_FLOAT_REG1 1
-#define SLJIT_FLOAT_REG2 2
-#define SLJIT_FLOAT_REG3 3
-#define SLJIT_FLOAT_REG4 4
-
-/* --------------------------------------------------------------------- */
-/* Main structures and functions */
-/* --------------------------------------------------------------------- */
-
-struct sljit_memory_fragment {
- struct sljit_memory_fragment *next;
- sljit_uw used_size;
- sljit_ub memory[1];
-};
-
-struct sljit_label {
- struct sljit_label *next;
- sljit_uw addr;
- /* The maximum size difference. */
- sljit_uw size;
-};
-
-struct sljit_jump {
- struct sljit_jump *next;
- sljit_uw addr;
- sljit_w flags;
- union {
- sljit_uw target;
- struct sljit_label* label;
- } u;
-};
-
-struct sljit_const {
- struct sljit_const *next;
- sljit_uw addr;
-};
-
-struct sljit_compiler {
- int error;
-
- struct sljit_label *labels;
- struct sljit_jump *jumps;
- struct sljit_const *consts;
- struct sljit_label *last_label;
- struct sljit_jump *last_jump;
- struct sljit_const *last_const;
-
- struct sljit_memory_fragment *buf;
- struct sljit_memory_fragment *abuf;
-
- /* Used local registers. */
- int temporaries;
- /* Used saved registers. */
- int saveds;
- /* Local stack size. */
- int local_size;
- /* Code size. */
- sljit_uw size;
- /* For statistical purposes. */
- sljit_uw executable_size;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- int args;
- int temporaries_start;
- int saveds_start;
-#endif
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- int mode32;
-#ifdef _WIN64
- int has_locals;
-#endif
-#endif
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- int flags_saved;
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- /* Constant pool handling. */
- sljit_uw *cpool;
- sljit_ub *cpool_unique;
- sljit_uw cpool_diff;
- sljit_uw cpool_fill;
- /* Other members. */
- /* Contains pointer, "ldr pc, [...]" pairs. */
- sljit_uw patches;
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
- /* Temporary fields. */
- sljit_uw shift_imm;
- int cache_arg;
- sljit_w cache_argw;
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
- int cache_arg;
- sljit_w cache_argw;
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- int has_locals;
- sljit_w imm;
- int cache_arg;
- sljit_w cache_argw;
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- int has_locals;
- int delay_slot;
- int cache_arg;
- sljit_w cache_argw;
-#endif
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
- FILE* verbose;
-#endif
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- int skip_checks;
-#endif
-};
-
-/* --------------------------------------------------------------------- */
-/* Main functions */
-/* --------------------------------------------------------------------- */
-
-/* Creates an sljit compiler.
- Returns NULL if failed. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void);
-/* Free everything except the codes. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler);
-
-static SLJIT_INLINE int sljit_get_compiler_error(struct sljit_compiler *compiler) { return compiler->error; }
-
-/*
- Allocate a small amount of memory. The size must be <= 64 bytes on 32 bit,
- and <= 128 bytes on 64 bit architectures. The memory area is owned by the compiler,
- and freed by sljit_free_compiler. The returned pointer is sizeof(sljit_w) aligned.
- Excellent for allocating small blocks during the compiling, and no need to worry
- about freeing them. The size is enough to contain at most 16 pointers.
- If the size is outside of the range, the function will return with NULL,
- but this return value does not indicate that there is no more memory (does
- not set the compiler to out-of-memory status).
-*/
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, int size);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-/* Passing NULL disables verbose. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose);
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler);
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code);
-
-/*
- After the code generation we can retrieve the allocated executable memory size,
- although this area may not be fully filled with instructions depending on some
- optimizations. This function is useful only for statistical purposes.
-
- Before a successful code generation, this function returns with 0.
-*/
-static SLJIT_INLINE sljit_uw sljit_get_generated_code_size(struct sljit_compiler *compiler) { return compiler->executable_size; }
-
-/* Instruction generation. Returns with error code. */
-
-/*
- The executable code is basically a function call from the viewpoint of
- the C language. The function calls must obey to the ABI (Application
- Binary Interface) of the platform, which specify the purpose of machine
- registers and stack handling among other things. The sljit_emit_enter
- function emits the necessary instructions for setting up a new context
- for the executable code and moves function arguments to the saved
- registers. The number of arguments are specified in the "args"
- parameter and the first argument goes to SLJIT_SAVED_REG1, the second
- goes to SLJIT_SAVED_REG2 and so on. The number of temporary and
- saved registers are passed in "temporaries" and "saveds" arguments
- respectively. Since the saved registers contains the arguments,
- "args" must be less or equal than "saveds". The sljit_emit_enter
- is also capable of allocating a stack space for local variables. The
- "local_size" argument contains the size in bytes of this local area
- and its staring address is stored in SLJIT_LOCALS_REG. However
- the SLJIT_LOCALS_REG is not necessary the machine stack pointer.
- The memory bytes between SLJIT_LOCALS_REG (inclusive) and
- SLJIT_LOCALS_REG + local_size (exclusive) can be modified freely
- until the function returns. The stack space is uninitialized.
-
- Note: every call of sljit_emit_enter and sljit_set_context overwrites
- the previous context. */
-
-#define SLJIT_MAX_LOCAL_SIZE 65536
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler,
- int args, int temporaries, int saveds, int local_size);
-
-/* The machine code has a context (which contains the local stack space size,
- number of used registers, etc.) which initialized by sljit_emit_enter. Several
- functions (like sljit_emit_return) requres this context to be able to generate
- the appropriate code. However, some code fragments (like inline cache) may have
- no normal entry point so their context is unknown for the compiler. Using the
- function below we can specify thir context.
-
- Note: every call of sljit_emit_enter and sljit_set_context overwrites
- the previous context. */
-
-/* Note: multiple calls of this function overwrites the previous call. */
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler,
- int args, int temporaries, int saveds, int local_size);
-
-/* Return from machine code. The op argument can be SLJIT_UNUSED which means the
- function does not return with anything or any opcode between SLJIT_MOV and
- SLJIT_MOV_SI (see sljit_emit_op1). As for src and srcw they must be 0 if op
- is SLJIT_UNUSED, otherwise see below the description about source and
- destination arguments. */
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op,
- int src, sljit_w srcw);
-
-/* Really fast calling method for utility functions inside sljit (see SLJIT_FAST_CALL).
- All registers and even the stack frame is passed to the callee. The return address is
- preserved in dst/dstw by sljit_emit_fast_enter, and sljit_emit_fast_return can
- use this as a return value later. */
-
-/* Note: only for sljit specific, non ABI compilant calls. Fast, since only a few machine instructions
- are needed. Excellent for small uility functions, where saving registers and setting up
- a new stack frame would cost too much performance. However, it is still possible to return
- to the address of the caller (or anywhere else). */
-
-/* Note: flags are not changed (unlike sljit_emit_enter / sljit_emit_return). */
-
-/* Note: although sljit_emit_fast_return could be replaced by an ijump, it is not suggested,
- since many architectures do clever branch prediction on call / return instruction pairs. */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size);
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw);
-
-/*
- Source and destination values for arithmetical instructions
- imm - a simple immediate value (cannot be used as a destination)
- reg - any of the registers (immediate argument must be 0)
- [imm] - absolute immediate memory address
- [reg+imm] - indirect memory address
- [reg+(reg<<imm)] - indirect indexed memory address (shift must be between 0 and 3)
- useful for (byte, half, int, sljit_w) array access
- (fully supported by both x86 and ARM architectures, and cheap operation on others)
-*/
-
-/*
- IMPORATNT NOTE: memory access MUST be naturally aligned except
- SLJIT_UNALIGNED macro is defined and its value is 1.
-
- length | alignment
- ---------+-----------
- byte | 1 byte (not aligned)
- half | 2 byte (real_address & 0x1 == 0)
- int | 4 byte (real_address & 0x3 == 0)
- sljit_w | 4 byte if SLJIT_32BIT_ARCHITECTURE is defined and its value is 1
- | 8 byte if SLJIT_64BIT_ARCHITECTURE is defined and its value is 1
-
- Note: different architectures have different addressing limitations
- Thus sljit may generate several instructions for other addressing modes
- x86: all addressing modes supported, but write-back is not supported
- (requires an extra instruction). On x86-64 only 32 bit signed
- integers are supported by the architecture.
- arm: [reg+imm] supported for small immediates (-4095 <= imm <= 4095
- or -255 <= imm <= 255 for loading signed bytes, any halfs or doubles)
- [reg+(reg<<imm)] are supported or requires only two instructions
- Write back is limited to small immediates on thumb2
- ppc: [reg+imm], -65535 <= imm <= 65535. 64 bit moves requires immediates
- divisible by 4. [reg+reg] supported, write-back supported
- [reg+(reg<<imm)] (imm != 0) is cheap (requires two instructions)
-*/
-
-/* Register output: simply the name of the register.
- For destination, you can use SLJIT_UNUSED as well. */
-#define SLJIT_MEM 0x100
-#define SLJIT_MEM0() (SLJIT_MEM)
-#define SLJIT_MEM1(r1) (SLJIT_MEM | (r1))
-#define SLJIT_MEM2(r1, r2) (SLJIT_MEM | (r1) | ((r2) << 4))
-#define SLJIT_IMM 0x200
-
-/* Set 32 bit operation mode (I) on 64 bit CPUs. The flag is totally ignored on
- 32 bit CPUs. The arithmetic instruction uses only the lower 32 bit of the
- input register(s), and set the flags according to the 32 bit result. If the
- destination is a register, the higher 32 bit of the result is undefined.
- The addressing modes (SLJIT_MEM1/SLJIT_MEM2 macros) are unaffected by this flag. */
-#define SLJIT_INT_OP 0x100
-
-/* Common CPU status flags for all architectures (x86, ARM, PPC)
- - carry flag
- - overflow flag
- - zero flag
- - negative/positive flag (depends on arc)
- On mips, these flags are emulated by software. */
-
-/* By default, the instructions may, or may not set the CPU status flags.
- Forcing to set or keep status flags can be done with the following flags: */
-
-/* Note: sljit tries to emit the minimum number of instructions. Using these
- flags can increase them, so use them wisely to avoid unnecessary code generation. */
-
-/* Set Equal (Zero) status flag (E). */
-#define SLJIT_SET_E 0x0200
-/* Set signed status flag (S). */
-#define SLJIT_SET_S 0x0400
-/* Set unsgined status flag (U). */
-#define SLJIT_SET_U 0x0800
-/* Set signed overflow flag (O). */
-#define SLJIT_SET_O 0x1000
-/* Set carry flag (C).
- Note: Kinda unsigned overflow, but behaves differently on various cpus. */
-#define SLJIT_SET_C 0x2000
-/* Do not modify the flags (K).
- Note: This flag cannot be combined with any other SLJIT_SET_* flag. */
-#define SLJIT_KEEP_FLAGS 0x4000
-
-/* Notes:
- - you cannot postpone conditional jump instructions except if noted that
- the instruction does not set flags (See: SLJIT_KEEP_FLAGS).
- - flag combinations: '|' means 'logical or'. */
-
-/* Flags: - (never set any flags)
- Note: breakpoint instruction is not supported by all architectures (namely ppc)
- It falls back to SLJIT_NOP in those cases. */
-#define SLJIT_BREAKPOINT 0
-/* Flags: - (never set any flags)
- Note: may or may not cause an extra cycle wait
- it can even decrease the runtime in a few cases. */
-#define SLJIT_NOP 1
-/* Flags: may destroy flags
- Unsigned multiplication of SLJIT_TEMPORARY_REG1 and SLJIT_TEMPORARY_REG2.
- Result goes to SLJIT_TEMPORARY_REG2:SLJIT_TEMPORARY_REG1 (high:low) word */
-#define SLJIT_UMUL 2
-/* Flags: may destroy flags
- Signed multiplication of SLJIT_TEMPORARY_REG1 and SLJIT_TEMPORARY_REG2.
- Result goes to SLJIT_TEMPORARY_REG2:SLJIT_TEMPORARY_REG1 (high:low) word */
-#define SLJIT_SMUL 3
-/* Flags: I | may destroy flags
- Unsigned divide of the value in SLJIT_TEMPORARY_REG1 by the value in SLJIT_TEMPORARY_REG2.
- The result is placed in SLJIT_TEMPORARY_REG1 and the remainder goes to SLJIT_TEMPORARY_REG2.
- Note: if SLJIT_TEMPORARY_REG2 contains 0, the behaviour is undefined. */
-#define SLJIT_UDIV 4
-/* Flags: I | may destroy flags
- Signed divide of the value in SLJIT_TEMPORARY_REG1 by the value in SLJIT_TEMPORARY_REG2.
- The result is placed in SLJIT_TEMPORARY_REG1 and the remainder goes to SLJIT_TEMPORARY_REG2.
- Note: if SLJIT_TEMPORARY_REG2 contains 0, the behaviour is undefined. */
-#define SLJIT_SDIV 5
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op);
-
-/* Notes for MOV instructions:
- U = Mov with update (post form). If source or destination defined as SLJIT_MEM1(r1)
- or SLJIT_MEM2(r1, r2), r1 is increased by the sum of r2 and the constant argument
- UB = unsigned byte (8 bit)
- SB = signed byte (8 bit)
- UH = unsgined half (16 bit)
- SH = unsgined half (16 bit) */
-
-/* Flags: - (never set any flags) */
-#define SLJIT_MOV 6
-/* Flags: - (never set any flags) */
-#define SLJIT_MOV_UB 7
-/* Flags: - (never set any flags) */
-#define SLJIT_MOV_SB 8
-/* Flags: - (never set any flags) */
-#define SLJIT_MOV_UH 9
-/* Flags: - (never set any flags) */
-#define SLJIT_MOV_SH 10
-/* Flags: - (never set any flags) */
-#define SLJIT_MOV_UI 11
-/* Flags: - (never set any flags) */
-#define SLJIT_MOV_SI 12
-/* Flags: - (never set any flags) */
-#define SLJIT_MOVU 13
-/* Flags: - (never set any flags) */
-#define SLJIT_MOVU_UB 14
-/* Flags: - (never set any flags) */
-#define SLJIT_MOVU_SB 15
-/* Flags: - (never set any flags) */
-#define SLJIT_MOVU_UH 16
-/* Flags: - (never set any flags) */
-#define SLJIT_MOVU_SH 17
-/* Flags: - (never set any flags) */
-#define SLJIT_MOVU_UI 18
-/* Flags: - (never set any flags) */
-#define SLJIT_MOVU_SI 19
-/* Flags: I | E | K */
-#define SLJIT_NOT 20
-/* Flags: I | E | O | K */
-#define SLJIT_NEG 21
-/* Count leading zeroes
- Flags: I | E | K */
-#define SLJIT_CLZ 22
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw);
-
-/* Flags: I | E | O | C | K */
-#define SLJIT_ADD 23
-/* Flags: I | C | K */
-#define SLJIT_ADDC 24
-/* Flags: I | E | S | U | O | C | K */
-#define SLJIT_SUB 25
-/* Flags: I | C | K */
-#define SLJIT_SUBC 26
-/* Note: integer mul
- Flags: I | O (see SLJIT_C_MUL_*) | K */
-#define SLJIT_MUL 27
-/* Flags: I | E | K */
-#define SLJIT_AND 28
-/* Flags: I | E | K */
-#define SLJIT_OR 29
-/* Flags: I | E | K */
-#define SLJIT_XOR 30
-/* Flags: I | E | K
- Let bit_length be the length of the shift operation: 32 or 64.
- If src2 is immediate, src2w is masked by (bit_length - 1).
- Otherwise, if the content of src2 is outside the range from 0
- to bit_length - 1, the operation is undefined. */
-#define SLJIT_SHL 31
-/* Flags: I | E | K
- Let bit_length be the length of the shift operation: 32 or 64.
- If src2 is immediate, src2w is masked by (bit_length - 1).
- Otherwise, if the content of src2 is outside the range from 0
- to bit_length - 1, the operation is undefined. */
-#define SLJIT_LSHR 32
-/* Flags: I | E | K
- Let bit_length be the length of the shift operation: 32 or 64.
- If src2 is immediate, src2w is masked by (bit_length - 1).
- Otherwise, if the content of src2 is outside the range from 0
- to bit_length - 1, the operation is undefined. */
-#define SLJIT_ASHR 33
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w);
-
-/* The following function is a helper function for sljit_emit_op_custom.
- It returns with the real machine register index of any SLJIT_TEMPORARY
- SLJIT_SAVED or SLJIT_LOCALS register.
- Note: it returns with -1 for virtual registers (all EREGs on x86-32).
- Note: register returned by SLJIT_LOCALS_REG is not necessary the real
- stack pointer register of the target architecture. */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg);
-
-/* Any instruction can be inserted into the instruction stream by
- sljit_emit_op_custom. It has a similar purpose as inline assembly.
- The size parameter must match to the instruction size of the target
- architecture:
-
- x86: 0 < size <= 15. The instruction argument can be byte aligned.
- Thumb2: if size == 2, the instruction argument must be 2 byte aligned.
- if size == 4, the instruction argument must be 4 byte aligned.
- Otherwise: size must be 4 and instruction argument must be 4 byte aligned. */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, int size);
-
-/* Returns with non-zero if fpu is available. */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void);
-
-/* Note: dst is the left and src is the right operand for SLJIT_FCMP.
- Note: NaN check is always performed. If SLJIT_C_FLOAT_NAN is set,
- the comparison result is unpredictable.
- Flags: E | S (see SLJIT_C_FLOAT_*) */
-#define SLJIT_FCMP 34
-/* Flags: - (never set any flags) */
-#define SLJIT_FMOV 35
-/* Flags: - (never set any flags) */
-#define SLJIT_FNEG 36
-/* Flags: - (never set any flags) */
-#define SLJIT_FABS 37
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw);
-
-/* Flags: - (never set any flags) */
-#define SLJIT_FADD 38
-/* Flags: - (never set any flags) */
-#define SLJIT_FSUB 39
-/* Flags: - (never set any flags) */
-#define SLJIT_FMUL 40
-/* Flags: - (never set any flags) */
-#define SLJIT_FDIV 41
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w);
-
-/* Label and jump instructions. */
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler);
-
-/* Invert conditional instruction: xor (^) with 0x1 */
-#define SLJIT_C_EQUAL 0
-#define SLJIT_C_ZERO 0
-#define SLJIT_C_NOT_EQUAL 1
-#define SLJIT_C_NOT_ZERO 1
-
-#define SLJIT_C_LESS 2
-#define SLJIT_C_GREATER_EQUAL 3
-#define SLJIT_C_GREATER 4
-#define SLJIT_C_LESS_EQUAL 5
-#define SLJIT_C_SIG_LESS 6
-#define SLJIT_C_SIG_GREATER_EQUAL 7
-#define SLJIT_C_SIG_GREATER 8
-#define SLJIT_C_SIG_LESS_EQUAL 9
-
-#define SLJIT_C_OVERFLOW 10
-#define SLJIT_C_NOT_OVERFLOW 11
-
-#define SLJIT_C_MUL_OVERFLOW 12
-#define SLJIT_C_MUL_NOT_OVERFLOW 13
-
-#define SLJIT_C_FLOAT_EQUAL 14
-#define SLJIT_C_FLOAT_NOT_EQUAL 15
-#define SLJIT_C_FLOAT_LESS 16
-#define SLJIT_C_FLOAT_GREATER_EQUAL 17
-#define SLJIT_C_FLOAT_GREATER 18
-#define SLJIT_C_FLOAT_LESS_EQUAL 19
-#define SLJIT_C_FLOAT_NAN 20
-#define SLJIT_C_FLOAT_NOT_NAN 21
-
-#define SLJIT_JUMP 22
-#define SLJIT_FAST_CALL 23
-#define SLJIT_CALL0 24
-#define SLJIT_CALL1 25
-#define SLJIT_CALL2 26
-#define SLJIT_CALL3 27
-
-/* Fast calling method. See sljit_emit_fast_enter / sljit_emit_fast_return. */
-
-/* The target can be changed during runtime (see: sljit_set_jump_addr). */
-#define SLJIT_REWRITABLE_JUMP 0x1000
-
-/* Emit a jump instruction. The destination is not set, only the type of the jump.
- type must be between SLJIT_C_EQUAL and SLJIT_CALL3
- type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP
- Flags: - (never set any flags) for both conditional and unconditional jumps.
- Flags: destroy all flags for calls. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type);
-
-/* Basic arithmetic comparison. In most architectures it is implemented as
- an SLJIT_SUB operation (with SLJIT_UNUSED destination and setting
- appropriate flags) followed by a sljit_emit_jump. However some
- architectures (i.e: MIPS) may employ special optimizations here. It is
- suggested to use this comparison form when appropriate.
- type must be between SLJIT_C_EQUAL and SLJIT_C_SIG_LESS_EQUAL
- type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP or SLJIT_INT_OP
- Flags: destroy flags. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w);
-
-/* Basic floating point comparison. In most architectures it is implemented as
- an SLJIT_FCMP operation (setting appropriate flags) followed by a
- sljit_emit_jump. However some architectures (i.e: MIPS) may employ
- special optimizations here. It is suggested to use this comparison form
- when appropriate.
- type must be between SLJIT_C_FLOAT_EQUAL and SLJIT_C_FLOAT_NOT_NAN
- type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP
- Flags: destroy flags.
- Note: if either operand is NaN, the behaviour is undefined for
- type <= SLJIT_C_FLOAT_LESS_EQUAL. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w);
-
-/* Set the destination of the jump to this label. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label);
-/* Only for jumps defined with SLJIT_REWRITABLE_JUMP flag.
- Note: use sljit_emit_ijump for fixed jumps. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target);
-
-/* Call function or jump anywhere. Both direct and indirect form
- type must be between SLJIT_JUMP and SLJIT_CALL3
- Direct form: set src to SLJIT_IMM() and srcw to the address
- Indirect form: any other valid addressing mode
- Flags: - (never set any flags) for unconditional jumps.
- Flags: destroy all flags for calls. */
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw);
-
-/* If op == SLJIT_MOV:
- Set dst to 1 if condition is fulfilled, 0 otherwise
- type must be between SLJIT_C_EQUAL and SLJIT_C_FLOAT_NOT_NAN
- Flags: - (never set any flags)
- If op == SLJIT_OR
- Dst is used as src as well, and set its lowest bit to 1 if
- the condition is fulfilled. Otherwise it does nothing.
- Flags: E | K
- Note: sljit_emit_cond_value does nothing, if dst is SLJIT_UNUSED (regardless of op). */
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type);
-
-/* The constant can be changed runtime (see: sljit_set_const)
- Flags: - (never set any flags) */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value);
-
-/* After the code generation the address for label, jump and const instructions
- are computed. Since these structures are freed sljit_free_compiler, the
- addresses must be preserved by the user program elsewere. */
-static SLJIT_INLINE sljit_uw sljit_get_label_addr(struct sljit_label *label) { return label->addr; }
-static SLJIT_INLINE sljit_uw sljit_get_jump_addr(struct sljit_jump *jump) { return jump->addr; }
-static SLJIT_INLINE sljit_uw sljit_get_const_addr(struct sljit_const *const_) { return const_->addr; }
-
-/* Only the address is required to rewrite the code. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr);
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant);
-
-/* --------------------------------------------------------------------- */
-/* Miscellaneous utility functions */
-/* --------------------------------------------------------------------- */
-
-#define SLJIT_MAJOR_VERSION 0
-#define SLJIT_MINOR_VERSION 87
-
-/* Get the human readable name of the platfrom.
- Can be useful for debugging on platforms like ARM, where ARM and
- Thumb2 functions can be mixed. */
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name(void);
-
-/* Portble helper function to get an offset of a member. */
-#define SLJIT_OFFSETOF(base, member) ((sljit_w)(&((base*)0x10)->member) - 0x10)
-
-#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
-/* This global lock is useful to compile common functions. */
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void);
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void);
-#endif
-
-#if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK)
-
-/* The sljit_stack is a utiliy feature of sljit, which allocates a
- writable memory region between base (inclusive) and limit (exclusive).
- Both base and limit is a pointer, and base is always <= than limit.
- This feature uses the "address space reserve" feature
- of modern operating systems. Basically we don't need to allocate a
- huge memory block in one step for the worst case, we can start with
- a smaller chunk and extend it later. Since the address space is
- reserved, the data never copied to other regions, thus it is safe
- to store pointers here. */
-
-/* Note: The base field is aligned to PAGE_SIZE bytes (usually 4k or more).
- Note: stack growing should not happen in small steps: 4k, 16k or even
- bigger growth is better.
- Note: this structure may not be supported by all operating systems.
- Some kind of fallback mechanism is suggested when SLJIT_UTIL_STACK
- is not defined. */
-
-struct sljit_stack {
- /* User data, anything can be stored here.
- Starting with the same value as base. */
- sljit_uw top;
- /* These members are read only. */
- sljit_uw base;
- sljit_uw limit;
- sljit_uw max_limit;
-};
-
-/* Returns NULL if unsuccessful.
- Note: limit and max_limit contains the size for stack allocation
- Note: the top field is initialized to base. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(sljit_uw limit, sljit_uw max_limit);
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_free_stack(struct sljit_stack* stack);
-
-/* Can be used to increase (allocate) or decrease (free) the memory area.
- Returns with a non-zero value if unsuccessful. If new_limit is greater than
- max_limit, it will fail. It is very easy to implement a stack data structure,
- since the growth ratio can be added to the current limit, and sljit_stack_resize
- will do all the necessary checks. The fields of the stack are not changed if
- sljit_stack_resize fails. */
-SLJIT_API_FUNC_ATTRIBUTE sljit_w SLJIT_CALL sljit_stack_resize(struct sljit_stack* stack, sljit_uw new_limit);
-
-#endif /* (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK) */
-
-#if !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
-
-/* Get the entry address of a given function. */
-#define SLJIT_FUNC_OFFSET(func_name) ((sljit_w)func_name)
-
-#else /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */
-
-/* All JIT related code should be placed in the same context (library, binary, etc.). */
-
-#define SLJIT_FUNC_OFFSET(func_name) ((sljit_w)*(void**)func_name)
-
-/* For powerpc64, the function pointers point to a context descriptor. */
-struct sljit_function_context {
- sljit_w addr;
- sljit_w r2;
- sljit_w r11;
-};
-
-/* Fill the context arguments using the addr and the function.
- If func_ptr is NULL, it will not be set to the address of context
- If addr is NULL, the function address also comes from the func pointer. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_w addr, void* func);
-
-#endif /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */
-
-#endif /* _SLJIT_LIR_H_ */
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativeARM_Thumb2.c b/src/third_party/pcre-8.30/sljit/sljitNativeARM_Thumb2.c
deleted file mode 100644
index a51536b4a74..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativeARM_Thumb2.c
+++ /dev/null
@@ -1,1913 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name()
-{
- return "ARM-Thumb2" SLJIT_CPUINFO;
-}
-
-/* Last register + 1. */
-#define TMP_REG1 (SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2 (SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3 (SLJIT_NO_REGISTERS + 3)
-#define TMP_PC (SLJIT_NO_REGISTERS + 4)
-
-#define TMP_FREG1 (SLJIT_FLOAT_REG4 + 1)
-#define TMP_FREG2 (SLJIT_FLOAT_REG4 + 2)
-
-/* See sljit_emit_enter and sljit_emit_op0 if you want to change them. */
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 5] = {
- 0, 0, 1, 2, 12, 5, 6, 7, 8, 10, 11, 13, 3, 4, 14, 15
-};
-
-#define COPY_BITS(src, from, to, bits) \
- ((from >= to ? (src >> (from - to)) : (src << (to - from))) & (((1 << bits) - 1) << to))
-
-/* Thumb16 encodings. */
-#define RD3(rd) (reg_map[rd])
-#define RN3(rn) (reg_map[rn] << 3)
-#define RM3(rm) (reg_map[rm] << 6)
-#define RDN3(rdn) (reg_map[rdn] << 8)
-#define IMM3(imm) (imm << 6)
-#define IMM8(imm) (imm)
-
-/* Thumb16 helpers. */
-#define SET_REGS44(rd, rn) \
- ((reg_map[rn] << 3) | (reg_map[rd] & 0x7) | ((reg_map[rd] & 0x8) << 4))
-#define IS_2_LO_REGS(reg1, reg2) \
- (reg_map[reg1] <= 7 && reg_map[reg2] <= 7)
-#define IS_3_LO_REGS(reg1, reg2, reg3) \
- (reg_map[reg1] <= 7 && reg_map[reg2] <= 7 && reg_map[reg3] <= 7)
-
-/* Thumb32 encodings. */
-#define RD4(rd) (reg_map[rd] << 8)
-#define RN4(rn) (reg_map[rn] << 16)
-#define RM4(rm) (reg_map[rm])
-#define RT4(rt) (reg_map[rt] << 12)
-#define DD4(dd) ((dd) << 12)
-#define DN4(dn) ((dn) << 16)
-#define DM4(dm) (dm)
-#define IMM5(imm) \
- (COPY_BITS(imm, 2, 12, 3) | ((imm & 0x3) << 6))
-#define IMM12(imm) \
- (COPY_BITS(imm, 11, 26, 1) | COPY_BITS(imm, 8, 12, 3) | (imm & 0xff))
-
-typedef sljit_ui sljit_ins;
-
-/* --------------------------------------------------------------------- */
-/* Instrucion forms */
-/* --------------------------------------------------------------------- */
-
-/* dot '.' changed to _
- I immediate form (possibly followed by number of immediate bits). */
-#define ADCI 0xf1400000
-#define ADCS 0x4140
-#define ADC_W 0xeb400000
-#define ADD 0x4400
-#define ADDS 0x1800
-#define ADDSI3 0x1c00
-#define ADDSI8 0x3000
-#define ADD_W 0xeb000000
-#define ADDWI 0xf2000000
-#define ADD_SP 0xb000
-#define ADD_W 0xeb000000
-#define ADD_WI 0xf1000000
-#define ANDI 0xf0000000
-#define ANDS 0x4000
-#define AND_W 0xea000000
-#define ASRS 0x4100
-#define ASRSI 0x1000
-#define ASR_W 0xfa40f000
-#define ASR_WI 0xea4f0020
-#define BICI 0xf0200000
-#define BKPT 0xbe00
-#define BLX 0x4780
-#define BX 0x4700
-#define CLZ 0xfab0f080
-#define CMPI 0x2800
-#define CMP_W 0xebb00f00
-#define EORI 0xf0800000
-#define EORS 0x4040
-#define EOR_W 0xea800000
-#define IT 0xbf00
-#define LSLS 0x4080
-#define LSLSI 0x0000
-#define LSL_W 0xfa00f000
-#define LSL_WI 0xea4f0000
-#define LSRS 0x40c0
-#define LSRSI 0x0800
-#define LSR_W 0xfa20f000
-#define LSR_WI 0xea4f0010
-#define MOV 0x4600
-#define MOVS 0x0000
-#define MOVSI 0x2000
-#define MOVT 0xf2c00000
-#define MOVW 0xf2400000
-#define MOV_W 0xea4f0000
-#define MOV_WI 0xf04f0000
-#define MUL 0xfb00f000
-#define MVNS 0x43c0
-#define MVN_W 0xea6f0000
-#define MVN_WI 0xf06f0000
-#define NOP 0xbf00
-#define ORNI 0xf0600000
-#define ORRI 0xf0400000
-#define ORRS 0x4300
-#define ORR_W 0xea400000
-#define POP 0xbd00
-#define POP_W 0xe8bd0000
-#define PUSH 0xb500
-#define PUSH_W 0xe92d0000
-#define RSB_WI 0xf1c00000
-#define RSBSI 0x4240
-#define SBCI 0xf1600000
-#define SBCS 0x4180
-#define SBC_W 0xeb600000
-#define SMULL 0xfb800000
-#define STR_SP 0x9000
-#define SUBS 0x1a00
-#define SUBSI3 0x1e00
-#define SUBSI8 0x3800
-#define SUB_W 0xeba00000
-#define SUBWI 0xf2a00000
-#define SUB_SP 0xb080
-#define SUB_WI 0xf1a00000
-#define SXTB 0xb240
-#define SXTB_W 0xfa4ff080
-#define SXTH 0xb200
-#define SXTH_W 0xfa0ff080
-#define TST 0x4200
-#define UMULL 0xfba00000
-#define UXTB 0xb2c0
-#define UXTB_W 0xfa5ff080
-#define UXTH 0xb280
-#define UXTH_W 0xfa1ff080
-#define VABS_F64 0xeeb00bc0
-#define VADD_F64 0xee300b00
-#define VCMP_F64 0xeeb40b40
-#define VDIV_F64 0xee800b00
-#define VMOV_F64 0xeeb00b40
-#define VMRS 0xeef1fa10
-#define VMUL_F64 0xee200b00
-#define VNEG_F64 0xeeb10b40
-#define VSTR 0xed000b00
-#define VSUB_F64 0xee300b40
-
-static int push_inst16(struct sljit_compiler *compiler, sljit_ins inst)
-{
- sljit_uh *ptr;
- SLJIT_ASSERT(!(inst & 0xffff0000));
-
- ptr = (sljit_uh*)ensure_buf(compiler, sizeof(sljit_uh));
- FAIL_IF(!ptr);
- *ptr = inst;
- compiler->size++;
- return SLJIT_SUCCESS;
-}
-
-static int push_inst32(struct sljit_compiler *compiler, sljit_ins inst)
-{
- sljit_uh *ptr = (sljit_uh*)ensure_buf(compiler, sizeof(sljit_ins));
- FAIL_IF(!ptr);
- *ptr++ = inst >> 16;
- *ptr = inst;
- compiler->size += 2;
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int emit_imm32_const(struct sljit_compiler *compiler, int dst, sljit_uw imm)
-{
- FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) |
- COPY_BITS(imm, 12, 16, 4) | COPY_BITS(imm, 11, 26, 1) | COPY_BITS(imm, 8, 12, 3) | (imm & 0xff)));
- return push_inst32(compiler, MOVT | RD4(dst) |
- COPY_BITS(imm, 12 + 16, 16, 4) | COPY_BITS(imm, 11 + 16, 26, 1) | COPY_BITS(imm, 8 + 16, 12, 3) | ((imm & 0xff0000) >> 16));
-}
-
-static SLJIT_INLINE void modify_imm32_const(sljit_uh* inst, sljit_uw new_imm)
-{
- int dst = inst[1] & 0x0f00;
- SLJIT_ASSERT(((inst[0] & 0xfbf0) == (MOVW >> 16)) && ((inst[2] & 0xfbf0) == (MOVT >> 16)) && dst == (inst[3] & 0x0f00));
- inst[0] = (MOVW >> 16) | COPY_BITS(new_imm, 12, 0, 4) | COPY_BITS(new_imm, 11, 10, 1);
- inst[1] = dst | COPY_BITS(new_imm, 8, 12, 3) | (new_imm & 0xff);
- inst[2] = (MOVT >> 16) | COPY_BITS(new_imm, 12 + 16, 0, 4) | COPY_BITS(new_imm, 11 + 16, 10, 1);
- inst[3] = dst | COPY_BITS(new_imm, 8 + 16, 12, 3) | ((new_imm & 0xff0000) >> 16);
-}
-
-static SLJIT_INLINE int detect_jump_type(struct sljit_jump *jump, sljit_uh *code_ptr, sljit_uh *code)
-{
- sljit_w diff;
-
- if (jump->flags & SLJIT_REWRITABLE_JUMP)
- return 0;
-
- if (jump->flags & JUMP_ADDR) {
- /* Branch to ARM code is not optimized yet. */
- if (!(jump->u.target & 0x1))
- return 0;
- diff = ((sljit_w)jump->u.target - (sljit_w)(code_ptr + 2)) >> 1;
- }
- else {
- SLJIT_ASSERT(jump->flags & JUMP_LABEL);
- diff = ((sljit_w)(code + jump->u.label->size) - (sljit_w)(code_ptr + 2)) >> 1;
- }
-
- if (jump->flags & IS_CONDITIONAL) {
- SLJIT_ASSERT(!(jump->flags & IS_BL));
- if (diff <= 127 && diff >= -128) {
- jump->flags |= B_TYPE1;
- return 5;
- }
- if (diff <= 524287 && diff >= -524288) {
- jump->flags |= B_TYPE2;
- return 4;
- }
- /* +1 comes from the prefix IT instruction. */
- diff--;
- if (diff <= 8388607 && diff >= -8388608) {
- jump->flags |= B_TYPE3;
- return 3;
- }
- }
- else if (jump->flags & IS_BL) {
- if (diff <= 8388607 && diff >= -8388608) {
- jump->flags |= BL_TYPE6;
- return 3;
- }
- }
- else {
- if (diff <= 1023 && diff >= -1024) {
- jump->flags |= B_TYPE4;
- return 4;
- }
- if (diff <= 8388607 && diff >= -8388608) {
- jump->flags |= B_TYPE5;
- return 3;
- }
- }
-
- return 0;
-}
-
-static SLJIT_INLINE void inline_set_jump_addr(sljit_uw addr, sljit_uw new_addr, int flush)
-{
- sljit_uh* inst = (sljit_uh*)addr;
- modify_imm32_const(inst, new_addr);
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 3);
- }
-}
-
-static SLJIT_INLINE void set_jump_instruction(struct sljit_jump *jump)
-{
- int type = (jump->flags >> 4) & 0xf;
- sljit_w diff;
- sljit_uh *jump_inst;
- int s, j1, j2;
-
- if (SLJIT_UNLIKELY(type == 0)) {
- inline_set_jump_addr(jump->addr, (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target, 0);
- return;
- }
-
- if (jump->flags & JUMP_ADDR) {
- SLJIT_ASSERT(jump->u.target & 0x1);
- diff = ((sljit_w)jump->u.target - (sljit_w)(jump->addr + 4)) >> 1;
- }
- else
- diff = ((sljit_w)(jump->u.label->addr) - (sljit_w)(jump->addr + 4)) >> 1;
- jump_inst = (sljit_uh*)jump->addr;
-
- switch (type) {
- case 1:
- /* Encoding T1 of 'B' instruction */
- SLJIT_ASSERT(diff <= 127 && diff >= -128 && (jump->flags & IS_CONDITIONAL));
- jump_inst[0] = 0xd000 | (jump->flags & 0xf00) | (diff & 0xff);
- return;
- case 2:
- /* Encoding T3 of 'B' instruction */
- SLJIT_ASSERT(diff <= 524287 && diff >= -524288 && (jump->flags & IS_CONDITIONAL));
- jump_inst[0] = 0xf000 | COPY_BITS(jump->flags, 8, 6, 4) | COPY_BITS(diff, 11, 0, 6) | COPY_BITS(diff, 19, 10, 1);
- jump_inst[1] = 0x8000 | COPY_BITS(diff, 17, 13, 1) | COPY_BITS(diff, 18, 11, 1) | (diff & 0x7ff);
- return;
- case 3:
- SLJIT_ASSERT(jump->flags & IS_CONDITIONAL);
- *jump_inst++ = IT | ((jump->flags >> 4) & 0xf0) | 0x8;
- diff--;
- type = 5;
- break;
- case 4:
- /* Encoding T2 of 'B' instruction */
- SLJIT_ASSERT(diff <= 1023 && diff >= -1024 && !(jump->flags & IS_CONDITIONAL));
- jump_inst[0] = 0xe000 | (diff & 0x7ff);
- return;
- }
-
- SLJIT_ASSERT(diff <= 8388607 && diff >= -8388608);
-
- /* Really complex instruction form for branches. */
- s = (diff >> 23) & 0x1;
- j1 = (~(diff >> 21) ^ s) & 0x1;
- j2 = (~(diff >> 22) ^ s) & 0x1;
- jump_inst[0] = 0xf000 | (s << 10) | COPY_BITS(diff, 11, 0, 10);
- jump_inst[1] = (j1 << 13) | (j2 << 11) | (diff & 0x7ff);
-
- /* The others have a common form. */
- if (type == 5) /* Encoding T4 of 'B' instruction */
- jump_inst[1] |= 0x9000;
- else if (type == 6) /* Encoding T1 of 'BL' instruction */
- jump_inst[1] |= 0xd000;
- else
- SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
- struct sljit_memory_fragment *buf;
- sljit_uh *code;
- sljit_uh *code_ptr;
- sljit_uh *buf_ptr;
- sljit_uh *buf_end;
- sljit_uw half_count;
-
- struct sljit_label *label;
- struct sljit_jump *jump;
- struct sljit_const *const_;
-
- CHECK_ERROR_PTR();
- check_sljit_generate_code(compiler);
- reverse_buf(compiler);
-
- code = (sljit_uh*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_uh));
- PTR_FAIL_WITH_EXEC_IF(code);
- buf = compiler->buf;
-
- code_ptr = code;
- half_count = 0;
- label = compiler->labels;
- jump = compiler->jumps;
- const_ = compiler->consts;
-
- do {
- buf_ptr = (sljit_uh*)buf->memory;
- buf_end = buf_ptr + (buf->used_size >> 1);
- do {
- *code_ptr = *buf_ptr++;
- /* These structures are ordered by their address. */
- SLJIT_ASSERT(!label || label->size >= half_count);
- SLJIT_ASSERT(!jump || jump->addr >= half_count);
- SLJIT_ASSERT(!const_ || const_->addr >= half_count);
- if (label && label->size == half_count) {
- label->addr = ((sljit_uw)code_ptr) | 0x1;
- label->size = code_ptr - code;
- label = label->next;
- }
- if (jump && jump->addr == half_count) {
- jump->addr = (sljit_uw)code_ptr - ((jump->flags & IS_CONDITIONAL) ? 10 : 8);
- code_ptr -= detect_jump_type(jump, code_ptr, code);
- jump = jump->next;
- }
- if (const_ && const_->addr == half_count) {
- const_->addr = (sljit_uw)code_ptr;
- const_ = const_->next;
- }
- code_ptr ++;
- half_count ++;
- } while (buf_ptr < buf_end);
-
- buf = buf->next;
- } while (buf);
-
- if (label && label->size == half_count) {
- label->addr = ((sljit_uw)code_ptr) | 0x1;
- label->size = code_ptr - code;
- label = label->next;
- }
-
- SLJIT_ASSERT(!label);
- SLJIT_ASSERT(!jump);
- SLJIT_ASSERT(!const_);
- SLJIT_ASSERT(code_ptr - code <= (int)compiler->size);
-
- jump = compiler->jumps;
- while (jump) {
- set_jump_instruction(jump);
- jump = jump->next;
- }
-
- SLJIT_CACHE_FLUSH(code, code_ptr);
- compiler->error = SLJIT_ERR_COMPILED;
- compiler->executable_size = compiler->size * sizeof(sljit_uh);
- /* Set thumb mode flag. */
- return (void*)((sljit_uw)code | 0x1);
-}
-
-#define INVALID_IMM 0x80000000
-static sljit_uw get_imm(sljit_uw imm)
-{
- /* Thumb immediate form. */
- int counter;
-
- if (imm <= 0xff)
- return imm;
-
- if ((imm & 0xffff) == (imm >> 16)) {
- /* Some special cases. */
- if (!(imm & 0xff00))
- return (1 << 12) | (imm & 0xff);
- if (!(imm & 0xff))
- return (2 << 12) | ((imm >> 8) & 0xff);
- if ((imm & 0xff00) == ((imm & 0xff) << 8))
- return (3 << 12) | (imm & 0xff);
- }
-
- /* Assembly optimization: count leading zeroes? */
- counter = 8;
- if (!(imm & 0xffff0000)) {
- counter += 16;
- imm <<= 16;
- }
- if (!(imm & 0xff000000)) {
- counter += 8;
- imm <<= 8;
- }
- if (!(imm & 0xf0000000)) {
- counter += 4;
- imm <<= 4;
- }
- if (!(imm & 0xc0000000)) {
- counter += 2;
- imm <<= 2;
- }
- if (!(imm & 0x80000000)) {
- counter += 1;
- imm <<= 1;
- }
- /* Since imm >= 128, this must be true. */
- SLJIT_ASSERT(counter <= 31);
-
- if (imm & 0x00ffffff)
- return INVALID_IMM; /* Cannot be encoded. */
-
- return ((imm >> 24) & 0x7f) | COPY_BITS(counter, 4, 26, 1) | COPY_BITS(counter, 1, 12, 3) | COPY_BITS(counter, 0, 7, 1);
-}
-
-static int load_immediate(struct sljit_compiler *compiler, int dst, sljit_uw imm)
-{
- sljit_uw tmp;
-
- if (imm >= 0x10000) {
- tmp = get_imm(imm);
- if (tmp != INVALID_IMM)
- return push_inst32(compiler, MOV_WI | RD4(dst) | tmp);
- tmp = get_imm(~imm);
- if (tmp != INVALID_IMM)
- return push_inst32(compiler, MVN_WI | RD4(dst) | tmp);
- }
-
- /* set low 16 bits, set hi 16 bits to 0. */
- FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) |
- COPY_BITS(imm, 12, 16, 4) | COPY_BITS(imm, 11, 26, 1) | COPY_BITS(imm, 8, 12, 3) | (imm & 0xff)));
-
- /* set hi 16 bit if needed. */
- if (imm >= 0x10000)
- return push_inst32(compiler, MOVT | RD4(dst) |
- COPY_BITS(imm, 12 + 16, 16, 4) | COPY_BITS(imm, 11 + 16, 26, 1) | COPY_BITS(imm, 8 + 16, 12, 3) | ((imm & 0xff0000) >> 16));
- return SLJIT_SUCCESS;
-}
-
-#define ARG1_IMM 0x0010000
-#define ARG2_IMM 0x0020000
-#define KEEP_FLAGS 0x0040000
-#define SET_MULOV 0x0080000
-/* SET_FLAGS must be 0x100000 as it is also the value of S bit (can be used for optimization). */
-#define SET_FLAGS 0x0100000
-#define UNUSED_RETURN 0x0200000
-#define SLOW_DEST 0x0400000
-#define SLOW_SRC1 0x0800000
-#define SLOW_SRC2 0x1000000
-
-static int emit_op_imm(struct sljit_compiler *compiler, int flags, int dst, sljit_uw arg1, sljit_uw arg2)
-{
- /* dst must be register, TMP_REG1
- arg1 must be register, TMP_REG1, imm
- arg2 must be register, TMP_REG2, imm */
- int reg;
- sljit_uw imm;
-
- if (SLJIT_UNLIKELY((flags & (ARG1_IMM | ARG2_IMM)) == (ARG1_IMM | ARG2_IMM))) {
- /* Both are immediates. */
- flags &= ~ARG1_IMM;
- FAIL_IF(load_immediate(compiler, TMP_REG1, arg1));
- arg1 = TMP_REG1;
- }
-
- if (flags & (ARG1_IMM | ARG2_IMM)) {
- reg = (flags & ARG2_IMM) ? arg1 : arg2;
- imm = (flags & ARG2_IMM) ? arg2 : arg1;
-
- switch (flags & 0xffff) {
- case SLJIT_MOV:
- SLJIT_ASSERT(!(flags & SET_FLAGS) && (flags & ARG2_IMM) && arg1 == TMP_REG1);
- return load_immediate(compiler, dst, imm);
- case SLJIT_NOT:
- if (!(flags & SET_FLAGS))
- return load_immediate(compiler, dst, ~imm);
- /* Since the flags should be set, we just fallback to the register mode.
- Although I could do some clever things here, "NOT IMM" does not worth the efforts. */
- break;
- case SLJIT_CLZ:
- /* No form with immediate operand. */
- break;
- case SLJIT_ADD:
- if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(reg, dst)) {
- if (imm <= 0x7)
- return push_inst16(compiler, ADDSI3 | IMM3(imm) | RD3(dst) | RN3(reg));
- if (reg == dst && imm <= 0xff)
- return push_inst16(compiler, ADDSI8 | IMM8(imm) | RDN3(dst));
- }
- if (imm <= 0xfff && !(flags & SET_FLAGS))
- return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(imm));
- imm = get_imm(imm);
- if (imm != INVALID_IMM)
- return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- break;
- case SLJIT_ADDC:
- imm = get_imm(imm);
- if (imm != INVALID_IMM)
- return push_inst32(compiler, ADCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- break;
- case SLJIT_SUB:
- if (flags & ARG2_IMM) {
- if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(reg, dst)) {
- if (imm <= 0x7)
- return push_inst16(compiler, SUBSI3 | IMM3(imm) | RD3(dst) | RN3(reg));
- if (imm <= 0xff) {
- if (reg == dst)
- return push_inst16(compiler, SUBSI8 | IMM8(imm) | RDN3(dst));
- if (flags & UNUSED_RETURN)
- return push_inst16(compiler, CMPI | IMM8(imm) | RDN3(reg));
- }
- }
- if (imm <= 0xfff && !(flags & SET_FLAGS))
- return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(imm));
- imm = get_imm(imm);
- if (imm != INVALID_IMM)
- return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- }
- else {
- if (!(flags & KEEP_FLAGS) && imm == 0 && IS_2_LO_REGS(reg, dst))
- return push_inst16(compiler, RSBSI | RD3(dst) | RN3(reg));
- imm = get_imm(imm);
- if (imm != INVALID_IMM)
- return push_inst32(compiler, RSB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- }
- break;
- case SLJIT_SUBC:
- if (flags & ARG2_IMM) {
- imm = get_imm(imm);
- if (imm != INVALID_IMM)
- return push_inst32(compiler, SBCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- }
- break;
- case SLJIT_MUL:
- /* No form with immediate operand. */
- break;
- case SLJIT_AND:
- imm = get_imm(imm);
- if (imm != INVALID_IMM)
- return push_inst32(compiler, ANDI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- imm = get_imm(~((flags & ARG2_IMM) ? arg2 : arg1));
- if (imm != INVALID_IMM)
- return push_inst32(compiler, BICI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- break;
- case SLJIT_OR:
- imm = get_imm(imm);
- if (imm != INVALID_IMM)
- return push_inst32(compiler, ORRI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- imm = get_imm(~((flags & ARG2_IMM) ? arg2 : arg1));
- if (imm != INVALID_IMM)
- return push_inst32(compiler, ORNI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- break;
- case SLJIT_XOR:
- imm = get_imm(imm);
- if (imm != INVALID_IMM)
- return push_inst32(compiler, EORI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
- break;
- case SLJIT_SHL:
- if (flags & ARG2_IMM) {
- imm &= 0x1f;
- if (imm == 0) {
- if (!(flags & SET_FLAGS))
- return push_inst16(compiler, MOV | SET_REGS44(dst, reg));
- if (IS_2_LO_REGS(dst, reg))
- return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg));
- return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg));
- }
- if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))
- return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6));
- return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));
- }
- break;
- case SLJIT_LSHR:
- if (flags & ARG2_IMM) {
- imm &= 0x1f;
- if (imm == 0) {
- if (!(flags & SET_FLAGS))
- return push_inst16(compiler, MOV | SET_REGS44(dst, reg));
- if (IS_2_LO_REGS(dst, reg))
- return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg));
- return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg));
- }
- if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))
- return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6));
- return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));
- }
- break;
- case SLJIT_ASHR:
- if (flags & ARG2_IMM) {
- imm &= 0x1f;
- if (imm == 0) {
- if (!(flags & SET_FLAGS))
- return push_inst16(compiler, MOV | SET_REGS44(dst, reg));
- if (IS_2_LO_REGS(dst, reg))
- return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg));
- return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg));
- }
- if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))
- return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6));
- return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));
- }
- break;
- default:
- SLJIT_ASSERT_STOP();
- break;
- }
-
- if (flags & ARG2_IMM) {
- FAIL_IF(load_immediate(compiler, TMP_REG2, arg2));
- arg2 = TMP_REG2;
- }
- else {
- FAIL_IF(load_immediate(compiler, TMP_REG1, arg1));
- arg1 = TMP_REG1;
- }
- }
-
- /* Both arguments are registers. */
- switch (flags & 0xffff) {
- case SLJIT_MOV:
- case SLJIT_MOV_UI:
- case SLJIT_MOV_SI:
- case SLJIT_MOVU:
- case SLJIT_MOVU_UI:
- case SLJIT_MOVU_SI:
- SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
- return push_inst16(compiler, MOV | SET_REGS44(dst, arg2));
- case SLJIT_MOV_UB:
- case SLJIT_MOVU_UB:
- SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
- if (IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, UXTB | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, UXTB_W | RD4(dst) | RM4(arg2));
- case SLJIT_MOV_SB:
- case SLJIT_MOVU_SB:
- SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
- if (IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, SXTB | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, SXTB_W | RD4(dst) | RM4(arg2));
- case SLJIT_MOV_UH:
- case SLJIT_MOVU_UH:
- SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
- if (IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, UXTH | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, UXTH_W | RD4(dst) | RM4(arg2));
- case SLJIT_MOV_SH:
- case SLJIT_MOVU_SH:
- SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
- if (IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, SXTH | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, SXTH_W | RD4(dst) | RM4(arg2));
- case SLJIT_NOT:
- SLJIT_ASSERT(arg1 == TMP_REG1);
- if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, MVNS | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, MVN_W | (flags & SET_FLAGS) | RD4(dst) | RM4(arg2));
- case SLJIT_CLZ:
- SLJIT_ASSERT(arg1 == TMP_REG1);
- FAIL_IF(push_inst32(compiler, CLZ | RN4(arg2) | RD4(dst) | RM4(arg2)));
- if (flags & SET_FLAGS) {
- if (reg_map[dst] <= 7)
- return push_inst16(compiler, CMPI | RDN3(dst));
- return push_inst32(compiler, ADD_WI | SET_FLAGS | RN4(dst) | RD4(dst));
- }
- return SLJIT_SUCCESS;
- case SLJIT_ADD:
- if (!(flags & KEEP_FLAGS) && IS_3_LO_REGS(dst, arg1, arg2))
- return push_inst16(compiler, ADDS | RD3(dst) | RN3(arg1) | RM3(arg2));
- if (dst == arg1 && !(flags & SET_FLAGS))
- return push_inst16(compiler, ADD | SET_REGS44(dst, arg2));
- return push_inst32(compiler, ADD_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- case SLJIT_ADDC:
- if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, ADCS | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, ADC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- case SLJIT_SUB:
- if (!(flags & KEEP_FLAGS) && IS_3_LO_REGS(dst, arg1, arg2))
- return push_inst16(compiler, SUBS | RD3(dst) | RN3(arg1) | RM3(arg2));
- return push_inst32(compiler, SUB_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- case SLJIT_SUBC:
- if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, SBCS | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, SBC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- case SLJIT_MUL:
- if (!(flags & SET_FLAGS))
- return push_inst32(compiler, MUL | RD4(dst) | RN4(arg1) | RM4(arg2));
- SLJIT_ASSERT(reg_map[TMP_REG2] <= 7 && dst != TMP_REG2);
- FAIL_IF(push_inst32(compiler, SMULL | RT4(dst) | RD4(TMP_REG2) | RN4(arg1) | RM4(arg2)));
- /* cmp TMP_REG2, dst asr #31. */
- return push_inst32(compiler, CMP_W | RN4(TMP_REG2) | 0x70e0 | RM4(dst));
- case SLJIT_AND:
- if (!(flags & KEEP_FLAGS)) {
- if (dst == arg1 && IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, ANDS | RD3(dst) | RN3(arg2));
- if ((flags & UNUSED_RETURN) && IS_2_LO_REGS(arg1, arg2))
- return push_inst16(compiler, TST | RD3(arg1) | RN3(arg2));
- }
- return push_inst32(compiler, AND_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- case SLJIT_OR:
- if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, ORRS | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, ORR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- case SLJIT_XOR:
- if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, EORS | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, EOR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- case SLJIT_SHL:
- if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, LSLS | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, LSL_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- case SLJIT_LSHR:
- if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, LSRS | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, LSR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- case SLJIT_ASHR:
- if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
- return push_inst16(compiler, ASRS | RD3(dst) | RN3(arg2));
- return push_inst32(compiler, ASR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
- }
-
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-}
-
-#define STORE 0x01
-#define SIGNED 0x02
-
-#define WORD_SIZE 0x00
-#define BYTE_SIZE 0x04
-#define HALF_SIZE 0x08
-
-#define UPDATE 0x10
-#define ARG_TEST 0x20
-
-#define IS_WORD_SIZE(flags) (!(flags & (BYTE_SIZE | HALF_SIZE)))
-#define OFFSET_CHECK(imm, shift) (!(argw & ~(imm << shift)))
-
-/*
- 1st letter:
- w = word
- b = byte
- h = half
-
- 2nd letter:
- s = signed
- u = unsigned
-
- 3rd letter:
- l = load
- s = store
-*/
-
-static SLJIT_CONST sljit_uw sljit_mem16[12] = {
-/* w u l */ 0x5800 /* ldr */,
-/* w u s */ 0x5000 /* str */,
-/* w s l */ 0x5800 /* ldr */,
-/* w s s */ 0x5000 /* str */,
-
-/* b u l */ 0x5c00 /* ldrb */,
-/* b u s */ 0x5400 /* strb */,
-/* b s l */ 0x5600 /* ldrsb */,
-/* b s s */ 0x5400 /* strb */,
-
-/* h u l */ 0x5a00 /* ldrh */,
-/* h u s */ 0x5200 /* strh */,
-/* h s l */ 0x5e00 /* ldrsh */,
-/* h s s */ 0x5200 /* strh */,
-};
-
-static SLJIT_CONST sljit_uw sljit_mem16_imm5[12] = {
-/* w u l */ 0x6800 /* ldr imm5 */,
-/* w u s */ 0x6000 /* str imm5 */,
-/* w s l */ 0x6800 /* ldr imm5 */,
-/* w s s */ 0x6000 /* str imm5 */,
-
-/* b u l */ 0x7800 /* ldrb imm5 */,
-/* b u s */ 0x7000 /* strb imm5 */,
-/* b s l */ 0x0000 /* not allowed */,
-/* b s s */ 0x7000 /* strb imm5 */,
-
-/* h u l */ 0x8800 /* ldrh imm5 */,
-/* h u s */ 0x8000 /* strh imm5 */,
-/* h s l */ 0x0000 /* not allowed */,
-/* h s s */ 0x8000 /* strh imm5 */,
-};
-
-#define MEM_IMM8 0xc00
-#define MEM_IMM12 0x800000
-static SLJIT_CONST sljit_uw sljit_mem32[12] = {
-/* w u l */ 0xf8500000 /* ldr.w */,
-/* w u s */ 0xf8400000 /* str.w */,
-/* w s l */ 0xf8500000 /* ldr.w */,
-/* w s s */ 0xf8400000 /* str.w */,
-
-/* b u l */ 0xf8100000 /* ldrb.w */,
-/* b u s */ 0xf8000000 /* strb.w */,
-/* b s l */ 0xf9100000 /* ldrsb.w */,
-/* b s s */ 0xf8000000 /* strb.w */,
-
-/* h u l */ 0xf8300000 /* ldrh.w */,
-/* h u s */ 0xf8200000 /* strsh.w */,
-/* h s l */ 0xf9300000 /* ldrsh.w */,
-/* h s s */ 0xf8200000 /* strsh.w */,
-};
-
-/* Helper function. Dst should be reg + value, using at most 1 instruction, flags does not set. */
-static int emit_set_delta(struct sljit_compiler *compiler, int dst, int reg, sljit_w value)
-{
- if (value >= 0) {
- if (value <= 0xfff)
- return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(value));
- value = get_imm(value);
- if (value != INVALID_IMM)
- return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | value);
- }
- else {
- value = -value;
- if (value <= 0xfff)
- return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(value));
- value = get_imm(value);
- if (value != INVALID_IMM)
- return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | value);
- }
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-/* Can perform an operation using at most 1 instruction. */
-static int getput_arg_fast(struct sljit_compiler *compiler, int flags, int reg, int arg, sljit_w argw)
-{
- int tmp;
-
- SLJIT_ASSERT(arg & SLJIT_MEM);
-
- if (SLJIT_UNLIKELY(flags & UPDATE)) {
- if ((arg & 0xf) && !(arg & 0xf0) && argw <= 0xff && argw >= -0xff) {
- flags &= ~UPDATE;
- arg &= 0xf;
- if (SLJIT_UNLIKELY(flags & ARG_TEST))
- return 1;
-
- if (argw >= 0)
- argw |= 0x200;
- else {
- argw = -argw;
- }
- SLJIT_ASSERT(argw >= 0 && (argw & 0xff) <= 0xff);
- FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(arg) | 0x100 | argw));
- return -1;
- }
- return (flags & ARG_TEST) ? SLJIT_SUCCESS : 0;
- }
-
- if (SLJIT_UNLIKELY(arg & 0xf0)) {
- argw &= 0x3;
- tmp = (arg >> 4) & 0xf;
- arg &= 0xf;
- if (SLJIT_UNLIKELY(flags & ARG_TEST))
- return 1;
-
- if (!argw && IS_3_LO_REGS(reg, arg, tmp))
- FAIL_IF(push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(tmp)));
- else
- FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(tmp) | (argw << 4)));
- return -1;
- }
-
- if (!(arg & 0xf) || argw > 0xfff || argw < -0xff)
- return (flags & ARG_TEST) ? SLJIT_SUCCESS : 0;
-
- if (SLJIT_UNLIKELY(flags & ARG_TEST))
- return 1;
-
- arg &= 0xf;
- if (IS_2_LO_REGS(reg, arg) && sljit_mem16_imm5[flags]) {
- tmp = 3;
- if (IS_WORD_SIZE(flags)) {
- if (OFFSET_CHECK(0x1f, 2))
- tmp = 2;
- }
- else if (flags & BYTE_SIZE)
- {
- if (OFFSET_CHECK(0x1f, 0))
- tmp = 0;
- }
- else {
- SLJIT_ASSERT(flags & HALF_SIZE);
- if (OFFSET_CHECK(0x1f, 1))
- tmp = 1;
- }
-
- if (tmp != 3) {
- FAIL_IF(push_inst16(compiler, sljit_mem16_imm5[flags] | RD3(reg) | RN3(arg) | (argw << (6 - tmp))));
- return -1;
- }
- }
-
- /* SP based immediate. */
- if (SLJIT_UNLIKELY(arg == SLJIT_LOCALS_REG) && OFFSET_CHECK(0xff, 2) && IS_WORD_SIZE(flags) && reg_map[reg] <= 7) {
- FAIL_IF(push_inst16(compiler, STR_SP | ((flags & STORE) ? 0 : 0x800) | RDN3(reg) | (argw >> 2)));
- return -1;
- }
-
- if (argw >= 0)
- FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(arg) | argw));
- else
- FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(arg) | -argw));
- return -1;
-}
-
-/* see getput_arg below.
- Note: can_cache is called only for binary operators. Those
- operators always uses word arguments without write back. */
-static int can_cache(int arg, sljit_w argw, int next_arg, sljit_w next_argw)
-{
- /* Simple operation except for updates. */
- if ((arg & 0xf0) || !(next_arg & SLJIT_MEM))
- return 0;
-
- if (!(arg & 0xf)) {
- if ((sljit_uw)(argw - next_argw) <= 0xfff || (sljit_uw)(next_argw - argw) <= 0xfff)
- return 1;
- return 0;
- }
-
- if (argw == next_argw)
- return 1;
-
- if (arg == next_arg && ((sljit_uw)(argw - next_argw) <= 0xfff || (sljit_uw)(next_argw - argw) <= 0xfff))
- return 1;
-
- return 0;
-}
-
-/* Emit the necessary instructions. See can_cache above. */
-static int getput_arg(struct sljit_compiler *compiler, int flags, int reg, int arg, sljit_w argw, int next_arg, sljit_w next_argw)
-{
- int tmp_r;
- sljit_w tmp;
-
- SLJIT_ASSERT(arg & SLJIT_MEM);
- if (!(next_arg & SLJIT_MEM)) {
- next_arg = 0;
- next_argw = 0;
- }
-
- tmp_r = (flags & STORE) ? TMP_REG3 : reg;
-
- if (SLJIT_UNLIKELY(flags & UPDATE)) {
- flags &= ~UPDATE;
- /* Update only applies if a base register exists. */
- if (arg & 0xf) {
- /* There is no caching here. */
- tmp = (arg & 0xf0) >> 4;
- arg &= 0xf;
-
- if (!tmp) {
- if (!(argw & ~0xfff)) {
- FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(arg) | argw));
- return push_inst32(compiler, ADDWI | RD4(arg) | RN4(arg) | IMM12(argw));
- }
-
- if (compiler->cache_arg == SLJIT_MEM) {
- if (argw == compiler->cache_argw) {
- tmp = TMP_REG3;
- argw = 0;
- }
- else if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, argw - compiler->cache_argw) != SLJIT_ERR_UNSUPPORTED) {
- FAIL_IF(compiler->error);
- compiler->cache_argw = argw;
- tmp = TMP_REG3;
- argw = 0;
- }
- }
-
- if (argw) {
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
- compiler->cache_arg = SLJIT_MEM;
- compiler->cache_argw = argw;
- tmp = TMP_REG3;
- argw = 0;
- }
- }
-
- argw &= 0x3;
- if (!argw && IS_3_LO_REGS(reg, arg, tmp)) {
- FAIL_IF(push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(tmp)));
- return push_inst16(compiler, ADD | SET_REGS44(arg, tmp));
- }
- FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(tmp) | (argw << 4)));
- return push_inst32(compiler, ADD_W | RD4(arg) | RN4(arg) | RM4(tmp) | (argw << 6));
- }
- }
-
- SLJIT_ASSERT(!(arg & 0xf0));
-
- if (compiler->cache_arg == arg) {
- if (!((argw - compiler->cache_argw) & ~0xfff))
- return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(TMP_REG3) | (argw - compiler->cache_argw));
- if (!((compiler->cache_argw - argw) & ~0xff))
- return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(TMP_REG3) | (compiler->cache_argw - argw));
- if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, argw - compiler->cache_argw) != SLJIT_ERR_UNSUPPORTED) {
- FAIL_IF(compiler->error);
- return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(TMP_REG3) | 0);
- }
- }
-
- next_arg = (arg & 0xf) && (arg == next_arg);
- arg &= 0xf;
- if (arg && compiler->cache_arg == SLJIT_MEM && compiler->cache_argw == argw)
- return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(TMP_REG3));
-
- compiler->cache_argw = argw;
- if (next_arg && emit_set_delta(compiler, TMP_REG3, arg, argw) != SLJIT_ERR_UNSUPPORTED) {
- FAIL_IF(compiler->error);
- compiler->cache_arg = SLJIT_MEM | arg;
- arg = 0;
- }
- else {
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
- compiler->cache_arg = SLJIT_MEM;
-
- if (next_arg) {
- FAIL_IF(push_inst16(compiler, ADD | SET_REGS44(TMP_REG3, arg)));
- compiler->cache_arg = SLJIT_MEM | arg;
- arg = 0;
- }
- }
-
- if (arg)
- return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(TMP_REG3));
- return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(TMP_REG3) | 0);
-}
-
-static SLJIT_INLINE int emit_op_mem(struct sljit_compiler *compiler, int flags, int reg, int arg, sljit_w argw)
-{
- if (getput_arg_fast(compiler, flags, reg, arg, argw))
- return compiler->error;
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- return getput_arg(compiler, flags, reg, arg, argw, 0, 0);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- int size;
- sljit_ins push;
-
- CHECK_ERROR();
- check_sljit_emit_enter(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- push = (1 << 4);
- if (saveds >= 5)
- push |= 1 << 11;
- if (saveds >= 4)
- push |= 1 << 10;
- if (saveds >= 3)
- push |= 1 << 8;
- if (saveds >= 2)
- push |= 1 << 7;
- if (saveds >= 1)
- push |= 1 << 6;
- if (temporaries >= 5)
- push |= 1 << 5;
- FAIL_IF(saveds >= 3
- ? push_inst32(compiler, PUSH_W | (1 << 14) | push)
- : push_inst16(compiler, PUSH | push));
-
- /* Stack must be aligned to 8 bytes: */
- size = (3 + saveds) * sizeof(sljit_uw);
- local_size += size;
- local_size = (local_size + 7) & ~7;
- local_size -= size;
- compiler->local_size = local_size;
- if (local_size > 0) {
- if (local_size <= (127 << 2))
- FAIL_IF(push_inst16(compiler, SUB_SP | (local_size >> 2)));
- else
- FAIL_IF(emit_op_imm(compiler, SLJIT_SUB | ARG2_IMM, SLJIT_LOCALS_REG, SLJIT_LOCALS_REG, local_size));
- }
-
- if (args >= 1)
- FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_SAVED_REG1, SLJIT_TEMPORARY_REG1)));
- if (args >= 2)
- FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_SAVED_REG2, SLJIT_TEMPORARY_REG2)));
- if (args >= 3)
- FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_SAVED_REG3, SLJIT_TEMPORARY_REG3)));
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- int size;
-
- CHECK_ERROR_VOID();
- check_sljit_set_context(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- size = (3 + saveds) * sizeof(sljit_uw);
- local_size += size;
- local_size = (local_size + 7) & ~7;
- local_size -= size;
- compiler->local_size = local_size;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)
-{
- sljit_ins pop;
-
- CHECK_ERROR();
- check_sljit_emit_return(compiler, op, src, srcw);
-
- FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-
- if (compiler->local_size > 0) {
- if (compiler->local_size <= (127 << 2))
- FAIL_IF(push_inst16(compiler, ADD_SP | (compiler->local_size >> 2)));
- else
- FAIL_IF(emit_op_imm(compiler, SLJIT_ADD | ARG2_IMM, SLJIT_LOCALS_REG, SLJIT_LOCALS_REG, compiler->local_size));
- }
-
- pop = (1 << 4);
- if (compiler->saveds >= 5)
- pop |= 1 << 11;
- if (compiler->saveds >= 4)
- pop |= 1 << 10;
- if (compiler->saveds >= 3)
- pop |= 1 << 8;
- if (compiler->saveds >= 2)
- pop |= 1 << 7;
- if (compiler->saveds >= 1)
- pop |= 1 << 6;
- if (compiler->temporaries >= 5)
- pop |= 1 << 5;
- return compiler->saveds >= 3
- ? push_inst32(compiler, POP_W | (1 << 15) | pop)
- : push_inst16(compiler, POP | pop);
-}
-
-/* --------------------------------------------------------------------- */
-/* Operators */
-/* --------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__GNUC__)
-extern unsigned int __aeabi_uidivmod(unsigned numerator, unsigned denominator);
-extern unsigned int __aeabi_idivmod(unsigned numerator, unsigned denominator);
-#else
-#error "Software divmod functions are needed"
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op)
-{
- CHECK_ERROR();
- check_sljit_emit_op0(compiler, op);
-
- op = GET_OPCODE(op);
- switch (op) {
- case SLJIT_BREAKPOINT:
- push_inst16(compiler, BKPT);
- break;
- case SLJIT_NOP:
- push_inst16(compiler, NOP);
- break;
- case SLJIT_UMUL:
- case SLJIT_SMUL:
- return push_inst32(compiler, (op == SLJIT_UMUL ? UMULL : SMULL)
- | (reg_map[SLJIT_TEMPORARY_REG2] << 8)
- | (reg_map[SLJIT_TEMPORARY_REG1] << 12)
- | (reg_map[SLJIT_TEMPORARY_REG1] << 16)
- | reg_map[SLJIT_TEMPORARY_REG2]);
- case SLJIT_UDIV:
- case SLJIT_SDIV:
- if (compiler->temporaries >= 4) {
- FAIL_IF(push_inst32(compiler, 0xf84d2d04 /* str r2, [sp, #-4]! */));
- FAIL_IF(push_inst32(compiler, 0xf84dcd04 /* str ip, [sp, #-4]! */));
- } else if (compiler->temporaries >= 3)
- FAIL_IF(push_inst32(compiler, 0xf84d2d08 /* str r2, [sp, #-8]! */));
-#if defined(__GNUC__)
- FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
- (op == SLJIT_UDIV ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
-#else
-#error "Software divmod functions are needed"
-#endif
- if (compiler->temporaries >= 4) {
- FAIL_IF(push_inst32(compiler, 0xf85dcb04 /* ldr ip, [sp], #4 */));
- return push_inst32(compiler, 0xf85d2b04 /* ldr r2, [sp], #4 */);
- } else if (compiler->temporaries >= 3)
- return push_inst32(compiler, 0xf85d2b08 /* ldr r2, [sp], #8 */);
- return SLJIT_SUCCESS;
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- int op_type, dst_r, flags;
-
- CHECK_ERROR();
- check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- op_type = GET_OPCODE(op);
- dst_r = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG1;
-
- if (op_type >= SLJIT_MOV && op_type <= SLJIT_MOVU_SI) {
- switch (op_type) {
- case SLJIT_MOV:
- case SLJIT_MOV_UI:
- case SLJIT_MOV_SI:
- flags = WORD_SIZE;
- break;
- case SLJIT_MOV_UB:
- flags = BYTE_SIZE;
- if (src & SLJIT_IMM)
- srcw = (unsigned char)srcw;
- break;
- case SLJIT_MOV_SB:
- flags = BYTE_SIZE | SIGNED;
- if (src & SLJIT_IMM)
- srcw = (signed char)srcw;
- break;
- case SLJIT_MOV_UH:
- flags = HALF_SIZE;
- if (src & SLJIT_IMM)
- srcw = (unsigned short)srcw;
- break;
- case SLJIT_MOV_SH:
- flags = HALF_SIZE | SIGNED;
- if (src & SLJIT_IMM)
- srcw = (signed short)srcw;
- break;
- case SLJIT_MOVU:
- case SLJIT_MOVU_UI:
- case SLJIT_MOVU_SI:
- flags = WORD_SIZE | UPDATE;
- break;
- case SLJIT_MOVU_UB:
- flags = BYTE_SIZE | UPDATE;
- if (src & SLJIT_IMM)
- srcw = (unsigned char)srcw;
- break;
- case SLJIT_MOVU_SB:
- flags = BYTE_SIZE | SIGNED | UPDATE;
- if (src & SLJIT_IMM)
- srcw = (signed char)srcw;
- break;
- case SLJIT_MOVU_UH:
- flags = HALF_SIZE | UPDATE;
- if (src & SLJIT_IMM)
- srcw = (unsigned short)srcw;
- break;
- case SLJIT_MOVU_SH:
- flags = HALF_SIZE | SIGNED | UPDATE;
- if (src & SLJIT_IMM)
- srcw = (signed short)srcw;
- break;
- default:
- SLJIT_ASSERT_STOP();
- flags = 0;
- break;
- }
-
- if (src & SLJIT_IMM)
- FAIL_IF(emit_op_imm(compiler, SLJIT_MOV | ARG2_IMM, dst_r, TMP_REG1, srcw));
- else if (src & SLJIT_MEM) {
- if (getput_arg_fast(compiler, flags, dst_r, src, srcw))
- FAIL_IF(compiler->error);
- else
- FAIL_IF(getput_arg(compiler, flags, dst_r, src, srcw, dst, dstw));
- } else {
- if (dst_r != TMP_REG1)
- return emit_op_imm(compiler, op_type, dst_r, TMP_REG1, src);
- dst_r = src;
- }
-
- if (dst & SLJIT_MEM) {
- if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw))
- return compiler->error;
- else
- return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0);
- }
- return SLJIT_SUCCESS;
- }
-
- if (op_type == SLJIT_NEG) {
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- return sljit_emit_op2(compiler, GET_FLAGS(op) | SLJIT_SUB, dst, dstw, SLJIT_IMM, 0, src, srcw);
- }
-
- flags = (GET_FLAGS(op) ? SET_FLAGS : 0) | ((op & SLJIT_KEEP_FLAGS) ? KEEP_FLAGS : 0);
- if (src & SLJIT_MEM) {
- if (getput_arg_fast(compiler, WORD_SIZE, TMP_REG2, src, srcw))
- FAIL_IF(compiler->error);
- else
- FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src, srcw, dst, dstw));
- src = TMP_REG2;
- }
-
- if (src & SLJIT_IMM)
- flags |= ARG2_IMM;
- else
- srcw = src;
-
- emit_op_imm(compiler, flags | op_type, dst_r, TMP_REG1, srcw);
-
- if (dst & SLJIT_MEM) {
- if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw))
- return compiler->error;
- else
- return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0);
- }
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- int dst_r, flags;
-
- CHECK_ERROR();
- check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- dst_r = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG1;
- flags = (GET_FLAGS(op) ? SET_FLAGS : 0) | ((op & SLJIT_KEEP_FLAGS) ? KEEP_FLAGS : 0);
-
- if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, WORD_SIZE | STORE | ARG_TEST, TMP_REG1, dst, dstw))
- flags |= SLOW_DEST;
-
- if (src1 & SLJIT_MEM) {
- if (getput_arg_fast(compiler, WORD_SIZE, TMP_REG1, src1, src1w))
- FAIL_IF(compiler->error);
- else
- flags |= SLOW_SRC1;
- }
- if (src2 & SLJIT_MEM) {
- if (getput_arg_fast(compiler, WORD_SIZE, TMP_REG2, src2, src2w))
- FAIL_IF(compiler->error);
- else
- flags |= SLOW_SRC2;
- }
-
- if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
- if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
- FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, src1, src1w));
- FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, dst, dstw));
- }
- else {
- FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, src2, src2w));
- FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, dst, dstw));
- }
- }
- else if (flags & SLOW_SRC1)
- FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, dst, dstw));
- else if (flags & SLOW_SRC2)
- FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, dst, dstw));
-
- if (src1 & SLJIT_MEM)
- src1 = TMP_REG1;
- if (src2 & SLJIT_MEM)
- src2 = TMP_REG2;
-
- if (src1 & SLJIT_IMM)
- flags |= ARG1_IMM;
- else
- src1w = src1;
- if (src2 & SLJIT_IMM)
- flags |= ARG2_IMM;
- else
- src2w = src2;
-
- if (dst == SLJIT_UNUSED)
- flags |= UNUSED_RETURN;
-
- if (GET_OPCODE(op) == SLJIT_MUL && (op & SLJIT_SET_O))
- flags |= SET_MULOV;
-
- emit_op_imm(compiler, flags | GET_OPCODE(op), dst_r, src1w, src2w);
-
- if (dst & SLJIT_MEM) {
- if (!(flags & SLOW_DEST)) {
- getput_arg_fast(compiler, WORD_SIZE | STORE, dst_r, dst, dstw);
- return compiler->error;
- }
- return getput_arg(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, 0, 0);
- }
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
-{
- check_sljit_get_register_index(reg);
- return reg_map[reg];
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, int size)
-{
- CHECK_ERROR();
- check_sljit_emit_op_custom(compiler, instruction, size);
- SLJIT_ASSERT(size == 2 || size == 4);
-
- if (size == 2)
- return push_inst16(compiler, *(sljit_uh*)instruction);
- return push_inst32(compiler, *(sljit_ins*)instruction);
-}
-
-/* --------------------------------------------------------------------- */
-/* Floating point operators */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)
-{
- return 1;
-}
-
-static int emit_fop_mem(struct sljit_compiler *compiler, int flags, int reg, int arg, sljit_w argw)
-{
- sljit_w tmp;
- sljit_w inst = VSTR | ((flags & STORE) ? 0 : 0x00100000);
-
- SLJIT_ASSERT(arg & SLJIT_MEM);
-
- /* Fast loads and stores. */
- if (SLJIT_UNLIKELY(arg & 0xf0)) {
- FAIL_IF(push_inst32(compiler, ADD_W | RD4(TMP_REG2) | RN4(arg & 0xf) | RM4((arg & 0xf0) >> 4) | ((argw & 0x3) << 6)));
- arg = SLJIT_MEM | TMP_REG2;
- argw = 0;
- }
-
- if (arg & 0xf) {
- if (!(argw & ~0x3fc))
- return push_inst32(compiler, inst | 0x800000 | RN4(arg & 0xf) | DD4(reg) | (argw >> 2));
- if (!(-argw & ~0x3fc))
- return push_inst32(compiler, inst | RN4(arg & 0xf) | DD4(reg) | (-argw >> 2));
- }
-
- SLJIT_ASSERT(!(arg & 0xf0));
- if (compiler->cache_arg == arg) {
- tmp = argw - compiler->cache_argw;
- if (!(tmp & ~0x3fc))
- return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg) | (tmp >> 2));
- if (!(-tmp & ~0x3fc))
- return push_inst32(compiler, inst | RN4(TMP_REG3) | DD4(reg) | (-tmp >> 2));
- if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, tmp) != SLJIT_ERR_UNSUPPORTED) {
- FAIL_IF(compiler->error);
- compiler->cache_argw = argw;
- return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg));
- }
- }
-
- compiler->cache_arg = arg;
- compiler->cache_argw = argw;
-
- if (SLJIT_UNLIKELY(!(arg & 0xf)))
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
- else if (emit_set_delta(compiler, TMP_REG3, arg & 0xf, argw) != SLJIT_ERR_UNSUPPORTED)
- FAIL_IF(compiler->error);
- else {
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
- if (arg & 0xf)
- FAIL_IF(push_inst16(compiler, ADD | SET_REGS44(TMP_REG3, (arg & 0xf))));
- }
- return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- int dst_r;
-
- CHECK_ERROR();
- check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- if (GET_OPCODE(op) == SLJIT_FCMP) {
- if (dst & SLJIT_MEM) {
- emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw);
- dst = TMP_FREG1;
- }
- if (src & SLJIT_MEM) {
- emit_fop_mem(compiler, 0, TMP_FREG2, src, srcw);
- src = TMP_FREG2;
- }
- FAIL_IF(push_inst32(compiler, VCMP_F64 | DD4(dst) | DM4(src)));
- return push_inst32(compiler, VMRS);
- }
-
- dst_r = (dst >= SLJIT_FLOAT_REG1 && dst <= SLJIT_FLOAT_REG4) ? dst : TMP_FREG1;
- if (src & SLJIT_MEM) {
- emit_fop_mem(compiler, 0, dst_r, src, srcw);
- src = dst_r;
- }
-
- switch (GET_OPCODE(op)) {
- case SLJIT_FMOV:
- if (src != dst_r)
- FAIL_IF(push_inst32(compiler, VMOV_F64 | DD4(dst_r) | DM4(src)));
- break;
- case SLJIT_FNEG:
- FAIL_IF(push_inst32(compiler, VNEG_F64 | DD4(dst_r) | DM4(src)));
- break;
- case SLJIT_FABS:
- FAIL_IF(push_inst32(compiler, VABS_F64 | DD4(dst_r) | DM4(src)));
- break;
- }
-
- if (dst & SLJIT_MEM)
- return emit_fop_mem(compiler, STORE, TMP_FREG1, dst, dstw);
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- int dst_r;
-
- CHECK_ERROR();
- check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- dst_r = (dst >= SLJIT_FLOAT_REG1 && dst <= SLJIT_FLOAT_REG4) ? dst : TMP_FREG1;
- if (src1 & SLJIT_MEM) {
- emit_fop_mem(compiler, 0, TMP_FREG1, src1, src1w);
- src1 = TMP_FREG1;
- }
- if (src2 & SLJIT_MEM) {
- emit_fop_mem(compiler, 0, TMP_FREG2, src2, src2w);
- src2 = TMP_FREG2;
- }
-
- switch (GET_OPCODE(op)) {
- case SLJIT_FADD:
- FAIL_IF(push_inst32(compiler, VADD_F64 | DD4(dst_r) | DN4(src1) | DM4(src2)));
- break;
- case SLJIT_FSUB:
- FAIL_IF(push_inst32(compiler, VSUB_F64 | DD4(dst_r) | DN4(src1) | DM4(src2)));
- break;
- case SLJIT_FMUL:
- FAIL_IF(push_inst32(compiler, VMUL_F64 | DD4(dst_r) | DN4(src1) | DM4(src2)));
- break;
- case SLJIT_FDIV:
- FAIL_IF(push_inst32(compiler, VDIV_F64 | DD4(dst_r) | DN4(src1) | DM4(src2)));
- break;
- }
-
- if (dst & SLJIT_MEM)
- return emit_fop_mem(compiler, STORE, TMP_FREG1, dst, dstw);
- return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/* Other instructions */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size)
-{
- int size;
-
- CHECK_ERROR();
- check_sljit_emit_fast_enter(compiler, dst, dstw, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- size = (3 + saveds) * sizeof(sljit_uw);
- local_size += size;
- local_size = (local_size + 7) & ~7;
- local_size -= size;
- compiler->local_size = local_size;
-
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS)
- return push_inst16(compiler, MOV | SET_REGS44(dst, TMP_REG3));
- else if (dst & SLJIT_MEM) {
- if (getput_arg_fast(compiler, WORD_SIZE | STORE, TMP_REG3, dst, dstw))
- return compiler->error;
- FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG2, TMP_REG3)));
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- return getput_arg(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, 0, 0);
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
-{
- CHECK_ERROR();
- check_sljit_emit_fast_return(compiler, src, srcw);
-
- if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS)
- FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG3, src)));
- else if (src & SLJIT_MEM) {
- if (getput_arg_fast(compiler, WORD_SIZE, TMP_REG3, src, srcw))
- FAIL_IF(compiler->error);
- else {
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src, srcw, 0, 0));
- FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG3, TMP_REG2)));
- }
- }
- else if (src & SLJIT_IMM)
- FAIL_IF(load_immediate(compiler, TMP_REG3, srcw));
- return push_inst16(compiler, BLX | RN3(TMP_REG3));
-}
-
-/* --------------------------------------------------------------------- */
-/* Conditional instructions */
-/* --------------------------------------------------------------------- */
-
-static sljit_uw get_cc(int type)
-{
- switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_MUL_NOT_OVERFLOW:
- case SLJIT_C_FLOAT_EQUAL:
- return 0x0;
-
- case SLJIT_C_NOT_EQUAL:
- case SLJIT_C_MUL_OVERFLOW:
- case SLJIT_C_FLOAT_NOT_EQUAL:
- return 0x1;
-
- case SLJIT_C_LESS:
- case SLJIT_C_FLOAT_LESS:
- return 0x3;
-
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
- return 0x2;
-
- case SLJIT_C_GREATER:
- case SLJIT_C_FLOAT_GREATER:
- return 0x8;
-
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_LESS_EQUAL:
- return 0x9;
-
- case SLJIT_C_SIG_LESS:
- return 0xb;
-
- case SLJIT_C_SIG_GREATER_EQUAL:
- return 0xa;
-
- case SLJIT_C_SIG_GREATER:
- return 0xc;
-
- case SLJIT_C_SIG_LESS_EQUAL:
- return 0xd;
-
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_FLOAT_NAN:
- return 0x6;
-
- case SLJIT_C_NOT_OVERFLOW:
- case SLJIT_C_FLOAT_NOT_NAN:
- return 0x7;
-
- default: /* SLJIT_JUMP */
- return 0xe;
- }
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
- struct sljit_label *label;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_label(compiler);
-
- if (compiler->last_label && compiler->last_label->size == compiler->size)
- return compiler->last_label;
-
- label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
- PTR_FAIL_IF(!label);
- set_label(label, compiler);
- return label;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type)
-{
- struct sljit_jump *jump;
- int cc;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_jump(compiler, type);
-
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- PTR_FAIL_IF(!jump);
- set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
- type &= 0xff;
-
- /* In ARM, we don't need to touch the arguments. */
- PTR_FAIL_IF(emit_imm32_const(compiler, TMP_REG1, 0));
- if (type < SLJIT_JUMP) {
- jump->flags |= IS_CONDITIONAL;
- cc = get_cc(type);
- jump->flags |= cc << 8;
- PTR_FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8));
- }
-
- jump->addr = compiler->size;
- if (type <= SLJIT_JUMP)
- PTR_FAIL_IF(push_inst16(compiler, BX | RN3(TMP_REG1)));
- else {
- jump->flags |= IS_BL;
- PTR_FAIL_IF(push_inst16(compiler, BLX | RN3(TMP_REG1)));
- }
-
- return jump;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)
-{
- struct sljit_jump *jump;
-
- CHECK_ERROR();
- check_sljit_emit_ijump(compiler, type, src, srcw);
-
- /* In ARM, we don't need to touch the arguments. */
- if (src & SLJIT_IMM) {
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- FAIL_IF(!jump);
- set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0));
- jump->u.target = srcw;
-
- FAIL_IF(emit_imm32_const(compiler, TMP_REG1, 0));
- jump->addr = compiler->size;
- FAIL_IF(push_inst16(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RN3(TMP_REG1)));
- }
- else {
- if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS)
- return push_inst16(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RN3(src));
-
- FAIL_IF(emit_op_mem(compiler, WORD_SIZE, type <= SLJIT_JUMP ? TMP_PC : TMP_REG1, src, srcw));
- if (type >= SLJIT_FAST_CALL)
- return push_inst16(compiler, BLX | RN3(TMP_REG1));
- }
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)
-{
- int dst_r;
- sljit_uw cc;
-
- CHECK_ERROR();
- check_sljit_emit_cond_value(compiler, op, dst, dstw, type);
-
- if (dst == SLJIT_UNUSED)
- return SLJIT_SUCCESS;
-
- cc = get_cc(type);
- if (GET_OPCODE(op) == SLJIT_OR && dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8));
- FAIL_IF(push_inst32(compiler, ORRI | RN4(dst) | RD4(dst) | 0x1));
- if (op & SLJIT_SET_E) {
- if (reg_map[dst] <= 7)
- return push_inst16(compiler, ORRS | RD3(dst) | RN3(dst));
- return push_inst32(compiler, ORR_W | SET_FLAGS | RD4(TMP_REG1) | RN4(dst) | RM4(dst));
- }
- return SLJIT_SUCCESS;
- }
-
- dst_r = TMP_REG2;
- if (op == SLJIT_MOV && dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS && reg_map[dst] <= 7)
- dst_r = dst;
-
- FAIL_IF(push_inst16(compiler, IT | (cc << 4) | (((cc & 0x1) ^ 0x1) << 3) | 0x4));
- FAIL_IF(push_inst16(compiler, MOVSI | 0x1 | RDN3(dst_r)));
- FAIL_IF(push_inst16(compiler, MOVSI | 0x0 | RDN3(dst_r)));
-
- if (dst_r == TMP_REG2) {
- if (GET_OPCODE(op) == SLJIT_OR) {
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- return sljit_emit_op2(compiler, op, dst, dstw, dst, dstw, TMP_REG2, 0);
- }
- if (dst & SLJIT_MEM)
- return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw);
- else
- return push_inst16(compiler, MOV | SET_REGS44(dst, TMP_REG2));
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)
-{
- struct sljit_const *const_;
- int dst_r;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_const(compiler, dst, dstw, init_value);
-
- const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
- PTR_FAIL_IF(!const_);
- set_const(const_, compiler);
-
- dst_r = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG1;
- PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, init_value));
-
- if (dst & SLJIT_MEM)
- PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw));
- return const_;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
- inline_set_jump_addr(addr, new_addr, 1);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant)
-{
- sljit_uh* inst = (sljit_uh*)addr;
- modify_imm32_const(inst, new_constant);
- SLJIT_CACHE_FLUSH(inst, inst + 3);
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativeARM_v5.c b/src/third_party/pcre-8.30/sljit/sljitNativeARM_v5.c
deleted file mode 100644
index e3a5873247e..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativeARM_v5.c
+++ /dev/null
@@ -1,2424 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name()
-{
-#if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
- return "ARMv7" SLJIT_CPUINFO;
-#elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- return "ARMv5" SLJIT_CPUINFO;
-#else
-#error "Internal error: Unknown ARM architecture"
-#endif
-}
-
-/* Last register + 1. */
-#define TMP_REG1 (SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2 (SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3 (SLJIT_NO_REGISTERS + 3)
-#define TMP_PC (SLJIT_NO_REGISTERS + 4)
-
-#define TMP_FREG1 (SLJIT_FLOAT_REG4 + 1)
-#define TMP_FREG2 (SLJIT_FLOAT_REG4 + 2)
-
-/* In ARM instruction words.
- Cache lines are usually 32 byte aligned. */
-#define CONST_POOL_ALIGNMENT 8
-#define CONST_POOL_EMPTY 0xffffffff
-
-#define ALIGN_INSTRUCTION(ptr) \
- (sljit_uw*)(((sljit_uw)(ptr) + (CONST_POOL_ALIGNMENT * sizeof(sljit_uw)) - 1) & ~((CONST_POOL_ALIGNMENT * sizeof(sljit_uw)) - 1))
-#define MAX_DIFFERENCE(max_diff) \
- (((max_diff) / (int)sizeof(sljit_uw)) - (CONST_POOL_ALIGNMENT - 1))
-
-/* See sljit_emit_enter and sljit_emit_op0 if you want to change them. */
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 5] = {
- 0, 0, 1, 2, 10, 11, 4, 5, 6, 7, 8, 13, 3, 12, 14, 15
-};
-
-#define RM(rm) (reg_map[rm])
-#define RD(rd) (reg_map[rd] << 12)
-#define RN(rn) (reg_map[rn] << 16)
-
-/* --------------------------------------------------------------------- */
-/* Instrucion forms */
-/* --------------------------------------------------------------------- */
-
-/* The instruction includes the AL condition.
- INST_NAME - CONDITIONAL remove this flag. */
-#define COND_MASK 0xf0000000
-#define CONDITIONAL 0xe0000000
-#define PUSH_POOL 0xff000000
-
-/* DP - Data Processing instruction (use with EMIT_DATA_PROCESS_INS). */
-#define ADC_DP 0x5
-#define ADD_DP 0x4
-#define AND_DP 0x0
-#define B 0xea000000
-#define BIC_DP 0xe
-#define BL 0xeb000000
-#define BLX 0xe12fff30
-#define BX 0xe12fff10
-#define CLZ 0xe16f0f10
-#define CMP_DP 0xa
-#define BKPT 0xe1200070
-#define EOR_DP 0x1
-#define MOV_DP 0xd
-#define MUL 0xe0000090
-#define MVN_DP 0xf
-#define NOP 0xe1a00000
-#define ORR_DP 0xc
-#define PUSH 0xe92d0000
-#define POP 0xe8bd0000
-#define RSB_DP 0x3
-#define RSC_DP 0x7
-#define SBC_DP 0x6
-#define SMULL 0xe0c00090
-#define SUB_DP 0x2
-#define UMULL 0xe0800090
-#define VABS_F64 0xeeb00bc0
-#define VADD_F64 0xee300b00
-#define VCMP_F64 0xeeb40b40
-#define VDIV_F64 0xee800b00
-#define VMOV_F64 0xeeb00b40
-#define VMRS 0xeef1fa10
-#define VMUL_F64 0xee200b00
-#define VNEG_F64 0xeeb10b40
-#define VSTR 0xed000b00
-#define VSUB_F64 0xee300b40
-
-#if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
-/* Arm v7 specific instructions. */
-#define MOVW 0xe3000000
-#define MOVT 0xe3400000
-#define SXTB 0xe6af0070
-#define SXTH 0xe6bf0070
-#define UXTB 0xe6ef0070
-#define UXTH 0xe6ff0070
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
-
-static int push_cpool(struct sljit_compiler *compiler)
-{
- /* Pushing the constant pool into the instruction stream. */
- sljit_uw* inst;
- sljit_uw* cpool_ptr;
- sljit_uw* cpool_end;
- int i;
-
- /* The label could point the address after the constant pool. */
- if (compiler->last_label && compiler->last_label->size == compiler->size)
- compiler->last_label->size += compiler->cpool_fill + (CONST_POOL_ALIGNMENT - 1) + 1;
-
- SLJIT_ASSERT(compiler->cpool_fill > 0 && compiler->cpool_fill <= CPOOL_SIZE);
- inst = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
- FAIL_IF(!inst);
- compiler->size++;
- *inst = 0xff000000 | compiler->cpool_fill;
-
- for (i = 0; i < CONST_POOL_ALIGNMENT - 1; i++) {
- inst = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
- FAIL_IF(!inst);
- compiler->size++;
- *inst = 0;
- }
-
- cpool_ptr = compiler->cpool;
- cpool_end = cpool_ptr + compiler->cpool_fill;
- while (cpool_ptr < cpool_end) {
- inst = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
- FAIL_IF(!inst);
- compiler->size++;
- *inst = *cpool_ptr++;
- }
- compiler->cpool_diff = CONST_POOL_EMPTY;
- compiler->cpool_fill = 0;
- return SLJIT_SUCCESS;
-}
-
-static int push_inst(struct sljit_compiler *compiler, sljit_uw inst)
-{
- sljit_uw* ptr;
-
- if (SLJIT_UNLIKELY(compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_diff >= MAX_DIFFERENCE(4092)))
- FAIL_IF(push_cpool(compiler));
-
- ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
- FAIL_IF(!ptr);
- compiler->size++;
- *ptr = inst;
- return SLJIT_SUCCESS;
-}
-
-static int push_inst_with_literal(struct sljit_compiler *compiler, sljit_uw inst, sljit_uw literal)
-{
- sljit_uw* ptr;
- sljit_uw cpool_index = CPOOL_SIZE;
- sljit_uw* cpool_ptr;
- sljit_uw* cpool_end;
- sljit_ub* cpool_unique_ptr;
-
- if (SLJIT_UNLIKELY(compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_diff >= MAX_DIFFERENCE(4092)))
- FAIL_IF(push_cpool(compiler));
- else if (compiler->cpool_fill > 0) {
- cpool_ptr = compiler->cpool;
- cpool_end = cpool_ptr + compiler->cpool_fill;
- cpool_unique_ptr = compiler->cpool_unique;
- do {
- if ((*cpool_ptr == literal) && !(*cpool_unique_ptr)) {
- cpool_index = cpool_ptr - compiler->cpool;
- break;
- }
- cpool_ptr++;
- cpool_unique_ptr++;
- } while (cpool_ptr < cpool_end);
- }
-
- if (cpool_index == CPOOL_SIZE) {
- /* Must allocate a new entry in the literal pool. */
- if (compiler->cpool_fill < CPOOL_SIZE) {
- cpool_index = compiler->cpool_fill;
- compiler->cpool_fill++;
- }
- else {
- FAIL_IF(push_cpool(compiler));
- cpool_index = 0;
- compiler->cpool_fill = 1;
- }
- }
-
- SLJIT_ASSERT((inst & 0xfff) == 0);
- ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
- FAIL_IF(!ptr);
- compiler->size++;
- *ptr = inst | cpool_index;
-
- compiler->cpool[cpool_index] = literal;
- compiler->cpool_unique[cpool_index] = 0;
- if (compiler->cpool_diff == CONST_POOL_EMPTY)
- compiler->cpool_diff = compiler->size;
- return SLJIT_SUCCESS;
-}
-
-static int push_inst_with_unique_literal(struct sljit_compiler *compiler, sljit_uw inst, sljit_uw literal)
-{
- sljit_uw* ptr;
- if (SLJIT_UNLIKELY((compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_diff >= MAX_DIFFERENCE(4092)) || compiler->cpool_fill >= CPOOL_SIZE))
- FAIL_IF(push_cpool(compiler));
-
- SLJIT_ASSERT(compiler->cpool_fill < CPOOL_SIZE && (inst & 0xfff) == 0);
- ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
- FAIL_IF(!ptr);
- compiler->size++;
- *ptr = inst | compiler->cpool_fill;
-
- compiler->cpool[compiler->cpool_fill] = literal;
- compiler->cpool_unique[compiler->cpool_fill] = 1;
- compiler->cpool_fill++;
- if (compiler->cpool_diff == CONST_POOL_EMPTY)
- compiler->cpool_diff = compiler->size;
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int prepare_blx(struct sljit_compiler *compiler)
-{
- /* Place for at least two instruction (doesn't matter whether the first has a literal). */
- if (SLJIT_UNLIKELY(compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_diff >= MAX_DIFFERENCE(4088)))
- return push_cpool(compiler);
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int emit_blx(struct sljit_compiler *compiler)
-{
- /* Must follow tightly the previous instruction (to be able to convert it to bl instruction). */
- SLJIT_ASSERT(compiler->cpool_diff == CONST_POOL_EMPTY || compiler->size - compiler->cpool_diff < MAX_DIFFERENCE(4092));
- return push_inst(compiler, BLX | RM(TMP_REG1));
-}
-
-static sljit_uw patch_pc_relative_loads(sljit_uw *last_pc_patch, sljit_uw *code_ptr, sljit_uw* const_pool, sljit_uw cpool_size)
-{
- sljit_uw diff;
- sljit_uw ind;
- sljit_uw counter = 0;
- sljit_uw* clear_const_pool = const_pool;
- sljit_uw* clear_const_pool_end = const_pool + cpool_size;
-
- SLJIT_ASSERT(const_pool - code_ptr <= CONST_POOL_ALIGNMENT);
- /* Set unused flag for all literals in the constant pool.
- I.e.: unused literals can belong to branches, which can be encoded as B or BL.
- We can "compress" the constant pool by discarding these literals. */
- while (clear_const_pool < clear_const_pool_end)
- *clear_const_pool++ = (sljit_uw)(-1);
-
- while (last_pc_patch < code_ptr) {
- /* Data transfer instruction with Rn == r15. */
- if ((*last_pc_patch & 0x0c0f0000) == 0x040f0000) {
- diff = const_pool - last_pc_patch;
- ind = (*last_pc_patch) & 0xfff;
-
- /* Must be a load instruction with immediate offset. */
- SLJIT_ASSERT(ind < cpool_size && !(*last_pc_patch & (1 << 25)) && (*last_pc_patch & (1 << 20)));
- if ((int)const_pool[ind] < 0) {
- const_pool[ind] = counter;
- ind = counter;
- counter++;
- }
- else
- ind = const_pool[ind];
-
- SLJIT_ASSERT(diff >= 1);
- if (diff >= 2 || ind > 0) {
- diff = (diff + ind - 2) << 2;
- SLJIT_ASSERT(diff <= 0xfff);
- *last_pc_patch = (*last_pc_patch & ~0xfff) | diff;
- }
- else
- *last_pc_patch = (*last_pc_patch & ~(0xfff | (1 << 23))) | 0x004;
- }
- last_pc_patch++;
- }
- return counter;
-}
-
-/* In some rare ocasions we may need future patches. The probability is close to 0 in practice. */
-struct future_patch {
- struct future_patch* next;
- int index;
- int value;
-};
-
-static SLJIT_INLINE int resolve_const_pool_index(struct future_patch **first_patch, sljit_uw cpool_current_index, sljit_uw *cpool_start_address, sljit_uw *buf_ptr)
-{
- int value;
- struct future_patch *curr_patch, *prev_patch;
-
- /* Using the values generated by patch_pc_relative_loads. */
- if (!*first_patch)
- value = (int)cpool_start_address[cpool_current_index];
- else {
- curr_patch = *first_patch;
- prev_patch = 0;
- while (1) {
- if (!curr_patch) {
- value = (int)cpool_start_address[cpool_current_index];
- break;
- }
- if ((sljit_uw)curr_patch->index == cpool_current_index) {
- value = curr_patch->value;
- if (prev_patch)
- prev_patch->next = curr_patch->next;
- else
- *first_patch = curr_patch->next;
- SLJIT_FREE(curr_patch);
- break;
- }
- prev_patch = curr_patch;
- curr_patch = curr_patch->next;
- }
- }
-
- if (value >= 0) {
- if ((sljit_uw)value > cpool_current_index) {
- curr_patch = (struct future_patch*)SLJIT_MALLOC(sizeof(struct future_patch));
- if (!curr_patch) {
- while (*first_patch) {
- curr_patch = *first_patch;
- *first_patch = (*first_patch)->next;
- SLJIT_FREE(curr_patch);
- }
- return SLJIT_ERR_ALLOC_FAILED;
- }
- curr_patch->next = *first_patch;
- curr_patch->index = value;
- curr_patch->value = cpool_start_address[value];
- *first_patch = curr_patch;
- }
- cpool_start_address[value] = *buf_ptr;
- }
- return SLJIT_SUCCESS;
-}
-
-#else
-
-static int push_inst(struct sljit_compiler *compiler, sljit_uw inst)
-{
- sljit_uw* ptr;
-
- ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
- FAIL_IF(!ptr);
- compiler->size++;
- *ptr = inst;
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int emit_imm(struct sljit_compiler *compiler, int reg, sljit_w imm)
-{
- FAIL_IF(push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff)));
- return push_inst(compiler, MOVT | RD(reg) | ((imm >> 12) & 0xf0000) | ((imm >> 16) & 0xfff));
-}
-
-#endif
-
-static SLJIT_INLINE int detect_jump_type(struct sljit_jump *jump, sljit_uw *code_ptr, sljit_uw *code)
-{
- sljit_w diff;
-
- if (jump->flags & SLJIT_REWRITABLE_JUMP)
- return 0;
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- if (jump->flags & IS_BL)
- code_ptr--;
-
- if (jump->flags & JUMP_ADDR)
- diff = ((sljit_w)jump->u.target - (sljit_w)(code_ptr + 2));
- else {
- SLJIT_ASSERT(jump->flags & JUMP_LABEL);
- diff = ((sljit_w)(code + jump->u.label->size) - (sljit_w)(code_ptr + 2));
- }
-
- /* Branch to Thumb code has not been optimized yet. */
- if (diff & 0x3)
- return 0;
-
- diff >>= 2;
- if (jump->flags & IS_BL) {
- if (diff <= 0x01ffffff && diff >= -0x02000000) {
- *code_ptr = (BL - CONDITIONAL) | (*(code_ptr + 1) & COND_MASK);
- jump->flags |= PATCH_B;
- return 1;
- }
- }
- else {
- if (diff <= 0x01ffffff && diff >= -0x02000000) {
- *code_ptr = (B - CONDITIONAL) | (*code_ptr & COND_MASK);
- jump->flags |= PATCH_B;
- }
- }
-#else
- if (jump->flags & JUMP_ADDR)
- diff = ((sljit_w)jump->u.target - (sljit_w)code_ptr);
- else {
- SLJIT_ASSERT(jump->flags & JUMP_LABEL);
- diff = ((sljit_w)(code + jump->u.label->size) - (sljit_w)code_ptr);
- }
-
- /* Branch to Thumb code has not been optimized yet. */
- if (diff & 0x3)
- return 0;
-
- diff >>= 2;
- if (diff <= 0x01ffffff && diff >= -0x02000000) {
- code_ptr -= 2;
- *code_ptr = ((jump->flags & IS_BL) ? (BL - CONDITIONAL) : (B - CONDITIONAL)) | (code_ptr[2] & COND_MASK);
- jump->flags |= PATCH_B;
- return 1;
- }
-#endif
- return 0;
-}
-
-static SLJIT_INLINE void inline_set_jump_addr(sljit_uw addr, sljit_uw new_addr, int flush)
-{
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- sljit_uw *ptr = (sljit_uw*)addr;
- sljit_uw *inst = (sljit_uw*)ptr[0];
- sljit_uw mov_pc = ptr[1];
- int bl = (mov_pc & 0x0000f000) != RD(TMP_PC);
- sljit_w diff = (sljit_w)(((sljit_w)new_addr - (sljit_w)(inst + 2)) >> 2);
-
- if (diff <= 0x7fffff && diff >= -0x800000) {
- /* Turn to branch. */
- if (!bl) {
- inst[0] = (mov_pc & COND_MASK) | (B - CONDITIONAL) | (diff & 0xffffff);
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 1);
- }
- } else {
- inst[0] = (mov_pc & COND_MASK) | (BL - CONDITIONAL) | (diff & 0xffffff);
- inst[1] = NOP;
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 2);
- }
- }
- } else {
- /* Get the position of the constant. */
- if (mov_pc & (1 << 23))
- ptr = inst + ((mov_pc & 0xfff) >> 2) + 2;
- else
- ptr = inst + 1;
-
- if (*inst != mov_pc) {
- inst[0] = mov_pc;
- if (!bl) {
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 1);
- }
- } else {
- inst[1] = BLX | RM(TMP_REG1);
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 2);
- }
- }
- }
- *ptr = new_addr;
- }
-#else
- sljit_uw *inst = (sljit_uw*)addr;
- SLJIT_ASSERT((inst[0] & 0xfff00000) == MOVW && (inst[1] & 0xfff00000) == MOVT);
- inst[0] = MOVW | (inst[0] & 0xf000) | ((new_addr << 4) & 0xf0000) | (new_addr & 0xfff);
- inst[1] = MOVT | (inst[1] & 0xf000) | ((new_addr >> 12) & 0xf0000) | ((new_addr >> 16) & 0xfff);
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 2);
- }
-#endif
-}
-
-static sljit_uw get_immediate(sljit_uw imm);
-
-static SLJIT_INLINE void inline_set_const(sljit_uw addr, sljit_w new_constant, int flush)
-{
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- sljit_uw *ptr = (sljit_uw*)addr;
- sljit_uw *inst = (sljit_uw*)ptr[0];
- sljit_uw ldr_literal = ptr[1];
- sljit_uw src2;
-
- src2 = get_immediate(new_constant);
- if (src2) {
- *inst = 0xe3a00000 | (ldr_literal & 0xf000) | src2;
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 1);
- }
- return;
- }
-
- src2 = get_immediate(~new_constant);
- if (src2) {
- *inst = 0xe3e00000 | (ldr_literal & 0xf000) | src2;
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 1);
- }
- return;
- }
-
- if (ldr_literal & (1 << 23))
- ptr = inst + ((ldr_literal & 0xfff) >> 2) + 2;
- else
- ptr = inst + 1;
-
- if (*inst != ldr_literal) {
- *inst = ldr_literal;
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 1);
- }
- }
- *ptr = new_constant;
-#else
- sljit_uw *inst = (sljit_uw*)addr;
- SLJIT_ASSERT((inst[0] & 0xfff00000) == MOVW && (inst[1] & 0xfff00000) == MOVT);
- inst[0] = MOVW | (inst[0] & 0xf000) | ((new_constant << 4) & 0xf0000) | (new_constant & 0xfff);
- inst[1] = MOVT | (inst[1] & 0xf000) | ((new_constant >> 12) & 0xf0000) | ((new_constant >> 16) & 0xfff);
- if (flush) {
- SLJIT_CACHE_FLUSH(inst, inst + 2);
- }
-#endif
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
- struct sljit_memory_fragment *buf;
- sljit_uw *code;
- sljit_uw *code_ptr;
- sljit_uw *buf_ptr;
- sljit_uw *buf_end;
- sljit_uw size;
- sljit_uw word_count;
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- sljit_uw cpool_size;
- sljit_uw cpool_skip_alignment;
- sljit_uw cpool_current_index;
- sljit_uw *cpool_start_address;
- sljit_uw *last_pc_patch;
- struct future_patch *first_patch;
-#endif
-
- struct sljit_label *label;
- struct sljit_jump *jump;
- struct sljit_const *const_;
-
- CHECK_ERROR_PTR();
- check_sljit_generate_code(compiler);
- reverse_buf(compiler);
-
- /* Second code generation pass. */
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- size = compiler->size + (compiler->patches << 1);
- if (compiler->cpool_fill > 0)
- size += compiler->cpool_fill + CONST_POOL_ALIGNMENT - 1;
-#else
- size = compiler->size;
-#endif
- code = (sljit_uw*)SLJIT_MALLOC_EXEC(size * sizeof(sljit_uw));
- PTR_FAIL_WITH_EXEC_IF(code);
- buf = compiler->buf;
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- cpool_size = 0;
- cpool_skip_alignment = 0;
- cpool_current_index = 0;
- cpool_start_address = NULL;
- first_patch = NULL;
- last_pc_patch = code;
-#endif
-
- code_ptr = code;
- word_count = 0;
-
- label = compiler->labels;
- jump = compiler->jumps;
- const_ = compiler->consts;
-
- if (label && label->size == 0) {
- label->addr = (sljit_uw)code;
- label->size = 0;
- label = label->next;
- }
-
- do {
- buf_ptr = (sljit_uw*)buf->memory;
- buf_end = buf_ptr + (buf->used_size >> 2);
- do {
- word_count++;
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- if (cpool_size > 0) {
- if (cpool_skip_alignment > 0) {
- buf_ptr++;
- cpool_skip_alignment--;
- }
- else {
- if (SLJIT_UNLIKELY(resolve_const_pool_index(&first_patch, cpool_current_index, cpool_start_address, buf_ptr))) {
- SLJIT_FREE_EXEC(code);
- compiler->error = SLJIT_ERR_ALLOC_FAILED;
- return NULL;
- }
- buf_ptr++;
- if (++cpool_current_index >= cpool_size) {
- SLJIT_ASSERT(!first_patch);
- cpool_size = 0;
- if (label && label->size == word_count) {
- /* Points after the current instruction. */
- label->addr = (sljit_uw)code_ptr;
- label->size = code_ptr - code;
- label = label->next;
- }
- }
- }
- }
- else if ((*buf_ptr & 0xff000000) != PUSH_POOL) {
-#endif
- *code_ptr = *buf_ptr++;
- /* These structures are ordered by their address. */
- SLJIT_ASSERT(!label || label->size >= word_count);
- SLJIT_ASSERT(!jump || jump->addr >= word_count);
- SLJIT_ASSERT(!const_ || const_->addr >= word_count);
- if (jump && jump->addr == word_count) {
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- if (detect_jump_type(jump, code_ptr, code))
- code_ptr--;
- jump->addr = (sljit_uw)code_ptr;
-#else
- jump->addr = (sljit_uw)(code_ptr - 2);
- if (detect_jump_type(jump, code_ptr, code))
- code_ptr -= 2;
-#endif
- jump = jump->next;
- }
- if (label && label->size == word_count) {
- /* code_ptr can be affected above. */
- label->addr = (sljit_uw)(code_ptr + 1);
- label->size = (code_ptr + 1) - code;
- label = label->next;
- }
- if (const_ && const_->addr == word_count) {
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- const_->addr = (sljit_uw)code_ptr;
-#else
- const_->addr = (sljit_uw)(code_ptr - 1);
-#endif
- const_ = const_->next;
- }
- code_ptr++;
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- }
- else {
- /* Fortunately, no need to shift. */
- cpool_size = *buf_ptr++ & ~PUSH_POOL;
- SLJIT_ASSERT(cpool_size > 0);
- cpool_start_address = ALIGN_INSTRUCTION(code_ptr + 1);
- cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, cpool_size);
- if (cpool_current_index > 0) {
- /* Unconditional branch. */
- *code_ptr = B | (((cpool_start_address - code_ptr) + cpool_current_index - 2) & ~PUSH_POOL);
- code_ptr = cpool_start_address + cpool_current_index;
- }
- cpool_skip_alignment = CONST_POOL_ALIGNMENT - 1;
- cpool_current_index = 0;
- last_pc_patch = code_ptr;
- }
-#endif
- } while (buf_ptr < buf_end);
- buf = buf->next;
- } while (buf);
-
- SLJIT_ASSERT(!label);
- SLJIT_ASSERT(!jump);
- SLJIT_ASSERT(!const_);
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- SLJIT_ASSERT(cpool_size == 0);
- if (compiler->cpool_fill > 0) {
- cpool_start_address = ALIGN_INSTRUCTION(code_ptr);
- cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, compiler->cpool_fill);
- if (cpool_current_index > 0)
- code_ptr = cpool_start_address + cpool_current_index;
-
- buf_ptr = compiler->cpool;
- buf_end = buf_ptr + compiler->cpool_fill;
- cpool_current_index = 0;
- while (buf_ptr < buf_end) {
- if (SLJIT_UNLIKELY(resolve_const_pool_index(&first_patch, cpool_current_index, cpool_start_address, buf_ptr))) {
- SLJIT_FREE_EXEC(code);
- compiler->error = SLJIT_ERR_ALLOC_FAILED;
- return NULL;
- }
- buf_ptr++;
- cpool_current_index++;
- }
- SLJIT_ASSERT(!first_patch);
- }
-#endif
-
- jump = compiler->jumps;
- while (jump) {
- buf_ptr = (sljit_uw*)jump->addr;
-
- if (jump->flags & PATCH_B) {
- if (!(jump->flags & JUMP_ADDR)) {
- SLJIT_ASSERT(jump->flags & JUMP_LABEL);
- SLJIT_ASSERT(((sljit_w)jump->u.label->addr - (sljit_w)(buf_ptr + 2)) <= 0x01ffffff && ((sljit_w)jump->u.label->addr - (sljit_w)(buf_ptr + 2)) >= -0x02000000);
- *buf_ptr |= (((sljit_w)jump->u.label->addr - (sljit_w)(buf_ptr + 2)) >> 2) & 0x00ffffff;
- }
- else {
- SLJIT_ASSERT(((sljit_w)jump->u.target - (sljit_w)(buf_ptr + 2)) <= 0x01ffffff && ((sljit_w)jump->u.target - (sljit_w)(buf_ptr + 2)) >= -0x02000000);
- *buf_ptr |= (((sljit_w)jump->u.target - (sljit_w)(buf_ptr + 2)) >> 2) & 0x00ffffff;
- }
- }
- else if (jump->flags & SLJIT_REWRITABLE_JUMP) {
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- jump->addr = (sljit_uw)code_ptr;
- code_ptr[0] = (sljit_uw)buf_ptr;
- code_ptr[1] = *buf_ptr;
- inline_set_jump_addr((sljit_uw)code_ptr, (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target, 0);
- code_ptr += 2;
-#else
- inline_set_jump_addr((sljit_uw)buf_ptr, (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target, 0);
-#endif
- }
- else {
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- if (jump->flags & IS_BL)
- buf_ptr--;
- if (*buf_ptr & (1 << 23))
- buf_ptr += ((*buf_ptr & 0xfff) >> 2) + 2;
- else
- buf_ptr += 1;
- *buf_ptr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
-#else
- inline_set_jump_addr((sljit_uw)buf_ptr, (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target, 0);
-#endif
- }
- jump = jump->next;
- }
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- const_ = compiler->consts;
- while (const_) {
- buf_ptr = (sljit_uw*)const_->addr;
- const_->addr = (sljit_uw)code_ptr;
-
- code_ptr[0] = (sljit_uw)buf_ptr;
- code_ptr[1] = *buf_ptr;
- if (*buf_ptr & (1 << 23))
- buf_ptr += ((*buf_ptr & 0xfff) >> 2) + 2;
- else
- buf_ptr += 1;
- /* Set the value again (can be a simple constant). */
- inline_set_const((sljit_uw)code_ptr, *buf_ptr, 0);
- code_ptr += 2;
-
- const_ = const_->next;
- }
-#endif
-
- SLJIT_ASSERT(code_ptr - code <= (int)size);
-
- SLJIT_CACHE_FLUSH(code, code_ptr);
- compiler->error = SLJIT_ERR_COMPILED;
- compiler->executable_size = size * sizeof(sljit_uw);
- return code;
-}
-
-/* emit_op inp_flags.
- WRITE_BACK must be the first, since it is a flag. */
-#define WRITE_BACK 0x01
-#define ALLOW_IMM 0x02
-#define ALLOW_INV_IMM 0x04
-#define ALLOW_ANY_IMM (ALLOW_IMM | ALLOW_INV_IMM)
-#define ARG_TEST 0x08
-
-/* Creates an index in data_transfer_insts array. */
-#define WORD_DATA 0x00
-#define BYTE_DATA 0x10
-#define HALF_DATA 0x20
-#define SIGNED_DATA 0x40
-#define LOAD_DATA 0x80
-
-#define EMIT_INSTRUCTION(inst) \
- FAIL_IF(push_inst(compiler, (inst)))
-
-/* Condition: AL. */
-#define EMIT_DATA_PROCESS_INS(opcode, set_flags, dst, src1, src2) \
- (0xe0000000 | ((opcode) << 21) | (set_flags) | RD(dst) | RN(src1) | (src2))
-
-static int emit_op(struct sljit_compiler *compiler, int op, int inp_flags,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w);
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- int size;
- sljit_uw push;
-
- CHECK_ERROR();
- check_sljit_emit_enter(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- /* Push saved registers, temporary registers
- stmdb sp!, {..., lr} */
- push = PUSH | (1 << 14);
- if (temporaries >= 5)
- push |= 1 << 11;
- if (temporaries >= 4)
- push |= 1 << 10;
- if (saveds >= 5)
- push |= 1 << 8;
- if (saveds >= 4)
- push |= 1 << 7;
- if (saveds >= 3)
- push |= 1 << 6;
- if (saveds >= 2)
- push |= 1 << 5;
- if (saveds >= 1)
- push |= 1 << 4;
- EMIT_INSTRUCTION(push);
-
- /* Stack must be aligned to 8 bytes: */
- size = (1 + saveds) * sizeof(sljit_uw);
- if (temporaries >= 4)
- size += (temporaries - 3) * sizeof(sljit_uw);
- local_size += size;
- local_size = (local_size + 7) & ~7;
- local_size -= size;
- compiler->local_size = local_size;
- if (local_size > 0)
- FAIL_IF(emit_op(compiler, SLJIT_SUB, ALLOW_IMM, SLJIT_LOCALS_REG, 0, SLJIT_LOCALS_REG, 0, SLJIT_IMM, local_size));
-
- if (args >= 1)
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_SAVED_REG1, SLJIT_UNUSED, RM(SLJIT_TEMPORARY_REG1)));
- if (args >= 2)
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_SAVED_REG2, SLJIT_UNUSED, RM(SLJIT_TEMPORARY_REG2)));
- if (args >= 3)
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_SAVED_REG3, SLJIT_UNUSED, RM(SLJIT_TEMPORARY_REG3)));
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- int size;
-
- CHECK_ERROR_VOID();
- check_sljit_set_context(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- size = (1 + saveds) * sizeof(sljit_uw);
- if (temporaries >= 4)
- size += (temporaries - 3) * sizeof(sljit_uw);
- local_size += size;
- local_size = (local_size + 7) & ~7;
- local_size -= size;
- compiler->local_size = local_size;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)
-{
- sljit_uw pop;
-
- CHECK_ERROR();
- check_sljit_emit_return(compiler, op, src, srcw);
-
- FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-
- if (compiler->local_size > 0)
- FAIL_IF(emit_op(compiler, SLJIT_ADD, ALLOW_IMM, SLJIT_LOCALS_REG, 0, SLJIT_LOCALS_REG, 0, SLJIT_IMM, compiler->local_size));
-
- pop = POP | (1 << 15);
- /* Push saved registers, temporary registers
- ldmia sp!, {..., pc} */
- if (compiler->temporaries >= 5)
- pop |= 1 << 11;
- if (compiler->temporaries >= 4)
- pop |= 1 << 10;
- if (compiler->saveds >= 5)
- pop |= 1 << 8;
- if (compiler->saveds >= 4)
- pop |= 1 << 7;
- if (compiler->saveds >= 3)
- pop |= 1 << 6;
- if (compiler->saveds >= 2)
- pop |= 1 << 5;
- if (compiler->saveds >= 1)
- pop |= 1 << 4;
-
- return push_inst(compiler, pop);
-}
-
-/* --------------------------------------------------------------------- */
-/* Operators */
-/* --------------------------------------------------------------------- */
-
-/* s/l - store/load (1 bit)
- u/s - signed/unsigned (1 bit)
- w/b/h/N - word/byte/half/NOT allowed (2 bit)
- It contans 16 items, but not all are different. */
-
-static sljit_w data_transfer_insts[16] = {
-/* s u w */ 0xe5000000 /* str */,
-/* s u b */ 0xe5400000 /* strb */,
-/* s u h */ 0xe10000b0 /* strh */,
-/* s u N */ 0x00000000 /* not allowed */,
-/* s s w */ 0xe5000000 /* str */,
-/* s s b */ 0xe5400000 /* strb */,
-/* s s h */ 0xe10000b0 /* strh */,
-/* s s N */ 0x00000000 /* not allowed */,
-
-/* l u w */ 0xe5100000 /* ldr */,
-/* l u b */ 0xe5500000 /* ldrb */,
-/* l u h */ 0xe11000b0 /* ldrh */,
-/* l u N */ 0x00000000 /* not allowed */,
-/* l s w */ 0xe5100000 /* ldr */,
-/* l s b */ 0xe11000d0 /* ldrsb */,
-/* l s h */ 0xe11000f0 /* ldrsh */,
-/* l s N */ 0x00000000 /* not allowed */,
-};
-
-#define EMIT_DATA_TRANSFER(type, add, wb, target, base1, base2) \
- (data_transfer_insts[(type) >> 4] | ((add) << 23) | ((wb) << 21) | (reg_map[target] << 12) | (reg_map[base1] << 16) | (base2))
-/* Normal ldr/str instruction.
- Type2: ldrsb, ldrh, ldrsh */
-#define IS_TYPE1_TRANSFER(type) \
- (data_transfer_insts[(type) >> 4] & 0x04000000)
-#define TYPE2_TRANSFER_IMM(imm) \
- (((imm) & 0xf) | (((imm) & 0xf0) << 4) | (1 << 22))
-
-/* flags: */
- /* Arguments are swapped. */
-#define ARGS_SWAPPED 0x01
- /* Inverted immediate. */
-#define INV_IMM 0x02
- /* Source and destination is register. */
-#define REG_DEST 0x04
-#define REG_SOURCE 0x08
- /* One instruction is enough. */
-#define FAST_DEST 0x10
- /* Multiple instructions are required. */
-#define SLOW_DEST 0x20
-/* SET_FLAGS must be (1 << 20) as it is also the value of S bit (can be used for optimization). */
-#define SET_FLAGS (1 << 20)
-/* dst: reg
- src1: reg
- src2: reg or imm (if allowed)
- SRC2_IMM must be (1 << 25) as it is also the value of I bit (can be used for optimization). */
-#define SRC2_IMM (1 << 25)
-
-#define EMIT_DATA_PROCESS_INS_AND_RETURN(opcode) \
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(opcode, flags & SET_FLAGS, dst, src1, (src2 & SRC2_IMM) ? src2 : RM(src2)))
-
-#define EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(opcode, dst, src1, src2) \
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(opcode, flags & SET_FLAGS, dst, src1, src2))
-
-#define EMIT_SHIFT_INS_AND_RETURN(opcode) \
- SLJIT_ASSERT(!(flags & INV_IMM) && !(src2 & SRC2_IMM)); \
- if (compiler->shift_imm != 0x20) { \
- SLJIT_ASSERT(src1 == TMP_REG1); \
- SLJIT_ASSERT(!(flags & ARGS_SWAPPED)); \
- if (compiler->shift_imm != 0) \
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, (compiler->shift_imm << 7) | (opcode << 5) | reg_map[src2])); \
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, reg_map[src2])); \
- } \
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, (reg_map[(flags & ARGS_SWAPPED) ? src1 : src2] << 8) | (opcode << 5) | 0x10 | ((flags & ARGS_SWAPPED) ? reg_map[src2] : reg_map[src1])));
-
-static SLJIT_INLINE int emit_single_op(struct sljit_compiler *compiler, int op, int flags,
- int dst, int src1, int src2)
-{
- sljit_w mul_inst;
-
- switch (GET_OPCODE(op)) {
- case SLJIT_ADD:
- SLJIT_ASSERT(!(flags & INV_IMM));
- EMIT_DATA_PROCESS_INS_AND_RETURN(ADD_DP);
-
- case SLJIT_ADDC:
- SLJIT_ASSERT(!(flags & INV_IMM));
- EMIT_DATA_PROCESS_INS_AND_RETURN(ADC_DP);
-
- case SLJIT_SUB:
- SLJIT_ASSERT(!(flags & INV_IMM));
- if (!(flags & ARGS_SWAPPED))
- EMIT_DATA_PROCESS_INS_AND_RETURN(SUB_DP);
- EMIT_DATA_PROCESS_INS_AND_RETURN(RSB_DP);
-
- case SLJIT_SUBC:
- SLJIT_ASSERT(!(flags & INV_IMM));
- if (!(flags & ARGS_SWAPPED))
- EMIT_DATA_PROCESS_INS_AND_RETURN(SBC_DP);
- EMIT_DATA_PROCESS_INS_AND_RETURN(RSC_DP);
-
- case SLJIT_MUL:
- SLJIT_ASSERT(!(flags & INV_IMM));
- SLJIT_ASSERT(!(src2 & SRC2_IMM));
- if (SLJIT_UNLIKELY(op & SLJIT_SET_O))
- mul_inst = SMULL | (reg_map[TMP_REG3] << 16) | (reg_map[dst] << 12);
- else
- mul_inst = MUL | (reg_map[dst] << 16);
-
- if (dst != src2)
- FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src1] << 8) | reg_map[src2]));
- else if (dst != src1)
- FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src2] << 8) | reg_map[src1]));
- else {
- /* Rm and Rd must not be the same register. */
- SLJIT_ASSERT(dst != TMP_REG1);
- FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, reg_map[src2])));
- FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src2] << 8) | reg_map[TMP_REG1]));
- }
-
- if (!(op & SLJIT_SET_O))
- return SLJIT_SUCCESS;
-
- /* We need to use TMP_REG3. */
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- /* cmp TMP_REG2, dst asr #31. */
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(CMP_DP, SET_FLAGS, SLJIT_UNUSED, TMP_REG3, RM(dst) | 0xfc0));
-
- case SLJIT_AND:
- if (!(flags & INV_IMM))
- EMIT_DATA_PROCESS_INS_AND_RETURN(AND_DP);
- EMIT_DATA_PROCESS_INS_AND_RETURN(BIC_DP);
-
- case SLJIT_OR:
- SLJIT_ASSERT(!(flags & INV_IMM));
- EMIT_DATA_PROCESS_INS_AND_RETURN(ORR_DP);
-
- case SLJIT_XOR:
- SLJIT_ASSERT(!(flags & INV_IMM));
- EMIT_DATA_PROCESS_INS_AND_RETURN(EOR_DP);
-
- case SLJIT_SHL:
- EMIT_SHIFT_INS_AND_RETURN(0);
-
- case SLJIT_LSHR:
- EMIT_SHIFT_INS_AND_RETURN(1);
-
- case SLJIT_ASHR:
- EMIT_SHIFT_INS_AND_RETURN(2);
-
- case SLJIT_MOV:
- SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & ARGS_SWAPPED));
- if (dst != src2) {
- if (src2 & SRC2_IMM) {
- if (flags & INV_IMM)
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, src2);
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, src2);
- }
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, reg_map[src2]);
- }
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV_UB:
- case SLJIT_MOV_SB:
- SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & ARGS_SWAPPED));
- if ((flags & (REG_DEST | REG_SOURCE)) == (REG_DEST | REG_SOURCE)) {
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- if (op == SLJIT_MOV_UB)
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(AND_DP, 0, dst, src2, SRC2_IMM | 0xff));
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (24 << 7) | reg_map[src2]));
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (24 << 7) | (op == SLJIT_MOV_UB ? 0x20 : 0x40) | reg_map[dst]));
-#else
- return push_inst(compiler, (op == SLJIT_MOV_UB ? UXTB : SXTB) | RD(dst) | RM(src2));
-#endif
- }
- else if (dst != src2) {
- SLJIT_ASSERT(src2 & SRC2_IMM);
- if (flags & INV_IMM)
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, src2);
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, src2);
- }
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV_UH:
- case SLJIT_MOV_SH:
- SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & ARGS_SWAPPED));
- if ((flags & (REG_DEST | REG_SOURCE)) == (REG_DEST | REG_SOURCE)) {
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (16 << 7) | reg_map[src2]));
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (16 << 7) | (op == SLJIT_MOV_UH ? 0x20 : 0x40) | reg_map[dst]));
-#else
- return push_inst(compiler, (op == SLJIT_MOV_UH ? UXTH : SXTH) | RD(dst) | RM(src2));
-#endif
- }
- else if (dst != src2) {
- SLJIT_ASSERT(src2 & SRC2_IMM);
- if (flags & INV_IMM)
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, src2);
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, src2);
- }
- return SLJIT_SUCCESS;
-
- case SLJIT_NOT:
- if (src2 & SRC2_IMM) {
- if (flags & INV_IMM)
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, src2);
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, src2);
- }
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, RM(src2));
-
- case SLJIT_CLZ:
- SLJIT_ASSERT(!(flags & INV_IMM));
- SLJIT_ASSERT(!(src2 & SRC2_IMM));
- FAIL_IF(push_inst(compiler, CLZ | RD(dst) | RM(src2)));
- if (flags & SET_FLAGS)
- EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(CMP_DP, SLJIT_UNUSED, dst, SRC2_IMM);
- return SLJIT_SUCCESS;
- }
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-}
-
-#undef EMIT_DATA_PROCESS_INS_AND_RETURN
-#undef EMIT_FULL_DATA_PROCESS_INS_AND_RETURN
-#undef EMIT_SHIFT_INS_AND_RETURN
-
-/* Tests whether the immediate can be stored in the 12 bit imm field.
- Returns with 0 if not possible. */
-static sljit_uw get_immediate(sljit_uw imm)
-{
- int rol;
-
- if (imm <= 0xff)
- return SRC2_IMM | imm;
-
- if (!(imm & 0xff000000)) {
- imm <<= 8;
- rol = 8;
- }
- else {
- imm = (imm << 24) | (imm >> 8);
- rol = 0;
- }
-
- if (!(imm & 0xff000000)) {
- imm <<= 8;
- rol += 4;
- }
-
- if (!(imm & 0xf0000000)) {
- imm <<= 4;
- rol += 2;
- }
-
- if (!(imm & 0xc0000000)) {
- imm <<= 2;
- rol += 1;
- }
-
- if (!(imm & 0x00ffffff))
- return SRC2_IMM | (imm >> 24) | (rol << 8);
- else
- return 0;
-}
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
-static int generate_int(struct sljit_compiler *compiler, int reg, sljit_uw imm, int positive)
-{
- sljit_uw mask;
- sljit_uw imm1;
- sljit_uw imm2;
- int rol;
-
- /* Step1: Search a zero byte (8 continous zero bit). */
- mask = 0xff000000;
- rol = 8;
- while(1) {
- if (!(imm & mask)) {
- /* Rol imm by rol. */
- imm = (imm << rol) | (imm >> (32 - rol));
- /* Calculate arm rol. */
- rol = 4 + (rol >> 1);
- break;
- }
- rol += 2;
- mask >>= 2;
- if (mask & 0x3) {
- /* rol by 8. */
- imm = (imm << 8) | (imm >> 24);
- mask = 0xff00;
- rol = 24;
- while (1) {
- if (!(imm & mask)) {
- /* Rol imm by rol. */
- imm = (imm << rol) | (imm >> (32 - rol));
- /* Calculate arm rol. */
- rol = (rol >> 1) - 8;
- break;
- }
- rol += 2;
- mask >>= 2;
- if (mask & 0x3)
- return 0;
- }
- break;
- }
- }
-
- /* The low 8 bit must be zero. */
- SLJIT_ASSERT(!(imm & 0xff));
-
- if (!(imm & 0xff000000)) {
- imm1 = SRC2_IMM | ((imm >> 16) & 0xff) | (((rol + 4) & 0xf) << 8);
- imm2 = SRC2_IMM | ((imm >> 8) & 0xff) | (((rol + 8) & 0xf) << 8);
- }
- else if (imm & 0xc0000000) {
- imm1 = SRC2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8);
- imm <<= 8;
- rol += 4;
-
- if (!(imm & 0xff000000)) {
- imm <<= 8;
- rol += 4;
- }
-
- if (!(imm & 0xf0000000)) {
- imm <<= 4;
- rol += 2;
- }
-
- if (!(imm & 0xc0000000)) {
- imm <<= 2;
- rol += 1;
- }
-
- if (!(imm & 0x00ffffff))
- imm2 = SRC2_IMM | (imm >> 24) | ((rol & 0xf) << 8);
- else
- return 0;
- }
- else {
- if (!(imm & 0xf0000000)) {
- imm <<= 4;
- rol += 2;
- }
-
- if (!(imm & 0xc0000000)) {
- imm <<= 2;
- rol += 1;
- }
-
- imm1 = SRC2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8);
- imm <<= 8;
- rol += 4;
-
- if (!(imm & 0xf0000000)) {
- imm <<= 4;
- rol += 2;
- }
-
- if (!(imm & 0xc0000000)) {
- imm <<= 2;
- rol += 1;
- }
-
- if (!(imm & 0x00ffffff))
- imm2 = SRC2_IMM | (imm >> 24) | ((rol & 0xf) << 8);
- else
- return 0;
- }
-
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(positive ? MOV_DP : MVN_DP, 0, reg, SLJIT_UNUSED, imm1));
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(positive ? ORR_DP : BIC_DP, 0, reg, reg, imm2));
- return 1;
-}
-#endif
-
-static int load_immediate(struct sljit_compiler *compiler, int reg, sljit_uw imm)
-{
- sljit_uw tmp;
-
-#if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
- if (!(imm & ~0xffff))
- return push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff));
-#endif
-
- /* Create imm by 1 inst. */
- tmp = get_immediate(imm);
- if (tmp) {
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, tmp));
- return SLJIT_SUCCESS;
- }
-
- tmp = get_immediate(~imm);
- if (tmp) {
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MVN_DP, 0, reg, SLJIT_UNUSED, tmp));
- return SLJIT_SUCCESS;
- }
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- /* Create imm by 2 inst. */
- FAIL_IF(generate_int(compiler, reg, imm, 1));
- FAIL_IF(generate_int(compiler, reg, ~imm, 0));
-
- /* Load integer. */
- return push_inst_with_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, reg, TMP_PC, 0), imm);
-#else
- return emit_imm(compiler, reg, imm);
-#endif
-}
-
-/* Can perform an operation using at most 1 instruction. */
-static int getput_arg_fast(struct sljit_compiler *compiler, int inp_flags, int reg, int arg, sljit_w argw)
-{
- sljit_uw imm;
-
- if (arg & SLJIT_IMM) {
- imm = get_immediate(argw);
- if (imm) {
- if (inp_flags & ARG_TEST)
- return 1;
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, imm));
- return -1;
- }
- imm = get_immediate(~argw);
- if (imm) {
- if (inp_flags & ARG_TEST)
- return 1;
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MVN_DP, 0, reg, SLJIT_UNUSED, imm));
- return -1;
- }
- return (inp_flags & ARG_TEST) ? SLJIT_SUCCESS : 0;
- }
-
- SLJIT_ASSERT(arg & SLJIT_MEM);
-
- /* Fast loads/stores. */
- if (arg & 0xf) {
- if (!(arg & 0xf0)) {
- if (IS_TYPE1_TRANSFER(inp_flags)) {
- if (argw >= 0 && argw <= 0xfff) {
- if (inp_flags & ARG_TEST)
- return 1;
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & 0xf, argw));
- return -1;
- }
- if (argw < 0 && argw >= -0xfff) {
- if (inp_flags & ARG_TEST)
- return 1;
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, 0, inp_flags & WRITE_BACK, reg, arg & 0xf, -argw));
- return -1;
- }
- }
- else {
- if (argw >= 0 && argw <= 0xff) {
- if (inp_flags & ARG_TEST)
- return 1;
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & 0xf, TYPE2_TRANSFER_IMM(argw)));
- return -1;
- }
- if (argw < 0 && argw >= -0xff) {
- if (inp_flags & ARG_TEST)
- return 1;
- argw = -argw;
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, 0, inp_flags & WRITE_BACK, reg, arg & 0xf, TYPE2_TRANSFER_IMM(argw)));
- return -1;
- }
- }
- }
- else if ((argw & 0x3) == 0 || IS_TYPE1_TRANSFER(inp_flags)) {
- if (inp_flags & ARG_TEST)
- return 1;
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & 0xf,
- RM((arg >> 4) & 0xf) | (IS_TYPE1_TRANSFER(inp_flags) ? SRC2_IMM : 0) | ((argw & 0x3) << 7)));
- return -1;
- }
- }
-
- return (inp_flags & ARG_TEST) ? SLJIT_SUCCESS : 0;
-}
-
-/* See getput_arg below.
- Note: can_cache is called only for binary operators. Those
- operators always uses word arguments without write back. */
-static int can_cache(int arg, sljit_w argw, int next_arg, sljit_w next_argw)
-{
- /* Immediate caching is not supported as it would be an operation on constant arguments. */
- if (arg & SLJIT_IMM)
- return 0;
-
- /* Always a simple operation. */
- if (arg & 0xf0)
- return 0;
-
- if (!(arg & 0xf)) {
- /* Immediate access. */
- if ((next_arg & SLJIT_MEM) && ((sljit_uw)argw - (sljit_uw)next_argw <= 0xfff || (sljit_uw)next_argw - (sljit_uw)argw <= 0xfff))
- return 1;
- return 0;
- }
-
- if (argw <= 0xfffff && argw >= -0xfffff)
- return 0;
-
- if (argw == next_argw && (next_arg & SLJIT_MEM))
- return 1;
-
- if (arg == next_arg && ((sljit_uw)argw - (sljit_uw)next_argw <= 0xfff || (sljit_uw)next_argw - (sljit_uw)argw <= 0xfff))
- return 1;
-
- return 0;
-}
-
-#define GETPUT_ARG_DATA_TRANSFER(add, wb, target, base, imm) \
- if (max_delta & 0xf00) \
- FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, imm))); \
- else \
- FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, TYPE2_TRANSFER_IMM(imm))));
-
-#define TEST_WRITE_BACK() \
- if (inp_flags & WRITE_BACK) { \
- tmp_r = arg & 0xf; \
- if (reg == tmp_r) { \
- /* This can only happen for stores */ \
- /* since ldr reg, [reg, ...]! has no meaning */ \
- SLJIT_ASSERT(!(inp_flags & LOAD_DATA)); \
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(reg))); \
- reg = TMP_REG3; \
- } \
- }
-
-/* Emit the necessary instructions. See can_cache above. */
-static int getput_arg(struct sljit_compiler *compiler, int inp_flags, int reg, int arg, sljit_w argw, int next_arg, sljit_w next_argw)
-{
- int tmp_r;
- sljit_w max_delta;
- sljit_w sign;
-
- if (arg & SLJIT_IMM) {
- SLJIT_ASSERT(inp_flags & LOAD_DATA);
- return load_immediate(compiler, reg, argw);
- }
-
- SLJIT_ASSERT(arg & SLJIT_MEM);
-
- tmp_r = (inp_flags & LOAD_DATA) ? reg : TMP_REG3;
- max_delta = IS_TYPE1_TRANSFER(inp_flags) ? 0xfff : 0xff;
-
- if ((arg & 0xf) == SLJIT_UNUSED) {
- /* Write back is not used. */
- if ((compiler->cache_arg & SLJIT_IMM) && (((sljit_uw)argw - (sljit_uw)compiler->cache_argw) <= (sljit_uw)max_delta || ((sljit_uw)compiler->cache_argw - (sljit_uw)argw) <= (sljit_uw)max_delta)) {
- if (((sljit_uw)argw - (sljit_uw)compiler->cache_argw) <= (sljit_uw)max_delta) {
- sign = 1;
- argw = argw - compiler->cache_argw;
- }
- else {
- sign = 0;
- argw = compiler->cache_argw - argw;
- }
-
- if (max_delta & 0xf00) {
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, sign, 0, reg, TMP_REG3, argw));
- }
- else {
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, sign, 0, reg, TMP_REG3, TYPE2_TRANSFER_IMM(argw)));
- }
- return SLJIT_SUCCESS;
- }
-
- /* With write back, we can create some sophisticated loads, but
- it is hard to decide whether we should convert downward (0s) or upward (1s). */
- if ((next_arg & SLJIT_MEM) && ((sljit_uw)argw - (sljit_uw)next_argw <= (sljit_uw)max_delta || (sljit_uw)next_argw - (sljit_uw)argw <= (sljit_uw)max_delta)) {
- SLJIT_ASSERT(inp_flags & LOAD_DATA);
-
- compiler->cache_arg = SLJIT_IMM;
- compiler->cache_argw = argw;
- tmp_r = TMP_REG3;
- }
-
- FAIL_IF(load_immediate(compiler, tmp_r, argw));
- GETPUT_ARG_DATA_TRANSFER(1, 0, reg, tmp_r, 0);
- return SLJIT_SUCCESS;
- }
-
- /* Extended imm addressing for [reg+imm] format. */
- sign = (max_delta << 8) | 0xff;
- if (!(arg & 0xf0) && argw <= sign && argw >= -sign) {
- TEST_WRITE_BACK();
- if (argw >= 0) {
- sign = 1;
- }
- else {
- sign = 0;
- argw = -argw;
- }
-
- /* Optimization: add is 0x4, sub is 0x2. Sign is 1 for add and 0 for sub. */
- if (max_delta & 0xf00)
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(SUB_DP << sign, 0, tmp_r, arg & 0xf, SRC2_IMM | (argw >> 12) | 0xa00));
- else
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(SUB_DP << sign, 0, tmp_r, arg & 0xf, SRC2_IMM | (argw >> 8) | 0xc00));
-
- argw &= max_delta;
- GETPUT_ARG_DATA_TRANSFER(sign, inp_flags & WRITE_BACK, reg, tmp_r, argw);
- return SLJIT_SUCCESS;
- }
-
- if (arg & 0xf0) {
- SLJIT_ASSERT((argw & 0x3) && !(max_delta & 0xf00));
- if (inp_flags & WRITE_BACK)
- tmp_r = arg & 0xf;
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(ADD_DP, 0, tmp_r, arg & 0xf, RM((arg >> 4) & 0xf) | ((argw & 0x3) << 7)));
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, 1, 0, reg, tmp_r, TYPE2_TRANSFER_IMM(0)));
- return SLJIT_SUCCESS;
- }
-
- if (compiler->cache_arg == arg && ((sljit_uw)argw - (sljit_uw)compiler->cache_argw) <= (sljit_uw)max_delta) {
- SLJIT_ASSERT(!(inp_flags & WRITE_BACK));
- argw = argw - compiler->cache_argw;
- GETPUT_ARG_DATA_TRANSFER(1, 0, reg, TMP_REG3, argw);
- return SLJIT_SUCCESS;
- }
-
- if (compiler->cache_arg == arg && ((sljit_uw)compiler->cache_argw - (sljit_uw)argw) <= (sljit_uw)max_delta) {
- SLJIT_ASSERT(!(inp_flags & WRITE_BACK));
- argw = compiler->cache_argw - argw;
- GETPUT_ARG_DATA_TRANSFER(0, 0, reg, TMP_REG3, argw);
- return SLJIT_SUCCESS;
- }
-
- if ((compiler->cache_arg & SLJIT_IMM) && compiler->cache_argw == argw) {
- TEST_WRITE_BACK();
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & 0xf, RM(TMP_REG3) | (max_delta & 0xf00 ? SRC2_IMM : 0)));
- return SLJIT_SUCCESS;
- }
-
- if (argw == next_argw && (next_arg & SLJIT_MEM)) {
- SLJIT_ASSERT(inp_flags & LOAD_DATA);
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
-
- compiler->cache_arg = SLJIT_IMM;
- compiler->cache_argw = argw;
-
- TEST_WRITE_BACK();
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & 0xf, RM(TMP_REG3) | (max_delta & 0xf00 ? SRC2_IMM : 0)));
- return SLJIT_SUCCESS;
- }
-
- if (arg == next_arg && !(inp_flags & WRITE_BACK) && ((sljit_uw)argw - (sljit_uw)next_argw <= (sljit_uw)max_delta || (sljit_uw)next_argw - (sljit_uw)argw <= (sljit_uw)max_delta)) {
- SLJIT_ASSERT(inp_flags & LOAD_DATA);
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG3, TMP_REG3, reg_map[arg & 0xf]));
-
- compiler->cache_arg = arg;
- compiler->cache_argw = argw;
-
- GETPUT_ARG_DATA_TRANSFER(1, 0, reg, TMP_REG3, 0);
- return SLJIT_SUCCESS;
- }
-
- if ((arg & 0xf) == tmp_r) {
- compiler->cache_arg = SLJIT_IMM;
- compiler->cache_argw = argw;
- tmp_r = TMP_REG3;
- }
-
- FAIL_IF(load_immediate(compiler, tmp_r, argw));
- EMIT_INSTRUCTION(EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & 0xf, reg_map[tmp_r] | (max_delta & 0xf00 ? SRC2_IMM : 0)));
- return SLJIT_SUCCESS;
-}
-
-static int emit_op(struct sljit_compiler *compiler, int op, int inp_flags,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- /* arg1 goes to TMP_REG1 or src reg
- arg2 goes to TMP_REG2, imm or src reg
- TMP_REG3 can be used for caching
- result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
-
- /* We prefers register and simple consts. */
- int dst_r;
- int src1_r;
- int src2_r = 0;
- int sugg_src2_r = TMP_REG2;
- int flags = GET_FLAGS(op) ? SET_FLAGS : 0;
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- /* Destination check. */
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REG3) {
- dst_r = dst;
- flags |= REG_DEST;
- if (op >= SLJIT_MOV && op <= SLJIT_MOVU_SI)
- sugg_src2_r = dst_r;
- }
- else if (dst == SLJIT_UNUSED) {
- if (op >= SLJIT_MOV && op <= SLJIT_MOVU_SI && !(src2 & SLJIT_MEM))
- return SLJIT_SUCCESS;
- dst_r = TMP_REG2;
- }
- else {
- SLJIT_ASSERT(dst & SLJIT_MEM);
- if (getput_arg_fast(compiler, inp_flags | ARG_TEST, TMP_REG2, dst, dstw)) {
- flags |= FAST_DEST;
- dst_r = TMP_REG2;
- }
- else {
- flags |= SLOW_DEST;
- dst_r = 0;
- }
- }
-
- /* Source 1. */
- if (src1 >= SLJIT_TEMPORARY_REG1 && src1 <= TMP_REG3)
- src1_r = src1;
- else if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= TMP_REG3) {
- flags |= ARGS_SWAPPED;
- src1_r = src2;
- src2 = src1;
- src2w = src1w;
- }
- else {
- if ((inp_flags & ALLOW_ANY_IMM) && (src1 & SLJIT_IMM)) {
- /* The second check will generate a hit. */
- src2_r = get_immediate(src1w);
- if (src2_r) {
- flags |= ARGS_SWAPPED;
- src1 = src2;
- src1w = src2w;
- }
- if (inp_flags & ALLOW_INV_IMM) {
- src2_r = get_immediate(~src1w);
- if (src2_r) {
- flags |= ARGS_SWAPPED | INV_IMM;
- src1 = src2;
- src1w = src2w;
- }
- }
- }
-
- src1_r = 0;
- if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w)) {
- FAIL_IF(compiler->error);
- src1_r = TMP_REG1;
- }
- }
-
- /* Source 2. */
- if (src2_r == 0) {
- if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= TMP_REG3) {
- src2_r = src2;
- flags |= REG_SOURCE;
- if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_SI)
- dst_r = src2_r;
- }
- else do { /* do { } while(0) is used because of breaks. */
- if ((inp_flags & ALLOW_ANY_IMM) && (src2 & SLJIT_IMM)) {
- src2_r = get_immediate(src2w);
- if (src2_r)
- break;
- if (inp_flags & ALLOW_INV_IMM) {
- src2_r = get_immediate(~src2w);
- if (src2_r) {
- flags |= INV_IMM;
- break;
- }
- }
- }
-
- /* src2_r is 0. */
- if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w)) {
- FAIL_IF(compiler->error);
- src2_r = sugg_src2_r;
- }
- } while (0);
- }
-
- /* src1_r, src2_r and dst_r can be zero (=unprocessed) or non-zero.
- If they are zero, they must not be registers. */
- if (src1_r == 0 && src2_r == 0 && dst_r == 0) {
- if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
- SLJIT_ASSERT(!(flags & ARGS_SWAPPED));
- flags |= ARGS_SWAPPED;
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src2, src2w, src1, src1w));
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src1, src1w, dst, dstw));
- }
- else {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw));
- }
- src1_r = TMP_REG1;
- src2_r = TMP_REG2;
- }
- else if (src1_r == 0 && src2_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
- src1_r = TMP_REG1;
- }
- else if (src1_r == 0 && dst_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
- src1_r = TMP_REG1;
- }
- else if (src2_r == 0 && dst_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw));
- src2_r = sugg_src2_r;
- }
-
- if (dst_r == 0)
- dst_r = TMP_REG2;
-
- if (src1_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, 0, 0));
- src1_r = TMP_REG1;
- }
-
- if (src2_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, 0, 0));
- src2_r = sugg_src2_r;
- }
-
- FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
-
- if (flags & (FAST_DEST | SLOW_DEST)) {
- if (flags & FAST_DEST)
- FAIL_IF(getput_arg_fast(compiler, inp_flags, dst_r, dst, dstw));
- else
- FAIL_IF(getput_arg(compiler, inp_flags, dst_r, dst, dstw, 0, 0));
- }
- return SLJIT_SUCCESS;
-}
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__GNUC__)
-extern unsigned int __aeabi_uidivmod(unsigned numerator, unsigned denominator);
-extern unsigned int __aeabi_idivmod(unsigned numerator, unsigned denominator);
-#else
-#error "Software divmod functions are needed"
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op)
-{
- CHECK_ERROR();
- check_sljit_emit_op0(compiler, op);
-
- op = GET_OPCODE(op);
- switch (op) {
- case SLJIT_BREAKPOINT:
- EMIT_INSTRUCTION(BKPT);
- break;
- case SLJIT_NOP:
- EMIT_INSTRUCTION(NOP);
- break;
- case SLJIT_UMUL:
- case SLJIT_SMUL:
-#if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
- return push_inst(compiler, (op == SLJIT_UMUL ? UMULL : SMULL)
- | (reg_map[SLJIT_TEMPORARY_REG2] << 16)
- | (reg_map[SLJIT_TEMPORARY_REG1] << 12)
- | (reg_map[SLJIT_TEMPORARY_REG1] << 8)
- | reg_map[SLJIT_TEMPORARY_REG2]);
-#else
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, RM(SLJIT_TEMPORARY_REG2)));
- return push_inst(compiler, (op == SLJIT_UMUL ? UMULL : SMULL)
- | (reg_map[SLJIT_TEMPORARY_REG2] << 16)
- | (reg_map[SLJIT_TEMPORARY_REG1] << 12)
- | (reg_map[SLJIT_TEMPORARY_REG1] << 8)
- | reg_map[TMP_REG1]);
-#endif
- case SLJIT_UDIV:
- case SLJIT_SDIV:
- if (compiler->temporaries >= 3)
- EMIT_INSTRUCTION(0xe52d2008 /* str r2, [sp, #-8]! */);
-#if defined(__GNUC__)
- FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
- (op == SLJIT_UDIV ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
-#else
-#error "Software divmod functions are needed"
-#endif
- if (compiler->temporaries >= 3)
- return push_inst(compiler, 0xe49d2008 /* ldr r2, [sp], #8 */);
- return SLJIT_SUCCESS;
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- CHECK_ERROR();
- check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
-
- switch (GET_OPCODE(op)) {
- case SLJIT_MOV:
- case SLJIT_MOV_UI:
- case SLJIT_MOV_SI:
- return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOV_UB:
- return emit_op(compiler, SLJIT_MOV_UB, ALLOW_ANY_IMM | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned char)srcw : srcw);
-
- case SLJIT_MOV_SB:
- return emit_op(compiler, SLJIT_MOV_SB, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed char)srcw : srcw);
-
- case SLJIT_MOV_UH:
- return emit_op(compiler, SLJIT_MOV_UH, ALLOW_ANY_IMM | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned short)srcw : srcw);
-
- case SLJIT_MOV_SH:
- return emit_op(compiler, SLJIT_MOV_SH, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed short)srcw : srcw);
-
- case SLJIT_MOVU:
- case SLJIT_MOVU_UI:
- case SLJIT_MOVU_SI:
- return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOVU_UB:
- return emit_op(compiler, SLJIT_MOV_UB, ALLOW_ANY_IMM | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned char)srcw : srcw);
-
- case SLJIT_MOVU_SB:
- return emit_op(compiler, SLJIT_MOV_SB, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed char)srcw : srcw);
-
- case SLJIT_MOVU_UH:
- return emit_op(compiler, SLJIT_MOV_UH, ALLOW_ANY_IMM | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned short)srcw : srcw);
-
- case SLJIT_MOVU_SH:
- return emit_op(compiler, SLJIT_MOV_SH, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed short)srcw : srcw);
-
- case SLJIT_NOT:
- return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_NEG:
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- return sljit_emit_op2(compiler, SLJIT_SUB | GET_FLAGS(op), dst, dstw, SLJIT_IMM, 0, src, srcw);
-
- case SLJIT_CLZ:
- return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src, srcw);
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- CHECK_ERROR();
- check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
- switch (GET_OPCODE(op)) {
- case SLJIT_ADD:
- case SLJIT_ADDC:
- case SLJIT_SUB:
- case SLJIT_SUBC:
- case SLJIT_OR:
- case SLJIT_XOR:
- return emit_op(compiler, op, ALLOW_IMM, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_MUL:
- return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_AND:
- return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_SHL:
- case SLJIT_LSHR:
- case SLJIT_ASHR:
- if (src2 & SLJIT_IMM) {
- compiler->shift_imm = src2w & 0x1f;
- return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src1, src1w);
- }
- else {
- compiler->shift_imm = 0x20;
- return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w);
- }
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
-{
- check_sljit_get_register_index(reg);
- return reg_map[reg];
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, int size)
-{
- CHECK_ERROR();
- check_sljit_emit_op_custom(compiler, instruction, size);
- SLJIT_ASSERT(size == 4);
-
- return push_inst(compiler, *(sljit_uw*)instruction);
-}
-
-/* --------------------------------------------------------------------- */
-/* Floating point operators */
-/* --------------------------------------------------------------------- */
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
-
-/* 0 - no fpu
- 1 - vfp */
-static int arm_fpu_type = -1;
-
-static void init_compiler()
-{
- if (arm_fpu_type != -1)
- return;
-
- /* TODO: Only the OS can help to determine the correct fpu type. */
- arm_fpu_type = 1;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)
-{
- if (arm_fpu_type == -1)
- init_compiler();
- return arm_fpu_type;
-}
-
-#else
-
-#define arm_fpu_type 1
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)
-{
- /* Always available. */
- return 1;
-}
-
-#endif
-
-#define EMIT_FPU_DATA_TRANSFER(add, load, base, freg, offs) \
- (VSTR | ((add) << 23) | ((load) << 20) | (reg_map[base] << 16) | (freg << 12) | (offs))
-#define EMIT_FPU_OPERATION(opcode, dst, src1, src2) \
- ((opcode) | ((dst) << 12) | (src1) | ((src2) << 16))
-
-static int emit_fpu_data_transfer(struct sljit_compiler *compiler, int fpu_reg, int load, int arg, sljit_w argw)
-{
- SLJIT_ASSERT(arg & SLJIT_MEM);
-
- /* Fast loads and stores. */
- if ((arg & 0xf) && !(arg & 0xf0) && (argw & 0x3) == 0) {
- if (argw >= 0 && argw <= 0x3ff) {
- EMIT_INSTRUCTION(EMIT_FPU_DATA_TRANSFER(1, load, arg & 0xf, fpu_reg, argw >> 2));
- return SLJIT_SUCCESS;
- }
- if (argw < 0 && argw >= -0x3ff) {
- EMIT_INSTRUCTION(EMIT_FPU_DATA_TRANSFER(0, load, arg & 0xf, fpu_reg, (-argw) >> 2));
- return SLJIT_SUCCESS;
- }
- if (argw >= 0 && argw <= 0x3ffff) {
- SLJIT_ASSERT(get_immediate(argw & 0x3fc00));
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & 0xf, get_immediate(argw & 0x3fc00)));
- argw &= 0x3ff;
- EMIT_INSTRUCTION(EMIT_FPU_DATA_TRANSFER(1, load, TMP_REG1, fpu_reg, argw >> 2));
- return SLJIT_SUCCESS;
- }
- if (argw < 0 && argw >= -0x3ffff) {
- argw = -argw;
- SLJIT_ASSERT(get_immediate(argw & 0x3fc00));
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(SUB_DP, 0, TMP_REG1, arg & 0xf, get_immediate(argw & 0x3fc00)));
- argw &= 0x3ff;
- EMIT_INSTRUCTION(EMIT_FPU_DATA_TRANSFER(0, load, TMP_REG1, fpu_reg, argw >> 2));
- return SLJIT_SUCCESS;
- }
- }
-
- if (arg & 0xf0) {
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & 0xf, RM((arg >> 4) & 0xf) | ((argw & 0x3) << 7)));
- EMIT_INSTRUCTION(EMIT_FPU_DATA_TRANSFER(1, load, TMP_REG1, fpu_reg, 0));
- return SLJIT_SUCCESS;
- }
-
- if (compiler->cache_arg == arg && ((argw - compiler->cache_argw) & 0x3) == 0) {
- if (((sljit_uw)argw - (sljit_uw)compiler->cache_argw) <= 0x3ff) {
- EMIT_INSTRUCTION(EMIT_FPU_DATA_TRANSFER(1, load, TMP_REG3, fpu_reg, (argw - compiler->cache_argw) >> 2));
- return SLJIT_SUCCESS;
- }
- if (((sljit_uw)compiler->cache_argw - (sljit_uw)argw) <= 0x3ff) {
- EMIT_INSTRUCTION(EMIT_FPU_DATA_TRANSFER(0, load, TMP_REG3, fpu_reg, (compiler->cache_argw - argw) >> 2));
- return SLJIT_SUCCESS;
- }
- }
-
- compiler->cache_arg = arg;
- compiler->cache_argw = argw;
- if (arg & 0xf) {
- FAIL_IF(load_immediate(compiler, TMP_REG1, argw));
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG3, arg & 0xf, reg_map[TMP_REG1]));
- }
- else
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
-
- EMIT_INSTRUCTION(EMIT_FPU_DATA_TRANSFER(1, load, TMP_REG3, fpu_reg, 0));
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- int dst_freg;
-
- CHECK_ERROR();
- check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- if (GET_OPCODE(op) == SLJIT_FCMP) {
- if (dst > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 1, dst, dstw));
- dst = TMP_FREG1;
- }
- if (src > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG2, 1, src, srcw));
- src = TMP_FREG2;
- }
- EMIT_INSTRUCTION(VCMP_F64 | (dst << 12) | src);
- EMIT_INSTRUCTION(VMRS);
- return SLJIT_SUCCESS;
- }
-
- dst_freg = (dst > SLJIT_FLOAT_REG4) ? TMP_FREG1 : dst;
-
- if (src > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, dst_freg, 1, src, srcw));
- src = dst_freg;
- }
-
- switch (op) {
- case SLJIT_FMOV:
- if (src != dst_freg && dst_freg != TMP_FREG1)
- EMIT_INSTRUCTION(EMIT_FPU_OPERATION(VMOV_F64, dst_freg, src, 0));
- break;
- case SLJIT_FNEG:
- EMIT_INSTRUCTION(EMIT_FPU_OPERATION(VNEG_F64, dst_freg, src, 0));
- break;
- case SLJIT_FABS:
- EMIT_INSTRUCTION(EMIT_FPU_OPERATION(VABS_F64, dst_freg, src, 0));
- break;
- }
-
- if (dst_freg == TMP_FREG1)
- FAIL_IF(emit_fpu_data_transfer(compiler, src, 0, dst, dstw));
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- int dst_freg;
-
- CHECK_ERROR();
- check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- dst_freg = (dst > SLJIT_FLOAT_REG4) ? TMP_FREG1 : dst;
-
- if (src2 > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG2, 1, src2, src2w));
- src2 = TMP_FREG2;
- }
-
- if (src1 > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 1, src1, src1w));
- src1 = TMP_FREG1;
- }
-
- switch (op) {
- case SLJIT_FADD:
- EMIT_INSTRUCTION(EMIT_FPU_OPERATION(VADD_F64, dst_freg, src2, src1));
- break;
-
- case SLJIT_FSUB:
- EMIT_INSTRUCTION(EMIT_FPU_OPERATION(VSUB_F64, dst_freg, src2, src1));
- break;
-
- case SLJIT_FMUL:
- EMIT_INSTRUCTION(EMIT_FPU_OPERATION(VMUL_F64, dst_freg, src2, src1));
- break;
-
- case SLJIT_FDIV:
- EMIT_INSTRUCTION(EMIT_FPU_OPERATION(VDIV_F64, dst_freg, src2, src1));
- break;
- }
-
- if (dst_freg == TMP_FREG1)
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 0, dst, dstw));
-
- return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/* Other instructions */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size)
-{
- int size;
-
- CHECK_ERROR();
- check_sljit_emit_fast_enter(compiler, dst, dstw, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- size = (1 + saveds) * sizeof(sljit_uw);
- if (temporaries >= 4)
- size += (temporaries - 3) * sizeof(sljit_uw);
- local_size += size;
- local_size = (local_size + 7) & ~7;
- local_size -= size;
- compiler->local_size = local_size;
-
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS)
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, RM(TMP_REG3)));
- else if (dst & SLJIT_MEM) {
- if (getput_arg_fast(compiler, WORD_DATA, TMP_REG3, dst, dstw))
- return compiler->error;
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG2, SLJIT_UNUSED, RM(TMP_REG3)));
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- return getput_arg(compiler, WORD_DATA, TMP_REG2, dst, dstw, 0, 0);
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
-{
- CHECK_ERROR();
- check_sljit_emit_fast_return(compiler, src, srcw);
-
- if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS)
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(src)));
- else if (src & SLJIT_MEM) {
- if (getput_arg_fast(compiler, WORD_DATA | LOAD_DATA, TMP_REG3, src, srcw))
- FAIL_IF(compiler->error);
- else {
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- FAIL_IF(getput_arg(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw, 0, 0));
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(TMP_REG2)));
- }
- }
- else if (src & SLJIT_IMM)
- FAIL_IF(load_immediate(compiler, TMP_REG3, srcw));
- return push_inst(compiler, BLX | RM(TMP_REG3));
-}
-
-/* --------------------------------------------------------------------- */
-/* Conditional instructions */
-/* --------------------------------------------------------------------- */
-
-static sljit_uw get_cc(int type)
-{
- switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_MUL_NOT_OVERFLOW:
- case SLJIT_C_FLOAT_EQUAL:
- return 0x00000000;
-
- case SLJIT_C_NOT_EQUAL:
- case SLJIT_C_MUL_OVERFLOW:
- case SLJIT_C_FLOAT_NOT_EQUAL:
- return 0x10000000;
-
- case SLJIT_C_LESS:
- case SLJIT_C_FLOAT_LESS:
- return 0x30000000;
-
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
- return 0x20000000;
-
- case SLJIT_C_GREATER:
- case SLJIT_C_FLOAT_GREATER:
- return 0x80000000;
-
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_LESS_EQUAL:
- return 0x90000000;
-
- case SLJIT_C_SIG_LESS:
- return 0xb0000000;
-
- case SLJIT_C_SIG_GREATER_EQUAL:
- return 0xa0000000;
-
- case SLJIT_C_SIG_GREATER:
- return 0xc0000000;
-
- case SLJIT_C_SIG_LESS_EQUAL:
- return 0xd0000000;
-
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_FLOAT_NAN:
- return 0x60000000;
-
- case SLJIT_C_NOT_OVERFLOW:
- case SLJIT_C_FLOAT_NOT_NAN:
- return 0x70000000;
-
- default: /* SLJIT_JUMP */
- return 0xe0000000;
- }
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
- struct sljit_label *label;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_label(compiler);
-
- if (compiler->last_label && compiler->last_label->size == compiler->size)
- return compiler->last_label;
-
- label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
- PTR_FAIL_IF(!label);
- set_label(label, compiler);
- return label;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type)
-{
- struct sljit_jump *jump;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_jump(compiler, type);
-
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- PTR_FAIL_IF(!jump);
- set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
- type &= 0xff;
-
- /* In ARM, we don't need to touch the arguments. */
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- if (type >= SLJIT_FAST_CALL)
- PTR_FAIL_IF(prepare_blx(compiler));
- PTR_FAIL_IF(push_inst_with_unique_literal(compiler, ((EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0,
- type <= SLJIT_JUMP ? TMP_PC : TMP_REG1, TMP_PC, 0)) & ~COND_MASK) | get_cc(type), 0));
-
- if (jump->flags & SLJIT_REWRITABLE_JUMP) {
- jump->addr = compiler->size;
- compiler->patches++;
- }
-
- if (type >= SLJIT_FAST_CALL) {
- jump->flags |= IS_BL;
- PTR_FAIL_IF(emit_blx(compiler));
- }
-
- if (!(jump->flags & SLJIT_REWRITABLE_JUMP))
- jump->addr = compiler->size;
-#else
- if (type >= SLJIT_FAST_CALL)
- jump->flags |= IS_BL;
- PTR_FAIL_IF(emit_imm(compiler, TMP_REG1, 0));
- PTR_FAIL_IF(push_inst(compiler, (((type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1)) & ~COND_MASK) | get_cc(type)));
- jump->addr = compiler->size;
-#endif
- return jump;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)
-{
- struct sljit_jump *jump;
-
- CHECK_ERROR();
- check_sljit_emit_ijump(compiler, type, src, srcw);
-
- /* In ARM, we don't need to touch the arguments. */
- if (src & SLJIT_IMM) {
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- FAIL_IF(!jump);
- set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0));
- jump->u.target = srcw;
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- if (type >= SLJIT_FAST_CALL)
- FAIL_IF(prepare_blx(compiler));
- FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, type <= SLJIT_JUMP ? TMP_PC : TMP_REG1, TMP_PC, 0), 0));
- if (type >= SLJIT_FAST_CALL)
- FAIL_IF(emit_blx(compiler));
-#else
- FAIL_IF(emit_imm(compiler, TMP_REG1, 0));
- FAIL_IF(push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1)));
-#endif
- jump->addr = compiler->size;
- }
- else {
- if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS)
- return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(src));
-
- SLJIT_ASSERT(src & SLJIT_MEM);
- FAIL_IF(emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
- return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG2));
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)
-{
- int reg;
- sljit_uw cc;
-
- CHECK_ERROR();
- check_sljit_emit_cond_value(compiler, op, dst, dstw, type);
-
- if (dst == SLJIT_UNUSED)
- return SLJIT_SUCCESS;
-
- cc = get_cc(type);
- if (GET_OPCODE(op) == SLJIT_OR) {
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- EMIT_INSTRUCTION((EMIT_DATA_PROCESS_INS(ORR_DP, 0, dst, dst, SRC2_IMM | 1) & ~COND_MASK) | cc);
- if (op & SLJIT_SET_E)
- return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, SET_FLAGS, TMP_REG1, SLJIT_UNUSED, RM(dst)));
- return SLJIT_SUCCESS;
- }
-
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, SRC2_IMM | 0));
- EMIT_INSTRUCTION((EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, SRC2_IMM | 1) & ~COND_MASK) | cc);
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- return emit_op(compiler, op, ALLOW_IMM, dst, dstw, TMP_REG1, 0, dst, dstw);
- }
-
- reg = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG2;
-
- EMIT_INSTRUCTION(EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, SRC2_IMM | 0));
- EMIT_INSTRUCTION((EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, SRC2_IMM | 1) & ~COND_MASK) | cc);
-
- if (reg == TMP_REG2)
- return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, TMP_REG2, 0);
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)
-{
- struct sljit_const *const_;
- int reg;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_const(compiler, dst, dstw, init_value);
-
- const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
- PTR_FAIL_IF(!const_);
-
- reg = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG2;
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
- PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, reg, TMP_PC, 0), init_value));
- compiler->patches++;
-#else
- PTR_FAIL_IF(emit_imm(compiler, reg, init_value));
-#endif
- set_const(const_, compiler);
-
- if (reg == TMP_REG2 && dst != SLJIT_UNUSED)
- if (emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, TMP_REG2, 0))
- return NULL;
- return const_;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
- inline_set_jump_addr(addr, new_addr, 1);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant)
-{
- inline_set_const(addr, new_constant, 1);
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativeMIPS_32.c b/src/third_party/pcre-8.30/sljit/sljitNativeMIPS_32.c
deleted file mode 100644
index c0cc8b58bb7..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativeMIPS_32.c
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* mips 32-bit arch dependent functions. */
-
-static int load_immediate(struct sljit_compiler *compiler, int dst_ar, sljit_w imm)
-{
- if (!(imm & ~0xffff))
- return push_inst(compiler, ORI | SA(0) | TA(dst_ar) | IMM(imm), dst_ar);
-
- if (imm < 0 && imm >= SIMM_MIN)
- return push_inst(compiler, ADDIU | SA(0) | TA(dst_ar) | IMM(imm), dst_ar);
-
- FAIL_IF(push_inst(compiler, LUI | TA(dst_ar) | IMM(imm >> 16), dst_ar));
- return (imm & 0xffff) ? push_inst(compiler, ORI | SA(dst_ar) | TA(dst_ar) | IMM(imm), dst_ar) : SLJIT_SUCCESS;
-}
-
-#define EMIT_LOGICAL(op_imm, op_norm) \
- if (flags & SRC2_IMM) { \
- if (op & SLJIT_SET_E) \
- FAIL_IF(push_inst(compiler, op_imm | S(src1) | TA(EQUAL_FLAG) | IMM(src2), EQUAL_FLAG)); \
- if (CHECK_FLAGS(SLJIT_SET_E)) \
- FAIL_IF(push_inst(compiler, op_imm | S(src1) | T(dst) | IMM(src2), DR(dst))); \
- } \
- else { \
- if (op & SLJIT_SET_E) \
- FAIL_IF(push_inst(compiler, op_norm | S(src1) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG)); \
- if (CHECK_FLAGS(SLJIT_SET_E)) \
- FAIL_IF(push_inst(compiler, op_norm | S(src1) | T(src2) | D(dst), DR(dst))); \
- }
-
-#define EMIT_SHIFT(op_imm, op_norm) \
- if (flags & SRC2_IMM) { \
- if (op & SLJIT_SET_E) \
- FAIL_IF(push_inst(compiler, op_imm | T(src1) | DA(EQUAL_FLAG) | SH_IMM(src2), EQUAL_FLAG)); \
- if (CHECK_FLAGS(SLJIT_SET_E)) \
- FAIL_IF(push_inst(compiler, op_imm | T(src1) | D(dst) | SH_IMM(src2), DR(dst))); \
- } \
- else { \
- if (op & SLJIT_SET_E) \
- FAIL_IF(push_inst(compiler, op_norm | S(src2) | T(src1) | DA(EQUAL_FLAG), EQUAL_FLAG)); \
- if (CHECK_FLAGS(SLJIT_SET_E)) \
- FAIL_IF(push_inst(compiler, op_norm | S(src2) | T(src1) | D(dst), DR(dst))); \
- }
-
-static SLJIT_INLINE int emit_single_op(struct sljit_compiler *compiler, int op, int flags,
- int dst, int src1, sljit_w src2)
-{
- int overflow_ra = 0;
-
- switch (GET_OPCODE(op)) {
- case SLJIT_ADD:
- if (flags & SRC2_IMM) {
- if (op & SLJIT_SET_O) {
- FAIL_IF(push_inst(compiler, SRL | T(src1) | DA(TMP_EREG1) | SH_IMM(31), TMP_EREG1));
- if (src2 < 0)
- FAIL_IF(push_inst(compiler, XORI | SA(TMP_EREG1) | TA(TMP_EREG1) | IMM(1), TMP_EREG1));
- }
- if (op & SLJIT_SET_E)
- FAIL_IF(push_inst(compiler, ADDIU | S(src1) | TA(EQUAL_FLAG) | IMM(src2), EQUAL_FLAG));
- if (op & SLJIT_SET_C) {
- if (src2 >= 0)
- FAIL_IF(push_inst(compiler, ORI | S(src1) | TA(ULESS_FLAG) | IMM(src2), ULESS_FLAG));
- else {
- FAIL_IF(push_inst(compiler, ADDIU | SA(0) | TA(ULESS_FLAG) | IMM(src2), ULESS_FLAG));
- FAIL_IF(push_inst(compiler, OR | S(src1) | TA(ULESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG));
- }
- }
- /* dst may be the same as src1 or src2. */
- if (CHECK_FLAGS(SLJIT_SET_E))
- FAIL_IF(push_inst(compiler, ADDIU | S(src1) | T(dst) | IMM(src2), DR(dst)));
- if (op & SLJIT_SET_O) {
- FAIL_IF(push_inst(compiler, SRL | T(dst) | DA(OVERFLOW_FLAG) | SH_IMM(31), OVERFLOW_FLAG));
- if (src2 < 0)
- FAIL_IF(push_inst(compiler, XORI | SA(OVERFLOW_FLAG) | TA(OVERFLOW_FLAG) | IMM(1), OVERFLOW_FLAG));
- }
- }
- else {
- if (op & SLJIT_SET_O) {
- FAIL_IF(push_inst(compiler, XOR | S(src1) | T(src2) | DA(TMP_EREG1), TMP_EREG1));
- FAIL_IF(push_inst(compiler, SRL | TA(TMP_EREG1) | DA(TMP_EREG1) | SH_IMM(31), TMP_EREG1));
- if (src1 != dst)
- overflow_ra = DR(src1);
- else if (src2 != dst)
- overflow_ra = DR(src2);
- else {
- /* Rare ocasion. */
- FAIL_IF(push_inst(compiler, ADDU | S(src1) | TA(0) | DA(TMP_EREG2), TMP_EREG2));
- overflow_ra = TMP_EREG2;
- }
- }
- if (op & SLJIT_SET_E)
- FAIL_IF(push_inst(compiler, ADDU | S(src1) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG));
- if (op & SLJIT_SET_C)
- FAIL_IF(push_inst(compiler, OR | S(src1) | T(src2) | DA(ULESS_FLAG), ULESS_FLAG));
- /* dst may be the same as src1 or src2. */
- if (CHECK_FLAGS(SLJIT_SET_E))
- FAIL_IF(push_inst(compiler, ADDU | S(src1) | T(src2) | D(dst), DR(dst)));
- if (op & SLJIT_SET_O) {
- FAIL_IF(push_inst(compiler, XOR | S(dst) | TA(overflow_ra) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
- FAIL_IF(push_inst(compiler, SRL | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG) | SH_IMM(31), OVERFLOW_FLAG));
- }
- }
-
- /* a + b >= a | b (otherwise, the carry should be set to 1). */
- if (op & SLJIT_SET_C)
- FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(ULESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG));
- if (op & SLJIT_SET_O)
- return push_inst(compiler, MOVN | SA(0) | TA(TMP_EREG1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG);
- return SLJIT_SUCCESS;
-
- case SLJIT_ADDC:
- if (flags & SRC2_IMM) {
- if (op & SLJIT_SET_C) {
- if (src2 >= 0)
- FAIL_IF(push_inst(compiler, ORI | S(src1) | TA(TMP_EREG1) | IMM(src2), TMP_EREG1));
- else {
- FAIL_IF(push_inst(compiler, ADDIU | SA(0) | TA(TMP_EREG1) | IMM(src2), TMP_EREG1));
- FAIL_IF(push_inst(compiler, OR | S(src1) | TA(TMP_EREG1) | DA(TMP_EREG1), TMP_EREG1));
- }
- }
- FAIL_IF(push_inst(compiler, ADDIU | S(src1) | T(dst) | IMM(src2), DR(dst)));
- } else {
- if (op & SLJIT_SET_C)
- FAIL_IF(push_inst(compiler, OR | S(src1) | T(src2) | DA(TMP_EREG1), TMP_EREG1));
- /* dst may be the same as src1 or src2. */
- FAIL_IF(push_inst(compiler, ADDU | S(src1) | T(src2) | D(dst), DR(dst)));
- }
- if (op & SLJIT_SET_C)
- FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(TMP_EREG1) | DA(TMP_EREG1), TMP_EREG1));
-
- FAIL_IF(push_inst(compiler, ADDU | S(dst) | TA(ULESS_FLAG) | D(dst), DR(dst)));
- if (!(op & SLJIT_SET_C))
- return SLJIT_SUCCESS;
-
- /* Set TMP_EREG2 (dst == 0) && (ULESS_FLAG == 1). */
- FAIL_IF(push_inst(compiler, SLTIU | S(dst) | TA(TMP_EREG2) | IMM(1), TMP_EREG2));
- FAIL_IF(push_inst(compiler, AND | SA(TMP_EREG2) | TA(ULESS_FLAG) | DA(TMP_EREG2), TMP_EREG2));
- /* Set carry flag. */
- return push_inst(compiler, OR | SA(TMP_EREG2) | TA(TMP_EREG1) | DA(ULESS_FLAG), ULESS_FLAG);
-
- case SLJIT_SUB:
- if ((flags & SRC2_IMM) && ((op & (SLJIT_SET_S | SLJIT_SET_U)) || src2 == SIMM_MIN)) {
- FAIL_IF(push_inst(compiler, ADDIU | SA(0) | T(TMP_REG2) | IMM(src2), DR(TMP_REG2)));
- src2 = TMP_REG2;
- flags &= ~SRC2_IMM;
- }
-
- if (flags & SRC2_IMM) {
- if (op & SLJIT_SET_O) {
- FAIL_IF(push_inst(compiler, SRL | T(src1) | DA(TMP_EREG1) | SH_IMM(31), TMP_EREG1));
- if (src2 < 0)
- FAIL_IF(push_inst(compiler, XORI | SA(TMP_EREG1) | TA(TMP_EREG1) | IMM(1), TMP_EREG1));
- if (src1 != dst)
- overflow_ra = DR(src1);
- else {
- /* Rare ocasion. */
- FAIL_IF(push_inst(compiler, ADDU | S(src1) | TA(0) | DA(TMP_EREG2), TMP_EREG2));
- overflow_ra = TMP_EREG2;
- }
- }
- if (op & SLJIT_SET_E)
- FAIL_IF(push_inst(compiler, ADDIU | S(src1) | TA(EQUAL_FLAG) | IMM(-src2), EQUAL_FLAG));
- if (op & SLJIT_SET_C)
- FAIL_IF(push_inst(compiler, SLTIU | S(src1) | TA(ULESS_FLAG) | IMM(src2), ULESS_FLAG));
- /* dst may be the same as src1 or src2. */
- if (CHECK_FLAGS(SLJIT_SET_E))
- FAIL_IF(push_inst(compiler, ADDIU | S(src1) | T(dst) | IMM(-src2), DR(dst)));
- }
- else {
- if (op & SLJIT_SET_O) {
- FAIL_IF(push_inst(compiler, XOR | S(src1) | T(src2) | DA(TMP_EREG1), TMP_EREG1));
- FAIL_IF(push_inst(compiler, SRL | TA(TMP_EREG1) | DA(TMP_EREG1) | SH_IMM(31), TMP_EREG1));
- if (src1 != dst)
- overflow_ra = DR(src1);
- else {
- /* Rare ocasion. */
- FAIL_IF(push_inst(compiler, ADDU | S(src1) | TA(0) | DA(TMP_EREG2), TMP_EREG2));
- overflow_ra = TMP_EREG2;
- }
- }
- if (op & SLJIT_SET_E)
- FAIL_IF(push_inst(compiler, SUBU | S(src1) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG));
- if (op & (SLJIT_SET_U | SLJIT_SET_C))
- FAIL_IF(push_inst(compiler, SLTU | S(src1) | T(src2) | DA(ULESS_FLAG), ULESS_FLAG));
- if (op & SLJIT_SET_U)
- FAIL_IF(push_inst(compiler, SLTU | S(src2) | T(src1) | DA(UGREATER_FLAG), UGREATER_FLAG));
- if (op & SLJIT_SET_S) {
- FAIL_IF(push_inst(compiler, SLT | S(src1) | T(src2) | DA(LESS_FLAG), LESS_FLAG));
- FAIL_IF(push_inst(compiler, SLT | S(src2) | T(src1) | DA(GREATER_FLAG), GREATER_FLAG));
- }
- /* dst may be the same as src1 or src2. */
- if (CHECK_FLAGS(SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_C))
- FAIL_IF(push_inst(compiler, SUBU | S(src1) | T(src2) | D(dst), DR(dst)));
- }
-
- if (op & SLJIT_SET_O) {
- FAIL_IF(push_inst(compiler, XOR | S(dst) | TA(overflow_ra) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
- FAIL_IF(push_inst(compiler, SRL | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG) | SH_IMM(31), OVERFLOW_FLAG));
- return push_inst(compiler, MOVZ | SA(0) | TA(TMP_EREG1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG);
- }
- return SLJIT_SUCCESS;
-
- case SLJIT_SUBC:
- if ((flags & SRC2_IMM) && src2 == SIMM_MIN) {
- FAIL_IF(push_inst(compiler, ADDIU | SA(0) | T(TMP_REG2) | IMM(src2), DR(TMP_REG2)));
- src2 = TMP_REG2;
- flags &= ~SRC2_IMM;
- }
-
- if (flags & SRC2_IMM) {
- if (op & SLJIT_SET_C)
- FAIL_IF(push_inst(compiler, SLTIU | S(src1) | TA(TMP_EREG1) | IMM(-src2), TMP_EREG1));
- /* dst may be the same as src1 or src2. */
- FAIL_IF(push_inst(compiler, ADDIU | S(src1) | T(dst) | IMM(-src2), DR(dst)));
- }
- else {
- if (op & SLJIT_SET_C)
- FAIL_IF(push_inst(compiler, SLTU | S(src1) | T(src2) | DA(TMP_EREG1), TMP_EREG1));
- /* dst may be the same as src1 or src2. */
- FAIL_IF(push_inst(compiler, SUBU | S(src1) | T(src2) | D(dst), DR(dst)));
- }
-
- if (op & SLJIT_SET_C)
- FAIL_IF(push_inst(compiler, MOVZ | SA(ULESS_FLAG) | T(dst) | DA(TMP_EREG1), TMP_EREG1));
-
- FAIL_IF(push_inst(compiler, SUBU | S(dst) | TA(ULESS_FLAG) | D(dst), DR(dst)));
-
- if (op & SLJIT_SET_C)
- FAIL_IF(push_inst(compiler, ADDU | SA(TMP_EREG1) | TA(0) | DA(ULESS_FLAG), ULESS_FLAG));
-
- return SLJIT_SUCCESS;
-
- case SLJIT_MUL:
- SLJIT_ASSERT(!(flags & SRC2_IMM));
- if (!(op & SLJIT_SET_O)) {
-#if (defined SLJIT_MIPS_32_64 && SLJIT_MIPS_32_64)
- return push_inst(compiler, MUL | S(src1) | T(src2) | D(dst), DR(dst));
-#else
- FAIL_IF(push_inst(compiler, MULT | S(src1) | T(src2), MOVABLE_INS));
- return push_inst(compiler, MFLO | D(dst), DR(dst));
-#endif
- }
- FAIL_IF(push_inst(compiler, MULT | S(src1) | T(src2), MOVABLE_INS));
- FAIL_IF(push_inst(compiler, MFHI | DA(TMP_EREG1), TMP_EREG1));
- FAIL_IF(push_inst(compiler, MFLO | D(dst), DR(dst)));
- FAIL_IF(push_inst(compiler, SRA | T(dst) | DA(TMP_EREG2) | SH_IMM(31), TMP_EREG2));
- return push_inst(compiler, SUBU | SA(TMP_EREG1) | TA(TMP_EREG2) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG);
-
- case SLJIT_AND:
- EMIT_LOGICAL(ANDI, AND);
- return SLJIT_SUCCESS;
-
- case SLJIT_OR:
- EMIT_LOGICAL(ORI, OR);
- return SLJIT_SUCCESS;
-
- case SLJIT_XOR:
- EMIT_LOGICAL(XORI, XOR);
- return SLJIT_SUCCESS;
-
- case SLJIT_SHL:
- EMIT_SHIFT(SLL, SLLV);
- return SLJIT_SUCCESS;
-
- case SLJIT_LSHR:
- EMIT_SHIFT(SRL, SRLV);
- return SLJIT_SUCCESS;
-
- case SLJIT_ASHR:
- EMIT_SHIFT(SRA, SRAV);
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV:
- case SLJIT_MOV_UI:
- case SLJIT_MOV_SI:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if (dst != src2)
- return push_inst(compiler, ADDU | S(src2) | TA(0) | D(dst), DR(dst));
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV_UB:
- case SLJIT_MOV_SB:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
- if (op == SLJIT_MOV_SB) {
-#if (defined SLJIT_MIPS_32_64 && SLJIT_MIPS_32_64)
- return push_inst(compiler, SEB | T(src2) | D(dst), DR(dst));
-#else
- FAIL_IF(push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(24), DR(dst)));
- return push_inst(compiler, SRA | T(dst) | D(dst) | SH_IMM(24), DR(dst));
-#endif
- }
- return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xff), DR(dst));
- }
- else if (dst != src2)
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV_UH:
- case SLJIT_MOV_SH:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
- if (op == SLJIT_MOV_SH) {
-#if (defined SLJIT_MIPS_32_64 && SLJIT_MIPS_32_64)
- return push_inst(compiler, SEH | T(src2) | D(dst), DR(dst));
-#else
- FAIL_IF(push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(16), DR(dst)));
- return push_inst(compiler, SRA | T(dst) | D(dst) | SH_IMM(16), DR(dst));
-#endif
- }
- return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xffff), DR(dst));
- }
- else if (dst != src2)
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-
- case SLJIT_NOT:
- SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
- if (op & SLJIT_SET_E)
- FAIL_IF(push_inst(compiler, NOR | S(src2) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG));
- if (CHECK_FLAGS(SLJIT_SET_E))
- FAIL_IF(push_inst(compiler, NOR | S(src2) | T(src2) | D(dst), DR(dst)));
- return SLJIT_SUCCESS;
-
- case SLJIT_CLZ:
- SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
-#if (defined SLJIT_MIPS_32_64 && SLJIT_MIPS_32_64)
- if (op & SLJIT_SET_E)
- FAIL_IF(push_inst(compiler, CLZ | S(src2) | TA(EQUAL_FLAG) | DA(EQUAL_FLAG), EQUAL_FLAG));
- if (CHECK_FLAGS(SLJIT_SET_E))
- FAIL_IF(push_inst(compiler, CLZ | S(src2) | T(dst) | D(dst), DR(dst)));
-#else
- if (SLJIT_UNLIKELY(flags & UNUSED_DEST)) {
- FAIL_IF(push_inst(compiler, SRL | T(src2) | DA(EQUAL_FLAG) | SH_IMM(31), EQUAL_FLAG));
- return push_inst(compiler, XORI | SA(EQUAL_FLAG) | TA(EQUAL_FLAG) | IMM(1), EQUAL_FLAG);
- }
- /* Nearly all instructions are unmovable in the following sequence. */
- FAIL_IF(push_inst(compiler, ADDU_W | S(src2) | TA(0) | D(TMP_REG1), DR(TMP_REG1)));
- /* Check zero. */
- FAIL_IF(push_inst(compiler, BEQ | S(TMP_REG1) | TA(0) | IMM(6), UNMOVABLE_INS));
- FAIL_IF(push_inst(compiler, ORI | SA(0) | T(dst) | IMM(32), UNMOVABLE_INS));
- /* Check sign bit. */
- FAIL_IF(push_inst(compiler, BLTZ | S(TMP_REG1) | IMM(4), UNMOVABLE_INS));
- FAIL_IF(push_inst(compiler, ORI | SA(0) | T(dst) | IMM(0), UNMOVABLE_INS));
- /* Loop for searching the highest bit. */
- FAIL_IF(push_inst(compiler, SLL | T(TMP_REG1) | D(TMP_REG1) | SH_IMM(1), DR(TMP_REG1)));
- FAIL_IF(push_inst(compiler, BGEZ | S(TMP_REG1) | IMM(-2), UNMOVABLE_INS));
- FAIL_IF(push_inst(compiler, ADDIU_W | S(dst) | T(dst) | IMM(1), UNMOVABLE_INS));
- if (op & SLJIT_SET_E)
- return push_inst(compiler, ADDU_W | S(dst) | TA(0) | DA(EQUAL_FLAG), EQUAL_FLAG);
-#endif
- return SLJIT_SUCCESS;
- }
-
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int emit_const(struct sljit_compiler *compiler, int reg, sljit_w init_value)
-{
- FAIL_IF(push_inst(compiler, LUI | T(reg) | IMM(init_value >> 16), DR(reg)));
- return push_inst(compiler, ORI | S(reg) | T(reg) | IMM(init_value), DR(reg));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
- sljit_ins *inst = (sljit_ins*)addr;
-
- inst[0] = (inst[0] & 0xffff0000) | ((new_addr >> 16) & 0xffff);
- inst[1] = (inst[1] & 0xffff0000) | (new_addr & 0xffff);
- SLJIT_CACHE_FLUSH(inst, inst + 2);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant)
-{
- sljit_ins *inst = (sljit_ins*)addr;
-
- inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 16) & 0xffff);
- inst[1] = (inst[1] & 0xffff0000) | (new_constant & 0xffff);
- SLJIT_CACHE_FLUSH(inst, inst + 2);
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativeMIPS_common.c b/src/third_party/pcre-8.30/sljit/sljitNativeMIPS_common.c
deleted file mode 100644
index 3c6ee663e15..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativeMIPS_common.c
+++ /dev/null
@@ -1,1829 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name()
-{
- return "MIPS" SLJIT_CPUINFO;
-}
-
-/* Latest MIPS architecture. */
-/* Detect SLJIT_MIPS_32_64 */
-
-/* Length of an instruction word
- Both for mips-32 and mips-64 */
-typedef sljit_ui sljit_ins;
-
-#define TMP_REG1 (SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2 (SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3 (SLJIT_NO_REGISTERS + 3)
-#define REAL_STACK_PTR (SLJIT_NO_REGISTERS + 4)
-
-/* For position independent code, t9 must contain the function address. */
-#define PIC_ADDR_REG TMP_REG2
-
-/* TMP_EREG1 is used mainly for literal encoding on 64 bit. */
-#define TMP_EREG1 15
-#define TMP_EREG2 24
-/* Floating point status register. */
-#define FCSR_REG 31
-/* Return address register. */
-#define RETURN_ADDR_REG 31
-
-/* Flags are keept in volatile registers. */
-#define EQUAL_FLAG 7
-/* And carry flag as well. */
-#define ULESS_FLAG 10
-#define UGREATER_FLAG 11
-#define LESS_FLAG 12
-#define GREATER_FLAG 13
-#define OVERFLOW_FLAG 14
-
-#define TMP_FREG1 (SLJIT_FLOAT_REG4 + 1)
-#define TMP_FREG2 (SLJIT_FLOAT_REG4 + 2)
-
-/* --------------------------------------------------------------------- */
-/* Instrucion forms */
-/* --------------------------------------------------------------------- */
-
-#define S(s) (reg_map[s] << 21)
-#define T(t) (reg_map[t] << 16)
-#define D(d) (reg_map[d] << 11)
-/* Absolute registers. */
-#define SA(s) ((s) << 21)
-#define TA(t) ((t) << 16)
-#define DA(d) ((d) << 11)
-#define FT(t) ((t) << (16 + 1))
-#define FS(s) ((s) << (11 + 1))
-#define FD(d) ((d) << (6 + 1))
-#define IMM(imm) ((imm) & 0xffff)
-#define SH_IMM(imm) ((imm & 0x1f) << 6)
-
-#define DR(dr) (reg_map[dr])
-#define HI(opcode) ((opcode) << 26)
-#define LO(opcode) (opcode)
-#define FMT_D (17 << 21)
-
-#define ABS_D (HI(17) | FMT_D | LO(5))
-#define ADD_D (HI(17) | FMT_D | LO(0))
-#define ADDU (HI(0) | LO(33))
-#define ADDIU (HI(9))
-#define AND (HI(0) | LO(36))
-#define ANDI (HI(12))
-#define B (HI(4))
-#define BAL (HI(1) | (17 << 16))
-#define BC1F (HI(17) | (8 << 21))
-#define BC1T (HI(17) | (8 << 21) | (1 << 16))
-#define BEQ (HI(4))
-#define BGEZ (HI(1) | (1 << 16))
-#define BGTZ (HI(7))
-#define BLEZ (HI(6))
-#define BLTZ (HI(1) | (0 << 16))
-#define BNE (HI(5))
-#define BREAK (HI(0) | LO(13))
-#define C_UN_D (HI(17) | FMT_D | LO(49))
-#define C_UEQ_D (HI(17) | FMT_D | LO(51))
-#define C_ULE_D (HI(17) | FMT_D | LO(55))
-#define C_ULT_D (HI(17) | FMT_D | LO(53))
-#define DIV (HI(0) | LO(26))
-#define DIVU (HI(0) | LO(27))
-#define DIV_D (HI(17) | FMT_D | LO(3))
-#define J (HI(2))
-#define JAL (HI(3))
-#define JALR (HI(0) | LO(9))
-#define JR (HI(0) | LO(8))
-#define LD (HI(55))
-#define LDC1 (HI(53))
-#define LUI (HI(15))
-#define LW (HI(35))
-#define NEG_D (HI(17) | FMT_D | LO(7))
-#define MFHI (HI(0) | LO(16))
-#define MFLO (HI(0) | LO(18))
-#define MOV_D (HI(17) | FMT_D | LO(6))
-#define CFC1 (HI(17) | (2 << 21))
-#define MOVN (HI(0) | LO(11))
-#define MOVZ (HI(0) | LO(10))
-#define MUL_D (HI(17) | FMT_D | LO(2))
-#define MULT (HI(0) | LO(24))
-#define MULTU (HI(0) | LO(25))
-#define NOP (HI(0) | LO(0))
-#define NOR (HI(0) | LO(39))
-#define OR (HI(0) | LO(37))
-#define ORI (HI(13))
-#define SD (HI(63))
-#define SDC1 (HI(61))
-#define SLT (HI(0) | LO(42))
-#define SLTI (HI(10))
-#define SLTIU (HI(11))
-#define SLTU (HI(0) | LO(43))
-#define SLL (HI(0) | LO(0))
-#define SLLV (HI(0) | LO(4))
-#define SRL (HI(0) | LO(2))
-#define SRLV (HI(0) | LO(6))
-#define SRA (HI(0) | LO(3))
-#define SRAV (HI(0) | LO(7))
-#define SUB_D (HI(17) | FMT_D | LO(1))
-#define SUBU (HI(0) | LO(35))
-#define SW (HI(43))
-#define XOR (HI(0) | LO(38))
-#define XORI (HI(14))
-
-#if (defined SLJIT_MIPS_32_64 && SLJIT_MIPS_32_64)
-#define CLZ (HI(28) | LO(32))
-#define MUL (HI(28) | LO(2))
-#define SEB (HI(31) | (16 << 6) | LO(32))
-#define SEH (HI(31) | (24 << 6) | LO(32))
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
-#define ADDU_W ADDU
-#define ADDIU_W ADDIU
-#define SLL_W SLL
-#define SUBU_W SUBU
-#else
-#define ADDU_W DADDU
-#define ADDIU_W DADDIU
-#define SLL_W DSLL
-#define SUBU_W DSUBU
-#endif
-
-#define SIMM_MAX (0x7fff)
-#define SIMM_MIN (-0x8000)
-#define UIMM_MAX (0xffff)
-
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 6] = {
- 0, 2, 5, 6, 3, 8, 17, 18, 19, 20, 21, 16, 4, 25, 9, 29
-};
-
-/* dest_reg is the absolute name of the register
- Useful for reordering instructions in the delay slot. */
-static int push_inst(struct sljit_compiler *compiler, sljit_ins ins, int delay_slot)
-{
- sljit_ins *ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins));
- FAIL_IF(!ptr);
- *ptr = ins;
- compiler->size++;
- compiler->delay_slot = delay_slot;
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE sljit_ins invert_branch(int flags)
-{
- return (flags & IS_BIT26_COND) ? (1 << 26) : (1 << 16);
-}
-
-static SLJIT_INLINE sljit_ins* optimize_jump(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code)
-{
- sljit_w diff;
- sljit_uw target_addr;
- sljit_ins *inst;
- sljit_ins saved_inst;
-
- if (jump->flags & SLJIT_REWRITABLE_JUMP)
- return code_ptr;
-
- if (jump->flags & JUMP_ADDR)
- target_addr = jump->u.target;
- else {
- SLJIT_ASSERT(jump->flags & JUMP_LABEL);
- target_addr = (sljit_uw)(code + jump->u.label->size);
- }
- inst = (sljit_ins*)jump->addr;
- if (jump->flags & IS_COND)
- inst--;
-
- /* B instructions. */
- if (jump->flags & IS_MOVABLE) {
- diff = ((sljit_w)target_addr - (sljit_w)(inst)) >> 2;
- if (diff <= SIMM_MAX && diff >= SIMM_MIN) {
- jump->flags |= PATCH_B;
-
- if (!(jump->flags & IS_COND)) {
- inst[0] = inst[-1];
- inst[-1] = (jump->flags & IS_JAL) ? BAL : B;
- jump->addr -= sizeof(sljit_ins);
- return inst;
- }
- saved_inst = inst[0];
- inst[0] = inst[-1];
- inst[-1] = saved_inst ^ invert_branch(jump->flags);
- jump->addr -= 2 * sizeof(sljit_ins);
- return inst;
- }
- }
-
- diff = ((sljit_w)target_addr - (sljit_w)(inst + 1)) >> 2;
- if (diff <= SIMM_MAX && diff >= SIMM_MIN) {
- jump->flags |= PATCH_B;
-
- if (!(jump->flags & IS_COND)) {
- inst[0] = (jump->flags & IS_JAL) ? BAL : B;
- inst[1] = NOP;
- return inst + 1;
- }
- inst[0] = inst[0] ^ invert_branch(jump->flags);
- inst[1] = NOP;
- jump->addr -= sizeof(sljit_ins);
- return inst + 1;
- }
-
- if (jump->flags & IS_COND) {
- if ((target_addr & ~0xfffffff) == ((jump->addr + 3 * sizeof(sljit_ins)) & ~0xfffffff)) {
- jump->flags |= PATCH_J;
- inst[0] = (inst[0] & 0xffff0000) | 3;
- inst[1] = NOP;
- inst[2] = J;
- inst[3] = NOP;
- jump->addr += sizeof(sljit_ins);
- return inst + 3;
- }
- return code_ptr;
- }
-
- /* J instuctions. */
- if (jump->flags & IS_MOVABLE) {
- if ((target_addr & ~0xfffffff) == (jump->addr & ~0xfffffff)) {
- jump->flags |= PATCH_J;
- inst[0] = inst[-1];
- inst[-1] = (jump->flags & IS_JAL) ? JAL : J;
- jump->addr -= sizeof(sljit_ins);
- return inst;
- }
- }
-
- if ((target_addr & ~0xfffffff) == ((jump->addr + sizeof(sljit_ins)) & ~0xfffffff)) {
- jump->flags |= PATCH_J;
- inst[0] = (jump->flags & IS_JAL) ? JAL : J;
- inst[1] = NOP;
- return inst + 1;
- }
-
- return code_ptr;
-}
-
-#ifdef __GNUC__
-static __attribute__ ((noinline)) void sljit_cache_flush(void* code, void* code_ptr)
-{
- SLJIT_CACHE_FLUSH(code, code_ptr);
-}
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
- struct sljit_memory_fragment *buf;
- sljit_ins *code;
- sljit_ins *code_ptr;
- sljit_ins *buf_ptr;
- sljit_ins *buf_end;
- sljit_uw word_count;
- sljit_uw addr;
-
- struct sljit_label *label;
- struct sljit_jump *jump;
- struct sljit_const *const_;
-
- CHECK_ERROR_PTR();
- check_sljit_generate_code(compiler);
- reverse_buf(compiler);
-
- code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
- PTR_FAIL_WITH_EXEC_IF(code);
- buf = compiler->buf;
-
- code_ptr = code;
- word_count = 0;
- label = compiler->labels;
- jump = compiler->jumps;
- const_ = compiler->consts;
- do {
- buf_ptr = (sljit_ins*)buf->memory;
- buf_end = buf_ptr + (buf->used_size >> 2);
- do {
- *code_ptr = *buf_ptr++;
- SLJIT_ASSERT(!label || label->size >= word_count);
- SLJIT_ASSERT(!jump || jump->addr >= word_count);
- SLJIT_ASSERT(!const_ || const_->addr >= word_count);
- /* These structures are ordered by their address. */
- if (label && label->size == word_count) {
- /* Just recording the address. */
- label->addr = (sljit_uw)code_ptr;
- label->size = code_ptr - code;
- label = label->next;
- }
- if (jump && jump->addr == word_count) {
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- jump->addr = (sljit_uw)(code_ptr - 3);
-#else
- jump->addr = (sljit_uw)(code_ptr - 6);
-#endif
- code_ptr = optimize_jump(jump, code_ptr, code);
- jump = jump->next;
- }
- if (const_ && const_->addr == word_count) {
- /* Just recording the address. */
- const_->addr = (sljit_uw)code_ptr;
- const_ = const_->next;
- }
- code_ptr ++;
- word_count ++;
- } while (buf_ptr < buf_end);
-
- buf = buf->next;
- } while (buf);
-
- if (label && label->size == word_count) {
- label->addr = (sljit_uw)code_ptr;
- label->size = code_ptr - code;
- label = label->next;
- }
-
- SLJIT_ASSERT(!label);
- SLJIT_ASSERT(!jump);
- SLJIT_ASSERT(!const_);
- SLJIT_ASSERT(code_ptr - code <= (int)compiler->size);
-
- jump = compiler->jumps;
- while (jump) {
- do {
- addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
- buf_ptr = (sljit_ins*)jump->addr;
-
- if (jump->flags & PATCH_B) {
- addr = (sljit_w)(addr - (jump->addr + sizeof(sljit_ins))) >> 2;
- SLJIT_ASSERT((sljit_w)addr <= SIMM_MAX && (sljit_w)addr >= SIMM_MIN);
- buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | (addr & 0xffff);
- break;
- }
- if (jump->flags & PATCH_J) {
- SLJIT_ASSERT((addr & ~0xfffffff) == ((jump->addr + sizeof(sljit_ins)) & ~0xfffffff));
- buf_ptr[0] |= (addr >> 2) & 0x03ffffff;
- break;
- }
-
- /* Set the fields of immediate loads. */
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff);
- buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff);
-#else
- buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 48) & 0xffff);
- buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 32) & 0xffff);
- buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | ((addr >> 16) & 0xffff);
- buf_ptr[4] = (buf_ptr[4] & 0xffff0000) | (addr & 0xffff);
-#endif
- } while (0);
- jump = jump->next;
- }
-
- compiler->error = SLJIT_ERR_COMPILED;
- compiler->executable_size = compiler->size * sizeof(sljit_ins);
-#ifndef __GNUC__
- SLJIT_CACHE_FLUSH(code, code_ptr);
-#else
- /* GCC workaround for invalid code generation with -O2. */
- sljit_cache_flush(code, code_ptr);
-#endif
- return code;
-}
-
-/* Creates an index in data_transfer_insts array. */
-#define WORD_DATA 0x00
-#define BYTE_DATA 0x01
-#define HALF_DATA 0x02
-#define INT_DATA 0x03
-#define SIGNED_DATA 0x04
-#define LOAD_DATA 0x08
-
-#define MEM_MASK 0x0f
-
-#define WRITE_BACK 0x00010
-#define ARG_TEST 0x00020
-#define CUMULATIVE_OP 0x00040
-#define LOGICAL_OP 0x00080
-#define IMM_OP 0x00100
-#define SRC2_IMM 0x00200
-
-#define UNUSED_DEST 0x00400
-#define REG_DEST 0x00800
-#define REG1_SOURCE 0x01000
-#define REG2_SOURCE 0x02000
-#define SLOW_SRC1 0x04000
-#define SLOW_SRC2 0x08000
-#define SLOW_DEST 0x10000
-
-/* Only these flags are set. UNUSED_DEST is not set when no flags should be set. */
-#define CHECK_FLAGS(list) \
- (!(flags & UNUSED_DEST) || (op & GET_FLAGS(~(list))))
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
-#include "sljitNativeMIPS_32.c"
-#else
-#include "sljitNativeMIPS_64.c"
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
-#define STACK_STORE SW
-#define STACK_LOAD LW
-#else
-#define STACK_STORE SD
-#define STACK_LOAD LD
-#endif
-
-static int emit_op(struct sljit_compiler *compiler, int op, int inp_flags,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w);
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- sljit_ins base;
-
- CHECK_ERROR();
- check_sljit_emit_enter(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- compiler->has_locals = local_size > 0;
- local_size += (saveds + 2 + 4) * sizeof(sljit_w);
- local_size = (local_size + 15) & ~0xf;
- compiler->local_size = local_size;
-
- if (local_size <= SIMM_MAX) {
- /* Frequent case. */
- FAIL_IF(push_inst(compiler, ADDIU_W | S(REAL_STACK_PTR) | T(REAL_STACK_PTR) | IMM(-local_size), DR(REAL_STACK_PTR)));
- base = S(REAL_STACK_PTR);
- }
- else {
- FAIL_IF(load_immediate(compiler, DR(TMP_REG1), local_size));
- FAIL_IF(push_inst(compiler, ADDU_W | S(REAL_STACK_PTR) | TA(0) | D(TMP_REG2), DR(TMP_REG2)));
- FAIL_IF(push_inst(compiler, SUBU_W | S(REAL_STACK_PTR) | T(TMP_REG1) | D(REAL_STACK_PTR), DR(REAL_STACK_PTR)));
- base = S(TMP_REG2);
- local_size = 0;
- }
-
- FAIL_IF(push_inst(compiler, STACK_STORE | base | TA(RETURN_ADDR_REG) | IMM(local_size - 1 * (int)sizeof(sljit_w)), MOVABLE_INS));
- if (compiler->has_locals)
- FAIL_IF(push_inst(compiler, STACK_STORE | base | T(SLJIT_LOCALS_REG) | IMM(local_size - 2 * (int)sizeof(sljit_w)), MOVABLE_INS));
- if (saveds >= 1)
- FAIL_IF(push_inst(compiler, STACK_STORE | base | T(SLJIT_SAVED_REG1) | IMM(local_size - 3 * (int)sizeof(sljit_w)), MOVABLE_INS));
- if (saveds >= 2)
- FAIL_IF(push_inst(compiler, STACK_STORE | base | T(SLJIT_SAVED_REG2) | IMM(local_size - 4 * (int)sizeof(sljit_w)), MOVABLE_INS));
- if (saveds >= 3)
- FAIL_IF(push_inst(compiler, STACK_STORE | base | T(SLJIT_SAVED_REG3) | IMM(local_size - 5 * (int)sizeof(sljit_w)), MOVABLE_INS));
- if (saveds >= 4)
- FAIL_IF(push_inst(compiler, STACK_STORE | base | T(SLJIT_SAVED_EREG1) | IMM(local_size - 6 * (int)sizeof(sljit_w)), MOVABLE_INS));
- if (saveds >= 5)
- FAIL_IF(push_inst(compiler, STACK_STORE | base | T(SLJIT_SAVED_EREG2) | IMM(local_size - 7 * (int)sizeof(sljit_w)), MOVABLE_INS));
-
- if (compiler->has_locals)
- FAIL_IF(push_inst(compiler, ADDIU_W | S(REAL_STACK_PTR) | T(SLJIT_LOCALS_REG) | IMM(4 * sizeof(sljit_w)), DR(SLJIT_LOCALS_REG)));
-
- if (args >= 1)
- FAIL_IF(push_inst(compiler, ADDU_W | SA(4) | TA(0) | D(SLJIT_SAVED_REG1), DR(SLJIT_SAVED_REG1)));
- if (args >= 2)
- FAIL_IF(push_inst(compiler, ADDU_W | SA(5) | TA(0) | D(SLJIT_SAVED_REG2), DR(SLJIT_SAVED_REG2)));
- if (args >= 3)
- FAIL_IF(push_inst(compiler, ADDU_W | SA(6) | TA(0) | D(SLJIT_SAVED_REG3), DR(SLJIT_SAVED_REG3)));
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- CHECK_ERROR_VOID();
- check_sljit_set_context(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- compiler->has_locals = local_size > 0;
- local_size += (saveds + 2 + 4) * sizeof(sljit_w);
- compiler->local_size = (local_size + 15) & ~0xf;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)
-{
- int local_size;
- sljit_ins base;
-
- CHECK_ERROR();
- check_sljit_emit_return(compiler, op, src, srcw);
-
- FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-
- local_size = compiler->local_size;
- if (local_size <= SIMM_MAX)
- base = S(REAL_STACK_PTR);
- else {
- FAIL_IF(load_immediate(compiler, DR(TMP_REG1), local_size));
- FAIL_IF(push_inst(compiler, ADDU_W | S(REAL_STACK_PTR) | T(TMP_REG1) | D(TMP_REG1), DR(TMP_REG1)));
- base = S(TMP_REG1);
- local_size = 0;
- }
-
- FAIL_IF(push_inst(compiler, STACK_LOAD | base | TA(RETURN_ADDR_REG) | IMM(local_size - 1 * (int)sizeof(sljit_w)), RETURN_ADDR_REG));
- if (compiler->saveds >= 5)
- FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(SLJIT_SAVED_EREG2) | IMM(local_size - 7 * (int)sizeof(sljit_w)), DR(SLJIT_SAVED_EREG2)));
- if (compiler->saveds >= 4)
- FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(SLJIT_SAVED_EREG1) | IMM(local_size - 6 * (int)sizeof(sljit_w)), DR(SLJIT_SAVED_EREG1)));
- if (compiler->saveds >= 3)
- FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(SLJIT_SAVED_REG3) | IMM(local_size - 5 * (int)sizeof(sljit_w)), DR(SLJIT_SAVED_REG3)));
- if (compiler->saveds >= 2)
- FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(SLJIT_SAVED_REG2) | IMM(local_size - 4 * (int)sizeof(sljit_w)), DR(SLJIT_SAVED_REG2)));
- if (compiler->saveds >= 1)
- FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(SLJIT_SAVED_REG1) | IMM(local_size - 3 * (int)sizeof(sljit_w)), DR(SLJIT_SAVED_REG1)));
- if (compiler->has_locals)
- FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(SLJIT_LOCALS_REG) | IMM(local_size - 2 * (int)sizeof(sljit_w)), DR(SLJIT_LOCALS_REG)));
-
- FAIL_IF(push_inst(compiler, JR | SA(RETURN_ADDR_REG), UNMOVABLE_INS));
- if (compiler->local_size <= SIMM_MAX)
- return push_inst(compiler, ADDIU_W | S(REAL_STACK_PTR) | T(REAL_STACK_PTR) | IMM(compiler->local_size), UNMOVABLE_INS);
- else
- return push_inst(compiler, ADDU_W | S(TMP_REG1) | TA(0) | D(REAL_STACK_PTR), UNMOVABLE_INS);
-}
-
-#undef STACK_STORE
-#undef STACK_LOAD
-
-/* --------------------------------------------------------------------- */
-/* Operators */
-/* --------------------------------------------------------------------- */
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
-#define ARCH_DEPEND(a, b) a
-#else
-#define ARCH_DEPEND(a, b) b
-#endif
-
-static SLJIT_CONST sljit_ins data_transfer_insts[16] = {
-/* s u w */ ARCH_DEPEND(HI(43) /* sw */, HI(63) /* sd */),
-/* s u b */ HI(40) /* sb */,
-/* s u h */ HI(41) /* sh*/,
-/* s u i */ HI(43) /* sw */,
-
-/* s s w */ ARCH_DEPEND(HI(43) /* sw */, HI(63) /* sd */),
-/* s s b */ HI(40) /* sb */,
-/* s s h */ HI(41) /* sh*/,
-/* s s i */ HI(43) /* sw */,
-
-/* l u w */ ARCH_DEPEND(HI(35) /* lw */, HI(55) /* ld */),
-/* l u b */ HI(36) /* lbu */,
-/* l u h */ HI(37) /* lhu */,
-/* l u i */ ARCH_DEPEND(HI(35) /* lw */, HI(39) /* lwu */),
-
-/* l s w */ ARCH_DEPEND(HI(35) /* lw */, HI(55) /* ld */),
-/* l s b */ HI(32) /* lb */,
-/* l s h */ HI(33) /* lh */,
-/* l s i */ HI(35) /* lw */,
-};
-
-/* reg_ar is an absoulute register! */
-
-/* Can perform an operation using at most 1 instruction. */
-static int getput_arg_fast(struct sljit_compiler *compiler, int flags, int reg_ar, int arg, sljit_w argw)
-{
- SLJIT_ASSERT(arg & SLJIT_MEM);
-
- if (!(flags & WRITE_BACK) && !(arg & 0xf0) && argw <= SIMM_MAX && argw >= SIMM_MIN) {
- /* Works for both absoulte and relative addresses. */
- if (SLJIT_UNLIKELY(flags & ARG_TEST))
- return 1;
- FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(arg & 0xf) | TA(reg_ar) | IMM(argw), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS));
- return -1;
- }
- return (flags & ARG_TEST) ? SLJIT_SUCCESS : 0;
-}
-
-/* See getput_arg below.
- Note: can_cache is called only for binary operators. Those
- operators always uses word arguments without write back. */
-static int can_cache(int arg, sljit_w argw, int next_arg, sljit_w next_argw)
-{
- if (!(next_arg & SLJIT_MEM))
- return 0;
-
- /* Simple operation except for updates. */
- if (arg & 0xf0) {
- argw &= 0x3;
- next_argw &= 0x3;
- if (argw && argw == next_argw && (arg == next_arg || (arg & 0xf0) == (next_arg & 0xf0)))
- return 1;
- return 0;
- }
-
- if (arg == next_arg) {
- if (((sljit_uw)(next_argw - argw) <= SIMM_MAX && (sljit_uw)(next_argw - argw) >= SIMM_MIN))
- return 1;
- return 0;
- }
-
- return 0;
-}
-
-/* Emit the necessary instructions. See can_cache above. */
-static int getput_arg(struct sljit_compiler *compiler, int flags, int reg_ar, int arg, sljit_w argw, int next_arg, sljit_w next_argw)
-{
- int tmp_ar;
- int base;
-
- SLJIT_ASSERT(arg & SLJIT_MEM);
- if (!(next_arg & SLJIT_MEM)) {
- next_arg = 0;
- next_argw = 0;
- }
-
- tmp_ar = (flags & LOAD_DATA) ? reg_ar : DR(TMP_REG3);
- base = arg & 0xf;
-
- if (SLJIT_UNLIKELY(arg & 0xf0)) {
- argw &= 0x3;
- if ((flags & WRITE_BACK) && reg_ar == DR(base)) {
- SLJIT_ASSERT(!(flags & LOAD_DATA) && DR(TMP_REG1) != reg_ar);
- FAIL_IF(push_inst(compiler, ADDU_W | SA(reg_ar) | TA(0) | D(TMP_REG1), DR(TMP_REG1)));
- reg_ar = DR(TMP_REG1);
- }
-
- /* Using the cache. */
- if (argw == compiler->cache_argw) {
- if (!(flags & WRITE_BACK)) {
- if (arg == compiler->cache_arg)
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
- if ((SLJIT_MEM | (arg & 0xf0)) == compiler->cache_arg) {
- if (arg == next_arg && argw == (next_argw & 0x3)) {
- compiler->cache_arg = arg;
- compiler->cache_argw = argw;
- FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | D(TMP_REG3), DR(TMP_REG3)));
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
- }
- FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | DA(tmp_ar), tmp_ar));
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
- }
- }
- else {
- if ((SLJIT_MEM | (arg & 0xf0)) == compiler->cache_arg) {
- FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | D(base), DR(base)));
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(base) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
- }
- }
- }
-
- if (SLJIT_UNLIKELY(argw)) {
- compiler->cache_arg = SLJIT_MEM | (arg & 0xf0);
- compiler->cache_argw = argw;
- FAIL_IF(push_inst(compiler, SLL_W | T((arg >> 4) & 0xf) | D(TMP_REG3) | SH_IMM(argw), DR(TMP_REG3)));
- }
-
- if (!(flags & WRITE_BACK)) {
- if (arg == next_arg && argw == (next_argw & 0x3)) {
- compiler->cache_arg = arg;
- compiler->cache_argw = argw;
- FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(!argw ? ((arg >> 4) & 0xf) : TMP_REG3) | D(TMP_REG3), DR(TMP_REG3)));
- tmp_ar = DR(TMP_REG3);
- }
- else
- FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(!argw ? ((arg >> 4) & 0xf) : TMP_REG3) | DA(tmp_ar), tmp_ar));
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
- }
- FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(!argw ? ((arg >> 4) & 0xf) : TMP_REG3) | D(base), DR(base)));
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(base) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
- }
-
- if (SLJIT_UNLIKELY(flags & WRITE_BACK) && base) {
- /* Update only applies if a base register exists. */
- if (reg_ar == DR(base)) {
- SLJIT_ASSERT(!(flags & LOAD_DATA) && DR(TMP_REG1) != reg_ar);
- if (argw <= SIMM_MAX && argw >= SIMM_MIN) {
- FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(base) | TA(reg_ar) | IMM(argw), MOVABLE_INS));
- if (argw)
- return push_inst(compiler, ADDIU_W | S(base) | T(base) | IMM(argw), DR(base));
- return SLJIT_SUCCESS;
- }
- FAIL_IF(push_inst(compiler, ADDU_W | SA(reg_ar) | TA(0) | D(TMP_REG1), DR(TMP_REG1)));
- reg_ar = DR(TMP_REG1);
- }
-
- if (argw <= SIMM_MAX && argw >= SIMM_MIN) {
- if (argw)
- FAIL_IF(push_inst(compiler, ADDIU_W | S(base) | T(base) | IMM(argw), DR(base)));
- }
- else {
- if (compiler->cache_arg == SLJIT_MEM && argw - compiler->cache_argw <= SIMM_MAX && argw - compiler->cache_argw >= SIMM_MIN) {
- if (argw != compiler->cache_argw) {
- FAIL_IF(push_inst(compiler, ADDIU_W | S(TMP_REG3) | T(TMP_REG3) | IMM(argw - compiler->cache_argw), DR(TMP_REG3)));
- compiler->cache_argw = argw;
- }
- FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | D(base), DR(base)));
- }
- else {
- compiler->cache_arg = SLJIT_MEM;
- compiler->cache_argw = argw;
- FAIL_IF(load_immediate(compiler, DR(TMP_REG3), argw));
- FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | D(base), DR(base)));
- }
- }
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(base) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
- }
-
- if (compiler->cache_arg == arg && argw - compiler->cache_argw <= SIMM_MAX && argw - compiler->cache_argw >= SIMM_MIN) {
- if (argw != compiler->cache_argw) {
- FAIL_IF(push_inst(compiler, ADDIU_W | S(TMP_REG3) | T(TMP_REG3) | IMM(argw - compiler->cache_argw), DR(TMP_REG3)));
- compiler->cache_argw = argw;
- }
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
- }
-
- if (compiler->cache_arg == SLJIT_MEM && argw - compiler->cache_argw <= SIMM_MAX && argw - compiler->cache_argw >= SIMM_MIN) {
- if (argw != compiler->cache_argw)
- FAIL_IF(push_inst(compiler, ADDIU_W | S(TMP_REG3) | T(TMP_REG3) | IMM(argw - compiler->cache_argw), DR(TMP_REG3)));
- }
- else {
- compiler->cache_arg = SLJIT_MEM;
- FAIL_IF(load_immediate(compiler, DR(TMP_REG3), argw));
- }
- compiler->cache_argw = argw;
-
- if (!base)
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
-
- if (arg == next_arg && next_argw - argw <= SIMM_MAX && next_argw - argw >= SIMM_MIN) {
- compiler->cache_arg = arg;
- FAIL_IF(push_inst(compiler, ADDU_W | S(TMP_REG3) | T(base) | D(TMP_REG3), DR(TMP_REG3)));
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
- }
-
- FAIL_IF(push_inst(compiler, ADDU_W | S(TMP_REG3) | T(base) | DA(tmp_ar), tmp_ar));
- return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), (flags & LOAD_DATA) ? reg_ar : MOVABLE_INS);
-}
-
-static SLJIT_INLINE int emit_op_mem(struct sljit_compiler *compiler, int flags, int reg_ar, int arg, sljit_w argw)
-{
- if (getput_arg_fast(compiler, flags, reg_ar, arg, argw))
- return compiler->error;
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- return getput_arg(compiler, flags, reg_ar, arg, argw, 0, 0);
-}
-
-static int emit_op(struct sljit_compiler *compiler, int op, int flags,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- /* arg1 goes to TMP_REG1 or src reg
- arg2 goes to TMP_REG2, imm or src reg
- TMP_REG3 can be used for caching
- result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
- int dst_r = TMP_REG2;
- int src1_r;
- sljit_w src2_r = 0;
- int sugg_src2_r = TMP_REG2;
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REG3) {
- dst_r = dst;
- flags |= REG_DEST;
- if (GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_MOVU_SI)
- sugg_src2_r = dst_r;
- }
- else if (dst == SLJIT_UNUSED) {
- if (op >= SLJIT_MOV && op <= SLJIT_MOVU_SI && !(src2 & SLJIT_MEM))
- return SLJIT_SUCCESS;
- if (GET_FLAGS(op))
- flags |= UNUSED_DEST;
- }
- else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, DR(TMP_REG1), dst, dstw))
- flags |= SLOW_DEST;
-
- if (flags & IMM_OP) {
- if ((src2 & SLJIT_IMM) && src2w) {
- if ((!(flags & LOGICAL_OP) && (src2w <= SIMM_MAX && src2w >= SIMM_MIN))
- || ((flags & LOGICAL_OP) && !(src2w & ~UIMM_MAX))) {
- flags |= SRC2_IMM;
- src2_r = src2w;
- }
- }
- if ((src1 & SLJIT_IMM) && src1w && (flags & CUMULATIVE_OP) && !(flags & SRC2_IMM)) {
- if ((!(flags & LOGICAL_OP) && (src1w <= SIMM_MAX && src1w >= SIMM_MIN))
- || ((flags & LOGICAL_OP) && !(src1w & ~UIMM_MAX))) {
- flags |= SRC2_IMM;
- src2_r = src1w;
-
- /* And swap arguments. */
- src1 = src2;
- src1w = src2w;
- src2 = SLJIT_IMM;
- /* src2w = src2_r unneeded. */
- }
- }
- }
-
- /* Source 1. */
- if (src1 >= SLJIT_TEMPORARY_REG1 && src1 <= TMP_REG3) {
- src1_r = src1;
- flags |= REG1_SOURCE;
- }
- else if (src1 & SLJIT_IMM) {
- if (src1w) {
- FAIL_IF(load_immediate(compiler, DR(TMP_REG1), src1w));
- src1_r = TMP_REG1;
- }
- else
- src1_r = 0;
- }
- else {
- if (getput_arg_fast(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w))
- FAIL_IF(compiler->error);
- else
- flags |= SLOW_SRC1;
- src1_r = TMP_REG1;
- }
-
- /* Source 2. */
- if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= TMP_REG3) {
- src2_r = src2;
- flags |= REG2_SOURCE;
- if (!(flags & REG_DEST) && GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_MOVU_SI)
- dst_r = src2_r;
- }
- else if (src2 & SLJIT_IMM) {
- if (!(flags & SRC2_IMM)) {
- if (src2w || (GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_MOVU_SI)) {
- FAIL_IF(load_immediate(compiler, DR(sugg_src2_r), src2w));
- src2_r = sugg_src2_r;
- }
- else
- src2_r = 0;
- }
- }
- else {
- if (getput_arg_fast(compiler, flags | LOAD_DATA, DR(sugg_src2_r), src2, src2w))
- FAIL_IF(compiler->error);
- else
- flags |= SLOW_SRC2;
- src2_r = sugg_src2_r;
- }
-
- if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
- SLJIT_ASSERT(src2_r == TMP_REG2);
- if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
- FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG2), src2, src2w, src1, src1w));
- FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, dst, dstw));
- }
- else {
- FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, src2, src2w));
- FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG2), src2, src2w, dst, dstw));
- }
- }
- else if (flags & SLOW_SRC1)
- FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, dst, dstw));
- else if (flags & SLOW_SRC2)
- FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(sugg_src2_r), src2, src2w, dst, dstw));
-
- FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
-
- if (dst & SLJIT_MEM) {
- if (!(flags & SLOW_DEST)) {
- getput_arg_fast(compiler, flags, DR(dst_r), dst, dstw);
- return compiler->error;
- }
- return getput_arg(compiler, flags, DR(dst_r), dst, dstw, 0, 0);
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op)
-{
- CHECK_ERROR();
- check_sljit_emit_op0(compiler, op);
-
- op = GET_OPCODE(op);
- switch (op) {
- case SLJIT_BREAKPOINT:
- return push_inst(compiler, BREAK, UNMOVABLE_INS);
- case SLJIT_NOP:
- return push_inst(compiler, NOP, UNMOVABLE_INS);
- case SLJIT_UMUL:
- case SLJIT_SMUL:
- FAIL_IF(push_inst(compiler, (op == SLJIT_UMUL ? MULTU : MULT) | S(SLJIT_TEMPORARY_REG1) | T(SLJIT_TEMPORARY_REG2), MOVABLE_INS));
- FAIL_IF(push_inst(compiler, MFLO | D(SLJIT_TEMPORARY_REG1), DR(SLJIT_TEMPORARY_REG1)));
- return push_inst(compiler, MFHI | D(SLJIT_TEMPORARY_REG2), DR(SLJIT_TEMPORARY_REG2));
- case SLJIT_UDIV:
- case SLJIT_SDIV:
-#if !(defined SLJIT_MIPS_32_64 && SLJIT_MIPS_32_64)
- FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
- FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
-#endif
- FAIL_IF(push_inst(compiler, (op == SLJIT_UDIV ? DIVU : DIV) | S(SLJIT_TEMPORARY_REG1) | T(SLJIT_TEMPORARY_REG2), MOVABLE_INS));
- FAIL_IF(push_inst(compiler, MFLO | D(SLJIT_TEMPORARY_REG1), DR(SLJIT_TEMPORARY_REG1)));
- return push_inst(compiler, MFHI | D(SLJIT_TEMPORARY_REG2), DR(SLJIT_TEMPORARY_REG2));
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- #define inp_flags 0
-#endif
-
- CHECK_ERROR();
- check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
-
- SLJIT_COMPILE_ASSERT(SLJIT_MOV + 7 == SLJIT_MOVU, movu_offset);
-
- switch (GET_OPCODE(op)) {
- case SLJIT_MOV:
- return emit_op(compiler, SLJIT_MOV, inp_flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOV_UI:
- return emit_op(compiler, SLJIT_MOV_UI, inp_flags | INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOV_SI:
- return emit_op(compiler, SLJIT_MOV_SI, inp_flags | INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOV_UB:
- return emit_op(compiler, SLJIT_MOV_UB, inp_flags | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned char)srcw : srcw);
-
- case SLJIT_MOV_SB:
- return emit_op(compiler, SLJIT_MOV_SB, inp_flags | BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed char)srcw : srcw);
-
- case SLJIT_MOV_UH:
- return emit_op(compiler, SLJIT_MOV_UH, inp_flags | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned short)srcw : srcw);
-
- case SLJIT_MOV_SH:
- return emit_op(compiler, SLJIT_MOV_SH, inp_flags | HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed short)srcw : srcw);
-
- case SLJIT_MOVU:
- return emit_op(compiler, SLJIT_MOV, inp_flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOVU_UI:
- return emit_op(compiler, SLJIT_MOV_UI, inp_flags | INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOVU_SI:
- return emit_op(compiler, SLJIT_MOV_SI, inp_flags | INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOVU_UB:
- return emit_op(compiler, SLJIT_MOV_UB, inp_flags | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned char)srcw : srcw);
-
- case SLJIT_MOVU_SB:
- return emit_op(compiler, SLJIT_MOV_SB, inp_flags | BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed char)srcw : srcw);
-
- case SLJIT_MOVU_UH:
- return emit_op(compiler, SLJIT_MOV_UH, inp_flags | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned short)srcw : srcw);
-
- case SLJIT_MOVU_SH:
- return emit_op(compiler, SLJIT_MOV_SH, inp_flags | HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed short)srcw : srcw);
-
- case SLJIT_NOT:
- return emit_op(compiler, op, inp_flags, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_NEG:
- return emit_op(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), inp_flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw);
-
- case SLJIT_CLZ:
- return emit_op(compiler, op, inp_flags, dst, dstw, TMP_REG1, 0, src, srcw);
- }
-
- return SLJIT_SUCCESS;
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- #undef inp_flags
-#endif
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- #define inp_flags 0
-#endif
-
- CHECK_ERROR();
- check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
- switch (GET_OPCODE(op)) {
- case SLJIT_ADD:
- case SLJIT_ADDC:
- return emit_op(compiler, op, inp_flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_SUB:
- case SLJIT_SUBC:
- return emit_op(compiler, op, inp_flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_MUL:
- return emit_op(compiler, op, inp_flags | CUMULATIVE_OP, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_AND:
- case SLJIT_OR:
- case SLJIT_XOR:
- return emit_op(compiler, op, inp_flags | CUMULATIVE_OP | LOGICAL_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_SHL:
- case SLJIT_LSHR:
- case SLJIT_ASHR:
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- if (src2 & SLJIT_IMM)
- src2w &= 0x1f;
-#else
- if (src2 & SLJIT_IMM)
- src2w &= 0x3f;
-#endif
- return emit_op(compiler, op, inp_flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
- }
-
- return SLJIT_SUCCESS;
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
- #undef inp_flags
-#endif
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
-{
- check_sljit_get_register_index(reg);
- return reg_map[reg];
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, int size)
-{
- CHECK_ERROR();
- check_sljit_emit_op_custom(compiler, instruction, size);
- SLJIT_ASSERT(size == 4);
-
- return push_inst(compiler, *(sljit_ins*)instruction, UNMOVABLE_INS);
-}
-
-/* --------------------------------------------------------------------- */
-/* Floating point operators */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)
-{
-#if (defined SLJIT_QEMU && SLJIT_QEMU)
- /* Qemu says fir is 0 by default. */
- return 1;
-#elif defined(__GNUC__)
- sljit_w fir;
- asm ("cfc1 %0, $0" : "=r"(fir));
- return (fir >> 22) & 0x1;
-#else
-#error "FIR check is not implemented for this architecture"
-#endif
-}
-
-static int emit_fpu_data_transfer(struct sljit_compiler *compiler, int fpu_reg, int load, int arg, sljit_w argw)
-{
- int hi_reg;
-
- SLJIT_ASSERT(arg & SLJIT_MEM);
-
- /* Fast loads and stores. */
- if (!(arg & 0xf0)) {
- /* Both for (arg & 0xf) == SLJIT_UNUSED and (arg & 0xf) != SLJIT_UNUSED. */
- if (argw <= SIMM_MAX && argw >= SIMM_MIN)
- return push_inst(compiler, (load ? LDC1 : SDC1) | S(arg & 0xf) | FT(fpu_reg) | IMM(argw), MOVABLE_INS);
- }
-
- if (arg & 0xf0) {
- argw &= 0x3;
- hi_reg = (arg >> 4) & 0xf;
- if (argw) {
- FAIL_IF(push_inst(compiler, SLL_W | T(hi_reg) | D(TMP_REG1) | SH_IMM(argw), DR(TMP_REG1)));
- hi_reg = TMP_REG1;
- }
- FAIL_IF(push_inst(compiler, ADDU_W | S(hi_reg) | T(arg & 0xf) | D(TMP_REG1), DR(TMP_REG1)));
- return push_inst(compiler, (load ? LDC1 : SDC1) | S(TMP_REG1) | FT(fpu_reg) | IMM(0), MOVABLE_INS);
- }
-
- /* Use cache. */
- if (compiler->cache_arg == arg && argw - compiler->cache_argw <= SIMM_MAX && argw - compiler->cache_argw >= SIMM_MIN)
- return push_inst(compiler, (load ? LDC1 : SDC1) | S(TMP_REG3) | FT(fpu_reg) | IMM(argw - compiler->cache_argw), MOVABLE_INS);
-
- /* Put value to cache. */
- compiler->cache_arg = arg;
- compiler->cache_argw = argw;
-
- FAIL_IF(load_immediate(compiler, DR(TMP_REG3), argw));
- if (arg & 0xf)
- FAIL_IF(push_inst(compiler, ADDU_W | S(TMP_REG3) | T(arg & 0xf) | D(TMP_REG3), DR(TMP_REG3)));
- return push_inst(compiler, (load ? LDC1 : SDC1) | S(TMP_REG3) | FT(fpu_reg) | IMM(0), MOVABLE_INS);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- int dst_fr;
-
- CHECK_ERROR();
- check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- if (GET_OPCODE(op) == SLJIT_FCMP) {
- if (dst > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 1, dst, dstw));
- dst = TMP_FREG1;
- }
- if (src > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG2, 1, src, srcw));
- src = TMP_FREG2;
- }
-
- /* src and dst are swapped. */
- if (op & SLJIT_SET_E) {
- FAIL_IF(push_inst(compiler, C_UEQ_D | FT(src) | FS(dst), UNMOVABLE_INS));
- FAIL_IF(push_inst(compiler, CFC1 | TA(EQUAL_FLAG) | DA(FCSR_REG), EQUAL_FLAG));
- FAIL_IF(push_inst(compiler, SRL | TA(EQUAL_FLAG) | DA(EQUAL_FLAG) | SH_IMM(23), EQUAL_FLAG));
- FAIL_IF(push_inst(compiler, ANDI | SA(EQUAL_FLAG) | TA(EQUAL_FLAG) | IMM(1), EQUAL_FLAG));
- }
- if (op & SLJIT_SET_S) {
- /* Mixing the instructions for the two checks. */
- FAIL_IF(push_inst(compiler, C_ULT_D | FT(src) | FS(dst), UNMOVABLE_INS));
- FAIL_IF(push_inst(compiler, CFC1 | TA(ULESS_FLAG) | DA(FCSR_REG), ULESS_FLAG));
- FAIL_IF(push_inst(compiler, C_ULT_D | FT(dst) | FS(src), UNMOVABLE_INS));
- FAIL_IF(push_inst(compiler, SRL | TA(ULESS_FLAG) | DA(ULESS_FLAG) | SH_IMM(23), ULESS_FLAG));
- FAIL_IF(push_inst(compiler, ANDI | SA(ULESS_FLAG) | TA(ULESS_FLAG) | IMM(1), ULESS_FLAG));
- FAIL_IF(push_inst(compiler, CFC1 | TA(UGREATER_FLAG) | DA(FCSR_REG), UGREATER_FLAG));
- FAIL_IF(push_inst(compiler, SRL | TA(UGREATER_FLAG) | DA(UGREATER_FLAG) | SH_IMM(23), UGREATER_FLAG));
- FAIL_IF(push_inst(compiler, ANDI | SA(UGREATER_FLAG) | TA(UGREATER_FLAG) | IMM(1), UGREATER_FLAG));
- }
- return push_inst(compiler, C_UN_D | FT(src) | FS(dst), FCSR_FCC);
- }
-
- dst_fr = (dst > SLJIT_FLOAT_REG4) ? TMP_FREG1 : dst;
-
- if (src > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, dst_fr, 1, src, srcw));
- src = dst_fr;
- }
-
- switch (op) {
- case SLJIT_FMOV:
- if (src != dst_fr && dst_fr != TMP_FREG1)
- FAIL_IF(push_inst(compiler, MOV_D | FS(src) | FD(dst_fr), MOVABLE_INS));
- break;
- case SLJIT_FNEG:
- FAIL_IF(push_inst(compiler, NEG_D | FS(src) | FD(dst_fr), MOVABLE_INS));
- break;
- case SLJIT_FABS:
- FAIL_IF(push_inst(compiler, ABS_D | FS(src) | FD(dst_fr), MOVABLE_INS));
- break;
- }
-
- if (dst_fr == TMP_FREG1)
- FAIL_IF(emit_fpu_data_transfer(compiler, src, 0, dst, dstw));
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- int dst_fr;
-
- CHECK_ERROR();
- check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- dst_fr = (dst > SLJIT_FLOAT_REG4) ? TMP_FREG1 : dst;
-
- if (src2 > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG2, 1, src2, src2w));
- src2 = TMP_FREG2;
- }
-
- if (src1 > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 1, src1, src1w));
- src1 = TMP_FREG1;
- }
-
- switch (op) {
- case SLJIT_FADD:
- FAIL_IF(push_inst(compiler, ADD_D | FT(src2) | FS(src1) | FD(dst_fr), MOVABLE_INS));
- break;
-
- case SLJIT_FSUB:
- FAIL_IF(push_inst(compiler, SUB_D | FT(src2) | FS(src1) | FD(dst_fr), MOVABLE_INS));
- break;
-
- case SLJIT_FMUL:
- FAIL_IF(push_inst(compiler, MUL_D | FT(src2) | FS(src1) | FD(dst_fr), MOVABLE_INS));
- break;
-
- case SLJIT_FDIV:
- FAIL_IF(push_inst(compiler, DIV_D | FT(src2) | FS(src1) | FD(dst_fr), MOVABLE_INS));
- break;
- }
-
- if (dst_fr == TMP_FREG1)
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 0, dst, dstw));
-
- return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/* Other instructions */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size)
-{
- CHECK_ERROR();
- check_sljit_emit_fast_enter(compiler, dst, dstw, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- compiler->has_locals = local_size > 0;
- local_size += (saveds + 2 + 4) * sizeof(sljit_w);
- compiler->local_size = (local_size + 15) & ~0xf;
-
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS)
- return push_inst(compiler, ADDU_W | SA(RETURN_ADDR_REG) | TA(0) | D(dst), DR(dst));
- else if (dst & SLJIT_MEM)
- return emit_op_mem(compiler, WORD_DATA, RETURN_ADDR_REG, dst, dstw);
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
-{
- CHECK_ERROR();
- check_sljit_emit_fast_return(compiler, src, srcw);
-
- if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS)
- FAIL_IF(push_inst(compiler, ADDU_W | S(src) | TA(0) | DA(RETURN_ADDR_REG), RETURN_ADDR_REG));
- else if (src & SLJIT_MEM)
- FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, RETURN_ADDR_REG, src, srcw));
- else if (src & SLJIT_IMM)
- FAIL_IF(load_immediate(compiler, RETURN_ADDR_REG, srcw));
-
- FAIL_IF(push_inst(compiler, JR | SA(RETURN_ADDR_REG), UNMOVABLE_INS));
- return push_inst(compiler, NOP, UNMOVABLE_INS);
-}
-
-/* --------------------------------------------------------------------- */
-/* Conditional instructions */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
- struct sljit_label *label;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_label(compiler);
-
- if (compiler->last_label && compiler->last_label->size == compiler->size)
- return compiler->last_label;
-
- label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
- PTR_FAIL_IF(!label);
- set_label(label, compiler);
- compiler->delay_slot = UNMOVABLE_INS;
- return label;
-}
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
-#define JUMP_LENGTH 4
-#else
-#define JUMP_LENGTH 7
-#endif
-
-#define BR_Z(src) \
- inst = BEQ | SA(src) | TA(0) | JUMP_LENGTH; \
- flags = IS_BIT26_COND; \
- delay_check = src;
-
-#define BR_NZ(src) \
- inst = BNE | SA(src) | TA(0) | JUMP_LENGTH; \
- flags = IS_BIT26_COND; \
- delay_check = src;
-
-#define BR_T() \
- inst = BC1T | JUMP_LENGTH; \
- flags = IS_BIT16_COND; \
- delay_check = FCSR_FCC;
-
-#define BR_F() \
- inst = BC1F | JUMP_LENGTH; \
- flags = IS_BIT16_COND; \
- delay_check = FCSR_FCC;
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type)
-{
- struct sljit_jump *jump;
- sljit_ins inst;
- int flags = 0;
- int delay_check = UNMOVABLE_INS;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_jump(compiler, type);
-
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- PTR_FAIL_IF(!jump);
- set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
- type &= 0xff;
-
- switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_FLOAT_NOT_EQUAL:
- BR_NZ(EQUAL_FLAG);
- break;
- case SLJIT_C_NOT_EQUAL:
- case SLJIT_C_FLOAT_EQUAL:
- BR_Z(EQUAL_FLAG);
- break;
- case SLJIT_C_LESS:
- case SLJIT_C_FLOAT_LESS:
- BR_Z(ULESS_FLAG);
- break;
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
- BR_NZ(ULESS_FLAG);
- break;
- case SLJIT_C_GREATER:
- case SLJIT_C_FLOAT_GREATER:
- BR_Z(UGREATER_FLAG);
- break;
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_LESS_EQUAL:
- BR_NZ(UGREATER_FLAG);
- break;
- case SLJIT_C_SIG_LESS:
- BR_Z(LESS_FLAG);
- break;
- case SLJIT_C_SIG_GREATER_EQUAL:
- BR_NZ(LESS_FLAG);
- break;
- case SLJIT_C_SIG_GREATER:
- BR_Z(GREATER_FLAG);
- break;
- case SLJIT_C_SIG_LESS_EQUAL:
- BR_NZ(GREATER_FLAG);
- break;
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_MUL_OVERFLOW:
- BR_Z(OVERFLOW_FLAG);
- break;
- case SLJIT_C_NOT_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
- BR_NZ(OVERFLOW_FLAG);
- break;
- case SLJIT_C_FLOAT_NAN:
- BR_F();
- break;
- case SLJIT_C_FLOAT_NOT_NAN:
- BR_T();
- break;
- default:
- /* Not conditional branch. */
- inst = 0;
- break;
- }
-
- jump->flags |= flags;
- if (compiler->delay_slot == MOVABLE_INS || (compiler->delay_slot != UNMOVABLE_INS && compiler->delay_slot != delay_check))
- jump->flags |= IS_MOVABLE;
-
- if (inst)
- PTR_FAIL_IF(push_inst(compiler, inst, UNMOVABLE_INS));
-
- PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0));
- if (type <= SLJIT_JUMP) {
- PTR_FAIL_IF(push_inst(compiler, JR | S(TMP_REG2), UNMOVABLE_INS));
- jump->addr = compiler->size;
- PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
- } else {
- SLJIT_ASSERT(DR(PIC_ADDR_REG) == 25 && PIC_ADDR_REG == TMP_REG2);
- /* Cannot be optimized out if type is >= CALL0. */
- jump->flags |= IS_JAL | (type >= SLJIT_CALL0 ? SLJIT_REWRITABLE_JUMP : 0);
- PTR_FAIL_IF(push_inst(compiler, JALR | S(TMP_REG2) | DA(RETURN_ADDR_REG), UNMOVABLE_INS));
- jump->addr = compiler->size;
- /* A NOP if type < CALL1. */
- PTR_FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_TEMPORARY_REG1) | TA(0) | DA(4), UNMOVABLE_INS));
- }
- return jump;
-}
-
-#define RESOLVE_IMM1() \
- if (src1 & SLJIT_IMM) { \
- if (src1w) { \
- PTR_FAIL_IF(load_immediate(compiler, DR(TMP_REG1), src1w)); \
- src1 = TMP_REG1; \
- } \
- else \
- src1 = 0; \
- }
-
-#define RESOLVE_IMM2() \
- if (src2 & SLJIT_IMM) { \
- if (src2w) { \
- PTR_FAIL_IF(load_immediate(compiler, DR(TMP_REG2), src2w)); \
- src2 = TMP_REG2; \
- } \
- else \
- src2 = 0; \
- }
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- struct sljit_jump *jump;
- int flags;
- sljit_ins inst;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- flags = ((type & SLJIT_INT_OP) ? INT_DATA : WORD_DATA) | LOAD_DATA;
- if (src1 & SLJIT_MEM) {
- if (getput_arg_fast(compiler, flags, DR(TMP_REG1), src1, src1w))
- PTR_FAIL_IF(compiler->error);
- else
- PTR_FAIL_IF(getput_arg(compiler, flags, DR(TMP_REG1), src1, src1w, src2, src2w));
- src1 = TMP_REG1;
- }
- if (src2 & SLJIT_MEM) {
- if (getput_arg_fast(compiler, flags, DR(TMP_REG2), src2, src2w))
- PTR_FAIL_IF(compiler->error);
- else
- PTR_FAIL_IF(getput_arg(compiler, flags, DR(TMP_REG2), src2, src2w, 0, 0));
- src2 = TMP_REG2;
- }
-
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- PTR_FAIL_IF(!jump);
- set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
- type &= 0xff;
-
- if (type <= SLJIT_C_NOT_EQUAL) {
- RESOLVE_IMM1();
- RESOLVE_IMM2();
- jump->flags |= IS_BIT26_COND;
- if (compiler->delay_slot == MOVABLE_INS || (compiler->delay_slot != UNMOVABLE_INS && compiler->delay_slot != DR(src1) && compiler->delay_slot != DR(src2)))
- jump->flags |= IS_MOVABLE;
- PTR_FAIL_IF(push_inst(compiler, (type == SLJIT_C_EQUAL ? BNE : BEQ) | S(src1) | T(src2) | JUMP_LENGTH, UNMOVABLE_INS));
- }
- else if (type >= SLJIT_C_SIG_LESS && (((src1 & SLJIT_IMM) && (src1w == 0)) || ((src2 & SLJIT_IMM) && (src2w == 0)))) {
- inst = NOP;
- if ((src1 & SLJIT_IMM) && (src1w == 0)) {
- RESOLVE_IMM2();
- switch (type) {
- case SLJIT_C_SIG_LESS:
- inst = BLEZ;
- jump->flags |= IS_BIT26_COND;
- break;
- case SLJIT_C_SIG_GREATER_EQUAL:
- inst = BGTZ;
- jump->flags |= IS_BIT26_COND;
- break;
- case SLJIT_C_SIG_GREATER:
- inst = BGEZ;
- jump->flags |= IS_BIT16_COND;
- break;
- case SLJIT_C_SIG_LESS_EQUAL:
- inst = BLTZ;
- jump->flags |= IS_BIT16_COND;
- break;
- }
- src1 = src2;
- }
- else {
- RESOLVE_IMM1();
- switch (type) {
- case SLJIT_C_SIG_LESS:
- inst = BGEZ;
- jump->flags |= IS_BIT16_COND;
- break;
- case SLJIT_C_SIG_GREATER_EQUAL:
- inst = BLTZ;
- jump->flags |= IS_BIT16_COND;
- break;
- case SLJIT_C_SIG_GREATER:
- inst = BLEZ;
- jump->flags |= IS_BIT26_COND;
- break;
- case SLJIT_C_SIG_LESS_EQUAL:
- inst = BGTZ;
- jump->flags |= IS_BIT26_COND;
- break;
- }
- }
- PTR_FAIL_IF(push_inst(compiler, inst | S(src1) | JUMP_LENGTH, UNMOVABLE_INS));
- }
- else {
- if (type == SLJIT_C_LESS || type == SLJIT_C_GREATER_EQUAL || type == SLJIT_C_SIG_LESS || type == SLJIT_C_SIG_GREATER_EQUAL) {
- RESOLVE_IMM1();
- if ((src2 & SLJIT_IMM) && src2w <= SIMM_MAX && src2w >= SIMM_MIN)
- PTR_FAIL_IF(push_inst(compiler, (type <= SLJIT_C_LESS_EQUAL ? SLTIU : SLTI) | S(src1) | T(TMP_REG1) | IMM(src2w), DR(TMP_REG1)));
- else {
- RESOLVE_IMM2();
- PTR_FAIL_IF(push_inst(compiler, (type <= SLJIT_C_LESS_EQUAL ? SLTU : SLT) | S(src1) | T(src2) | D(TMP_REG1), DR(TMP_REG1)));
- }
- type = (type == SLJIT_C_LESS || type == SLJIT_C_SIG_LESS) ? SLJIT_C_NOT_EQUAL : SLJIT_C_EQUAL;
- }
- else {
- RESOLVE_IMM2();
- if ((src1 & SLJIT_IMM) && src1w <= SIMM_MAX && src1w >= SIMM_MIN)
- PTR_FAIL_IF(push_inst(compiler, (type <= SLJIT_C_LESS_EQUAL ? SLTIU : SLTI) | S(src2) | T(TMP_REG1) | IMM(src1w), DR(TMP_REG1)));
- else {
- RESOLVE_IMM1();
- PTR_FAIL_IF(push_inst(compiler, (type <= SLJIT_C_LESS_EQUAL ? SLTU : SLT) | S(src2) | T(src1) | D(TMP_REG1), DR(TMP_REG1)));
- }
- type = (type == SLJIT_C_GREATER || type == SLJIT_C_SIG_GREATER) ? SLJIT_C_NOT_EQUAL : SLJIT_C_EQUAL;
- }
-
- jump->flags |= IS_BIT26_COND;
- PTR_FAIL_IF(push_inst(compiler, (type == SLJIT_C_EQUAL ? BNE : BEQ) | S(TMP_REG1) | TA(0) | JUMP_LENGTH, UNMOVABLE_INS));
- }
-
- PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0));
- PTR_FAIL_IF(push_inst(compiler, JR | S(TMP_REG2), UNMOVABLE_INS));
- jump->addr = compiler->size;
- PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
- return jump;
-}
-
-#undef RESOLVE_IMM1
-#undef RESOLVE_IMM2
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- struct sljit_jump *jump;
- sljit_ins inst;
- int if_true;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- if (src1 > SLJIT_FLOAT_REG4) {
- PTR_FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 1, src1, src1w));
- src1 = TMP_FREG1;
- }
- if (src2 > SLJIT_FLOAT_REG4) {
- PTR_FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG2, 1, src2, src2w));
- src2 = TMP_FREG2;
- }
-
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- PTR_FAIL_IF(!jump);
- set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
- jump->flags |= IS_BIT16_COND;
- type &= 0xff;
-
- switch (type) {
- case SLJIT_C_FLOAT_EQUAL:
- inst = C_UEQ_D;
- if_true = 1;
- break;
- case SLJIT_C_FLOAT_NOT_EQUAL:
- inst = C_UEQ_D;
- if_true = 0;
- break;
- case SLJIT_C_FLOAT_LESS:
- inst = C_ULT_D;
- if_true = 1;
- break;
- case SLJIT_C_FLOAT_GREATER_EQUAL:
- inst = C_ULT_D;
- if_true = 0;
- break;
- case SLJIT_C_FLOAT_GREATER:
- inst = C_ULE_D;
- if_true = 0;
- break;
- case SLJIT_C_FLOAT_LESS_EQUAL:
- inst = C_ULE_D;
- if_true = 1;
- break;
- case SLJIT_C_FLOAT_NAN:
- inst = C_UN_D;
- if_true = 1;
- break;
- case SLJIT_C_FLOAT_NOT_NAN:
- default: /* Make compilers happy. */
- inst = C_UN_D;
- if_true = 0;
- break;
- }
-
- PTR_FAIL_IF(push_inst(compiler, inst | FT(src2) | FS(src1), UNMOVABLE_INS));
- /* Intentionally the other opcode. */
- PTR_FAIL_IF(push_inst(compiler, (if_true ? BC1F : BC1T) | JUMP_LENGTH, UNMOVABLE_INS));
- PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0));
- PTR_FAIL_IF(push_inst(compiler, JR | S(TMP_REG2), UNMOVABLE_INS));
- jump->addr = compiler->size;
- PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
- return jump;
-}
-
-#undef JUMP_LENGTH
-#undef BR_Z
-#undef BR_NZ
-#undef BR_T
-#undef BR_F
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)
-{
- int src_r = TMP_REG2;
- struct sljit_jump *jump = NULL;
-
- CHECK_ERROR();
- check_sljit_emit_ijump(compiler, type, src, srcw);
-
- if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS) {
- if (DR(src) != 4)
- src_r = src;
- else
- FAIL_IF(push_inst(compiler, ADDU_W | S(src) | TA(0) | D(TMP_REG2), DR(TMP_REG2)));
- }
-
- if (type >= SLJIT_CALL0) {
- SLJIT_ASSERT(DR(PIC_ADDR_REG) == 25 && PIC_ADDR_REG == TMP_REG2);
- if (src & (SLJIT_IMM | SLJIT_MEM)) {
- if (src & SLJIT_IMM)
- FAIL_IF(load_immediate(compiler, DR(PIC_ADDR_REG), srcw));
- else {
- SLJIT_ASSERT(src_r == TMP_REG2 && (src & SLJIT_MEM));
- FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
- }
- FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS));
- /* We need an extra instruction in any case. */
- return push_inst(compiler, ADDU_W | S(SLJIT_TEMPORARY_REG1) | TA(0) | DA(4), UNMOVABLE_INS);
- }
-
- /* Register input. */
- if (type >= SLJIT_CALL1)
- FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_TEMPORARY_REG1) | TA(0) | DA(4), 4));
- FAIL_IF(push_inst(compiler, JALR | S(src_r) | DA(RETURN_ADDR_REG), UNMOVABLE_INS));
- return push_inst(compiler, ADDU_W | S(src_r) | TA(0) | D(PIC_ADDR_REG), UNMOVABLE_INS);
- }
-
- if (src & SLJIT_IMM) {
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- FAIL_IF(!jump);
- set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_JAL : 0));
- jump->u.target = srcw;
-
- if (compiler->delay_slot != UNMOVABLE_INS)
- jump->flags |= IS_MOVABLE;
-
- FAIL_IF(emit_const(compiler, TMP_REG2, 0));
- }
- else if (src & SLJIT_MEM)
- FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
-
- FAIL_IF(push_inst(compiler, JR | S(src_r), UNMOVABLE_INS));
- if (jump)
- jump->addr = compiler->size;
- FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)
-{
- int sugg_dst_ar, dst_ar;
-
- CHECK_ERROR();
- check_sljit_emit_cond_value(compiler, op, dst, dstw, type);
-
- if (dst == SLJIT_UNUSED)
- return SLJIT_SUCCESS;
-
- sugg_dst_ar = DR((op == SLJIT_MOV && dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG2);
-
- switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_NOT_EQUAL:
- FAIL_IF(push_inst(compiler, SLTIU | SA(EQUAL_FLAG) | TA(sugg_dst_ar) | IMM(1), sugg_dst_ar));
- dst_ar = sugg_dst_ar;
- break;
- case SLJIT_C_LESS:
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_LESS:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
- dst_ar = ULESS_FLAG;
- break;
- case SLJIT_C_GREATER:
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_GREATER:
- case SLJIT_C_FLOAT_LESS_EQUAL:
- dst_ar = UGREATER_FLAG;
- break;
- case SLJIT_C_SIG_LESS:
- case SLJIT_C_SIG_GREATER_EQUAL:
- dst_ar = LESS_FLAG;
- break;
- case SLJIT_C_SIG_GREATER:
- case SLJIT_C_SIG_LESS_EQUAL:
- dst_ar = GREATER_FLAG;
- break;
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_NOT_OVERFLOW:
- dst_ar = OVERFLOW_FLAG;
- break;
- case SLJIT_C_MUL_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
- FAIL_IF(push_inst(compiler, SLTIU | SA(OVERFLOW_FLAG) | TA(sugg_dst_ar) | IMM(1), sugg_dst_ar));
- dst_ar = sugg_dst_ar;
- type ^= 0x1; /* Flip type bit for the XORI below. */
- break;
- case SLJIT_C_FLOAT_EQUAL:
- case SLJIT_C_FLOAT_NOT_EQUAL:
- dst_ar = EQUAL_FLAG;
- break;
-
- case SLJIT_C_FLOAT_NAN:
- case SLJIT_C_FLOAT_NOT_NAN:
- FAIL_IF(push_inst(compiler, CFC1 | TA(sugg_dst_ar) | DA(FCSR_REG), sugg_dst_ar));
- FAIL_IF(push_inst(compiler, SRL | TA(sugg_dst_ar) | DA(sugg_dst_ar) | SH_IMM(23), sugg_dst_ar));
- FAIL_IF(push_inst(compiler, ANDI | SA(sugg_dst_ar) | TA(sugg_dst_ar) | IMM(1), sugg_dst_ar));
- dst_ar = sugg_dst_ar;
- break;
-
- default:
- SLJIT_ASSERT_STOP();
- dst_ar = sugg_dst_ar;
- break;
- }
-
- if (type & 0x1) {
- FAIL_IF(push_inst(compiler, XORI | SA(dst_ar) | TA(sugg_dst_ar) | IMM(1), sugg_dst_ar));
- dst_ar = sugg_dst_ar;
- }
-
- if (GET_OPCODE(op) == SLJIT_OR) {
- if (DR(TMP_REG2) != dst_ar)
- FAIL_IF(push_inst(compiler, ADDU_W | SA(dst_ar) | TA(0) | D(TMP_REG2), DR(TMP_REG2)));
- return emit_op(compiler, op, CUMULATIVE_OP | LOGICAL_OP | IMM_OP, dst, dstw, dst, dstw, TMP_REG2, 0);
- }
-
- if (dst & SLJIT_MEM)
- return emit_op_mem(compiler, WORD_DATA, dst_ar, dst, dstw);
-
- if (sugg_dst_ar != dst_ar)
- return push_inst(compiler, ADDU_W | SA(dst_ar) | TA(0) | DA(sugg_dst_ar), sugg_dst_ar);
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)
-{
- struct sljit_const *const_;
- int reg;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_const(compiler, dst, dstw, init_value);
-
- const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
- PTR_FAIL_IF(!const_);
- set_const(const_, compiler);
-
- reg = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG2;
-
- PTR_FAIL_IF(emit_const(compiler, reg, init_value));
-
- if (dst & SLJIT_MEM)
- PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0));
- return const_;
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativePPC_32.c b/src/third_party/pcre-8.30/sljit/sljitNativePPC_32.c
deleted file mode 100644
index 82d0508ac17..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativePPC_32.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* ppc 32-bit arch dependent functions. */
-
-static int load_immediate(struct sljit_compiler *compiler, int reg, sljit_w imm)
-{
- if (imm <= SIMM_MAX && imm >= SIMM_MIN)
- return push_inst(compiler, ADDI | D(reg) | A(0) | IMM(imm));
-
- if (!(imm & ~0xffff))
- return push_inst(compiler, ORI | S(ZERO_REG) | A(reg) | IMM(imm));
-
- FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 16)));
- return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)) : SLJIT_SUCCESS;
-}
-
-#define INS_CLEAR_LEFT(dst, src, from) \
- (RLWINM | S(src) | A(dst) | ((from) << 6) | (31 << 1))
-
-static SLJIT_INLINE int emit_single_op(struct sljit_compiler *compiler, int op, int flags,
- int dst, int src1, int src2)
-{
- switch (op) {
- case SLJIT_ADD:
- if (flags & ALT_FORM1) {
- /* Flags does not set: BIN_IMM_EXTS unnecessary. */
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ADDI | D(dst) | A(src1) | compiler->imm);
- }
- if (flags & ALT_FORM2) {
- /* Flags does not set: BIN_IMM_EXTS unnecessary. */
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ADDIS | D(dst) | A(src1) | compiler->imm);
- }
- if (flags & ALT_FORM3) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ADDIC | D(dst) | A(src1) | compiler->imm);
- }
- if (flags & ALT_FORM4) {
- /* Flags does not set: BIN_IMM_EXTS unnecessary. */
- FAIL_IF(push_inst(compiler, ADDI | D(dst) | A(src1) | (compiler->imm & 0xffff)));
- return push_inst(compiler, ADDIS | D(dst) | A(dst) | (((compiler->imm >> 16) & 0xffff) + ((compiler->imm >> 15) & 0x1)));
- }
- if (!(flags & ALT_SET_FLAGS))
- return push_inst(compiler, ADD | D(dst) | A(src1) | B(src2));
- return push_inst(compiler, ADDC | OERC(ALT_SET_FLAGS) | D(dst) | A(src1) | B(src2));
-
- case SLJIT_ADDC:
- if (flags & ALT_FORM1) {
- FAIL_IF(push_inst(compiler, MFXER | S(0)));
- FAIL_IF(push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2)));
- return push_inst(compiler, MTXER | S(0));
- }
- return push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2));
-
- case SLJIT_SUB:
- if (flags & ALT_FORM1) {
- /* Flags does not set: BIN_IMM_EXTS unnecessary. */
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm);
- }
- if (flags & (ALT_FORM2 | ALT_FORM3)) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- if (flags & ALT_FORM2)
- FAIL_IF(push_inst(compiler, CMPI | CRD(0) | A(src1) | compiler->imm));
- if (flags & ALT_FORM3)
- return push_inst(compiler, CMPLI | CRD(4) | A(src1) | compiler->imm);
- return SLJIT_SUCCESS;
- }
- if (flags & (ALT_FORM4 | ALT_FORM5)) {
- if (flags & ALT_FORM4)
- FAIL_IF(push_inst(compiler, CMPL | CRD(4) | A(src1) | B(src2)));
- if (flags & ALT_FORM5)
- FAIL_IF(push_inst(compiler, CMP | CRD(0) | A(src1) | B(src2)));
- return SLJIT_SUCCESS;
- }
- if (!(flags & ALT_SET_FLAGS))
- return push_inst(compiler, SUBF | D(dst) | A(src2) | B(src1));
- if (flags & ALT_FORM6)
- FAIL_IF(push_inst(compiler, CMPL | CRD(4) | A(src1) | B(src2)));
- return push_inst(compiler, SUBFC | OERC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1));
-
- case SLJIT_SUBC:
- if (flags & ALT_FORM1) {
- FAIL_IF(push_inst(compiler, MFXER | S(0)));
- FAIL_IF(push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1)));
- return push_inst(compiler, MTXER | S(0));
- }
- return push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1));
-
- case SLJIT_MUL:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, MULLI | D(dst) | A(src1) | compiler->imm);
- }
- return push_inst(compiler, MULLW | OERC(flags) | D(dst) | A(src2) | B(src1));
-
- case SLJIT_AND:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ANDI | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM2) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ANDIS | S(src1) | A(dst) | compiler->imm);
- }
- return push_inst(compiler, AND | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_OR:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ORI | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM2) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ORIS | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM3) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- FAIL_IF(push_inst(compiler, ORI | S(src1) | A(dst) | IMM(compiler->imm)));
- return push_inst(compiler, ORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
- }
- return push_inst(compiler, OR | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_XOR:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, XORI | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM2) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, XORIS | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM3) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- FAIL_IF(push_inst(compiler, XORI | S(src1) | A(dst) | IMM(compiler->imm)));
- return push_inst(compiler, XORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
- }
- return push_inst(compiler, XOR | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_SHL:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- compiler->imm &= 0x1f;
- return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11) | ((31 - compiler->imm) << 1));
- }
- return push_inst(compiler, SLW | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_LSHR:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- compiler->imm &= 0x1f;
- return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (((32 - compiler->imm) & 0x1f) << 11) | (compiler->imm << 6) | (31 << 1));
- }
- return push_inst(compiler, SRW | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_ASHR:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- compiler->imm &= 0x1f;
- return push_inst(compiler, SRAWI | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11));
- }
- return push_inst(compiler, SRAW | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_MOV:
- case SLJIT_MOV_UI:
- case SLJIT_MOV_SI:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if (dst != src2)
- return push_inst(compiler, OR | S(src2) | A(dst) | B(src2));
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV_UB:
- case SLJIT_MOV_SB:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
- if (op == SLJIT_MOV_SB)
- return push_inst(compiler, EXTSB | S(src2) | A(dst));
- return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 24));
- }
- else if ((flags & REG_DEST) && op == SLJIT_MOV_SB)
- return push_inst(compiler, EXTSB | S(src2) | A(dst));
- else if (dst != src2)
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV_UH:
- case SLJIT_MOV_SH:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
- if (op == SLJIT_MOV_SH)
- return push_inst(compiler, EXTSH | S(src2) | A(dst));
- return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 16));
- }
- else if (dst != src2)
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-
- case SLJIT_NOT:
- SLJIT_ASSERT(src1 == TMP_REG1);
- return push_inst(compiler, NOR | RC(flags) | S(src2) | A(dst) | B(src2));
-
- case SLJIT_NEG:
- SLJIT_ASSERT(src1 == TMP_REG1);
- return push_inst(compiler, NEG | OERC(flags) | D(dst) | A(src2));
-
- case SLJIT_CLZ:
- SLJIT_ASSERT(src1 == TMP_REG1);
- return push_inst(compiler, CNTLZW | RC(flags) | S(src2) | A(dst));
- }
-
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int emit_const(struct sljit_compiler *compiler, int reg, sljit_w init_value)
-{
- FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(init_value >> 16)));
- return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(init_value));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
- sljit_ins *inst = (sljit_ins*)addr;
-
- inst[0] = (inst[0] & 0xffff0000) | ((new_addr >> 16) & 0xffff);
- inst[1] = (inst[1] & 0xffff0000) | (new_addr & 0xffff);
- SLJIT_CACHE_FLUSH(inst, inst + 2);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant)
-{
- sljit_ins *inst = (sljit_ins*)addr;
-
- inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 16) & 0xffff);
- inst[1] = (inst[1] & 0xffff0000) | (new_constant & 0xffff);
- SLJIT_CACHE_FLUSH(inst, inst + 2);
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativePPC_64.c b/src/third_party/pcre-8.30/sljit/sljitNativePPC_64.c
deleted file mode 100644
index cc2ae37eb9b..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativePPC_64.c
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* ppc 64-bit arch dependent functions. */
-
-#ifdef __GNUC__
-#define ASM_SLJIT_CLZ(src, dst) \
- asm volatile ( "cntlzd %0, %1" : "=r"(dst) : "r"(src) )
-#else
-#error "Must implement count leading zeroes"
-#endif
-
-#define RLDI(dst, src, sh, mb, type) \
- (HI(30) | S(src) | A(dst) | ((type) << 2) | (((sh) & 0x1f) << 11) | (((sh) & 0x20) >> 4) | (((mb) & 0x1f) << 6) | ((mb) & 0x20))
-
-#define PUSH_RLDICR(reg, shift) \
- push_inst(compiler, RLDI(reg, reg, 63 - shift, shift, 1))
-
-static int load_immediate(struct sljit_compiler *compiler, int reg, sljit_w imm)
-{
- sljit_uw tmp;
- sljit_uw shift;
- sljit_uw tmp2;
- sljit_uw shift2;
-
- if (imm <= SIMM_MAX && imm >= SIMM_MIN)
- return push_inst(compiler, ADDI | D(reg) | A(0) | IMM(imm));
-
- if (!(imm & ~0xffff))
- return push_inst(compiler, ORI | S(ZERO_REG) | A(reg) | IMM(imm));
-
- if (imm <= SLJIT_W(0x7fffffff) && imm >= SLJIT_W(-0x80000000)) {
- FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 16)));
- return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)) : SLJIT_SUCCESS;
- }
-
- /* Count leading zeroes. */
- tmp = (imm >= 0) ? imm : ~imm;
- ASM_SLJIT_CLZ(tmp, shift);
- SLJIT_ASSERT(shift > 0);
- shift--;
- tmp = (imm << shift);
-
- if ((tmp & ~0xffff000000000000ul) == 0) {
- FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
- shift += 15;
- return PUSH_RLDICR(reg, shift);
- }
-
- if ((tmp & ~0xffffffff00000000ul) == 0) {
- FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(tmp >> 48)));
- FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp >> 32)));
- shift += 31;
- return PUSH_RLDICR(reg, shift);
- }
-
- /* Cut out the 16 bit from immediate. */
- shift += 15;
- tmp2 = imm & ((1ul << (63 - shift)) - 1);
-
- if (tmp2 <= 0xffff) {
- FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
- FAIL_IF(PUSH_RLDICR(reg, shift));
- return push_inst(compiler, ORI | S(reg) | A(reg) | tmp2);
- }
-
- if (tmp2 <= 0xffffffff) {
- FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
- FAIL_IF(PUSH_RLDICR(reg, shift));
- FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | (tmp2 >> 16)));
- return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp2)) : SLJIT_SUCCESS;
- }
-
- ASM_SLJIT_CLZ(tmp2, shift2);
- tmp2 <<= shift2;
-
- if ((tmp2 & ~0xffff000000000000ul) == 0) {
- FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
- shift2 += 15;
- shift += (63 - shift2);
- FAIL_IF(PUSH_RLDICR(reg, shift));
- FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | (tmp2 >> 48)));
- return PUSH_RLDICR(reg, shift2);
- }
-
- /* The general version. */
- FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 48)));
- FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm >> 32)));
- FAIL_IF(PUSH_RLDICR(reg, 31));
- FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | IMM(imm >> 16)));
- return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm));
-}
-
-/* Simplified mnemonics: clrldi. */
-#define INS_CLEAR_LEFT(dst, src, from) \
- (RLDICL | S(src) | A(dst) | ((from) << 6) | (1 << 5))
-
-/* Sign extension for integer operations. */
-#define UN_EXTS() \
- if ((flags & (ALT_SIGN_EXT | REG2_SOURCE)) == (ALT_SIGN_EXT | REG2_SOURCE)) { \
- FAIL_IF(push_inst(compiler, EXTSW | S(src2) | A(TMP_REG2))); \
- src2 = TMP_REG2; \
- }
-
-#define BIN_EXTS() \
- if (flags & ALT_SIGN_EXT) { \
- if (flags & REG1_SOURCE) { \
- FAIL_IF(push_inst(compiler, EXTSW | S(src1) | A(TMP_REG1))); \
- src1 = TMP_REG1; \
- } \
- if (flags & REG2_SOURCE) { \
- FAIL_IF(push_inst(compiler, EXTSW | S(src2) | A(TMP_REG2))); \
- src2 = TMP_REG2; \
- } \
- }
-
-#define BIN_IMM_EXTS() \
- if ((flags & (ALT_SIGN_EXT | REG1_SOURCE)) == (ALT_SIGN_EXT | REG1_SOURCE)) { \
- FAIL_IF(push_inst(compiler, EXTSW | S(src1) | A(TMP_REG1))); \
- src1 = TMP_REG1; \
- }
-
-static SLJIT_INLINE int emit_single_op(struct sljit_compiler *compiler, int op, int flags,
- int dst, int src1, int src2)
-{
- switch (op) {
- case SLJIT_ADD:
- if (flags & ALT_FORM1) {
- /* Flags does not set: BIN_IMM_EXTS unnecessary. */
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ADDI | D(dst) | A(src1) | compiler->imm);
- }
- if (flags & ALT_FORM2) {
- /* Flags does not set: BIN_IMM_EXTS unnecessary. */
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ADDIS | D(dst) | A(src1) | compiler->imm);
- }
- if (flags & ALT_FORM3) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- BIN_IMM_EXTS();
- return push_inst(compiler, ADDIC | D(dst) | A(src1) | compiler->imm);
- }
- if (flags & ALT_FORM4) {
- /* Flags does not set: BIN_IMM_EXTS unnecessary. */
- FAIL_IF(push_inst(compiler, ADDI | D(dst) | A(src1) | (compiler->imm & 0xffff)));
- return push_inst(compiler, ADDIS | D(dst) | A(dst) | (((compiler->imm >> 16) & 0xffff) + ((compiler->imm >> 15) & 0x1)));
- }
- if (!(flags & ALT_SET_FLAGS))
- return push_inst(compiler, ADD | D(dst) | A(src1) | B(src2));
- BIN_EXTS();
- return push_inst(compiler, ADDC | OERC(ALT_SET_FLAGS) | D(dst) | A(src1) | B(src2));
-
- case SLJIT_ADDC:
- if (flags & ALT_FORM1) {
- FAIL_IF(push_inst(compiler, MFXER | S(0)));
- FAIL_IF(push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2)));
- return push_inst(compiler, MTXER | S(0));
- }
- BIN_EXTS();
- return push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2));
-
- case SLJIT_SUB:
- if (flags & ALT_FORM1) {
- /* Flags does not set: BIN_IMM_EXTS unnecessary. */
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm);
- }
- if (flags & (ALT_FORM2 | ALT_FORM3)) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- if (flags & ALT_FORM2)
- FAIL_IF(push_inst(compiler, CMPI | CRD(0 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm));
- if (flags & ALT_FORM3)
- return push_inst(compiler, CMPLI | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm);
- return SLJIT_SUCCESS;
- }
- if (flags & (ALT_FORM4 | ALT_FORM5)) {
- if (flags & ALT_FORM4)
- FAIL_IF(push_inst(compiler, CMPL | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | B(src2)));
- if (flags & ALT_FORM5)
- return push_inst(compiler, CMP | CRD(0 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | B(src2));
- return SLJIT_SUCCESS;
- }
- if (!(flags & ALT_SET_FLAGS))
- return push_inst(compiler, SUBF | D(dst) | A(src2) | B(src1));
- BIN_EXTS();
- if (flags & ALT_FORM6)
- FAIL_IF(push_inst(compiler, CMPL | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | B(src2)));
- return push_inst(compiler, SUBFC | OERC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1));
-
- case SLJIT_SUBC:
- if (flags & ALT_FORM1) {
- FAIL_IF(push_inst(compiler, MFXER | S(0)));
- FAIL_IF(push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1)));
- return push_inst(compiler, MTXER | S(0));
- }
- BIN_EXTS();
- return push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1));
-
- case SLJIT_MUL:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, MULLI | D(dst) | A(src1) | compiler->imm);
- }
- BIN_EXTS();
- if (flags & ALT_FORM2)
- return push_inst(compiler, MULLW | OERC(flags) | D(dst) | A(src2) | B(src1));
- return push_inst(compiler, MULLD | OERC(flags) | D(dst) | A(src2) | B(src1));
-
- case SLJIT_AND:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ANDI | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM2) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ANDIS | S(src1) | A(dst) | compiler->imm);
- }
- return push_inst(compiler, AND | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_OR:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ORI | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM2) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, ORIS | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM3) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- FAIL_IF(push_inst(compiler, ORI | S(src1) | A(dst) | IMM(compiler->imm)));
- return push_inst(compiler, ORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
- }
- return push_inst(compiler, OR | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_XOR:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, XORI | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM2) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- return push_inst(compiler, XORIS | S(src1) | A(dst) | compiler->imm);
- }
- if (flags & ALT_FORM3) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- FAIL_IF(push_inst(compiler, XORI | S(src1) | A(dst) | IMM(compiler->imm)));
- return push_inst(compiler, XORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
- }
- return push_inst(compiler, XOR | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_SHL:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- if (flags & ALT_FORM2) {
- compiler->imm &= 0x1f;
- return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11) | ((31 - compiler->imm) << 1));
- }
- else {
- compiler->imm &= 0x3f;
- return push_inst(compiler, RLDI(dst, src1, compiler->imm, 63 - compiler->imm, 1) | RC(flags));
- }
- }
- if (flags & ALT_FORM2)
- return push_inst(compiler, SLW | RC(flags) | S(src1) | A(dst) | B(src2));
- return push_inst(compiler, SLD | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_LSHR:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- if (flags & ALT_FORM2) {
- compiler->imm &= 0x1f;
- return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (((32 - compiler->imm) & 0x1f) << 11) | (compiler->imm << 6) | (31 << 1));
- }
- else {
- compiler->imm &= 0x3f;
- return push_inst(compiler, RLDI(dst, src1, 64 - compiler->imm, compiler->imm, 0) | RC(flags));
- }
- }
- if (flags & ALT_FORM2)
- return push_inst(compiler, SRW | RC(flags) | S(src1) | A(dst) | B(src2));
- return push_inst(compiler, SRD | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_ASHR:
- if (flags & ALT_FORM1) {
- SLJIT_ASSERT(src2 == TMP_REG2);
- if (flags & ALT_FORM2) {
- compiler->imm &= 0x1f;
- return push_inst(compiler, SRAWI | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11));
- }
- else {
- compiler->imm &= 0x3f;
- return push_inst(compiler, SRADI | RC(flags) | S(src1) | A(dst) | ((compiler->imm & 0x1f) << 11) | ((compiler->imm & 0x20) >> 4));
- }
- }
- if (flags & ALT_FORM2)
- return push_inst(compiler, SRAW | RC(flags) | S(src1) | A(dst) | B(src2));
- return push_inst(compiler, SRAD | RC(flags) | S(src1) | A(dst) | B(src2));
-
- case SLJIT_MOV:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if (dst != src2)
- return push_inst(compiler, OR | S(src2) | A(dst) | B(src2));
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV_UI:
- case SLJIT_MOV_SI:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
- if (op == SLJIT_MOV_SI)
- return push_inst(compiler, EXTSW | S(src2) | A(dst));
- return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 0));
- }
- else if (dst != src2)
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV_UB:
- case SLJIT_MOV_SB:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
- if (op == SLJIT_MOV_SB)
- return push_inst(compiler, EXTSB | S(src2) | A(dst));
- return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 24));
- }
- else if ((flags & REG_DEST) && op == SLJIT_MOV_SB)
- return push_inst(compiler, EXTSB | S(src2) | A(dst));
- else if (dst != src2)
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-
- case SLJIT_MOV_UH:
- case SLJIT_MOV_SH:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
- if (op == SLJIT_MOV_SH)
- return push_inst(compiler, EXTSH | S(src2) | A(dst));
- return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 16));
- }
- else if (dst != src2)
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-
- case SLJIT_NOT:
- SLJIT_ASSERT(src1 == TMP_REG1);
- UN_EXTS();
- return push_inst(compiler, NOR | RC(flags) | S(src2) | A(dst) | B(src2));
-
- case SLJIT_NEG:
- SLJIT_ASSERT(src1 == TMP_REG1);
- UN_EXTS();
- return push_inst(compiler, NEG | OERC(flags) | D(dst) | A(src2));
-
- case SLJIT_CLZ:
- SLJIT_ASSERT(src1 == TMP_REG1);
- if (flags & ALT_FORM1)
- return push_inst(compiler, CNTLZW | RC(flags) | S(src2) | A(dst));
- return push_inst(compiler, CNTLZD | RC(flags) | S(src2) | A(dst));
- }
-
- SLJIT_ASSERT_STOP();
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int emit_const(struct sljit_compiler *compiler, int reg, sljit_w init_value)
-{
- FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(init_value >> 48)));
- FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(init_value >> 32)));
- FAIL_IF(PUSH_RLDICR(reg, 31));
- FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | IMM(init_value >> 16)));
- return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(init_value));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
- sljit_ins *inst = (sljit_ins*)addr;
-
- inst[0] = (inst[0] & 0xffff0000) | ((new_addr >> 48) & 0xffff);
- inst[1] = (inst[1] & 0xffff0000) | ((new_addr >> 32) & 0xffff);
- inst[3] = (inst[3] & 0xffff0000) | ((new_addr >> 16) & 0xffff);
- inst[4] = (inst[4] & 0xffff0000) | (new_addr & 0xffff);
- SLJIT_CACHE_FLUSH(inst, inst + 5);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant)
-{
- sljit_ins *inst = (sljit_ins*)addr;
-
- inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 48) & 0xffff);
- inst[1] = (inst[1] & 0xffff0000) | ((new_constant >> 32) & 0xffff);
- inst[3] = (inst[3] & 0xffff0000) | ((new_constant >> 16) & 0xffff);
- inst[4] = (inst[4] & 0xffff0000) | (new_constant & 0xffff);
- SLJIT_CACHE_FLUSH(inst, inst + 5);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_w addr, void* func)
-{
- sljit_w* ptrs;
- if (func_ptr)
- *func_ptr = (void*)context;
- ptrs = (sljit_w*)func;
- context->addr = addr ? addr : ptrs[0];
- context->r2 = ptrs[1];
- context->r11 = ptrs[2];
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativePPC_common.c b/src/third_party/pcre-8.30/sljit/sljitNativePPC_common.c
deleted file mode 100644
index f0f191de1f0..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativePPC_common.c
+++ /dev/null
@@ -1,1872 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name()
-{
- return "PowerPC" SLJIT_CPUINFO;
-}
-
-/* Length of an instruction word.
- Both for ppc-32 and ppc-64. */
-typedef sljit_ui sljit_ins;
-
-static void ppc_cache_flush(sljit_ins *from, sljit_ins *to)
-{
- while (from < to) {
-#ifdef __GNUC__
- asm volatile ( "icbi 0, %0" : : "r"(from) );
-#else
-#error "Must implement icbi"
-#endif
- from++;
- }
-}
-
-#define TMP_REG1 (SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2 (SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3 (SLJIT_NO_REGISTERS + 3)
-#define ZERO_REG (SLJIT_NO_REGISTERS + 4)
-#define REAL_STACK_PTR (SLJIT_NO_REGISTERS + 5)
-
-#define TMP_FREG1 (SLJIT_FLOAT_REG4 + 1)
-#define TMP_FREG2 (SLJIT_FLOAT_REG4 + 2)
-
-/* --------------------------------------------------------------------- */
-/* Instrucion forms */
-/* --------------------------------------------------------------------- */
-#define D(d) (reg_map[d] << 21)
-#define S(s) (reg_map[s] << 21)
-#define A(a) (reg_map[a] << 16)
-#define B(b) (reg_map[b] << 11)
-#define C(c) (reg_map[c] << 6)
-#define FD(fd) ((fd) << 21)
-#define FA(fa) ((fa) << 16)
-#define FB(fb) ((fb) << 11)
-#define FC(fc) ((fc) << 6)
-#define IMM(imm) ((imm) & 0xffff)
-#define CRD(d) ((d) << 21)
-
-/* Instruction bit sections.
- OE and Rc flag (see ALT_SET_FLAGS). */
-#define OERC(flags) (((flags & ALT_SET_FLAGS) >> 10) | (flags & ALT_SET_FLAGS))
-/* Rc flag (see ALT_SET_FLAGS). */
-#define RC(flags) ((flags & ALT_SET_FLAGS) >> 10)
-#define HI(opcode) ((opcode) << 26)
-#define LO(opcode) ((opcode) << 1)
-
-#define ADD (HI(31) | LO(266))
-#define ADDC (HI(31) | LO(10))
-#define ADDE (HI(31) | LO(138))
-#define ADDI (HI(14))
-#define ADDIC (HI(13))
-#define ADDIS (HI(15))
-#define ADDME (HI(31) | LO(234))
-#define AND (HI(31) | LO(28))
-#define ANDI (HI(28))
-#define ANDIS (HI(29))
-#define Bx (HI(18))
-#define BCx (HI(16))
-#define BCCTR (HI(19) | LO(528) | (3 << 11))
-#define BLR (HI(19) | LO(16) | (0x14 << 21))
-#define CNTLZD (HI(31) | LO(58))
-#define CNTLZW (HI(31) | LO(26))
-#define CMP (HI(31) | LO(0))
-#define CMPI (HI(11))
-#define CMPL (HI(31) | LO(32))
-#define CMPLI (HI(10))
-#define CROR (HI(19) | LO(449))
-#define DIVD (HI(31) | LO(489))
-#define DIVDU (HI(31) | LO(457))
-#define DIVW (HI(31) | LO(491))
-#define DIVWU (HI(31) | LO(459))
-#define EXTSB (HI(31) | LO(954))
-#define EXTSH (HI(31) | LO(922))
-#define EXTSW (HI(31) | LO(986))
-#define FABS (HI(63) | LO(264))
-#define FADD (HI(63) | LO(21))
-#define FCMPU (HI(63) | LO(0))
-#define FDIV (HI(63) | LO(18))
-#define FMR (HI(63) | LO(72))
-#define FMUL (HI(63) | LO(25))
-#define FNEG (HI(63) | LO(40))
-#define FSUB (HI(63) | LO(20))
-#define LD (HI(58) | 0)
-#define LFD (HI(50))
-#define LFDUX (HI(31) | LO(631))
-#define LFDX (HI(31) | LO(599))
-#define LWZ (HI(32))
-#define MFCR (HI(31) | LO(19))
-#define MFLR (HI(31) | LO(339) | 0x80000)
-#define MFXER (HI(31) | LO(339) | 0x10000)
-#define MTCTR (HI(31) | LO(467) | 0x90000)
-#define MTLR (HI(31) | LO(467) | 0x80000)
-#define MTXER (HI(31) | LO(467) | 0x10000)
-#define MULHD (HI(31) | LO(73))
-#define MULHDU (HI(31) | LO(9))
-#define MULHW (HI(31) | LO(75))
-#define MULHWU (HI(31) | LO(11))
-#define MULLD (HI(31) | LO(233))
-#define MULLI (HI(7))
-#define MULLW (HI(31) | LO(235))
-#define NEG (HI(31) | LO(104))
-#define NOP (HI(24))
-#define NOR (HI(31) | LO(124))
-#define OR (HI(31) | LO(444))
-#define ORI (HI(24))
-#define ORIS (HI(25))
-#define RLDICL (HI(30))
-#define RLWINM (HI(21))
-#define SLD (HI(31) | LO(27))
-#define SLW (HI(31) | LO(24))
-#define SRAD (HI(31) | LO(794))
-#define SRADI (HI(31) | LO(413 << 1))
-#define SRAW (HI(31) | LO(792))
-#define SRAWI (HI(31) | LO(824))
-#define SRD (HI(31) | LO(539))
-#define SRW (HI(31) | LO(536))
-#define STD (HI(62) | 0)
-#define STDU (HI(62) | 1)
-#define STDUX (HI(31) | LO(181))
-#define STFD (HI(54))
-#define STFDUX (HI(31) | LO(759))
-#define STFDX (HI(31) | LO(727))
-#define STW (HI(36))
-#define STWU (HI(37))
-#define STWUX (HI(31) | LO(183))
-#define SUBF (HI(31) | LO(40))
-#define SUBFC (HI(31) | LO(8))
-#define SUBFE (HI(31) | LO(136))
-#define SUBFIC (HI(8))
-#define XOR (HI(31) | LO(316))
-#define XORI (HI(26))
-#define XORIS (HI(27))
-
-#define SIMM_MAX (0x7fff)
-#define SIMM_MIN (-0x8000)
-#define UIMM_MAX (0xffff)
-
-/* SLJIT_LOCALS_REG is not the real stack register, since it must
- point to the head of the stack chain. */
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 6] = {
- 0, 3, 4, 5, 6, 7, 29, 28, 27, 26, 25, 31, 8, 9, 10, 30, 1
-};
-
-static int push_inst(struct sljit_compiler *compiler, sljit_ins ins)
-{
- sljit_ins *ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins));
- FAIL_IF(!ptr);
- *ptr = ins;
- compiler->size++;
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int optimize_jump(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code)
-{
- sljit_w diff;
- sljit_uw target_addr;
-
- if (jump->flags & SLJIT_REWRITABLE_JUMP)
- return 0;
-
- if (jump->flags & JUMP_ADDR)
- target_addr = jump->u.target;
- else {
- SLJIT_ASSERT(jump->flags & JUMP_LABEL);
- target_addr = (sljit_uw)(code + jump->u.label->size);
- }
- diff = ((sljit_w)target_addr - (sljit_w)(code_ptr)) & ~0x3l;
-
- if (jump->flags & UNCOND_B) {
- if (diff <= 0x01ffffff && diff >= -0x02000000) {
- jump->flags |= PATCH_B;
- return 1;
- }
- if (target_addr <= 0x03ffffff) {
- jump->flags |= PATCH_B | ABSOLUTE_B;
- return 1;
- }
- }
- else {
- if (diff <= 0x7fff && diff >= -0x8000) {
- jump->flags |= PATCH_B;
- return 1;
- }
- if (target_addr <= 0xffff) {
- jump->flags |= PATCH_B | ABSOLUTE_B;
- return 1;
- }
- }
- return 0;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
- struct sljit_memory_fragment *buf;
- sljit_ins *code;
- sljit_ins *code_ptr;
- sljit_ins *buf_ptr;
- sljit_ins *buf_end;
- sljit_uw word_count;
- sljit_uw addr;
-
- struct sljit_label *label;
- struct sljit_jump *jump;
- struct sljit_const *const_;
-
- CHECK_ERROR_PTR();
- check_sljit_generate_code(compiler);
- reverse_buf(compiler);
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- compiler->size += (compiler->size & 0x1) + (sizeof(struct sljit_function_context) / sizeof(sljit_ins));
-#endif
- code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
- PTR_FAIL_WITH_EXEC_IF(code);
- buf = compiler->buf;
-
- code_ptr = code;
- word_count = 0;
- label = compiler->labels;
- jump = compiler->jumps;
- const_ = compiler->consts;
- do {
- buf_ptr = (sljit_ins*)buf->memory;
- buf_end = buf_ptr + (buf->used_size >> 2);
- do {
- *code_ptr = *buf_ptr++;
- SLJIT_ASSERT(!label || label->size >= word_count);
- SLJIT_ASSERT(!jump || jump->addr >= word_count);
- SLJIT_ASSERT(!const_ || const_->addr >= word_count);
- /* These structures are ordered by their address. */
- if (label && label->size == word_count) {
- /* Just recording the address. */
- label->addr = (sljit_uw)code_ptr;
- label->size = code_ptr - code;
- label = label->next;
- }
- if (jump && jump->addr == word_count) {
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- jump->addr = (sljit_uw)(code_ptr - 3);
-#else
- jump->addr = (sljit_uw)(code_ptr - 6);
-#endif
- if (optimize_jump(jump, code_ptr, code)) {
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- code_ptr[-3] = code_ptr[0];
- code_ptr -= 3;
-#else
- code_ptr[-6] = code_ptr[0];
- code_ptr -= 6;
-#endif
- }
- jump = jump->next;
- }
- if (const_ && const_->addr == word_count) {
- /* Just recording the address. */
- const_->addr = (sljit_uw)code_ptr;
- const_ = const_->next;
- }
- code_ptr ++;
- word_count ++;
- } while (buf_ptr < buf_end);
-
- buf = buf->next;
- } while (buf);
-
- if (label && label->size == word_count) {
- label->addr = (sljit_uw)code_ptr;
- label->size = code_ptr - code;
- label = label->next;
- }
-
- SLJIT_ASSERT(!label);
- SLJIT_ASSERT(!jump);
- SLJIT_ASSERT(!const_);
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- SLJIT_ASSERT(code_ptr - code <= (int)compiler->size - ((compiler->size & 0x1) ? 3 : 2));
-#else
- SLJIT_ASSERT(code_ptr - code <= (int)compiler->size);
-#endif
-
- jump = compiler->jumps;
- while (jump) {
- do {
- addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
- buf_ptr = (sljit_ins*)jump->addr;
- if (jump->flags & PATCH_B) {
- if (jump->flags & UNCOND_B) {
- if (!(jump->flags & ABSOLUTE_B)) {
- addr = addr - jump->addr;
- SLJIT_ASSERT((sljit_w)addr <= 0x01ffffff && (sljit_w)addr >= -0x02000000);
- *buf_ptr = Bx | (addr & 0x03fffffc) | ((*buf_ptr) & 0x1);
- }
- else {
- SLJIT_ASSERT(addr <= 0x03ffffff);
- *buf_ptr = Bx | (addr & 0x03fffffc) | 0x2 | ((*buf_ptr) & 0x1);
- }
- }
- else {
- if (!(jump->flags & ABSOLUTE_B)) {
- addr = addr - jump->addr;
- SLJIT_ASSERT((sljit_w)addr <= 0x7fff && (sljit_w)addr >= -0x8000);
- *buf_ptr = BCx | (addr & 0xfffc) | ((*buf_ptr) & 0x03ff0001);
- }
- else {
- addr = addr & ~0x3l;
- SLJIT_ASSERT(addr <= 0xffff);
- *buf_ptr = BCx | (addr & 0xfffc) | 0x2 | ((*buf_ptr) & 0x03ff0001);
- }
-
- }
- break;
- }
- /* Set the fields of immediate loads. */
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff);
- buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff);
-#else
- buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 48) & 0xffff);
- buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 32) & 0xffff);
- buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | ((addr >> 16) & 0xffff);
- buf_ptr[4] = (buf_ptr[4] & 0xffff0000) | (addr & 0xffff);
-#endif
- } while (0);
- jump = jump->next;
- }
-
- SLJIT_CACHE_FLUSH(code, code_ptr);
- compiler->error = SLJIT_ERR_COMPILED;
- compiler->executable_size = compiler->size * sizeof(sljit_ins);
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- if (((sljit_w)code_ptr) & 0x4)
- code_ptr++;
- sljit_set_function_context(NULL, (struct sljit_function_context*)code_ptr, (sljit_w)code, sljit_generate_code);
- return code_ptr;
-#else
- return code;
-#endif
-}
-
-/* inp_flags: */
-
-/* Creates an index in data_transfer_insts array. */
-#define WORD_DATA 0x00
-#define BYTE_DATA 0x01
-#define HALF_DATA 0x02
-#define INT_DATA 0x03
-#define SIGNED_DATA 0x04
-#define LOAD_DATA 0x08
-#define WRITE_BACK 0x10
-#define INDEXED 0x20
-
-#define MEM_MASK 0x3f
-
-/* Other inp_flags. */
-
-#define ARG_TEST 0x000100
-/* Integer opertion and set flags -> requires exts on 64 bit systems. */
-#define ALT_SIGN_EXT 0x000200
-/* This flag affects the RC() and OERC() macros. */
-#define ALT_SET_FLAGS 0x000400
-#define ALT_FORM1 0x010000
-#define ALT_FORM2 0x020000
-#define ALT_FORM3 0x040000
-#define ALT_FORM4 0x080000
-#define ALT_FORM5 0x100000
-#define ALT_FORM6 0x200000
-
-/* Source and destination is register. */
-#define REG_DEST 0x000001
-#define REG1_SOURCE 0x000002
-#define REG2_SOURCE 0x000004
-/* getput_arg_fast returned true. */
-#define FAST_DEST 0x000008
-/* Multiple instructions are required. */
-#define SLOW_DEST 0x000010
-/*
-ALT_SIGN_EXT 0x000200
-ALT_SET_FLAGS 0x000400
-ALT_FORM1 0x010000
-...
-ALT_FORM6 0x200000 */
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-#include "sljitNativePPC_32.c"
-#else
-#include "sljitNativePPC_64.c"
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-#define STACK_STORE STW
-#define STACK_LOAD LWZ
-#else
-#define STACK_STORE STD
-#define STACK_LOAD LD
-#endif
-
-static int emit_op(struct sljit_compiler *compiler, int op, int inp_flags,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w);
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- CHECK_ERROR();
- check_sljit_emit_enter(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
- compiler->has_locals = local_size > 0;
-
- FAIL_IF(push_inst(compiler, MFLR | D(0)));
- if (compiler->has_locals)
- FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_LOCALS_REG) | A(REAL_STACK_PTR) | IMM(-(int)(sizeof(sljit_w))) ));
- FAIL_IF(push_inst(compiler, STACK_STORE | S(ZERO_REG) | A(REAL_STACK_PTR) | IMM(-2 * (int)(sizeof(sljit_w))) ));
- if (saveds >= 1)
- FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_REG1) | A(REAL_STACK_PTR) | IMM(-3 * (int)(sizeof(sljit_w))) ));
- if (saveds >= 2)
- FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_REG2) | A(REAL_STACK_PTR) | IMM(-4 * (int)(sizeof(sljit_w))) ));
- if (saveds >= 3)
- FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_REG3) | A(REAL_STACK_PTR) | IMM(-5 * (int)(sizeof(sljit_w))) ));
- if (saveds >= 4)
- FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_EREG1) | A(REAL_STACK_PTR) | IMM(-6 * (int)(sizeof(sljit_w))) ));
- if (saveds >= 5)
- FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_EREG2) | A(REAL_STACK_PTR) | IMM(-7 * (int)(sizeof(sljit_w))) ));
- FAIL_IF(push_inst(compiler, STACK_STORE | S(0) | A(REAL_STACK_PTR) | IMM(sizeof(sljit_w)) ));
-
- FAIL_IF(push_inst(compiler, ADDI | D(ZERO_REG) | A(0) | 0));
- if (args >= 1)
- FAIL_IF(push_inst(compiler, OR | S(SLJIT_TEMPORARY_REG1) | A(SLJIT_SAVED_REG1) | B(SLJIT_TEMPORARY_REG1)));
- if (args >= 2)
- FAIL_IF(push_inst(compiler, OR | S(SLJIT_TEMPORARY_REG2) | A(SLJIT_SAVED_REG2) | B(SLJIT_TEMPORARY_REG2)));
- if (args >= 3)
- FAIL_IF(push_inst(compiler, OR | S(SLJIT_TEMPORARY_REG3) | A(SLJIT_SAVED_REG3) | B(SLJIT_TEMPORARY_REG3)));
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- compiler->local_size = (2 + saveds + 2) * sizeof(sljit_w) + local_size;
-#else
- compiler->local_size = (2 + saveds + 7 + 8) * sizeof(sljit_w) + local_size;
-#endif
- compiler->local_size = (compiler->local_size + 15) & ~0xf;
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- if (compiler->local_size <= SIMM_MAX)
- FAIL_IF(push_inst(compiler, STWU | S(REAL_STACK_PTR) | A(REAL_STACK_PTR) | IMM(-compiler->local_size)));
- else {
- FAIL_IF(load_immediate(compiler, 0, -compiler->local_size));
- FAIL_IF(push_inst(compiler, STWUX | S(REAL_STACK_PTR) | A(REAL_STACK_PTR) | B(0)));
- }
- if (compiler->has_locals)
- FAIL_IF(push_inst(compiler, ADDI | D(SLJIT_LOCALS_REG) | A(REAL_STACK_PTR) | IMM(2 * sizeof(sljit_w))));
-#else
- if (compiler->local_size <= SIMM_MAX)
- FAIL_IF(push_inst(compiler, STDU | S(REAL_STACK_PTR) | A(REAL_STACK_PTR) | IMM(-compiler->local_size)));
- else {
- FAIL_IF(load_immediate(compiler, 0, -compiler->local_size));
- FAIL_IF(push_inst(compiler, STDUX | S(REAL_STACK_PTR) | A(REAL_STACK_PTR) | B(0)));
- }
- if (compiler->has_locals)
- FAIL_IF(push_inst(compiler, ADDI | D(SLJIT_LOCALS_REG) | A(REAL_STACK_PTR) | IMM((7 + 8) * sizeof(sljit_w))));
-#endif
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- CHECK_ERROR_VOID();
- check_sljit_set_context(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- compiler->has_locals = local_size > 0;
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- compiler->local_size = (2 + saveds + 2) * sizeof(sljit_w) + local_size;
-#else
- compiler->local_size = (2 + saveds + 7 + 8) * sizeof(sljit_w) + local_size;
-#endif
- compiler->local_size = (compiler->local_size + 15) & ~0xf;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)
-{
- CHECK_ERROR();
- check_sljit_emit_return(compiler, op, src, srcw);
-
- FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-
- if (compiler->local_size <= SIMM_MAX)
- FAIL_IF(push_inst(compiler, ADDI | D(REAL_STACK_PTR) | A(REAL_STACK_PTR) | IMM(compiler->local_size)));
- else {
- FAIL_IF(load_immediate(compiler, 0, compiler->local_size));
- FAIL_IF(push_inst(compiler, ADD | D(REAL_STACK_PTR) | A(REAL_STACK_PTR) | B(0)));
- }
-
- FAIL_IF(push_inst(compiler, STACK_LOAD | D(0) | A(REAL_STACK_PTR) | IMM(sizeof(sljit_w))));
- if (compiler->saveds >= 5)
- FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_EREG2) | A(REAL_STACK_PTR) | IMM(-7 * (int)(sizeof(sljit_w))) ));
- if (compiler->saveds >= 4)
- FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_EREG1) | A(REAL_STACK_PTR) | IMM(-6 * (int)(sizeof(sljit_w))) ));
- if (compiler->saveds >= 3)
- FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_REG3) | A(REAL_STACK_PTR) | IMM(-5 * (int)(sizeof(sljit_w))) ));
- if (compiler->saveds >= 2)
- FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_REG2) | A(REAL_STACK_PTR) | IMM(-4 * (int)(sizeof(sljit_w))) ));
- if (compiler->saveds >= 1)
- FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_REG1) | A(REAL_STACK_PTR) | IMM(-3 * (int)(sizeof(sljit_w))) ));
- FAIL_IF(push_inst(compiler, STACK_LOAD | D(ZERO_REG) | A(REAL_STACK_PTR) | IMM(-2 * (int)(sizeof(sljit_w))) ));
- if (compiler->has_locals)
- FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_LOCALS_REG) | A(REAL_STACK_PTR) | IMM(-(int)(sizeof(sljit_w))) ));
-
- FAIL_IF(push_inst(compiler, MTLR | S(0)));
- FAIL_IF(push_inst(compiler, BLR));
-
- return SLJIT_SUCCESS;
-}
-
-#undef STACK_STORE
-#undef STACK_LOAD
-
-/* --------------------------------------------------------------------- */
-/* Operators */
-/* --------------------------------------------------------------------- */
-
-/* i/x - immediate/indexed form
- n/w - no write-back / write-back (1 bit)
- s/l - store/load (1 bit)
- u/s - signed/unsigned (1 bit)
- w/b/h/i - word/byte/half/int allowed (2 bit)
- It contans 32 items, but not all are different. */
-
-/* 64 bit only: [reg+imm] must be aligned to 4 bytes. */
-#define ADDR_MODE2 0x10000
-/* 64-bit only: there is no lwau instruction. */
-#define UPDATE_REQ 0x20000
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-#define ARCH_DEPEND(a, b) a
-#define GET_INST_CODE(inst) (inst)
-#else
-#define ARCH_DEPEND(a, b) b
-#define GET_INST_CODE(index) ((inst) & ~(ADDR_MODE2 | UPDATE_REQ))
-#endif
-
-static SLJIT_CONST sljit_ins data_transfer_insts[64] = {
-
-/* No write-back. */
-
-/* i n s u w */ ARCH_DEPEND(HI(36) /* stw */, HI(62) | ADDR_MODE2 | 0x0 /* std */),
-/* i n s u b */ HI(38) /* stb */,
-/* i n s u h */ HI(44) /* sth*/,
-/* i n s u i */ HI(36) /* stw */,
-
-/* i n s s w */ ARCH_DEPEND(HI(36) /* stw */, HI(62) | ADDR_MODE2 | 0x0 /* std */),
-/* i n s s b */ HI(38) /* stb */,
-/* i n s s h */ HI(44) /* sth*/,
-/* i n s s i */ HI(36) /* stw */,
-
-/* i n l u w */ ARCH_DEPEND(HI(32) /* lwz */, HI(58) | ADDR_MODE2 | 0x0 /* ld */),
-/* i n l u b */ HI(34) /* lbz */,
-/* i n l u h */ HI(40) /* lhz */,
-/* i n l u i */ HI(32) /* lwz */,
-
-/* i n l s w */ ARCH_DEPEND(HI(32) /* lwz */, HI(58) | ADDR_MODE2 | 0x0 /* ld */),
-/* i n l s b */ HI(34) /* lbz */ /* EXTS_REQ */,
-/* i n l s h */ HI(42) /* lha */,
-/* i n l s i */ ARCH_DEPEND(HI(32) /* lwz */, HI(58) | ADDR_MODE2 | 0x2 /* lwa */),
-
-/* Write-back. */
-
-/* i w s u w */ ARCH_DEPEND(HI(37) /* stwu */, HI(62) | ADDR_MODE2 | 0x1 /* stdu */),
-/* i w s u b */ HI(39) /* stbu */,
-/* i w s u h */ HI(45) /* sthu */,
-/* i w s u i */ HI(37) /* stwu */,
-
-/* i w s s w */ ARCH_DEPEND(HI(37) /* stwu */, HI(62) | ADDR_MODE2 | 0x1 /* stdu */),
-/* i w s s b */ HI(39) /* stbu */,
-/* i w s s h */ HI(45) /* sthu */,
-/* i w s s i */ HI(37) /* stwu */,
-
-/* i w l u w */ ARCH_DEPEND(HI(33) /* lwzu */, HI(58) | ADDR_MODE2 | 0x1 /* ldu */),
-/* i w l u b */ HI(35) /* lbzu */,
-/* i w l u h */ HI(41) /* lhzu */,
-/* i w l u i */ HI(33) /* lwzu */,
-
-/* i w l s w */ ARCH_DEPEND(HI(33) /* lwzu */, HI(58) | ADDR_MODE2 | 0x1 /* ldu */),
-/* i w l s b */ HI(35) /* lbzu */ /* EXTS_REQ */,
-/* i w l s h */ HI(43) /* lhau */,
-/* i w l s i */ ARCH_DEPEND(HI(33) /* lwzu */, HI(58) | ADDR_MODE2 | UPDATE_REQ | 0x2 /* lwa */),
-
-/* ---------- */
-/* Indexed */
-/* ---------- */
-
-/* No write-back. */
-
-/* x n s u w */ ARCH_DEPEND(HI(31) | LO(151) /* stwx */, HI(31) | LO(149) /* stdx */),
-/* x n s u b */ HI(31) | LO(215) /* stbx */,
-/* x n s u h */ HI(31) | LO(407) /* sthx */,
-/* x n s u i */ HI(31) | LO(151) /* stwx */,
-
-/* x n s s w */ ARCH_DEPEND(HI(31) | LO(151) /* stwx */, HI(31) | LO(149) /* stdx */),
-/* x n s s b */ HI(31) | LO(215) /* stbx */,
-/* x n s s h */ HI(31) | LO(407) /* sthx */,
-/* x n s s i */ HI(31) | LO(151) /* stwx */,
-
-/* x n l u w */ ARCH_DEPEND(HI(31) | LO(23) /* lwzx */, HI(31) | LO(21) /* ldx */),
-/* x n l u b */ HI(31) | LO(87) /* lbzx */,
-/* x n l u h */ HI(31) | LO(279) /* lhzx */,
-/* x n l u i */ HI(31) | LO(23) /* lwzx */,
-
-/* x n l s w */ ARCH_DEPEND(HI(31) | LO(23) /* lwzx */, HI(31) | LO(21) /* ldx */),
-/* x n l s b */ HI(31) | LO(87) /* lbzx */ /* EXTS_REQ */,
-/* x n l s h */ HI(31) | LO(343) /* lhax */,
-/* x n l s i */ ARCH_DEPEND(HI(31) | LO(23) /* lwzx */, HI(31) | LO(341) /* lwax */),
-
-/* Write-back. */
-
-/* x w s u w */ ARCH_DEPEND(HI(31) | LO(183) /* stwux */, HI(31) | LO(181) /* stdux */),
-/* x w s u b */ HI(31) | LO(247) /* stbux */,
-/* x w s u h */ HI(31) | LO(439) /* sthux */,
-/* x w s u i */ HI(31) | LO(183) /* stwux */,
-
-/* x w s s w */ ARCH_DEPEND(HI(31) | LO(183) /* stwux */, HI(31) | LO(181) /* stdux */),
-/* x w s s b */ HI(31) | LO(247) /* stbux */,
-/* x w s s h */ HI(31) | LO(439) /* sthux */,
-/* x w s s i */ HI(31) | LO(183) /* stwux */,
-
-/* x w l u w */ ARCH_DEPEND(HI(31) | LO(55) /* lwzux */, HI(31) | LO(53) /* ldux */),
-/* x w l u b */ HI(31) | LO(119) /* lbzux */,
-/* x w l u h */ HI(31) | LO(311) /* lhzux */,
-/* x w l u i */ HI(31) | LO(55) /* lwzux */,
-
-/* x w l s w */ ARCH_DEPEND(HI(31) | LO(55) /* lwzux */, HI(31) | LO(53) /* ldux */),
-/* x w l s b */ HI(31) | LO(119) /* lbzux */ /* EXTS_REQ */,
-/* x w l s h */ HI(31) | LO(375) /* lhaux */,
-/* x w l s i */ ARCH_DEPEND(HI(31) | LO(55) /* lwzux */, HI(31) | LO(373) /* lwaux */)
-
-};
-
-#undef ARCH_DEPEND
-
-/* Simple cases, (no caching is required). */
-static int getput_arg_fast(struct sljit_compiler *compiler, int inp_flags, int reg, int arg, sljit_w argw)
-{
- sljit_ins inst;
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- int tmp_reg;
-#endif
-
- SLJIT_ASSERT(arg & SLJIT_MEM);
- if (!(arg & 0xf)) {
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- if (argw <= SIMM_MAX && argw >= SIMM_MIN) {
- if (inp_flags & ARG_TEST)
- return 1;
-
- inst = data_transfer_insts[(inp_flags & ~WRITE_BACK) & MEM_MASK];
- SLJIT_ASSERT(!(inst & (ADDR_MODE2 | UPDATE_REQ)));
- push_inst(compiler, GET_INST_CODE(inst) | D(reg) | IMM(argw));
- return -1;
- }
-#else
- inst = data_transfer_insts[(inp_flags & ~WRITE_BACK) & MEM_MASK];
- if (argw <= SIMM_MAX && argw >= SIMM_MIN &&
- (!(inst & ADDR_MODE2) || (argw & 0x3) == 0)) {
- if (inp_flags & ARG_TEST)
- return 1;
-
- push_inst(compiler, GET_INST_CODE(inst) | D(reg) | IMM(argw));
- return -1;
- }
-#endif
- return (inp_flags & ARG_TEST) ? SLJIT_SUCCESS : 0;
- }
-
- if (!(arg & 0xf0)) {
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- if (argw <= SIMM_MAX && argw >= SIMM_MIN) {
- if (inp_flags & ARG_TEST)
- return 1;
-
- inst = data_transfer_insts[inp_flags & MEM_MASK];
- SLJIT_ASSERT(!(inst & (ADDR_MODE2 | UPDATE_REQ)));
- push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(arg & 0xf) | IMM(argw));
- return -1;
- }
-#else
- inst = data_transfer_insts[inp_flags & MEM_MASK];
- if (argw <= SIMM_MAX && argw >= SIMM_MIN && (!(inst & ADDR_MODE2) || (argw & 0x3) == 0)) {
- if (inp_flags & ARG_TEST)
- return 1;
-
- if ((inp_flags & WRITE_BACK) && (inst & UPDATE_REQ)) {
- tmp_reg = (inp_flags & LOAD_DATA) ? (arg & 0xf) : TMP_REG3;
- if (push_inst(compiler, ADDI | D(tmp_reg) | A(arg & 0xf) | IMM(argw)))
- return -1;
- arg = tmp_reg | SLJIT_MEM;
- argw = 0;
- }
- push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(arg & 0xf) | IMM(argw));
- return -1;
- }
-#endif
- }
- else if (!(argw & 0x3)) {
- if (inp_flags & ARG_TEST)
- return 1;
- inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
- SLJIT_ASSERT(!(inst & (ADDR_MODE2 | UPDATE_REQ)));
- push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(arg & 0xf) | B((arg >> 4) & 0xf));
- return -1;
- }
- return (inp_flags & ARG_TEST) ? SLJIT_SUCCESS : 0;
-}
-
-/* See getput_arg below.
- Note: can_cache is called only for binary operators. Those operator always
- uses word arguments without write back. */
-static int can_cache(int arg, sljit_w argw, int next_arg, sljit_w next_argw)
-{
- SLJIT_ASSERT(arg & SLJIT_MEM);
- SLJIT_ASSERT(next_arg & SLJIT_MEM);
-
- if (!(arg & 0xf)) {
- if ((next_arg & SLJIT_MEM) && ((sljit_uw)argw - (sljit_uw)next_argw <= SIMM_MAX || (sljit_uw)next_argw - (sljit_uw)argw <= SIMM_MAX))
- return 1;
- return 0;
- }
-
- if (arg & 0xf0)
- return 0;
-
- if (argw <= SIMM_MAX && argw >= SIMM_MIN) {
- if (arg == next_arg && (next_argw >= SIMM_MAX && next_argw <= SIMM_MIN))
- return 1;
- }
-
- if (arg == next_arg && ((sljit_uw)argw - (sljit_uw)next_argw <= SIMM_MAX || (sljit_uw)next_argw - (sljit_uw)argw <= SIMM_MAX))
- return 1;
-
- return 0;
-}
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define ADJUST_CACHED_IMM(imm) \
- if ((inst & ADDR_MODE2) && (imm & 0x3)) { \
- /* Adjust cached value. Fortunately this is really a rare case */ \
- compiler->cache_argw += imm & 0x3; \
- FAIL_IF(push_inst(compiler, ADDI | D(TMP_REG3) | A(TMP_REG3) | (imm & 0x3))); \
- imm &= ~0x3; \
- }
-#else
-#define ADJUST_CACHED_IMM(imm)
-#endif
-
-/* Emit the necessary instructions. See can_cache above. */
-static int getput_arg(struct sljit_compiler *compiler, int inp_flags, int reg, int arg, sljit_w argw, int next_arg, sljit_w next_argw)
-{
- int tmp_r;
- sljit_ins inst;
-
- SLJIT_ASSERT(arg & SLJIT_MEM);
-
- tmp_r = (inp_flags & LOAD_DATA) ? reg : TMP_REG3;
- if ((arg & 0xf) == tmp_r) {
- /* Special case for "mov reg, [reg, ... ]".
- Caching would not happen anyway. */
- tmp_r = TMP_REG3;
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- }
-
- if (!(arg & 0xf)) {
- inst = data_transfer_insts[(inp_flags & ~WRITE_BACK) & MEM_MASK];
- if ((compiler->cache_arg & SLJIT_IMM) && (((sljit_uw)argw - (sljit_uw)compiler->cache_argw) <= SIMM_MAX || ((sljit_uw)compiler->cache_argw - (sljit_uw)argw) <= SIMM_MAX)) {
- argw = argw - compiler->cache_argw;
- ADJUST_CACHED_IMM(argw);
- SLJIT_ASSERT(!(inst & UPDATE_REQ));
- return push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(TMP_REG3) | IMM(argw));
- }
-
- if ((next_arg & SLJIT_MEM) && (argw - next_argw <= SIMM_MAX || next_argw - argw <= SIMM_MAX)) {
- SLJIT_ASSERT(inp_flags & LOAD_DATA);
-
- compiler->cache_arg = SLJIT_IMM;
- compiler->cache_argw = argw;
- tmp_r = TMP_REG3;
- }
-
- FAIL_IF(load_immediate(compiler, tmp_r, argw));
- return push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(tmp_r));
- }
-
- if (SLJIT_UNLIKELY(arg & 0xf0)) {
- argw &= 0x3;
- /* Otherwise getput_arg_fast would capture it. */
- SLJIT_ASSERT(argw);
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- FAIL_IF(push_inst(compiler, RLWINM | S((arg >> 4) & 0xf) | A(tmp_r) | (argw << 11) | ((31 - argw) << 1)));
-#else
- FAIL_IF(push_inst(compiler, RLDI(tmp_r, (arg >> 4) & 0xf, argw, 63 - argw, 1)));
-#endif
- inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
- SLJIT_ASSERT(!(inst & (ADDR_MODE2 | UPDATE_REQ)));
- return push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(arg & 0xf) | B(tmp_r));
- }
-
- inst = data_transfer_insts[inp_flags & MEM_MASK];
-
- if (compiler->cache_arg == arg && ((sljit_uw)argw - (sljit_uw)compiler->cache_argw <= SIMM_MAX || (sljit_uw)compiler->cache_argw - (sljit_uw)argw <= SIMM_MAX)) {
- SLJIT_ASSERT(!(inp_flags & WRITE_BACK));
- argw = argw - compiler->cache_argw;
- ADJUST_CACHED_IMM(argw);
- return push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(TMP_REG3) | IMM(argw));
- }
-
- if ((compiler->cache_arg & SLJIT_IMM) && compiler->cache_argw == argw) {
- inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
- SLJIT_ASSERT(!(inst & (ADDR_MODE2 | UPDATE_REQ)));
- return push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(arg & 0xf) | B(TMP_REG3));
- }
-
- if (argw == next_argw && (next_arg & SLJIT_MEM)) {
- SLJIT_ASSERT(inp_flags & LOAD_DATA);
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
-
- compiler->cache_arg = SLJIT_IMM;
- compiler->cache_argw = argw;
-
- inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
- SLJIT_ASSERT(!(inst & (ADDR_MODE2 | UPDATE_REQ)));
- return push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(arg & 0xf) | B(TMP_REG3));
- }
-
- if (arg == next_arg && !(inp_flags & WRITE_BACK) && ((sljit_uw)argw - (sljit_uw)next_argw <= SIMM_MAX || (sljit_uw)next_argw - (sljit_uw)argw <= SIMM_MAX)) {
- SLJIT_ASSERT(inp_flags & LOAD_DATA);
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
- FAIL_IF(push_inst(compiler, ADD | D(TMP_REG3) | A(TMP_REG3) | B(arg & 0xf)));
-
- compiler->cache_arg = arg;
- compiler->cache_argw = argw;
-
- return push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(TMP_REG3));
- }
-
- /* Get the indexed version instead of the normal one. */
- inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
- SLJIT_ASSERT(!(inst & (ADDR_MODE2 | UPDATE_REQ)));
- FAIL_IF(load_immediate(compiler, tmp_r, argw));
- return push_inst(compiler, GET_INST_CODE(inst) | D(reg) | A(arg & 0xf) | B(tmp_r));
-}
-
-static int emit_op(struct sljit_compiler *compiler, int op, int inp_flags,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- /* arg1 goes to TMP_REG1 or src reg
- arg2 goes to TMP_REG2, imm or src reg
- TMP_REG3 can be used for caching
- result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
- int dst_r;
- int src1_r;
- int src2_r;
- int sugg_src2_r = TMP_REG2;
- int flags = inp_flags & (ALT_FORM1 | ALT_FORM2 | ALT_FORM3 | ALT_FORM4 | ALT_FORM5 | ALT_FORM6 | ALT_SIGN_EXT | ALT_SET_FLAGS);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- /* Destination check. */
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= ZERO_REG) {
- dst_r = dst;
- flags |= REG_DEST;
- if (op >= SLJIT_MOV && op <= SLJIT_MOVU_SI)
- sugg_src2_r = dst_r;
- }
- else if (dst == SLJIT_UNUSED) {
- if (op >= SLJIT_MOV && op <= SLJIT_MOVU_SI && !(src2 & SLJIT_MEM))
- return SLJIT_SUCCESS;
- dst_r = TMP_REG2;
- }
- else {
- SLJIT_ASSERT(dst & SLJIT_MEM);
- if (getput_arg_fast(compiler, inp_flags | ARG_TEST, TMP_REG2, dst, dstw)) {
- flags |= FAST_DEST;
- dst_r = TMP_REG2;
- }
- else {
- flags |= SLOW_DEST;
- dst_r = 0;
- }
- }
-
- /* Source 1. */
- if (src1 >= SLJIT_TEMPORARY_REG1 && src1 <= ZERO_REG) {
- src1_r = src1;
- flags |= REG1_SOURCE;
- }
- else if (src1 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- if ((inp_flags & 0x3) == INT_DATA) {
- if (inp_flags & SIGNED_DATA)
- src1w = (signed int)src1w;
- else
- src1w = (unsigned int)src1w;
- }
-#endif
- FAIL_IF(load_immediate(compiler, TMP_REG1, src1w));
- src1_r = TMP_REG1;
- }
- else if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w)) {
- FAIL_IF(compiler->error);
- src1_r = TMP_REG1;
- }
- else
- src1_r = 0;
-
- /* Source 2. */
- if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= ZERO_REG) {
- src2_r = src2;
- flags |= REG2_SOURCE;
- if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_SI)
- dst_r = src2_r;
- }
- else if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- if ((inp_flags & 0x3) == INT_DATA) {
- if (inp_flags & SIGNED_DATA)
- src2w = (signed int)src2w;
- else
- src2w = (unsigned int)src2w;
- }
-#endif
- FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w));
- src2_r = sugg_src2_r;
- }
- else if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w)) {
- FAIL_IF(compiler->error);
- src2_r = sugg_src2_r;
- }
- else
- src2_r = 0;
-
- /* src1_r, src2_r and dst_r can be zero (=unprocessed).
- All arguments are complex addressing modes, and it is a binary operator. */
- if (src1_r == 0 && src2_r == 0 && dst_r == 0) {
- if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src2, src2w, src1, src1w));
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
- }
- else {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw));
- }
- src1_r = TMP_REG1;
- src2_r = TMP_REG2;
- }
- else if (src1_r == 0 && src2_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
- src1_r = TMP_REG1;
- }
- else if (src1_r == 0 && dst_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
- src1_r = TMP_REG1;
- }
- else if (src2_r == 0 && dst_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw));
- src2_r = sugg_src2_r;
- }
-
- if (dst_r == 0)
- dst_r = TMP_REG2;
-
- if (src1_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, 0, 0));
- src1_r = TMP_REG1;
- }
-
- if (src2_r == 0) {
- FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, 0, 0));
- src2_r = sugg_src2_r;
- }
-
- FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
-
- if (flags & (FAST_DEST | SLOW_DEST)) {
- if (flags & FAST_DEST)
- FAIL_IF(getput_arg_fast(compiler, inp_flags, dst_r, dst, dstw));
- else
- FAIL_IF(getput_arg(compiler, inp_flags, dst_r, dst, dstw, 0, 0));
- }
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op)
-{
- CHECK_ERROR();
- check_sljit_emit_op0(compiler, op);
-
- switch (GET_OPCODE(op)) {
- case SLJIT_BREAKPOINT:
- case SLJIT_NOP:
- return push_inst(compiler, NOP);
- break;
- case SLJIT_UMUL:
- case SLJIT_SMUL:
- FAIL_IF(push_inst(compiler, OR | S(SLJIT_TEMPORARY_REG1) | A(TMP_REG1) | B(SLJIT_TEMPORARY_REG1)));
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- FAIL_IF(push_inst(compiler, MULLD | D(SLJIT_TEMPORARY_REG1) | A(TMP_REG1) | B(SLJIT_TEMPORARY_REG2)));
- return push_inst(compiler, (GET_OPCODE(op) == SLJIT_UMUL ? MULHDU : MULHD) | D(SLJIT_TEMPORARY_REG2) | A(TMP_REG1) | B(SLJIT_TEMPORARY_REG2));
-#else
- FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_TEMPORARY_REG1) | A(TMP_REG1) | B(SLJIT_TEMPORARY_REG2)));
- return push_inst(compiler, (GET_OPCODE(op) == SLJIT_UMUL ? MULHWU : MULHW) | D(SLJIT_TEMPORARY_REG2) | A(TMP_REG1) | B(SLJIT_TEMPORARY_REG2));
-#endif
- case SLJIT_UDIV:
- case SLJIT_SDIV:
- FAIL_IF(push_inst(compiler, OR | S(SLJIT_TEMPORARY_REG1) | A(TMP_REG1) | B(SLJIT_TEMPORARY_REG1)));
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- if (op & SLJIT_INT_OP) {
- FAIL_IF(push_inst(compiler, (GET_OPCODE(op) == SLJIT_UDIV ? DIVWU : DIVW) | D(SLJIT_TEMPORARY_REG1) | A(TMP_REG1) | B(SLJIT_TEMPORARY_REG2)));
- FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_TEMPORARY_REG2) | A(SLJIT_TEMPORARY_REG1) | B(SLJIT_TEMPORARY_REG2)));
- return push_inst(compiler, SUBF | D(SLJIT_TEMPORARY_REG2) | A(SLJIT_TEMPORARY_REG2) | B(TMP_REG1));
- }
- FAIL_IF(push_inst(compiler, (GET_OPCODE(op) == SLJIT_UDIV ? DIVDU : DIVD) | D(SLJIT_TEMPORARY_REG1) | A(TMP_REG1) | B(SLJIT_TEMPORARY_REG2)));
- FAIL_IF(push_inst(compiler, MULLD | D(SLJIT_TEMPORARY_REG2) | A(SLJIT_TEMPORARY_REG1) | B(SLJIT_TEMPORARY_REG2)));
- return push_inst(compiler, SUBF | D(SLJIT_TEMPORARY_REG2) | A(SLJIT_TEMPORARY_REG2) | B(TMP_REG1));
-#else
- FAIL_IF(push_inst(compiler, (GET_OPCODE(op) == SLJIT_UDIV ? DIVWU : DIVW) | D(SLJIT_TEMPORARY_REG1) | A(TMP_REG1) | B(SLJIT_TEMPORARY_REG2)));
- FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_TEMPORARY_REG2) | A(SLJIT_TEMPORARY_REG1) | B(SLJIT_TEMPORARY_REG2)));
- return push_inst(compiler, SUBF | D(SLJIT_TEMPORARY_REG2) | A(SLJIT_TEMPORARY_REG2) | B(TMP_REG1));
-#endif
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- int inp_flags = GET_FLAGS(op) ? ALT_SET_FLAGS : 0;
-
- CHECK_ERROR();
- check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
-
- if ((src & SLJIT_IMM) && srcw == 0)
- src = ZERO_REG;
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- if (op & SLJIT_INT_OP) {
- inp_flags |= INT_DATA | SIGNED_DATA;
- if (src & SLJIT_IMM)
- srcw = (int)srcw;
- }
-#endif
- if (op & SLJIT_SET_O)
- FAIL_IF(push_inst(compiler, MTXER | S(ZERO_REG)));
-
- switch (GET_OPCODE(op)) {
- case SLJIT_MOV:
- return emit_op(compiler, SLJIT_MOV, inp_flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOV_UI:
- return emit_op(compiler, SLJIT_MOV_UI, inp_flags | INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOV_SI:
- return emit_op(compiler, SLJIT_MOV_SI, inp_flags | INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOV_UB:
- return emit_op(compiler, SLJIT_MOV_UB, inp_flags | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned char)srcw : srcw);
-
- case SLJIT_MOV_SB:
- return emit_op(compiler, SLJIT_MOV_SB, inp_flags | BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed char)srcw : srcw);
-
- case SLJIT_MOV_UH:
- return emit_op(compiler, SLJIT_MOV_UH, inp_flags | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned short)srcw : srcw);
-
- case SLJIT_MOV_SH:
- return emit_op(compiler, SLJIT_MOV_SH, inp_flags | HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed short)srcw : srcw);
-
- case SLJIT_MOVU:
- return emit_op(compiler, SLJIT_MOV, inp_flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOVU_UI:
- return emit_op(compiler, SLJIT_MOV_UI, inp_flags | INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOVU_SI:
- return emit_op(compiler, SLJIT_MOV_SI, inp_flags | INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_MOVU_UB:
- return emit_op(compiler, SLJIT_MOV_UB, inp_flags | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned char)srcw : srcw);
-
- case SLJIT_MOVU_SB:
- return emit_op(compiler, SLJIT_MOV_SB, inp_flags | BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed char)srcw : srcw);
-
- case SLJIT_MOVU_UH:
- return emit_op(compiler, SLJIT_MOV_UH, inp_flags | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (unsigned short)srcw : srcw);
-
- case SLJIT_MOVU_SH:
- return emit_op(compiler, SLJIT_MOV_SH, inp_flags | HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (signed short)srcw : srcw);
-
- case SLJIT_NOT:
- return emit_op(compiler, SLJIT_NOT, inp_flags, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_NEG:
- return emit_op(compiler, SLJIT_NEG, inp_flags, dst, dstw, TMP_REG1, 0, src, srcw);
-
- case SLJIT_CLZ:
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- return emit_op(compiler, SLJIT_CLZ, inp_flags | (!(op & SLJIT_INT_OP) ? 0 : ALT_FORM1), dst, dstw, TMP_REG1, 0, src, srcw);
-#else
- return emit_op(compiler, SLJIT_CLZ, inp_flags, dst, dstw, TMP_REG1, 0, src, srcw);
-#endif
- }
-
- return SLJIT_SUCCESS;
-}
-
-#define TEST_SL_IMM(src, srcw) \
- (((src) & SLJIT_IMM) && (srcw) <= SIMM_MAX && (srcw) >= SIMM_MIN)
-
-#define TEST_UL_IMM(src, srcw) \
- (((src) & SLJIT_IMM) && !((srcw) & ~0xffff))
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define TEST_SH_IMM(src, srcw) \
- (((src) & SLJIT_IMM) && !((srcw) & 0xffff) && (srcw) <= SLJIT_W(0x7fffffff) && (srcw) >= SLJIT_W(-0x80000000))
-#else
-#define TEST_SH_IMM(src, srcw) \
- (((src) & SLJIT_IMM) && !((srcw) & 0xffff))
-#endif
-
-#define TEST_UH_IMM(src, srcw) \
- (((src) & SLJIT_IMM) && !((srcw) & ~0xffff0000))
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define TEST_ADD_IMM(src, srcw) \
- (((src) & SLJIT_IMM) && (srcw) <= SLJIT_W(0x7fff7fff) && (srcw) >= SLJIT_W(-0x80000000))
-#else
-#define TEST_ADD_IMM(src, srcw) \
- ((src) & SLJIT_IMM)
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define TEST_UI_IMM(src, srcw) \
- (((src) & SLJIT_IMM) && !((srcw) & ~0xffffffff))
-#else
-#define TEST_UI_IMM(src, srcw) \
- ((src) & SLJIT_IMM)
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- int inp_flags = GET_FLAGS(op) ? ALT_SET_FLAGS : 0;
-
- CHECK_ERROR();
- check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
- if ((src1 & SLJIT_IMM) && src1w == 0)
- src1 = ZERO_REG;
- if ((src2 & SLJIT_IMM) && src2w == 0)
- src2 = ZERO_REG;
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- if (op & SLJIT_INT_OP) {
- inp_flags |= INT_DATA | SIGNED_DATA;
- if (src1 & SLJIT_IMM)
- src1w = (src1w << 32) >> 32;
- if (src2 & SLJIT_IMM)
- src2w = (src2w << 32) >> 32;
- if (GET_FLAGS(op))
- inp_flags |= ALT_SIGN_EXT;
- }
-#endif
- if (op & SLJIT_SET_O)
- FAIL_IF(push_inst(compiler, MTXER | S(ZERO_REG)));
-
- switch (GET_OPCODE(op)) {
- case SLJIT_ADD:
- if (!GET_FLAGS(op) && ((src1 | src2) & SLJIT_IMM)) {
- if (TEST_SL_IMM(src2, src2w)) {
- compiler->imm = src2w & 0xffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (TEST_SL_IMM(src1, src1w)) {
- compiler->imm = src1w & 0xffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- if (TEST_SH_IMM(src2, src2w)) {
- compiler->imm = (src2w >> 16) & 0xffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (TEST_SH_IMM(src1, src1w)) {
- compiler->imm = (src1w >> 16) & 0xffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- /* Range between -1 and -32768 is covered above. */
- if (TEST_ADD_IMM(src2, src2w)) {
- compiler->imm = src2w & 0xffffffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM4, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (TEST_ADD_IMM(src1, src1w)) {
- compiler->imm = src1w & 0xffffffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM4, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- }
- if (!(GET_FLAGS(op) & (SLJIT_SET_E | SLJIT_SET_O))) {
- if (TEST_SL_IMM(src2, src2w)) {
- compiler->imm = src2w & 0xffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (TEST_SL_IMM(src1, src1w)) {
- compiler->imm = src1w & 0xffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- }
- return emit_op(compiler, SLJIT_ADD, inp_flags, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_ADDC:
- return emit_op(compiler, SLJIT_ADDC, inp_flags | (!(op & SLJIT_KEEP_FLAGS) ? 0 : ALT_FORM1), dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_SUB:
- if (!GET_FLAGS(op) && ((src1 | src2) & SLJIT_IMM)) {
- if (TEST_SL_IMM(src2, -src2w)) {
- compiler->imm = (-src2w) & 0xffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (TEST_SL_IMM(src1, src1w)) {
- compiler->imm = src1w & 0xffff;
- return emit_op(compiler, SLJIT_SUB, inp_flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- if (TEST_SH_IMM(src2, -src2w)) {
- compiler->imm = ((-src2w) >> 16) & 0xffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- /* Range between -1 and -32768 is covered above. */
- if (TEST_ADD_IMM(src2, -src2w)) {
- compiler->imm = -src2w & 0xffffffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM4, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- }
- if (dst == SLJIT_UNUSED && (op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U)) && !(op & (SLJIT_SET_O | SLJIT_SET_C))) {
- if (!(op & SLJIT_SET_U)) {
- /* We know ALT_SIGN_EXT is set if it is an SLJIT_INT_OP on 64 bit systems. */
- if (TEST_SL_IMM(src2, src2w)) {
- compiler->imm = src2w & 0xffff;
- return emit_op(compiler, SLJIT_SUB, inp_flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (GET_FLAGS(op) == SLJIT_SET_E && TEST_SL_IMM(src1, src1w)) {
- compiler->imm = src1w & 0xffff;
- return emit_op(compiler, SLJIT_SUB, inp_flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- }
- if (!(op & (SLJIT_SET_E | SLJIT_SET_S))) {
- /* We know ALT_SIGN_EXT is set if it is an SLJIT_INT_OP on 64 bit systems. */
- if (TEST_UL_IMM(src2, src2w)) {
- compiler->imm = src2w & 0xffff;
- return emit_op(compiler, SLJIT_SUB, inp_flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- return emit_op(compiler, SLJIT_SUB, inp_flags | ALT_FORM4, dst, dstw, src1, src1w, src2, src2w);
- }
- if ((src2 & SLJIT_IMM) && src2w >= 0 && src2w <= 0x7fff) {
- compiler->imm = src2w;
- return emit_op(compiler, SLJIT_SUB, inp_flags | ALT_FORM2 | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- return emit_op(compiler, SLJIT_SUB, inp_flags | ((op & SLJIT_SET_U) ? ALT_FORM4 : 0) | ((op & (SLJIT_SET_E | SLJIT_SET_S)) ? ALT_FORM5 : 0), dst, dstw, src1, src1w, src2, src2w);
- }
- if (!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O))) {
- if (TEST_SL_IMM(src2, -src2w)) {
- compiler->imm = (-src2w) & 0xffff;
- return emit_op(compiler, SLJIT_ADD, inp_flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- }
- /* We know ALT_SIGN_EXT is set if it is an SLJIT_INT_OP on 64 bit systems. */
- return emit_op(compiler, SLJIT_SUB, inp_flags | (!(op & SLJIT_SET_U) ? 0 : ALT_FORM6), dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_SUBC:
- return emit_op(compiler, SLJIT_SUBC, inp_flags | (!(op & SLJIT_KEEP_FLAGS) ? 0 : ALT_FORM1), dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_MUL:
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- if (op & SLJIT_INT_OP)
- inp_flags |= ALT_FORM2;
-#endif
- if (!GET_FLAGS(op)) {
- if (TEST_SL_IMM(src2, src2w)) {
- compiler->imm = src2w & 0xffff;
- return emit_op(compiler, SLJIT_MUL, inp_flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (TEST_SL_IMM(src1, src1w)) {
- compiler->imm = src1w & 0xffff;
- return emit_op(compiler, SLJIT_MUL, inp_flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- }
- return emit_op(compiler, SLJIT_MUL, inp_flags, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_AND:
- case SLJIT_OR:
- case SLJIT_XOR:
- /* Commutative unsigned operations. */
- if (!GET_FLAGS(op) || GET_OPCODE(op) == SLJIT_AND) {
- if (TEST_UL_IMM(src2, src2w)) {
- compiler->imm = src2w;
- return emit_op(compiler, GET_OPCODE(op), inp_flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (TEST_UL_IMM(src1, src1w)) {
- compiler->imm = src1w;
- return emit_op(compiler, GET_OPCODE(op), inp_flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- if (TEST_UH_IMM(src2, src2w)) {
- compiler->imm = (src2w >> 16) & 0xffff;
- return emit_op(compiler, GET_OPCODE(op), inp_flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (TEST_UH_IMM(src1, src1w)) {
- compiler->imm = (src1w >> 16) & 0xffff;
- return emit_op(compiler, GET_OPCODE(op), inp_flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- }
- if (!GET_FLAGS(op) && GET_OPCODE(op) != SLJIT_AND) {
- if (TEST_UI_IMM(src2, src2w)) {
- compiler->imm = src2w;
- return emit_op(compiler, GET_OPCODE(op), inp_flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- if (TEST_UI_IMM(src1, src1w)) {
- compiler->imm = src1w;
- return emit_op(compiler, GET_OPCODE(op), inp_flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0);
- }
- }
- return emit_op(compiler, GET_OPCODE(op), inp_flags, dst, dstw, src1, src1w, src2, src2w);
-
- case SLJIT_SHL:
- case SLJIT_LSHR:
- case SLJIT_ASHR:
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- if (op & SLJIT_INT_OP)
- inp_flags |= ALT_FORM2;
-#endif
- if (src2 & SLJIT_IMM) {
- compiler->imm = src2w;
- return emit_op(compiler, GET_OPCODE(op), inp_flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
- }
- return emit_op(compiler, GET_OPCODE(op), inp_flags, dst, dstw, src1, src1w, src2, src2w);
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
-{
- check_sljit_get_register_index(reg);
- return reg_map[reg];
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, int size)
-{
- CHECK_ERROR();
- check_sljit_emit_op_custom(compiler, instruction, size);
- SLJIT_ASSERT(size == 4);
-
- return push_inst(compiler, *(sljit_ins*)instruction);
-}
-
-/* --------------------------------------------------------------------- */
-/* Floating point operators */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)
-{
- /* Always available. */
- return 1;
-}
-
-static int emit_fpu_data_transfer(struct sljit_compiler *compiler, int fpu_reg, int load, int arg, sljit_w argw)
-{
- SLJIT_ASSERT(arg & SLJIT_MEM);
-
- /* Fast loads and stores. */
- if (!(arg & 0xf0)) {
- /* Both for (arg & 0xf) == SLJIT_UNUSED and (arg & 0xf) != SLJIT_UNUSED. */
- if (argw <= SIMM_MAX && argw >= SIMM_MIN)
- return push_inst(compiler, (load ? LFD : STFD) | FD(fpu_reg) | A(arg & 0xf) | IMM(argw));
- }
-
- if (arg & 0xf0) {
- argw &= 0x3;
- if (argw) {
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- FAIL_IF(push_inst(compiler, RLWINM | S((arg >> 4) & 0xf) | A(TMP_REG2) | (argw << 11) | ((31 - argw) << 1)));
-#else
- FAIL_IF(push_inst(compiler, RLDI(TMP_REG2, (arg >> 4) & 0xf, argw, 63 - argw, 1)));
-#endif
- return push_inst(compiler, (load ? LFDX : STFDX) | FD(fpu_reg) | A(arg & 0xf) | B(TMP_REG2));
- }
- return push_inst(compiler, (load ? LFDX : STFDX) | FD(fpu_reg) | A(arg & 0xf) | B((arg >> 4) & 0xf));
- }
-
- /* Use cache. */
- if (compiler->cache_arg == arg && argw - compiler->cache_argw <= SIMM_MAX && argw - compiler->cache_argw >= SIMM_MIN)
- return push_inst(compiler, (load ? LFD : STFD) | FD(fpu_reg) | A(TMP_REG3) | IMM(argw - compiler->cache_argw));
-
- /* Put value to cache. */
- compiler->cache_arg = arg;
- compiler->cache_argw = argw;
-
- FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
- if (!(arg & 0xf))
- return push_inst(compiler, (load ? LFDX : STFDX) | FD(fpu_reg) | A(0) | B(TMP_REG3));
- return push_inst(compiler, (load ? LFDUX : STFDUX) | FD(fpu_reg) | A(TMP_REG3) | B(arg & 0xf));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- int dst_fr;
-
- CHECK_ERROR();
- check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- if (GET_OPCODE(op) == SLJIT_FCMP) {
- if (dst > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 1, dst, dstw));
- dst = TMP_FREG1;
- }
- if (src > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG2, 1, src, srcw));
- src = TMP_FREG2;
- }
- return push_inst(compiler, FCMPU | CRD(4) | FA(dst) | FB(src));
- }
-
- dst_fr = (dst > SLJIT_FLOAT_REG4) ? TMP_FREG1 : dst;
-
- if (src > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, dst_fr, 1, src, srcw));
- src = dst_fr;
- }
-
- switch (op) {
- case SLJIT_FMOV:
- if (src != dst_fr && dst_fr != TMP_FREG1)
- FAIL_IF(push_inst(compiler, FMR | FD(dst_fr) | FB(src)));
- break;
- case SLJIT_FNEG:
- FAIL_IF(push_inst(compiler, FNEG | FD(dst_fr) | FB(src)));
- break;
- case SLJIT_FABS:
- FAIL_IF(push_inst(compiler, FABS | FD(dst_fr) | FB(src)));
- break;
- }
-
- if (dst_fr == TMP_FREG1)
- FAIL_IF(emit_fpu_data_transfer(compiler, src, 0, dst, dstw));
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- int dst_fr;
-
- CHECK_ERROR();
- check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
-
- dst_fr = (dst > SLJIT_FLOAT_REG4) ? TMP_FREG1 : dst;
-
- if (src2 > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG2, 1, src2, src2w));
- src2 = TMP_FREG2;
- }
-
- if (src1 > SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 1, src1, src1w));
- src1 = TMP_FREG1;
- }
-
- switch (op) {
- case SLJIT_FADD:
- FAIL_IF(push_inst(compiler, FADD | FD(dst_fr) | FA(src1) | FB(src2)));
- break;
-
- case SLJIT_FSUB:
- FAIL_IF(push_inst(compiler, FSUB | FD(dst_fr) | FA(src1) | FB(src2)));
- break;
-
- case SLJIT_FMUL:
- FAIL_IF(push_inst(compiler, FMUL | FD(dst_fr) | FA(src1) | FC(src2) /* FMUL use FC as src2 */));
- break;
-
- case SLJIT_FDIV:
- FAIL_IF(push_inst(compiler, FDIV | FD(dst_fr) | FA(src1) | FB(src2)));
- break;
- }
-
- if (dst_fr == TMP_FREG1)
- FAIL_IF(emit_fpu_data_transfer(compiler, TMP_FREG1, 0, dst, dstw));
-
- return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/* Other instructions */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size)
-{
- CHECK_ERROR();
- check_sljit_emit_fast_enter(compiler, dst, dstw, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
-
- compiler->has_locals = local_size > 0;
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
- compiler->local_size = (2 + saveds + 2) * sizeof(sljit_w) + local_size;
-#else
- compiler->local_size = (2 + saveds + 7 + 8) * sizeof(sljit_w) + local_size;
-#endif
- compiler->local_size = (compiler->local_size + 15) & ~0xf;
-
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS)
- return push_inst(compiler, MFLR | D(dst));
- else if (dst & SLJIT_MEM) {
- FAIL_IF(push_inst(compiler, MFLR | D(TMP_REG2)));
- return emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0);
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
-{
- CHECK_ERROR();
- check_sljit_emit_fast_return(compiler, src, srcw);
-
- if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS)
- FAIL_IF(push_inst(compiler, MTLR | S(src)));
- else {
- if (src & SLJIT_MEM)
- FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
- else if (src & SLJIT_IMM)
- FAIL_IF(load_immediate(compiler, TMP_REG2, srcw));
- FAIL_IF(push_inst(compiler, MTLR | S(TMP_REG2)));
- }
- return push_inst(compiler, BLR);
-}
-
-/* --------------------------------------------------------------------- */
-/* Conditional instructions */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
- struct sljit_label *label;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_label(compiler);
-
- if (compiler->last_label && compiler->last_label->size == compiler->size)
- return compiler->last_label;
-
- label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
- PTR_FAIL_IF(!label);
- set_label(label, compiler);
- return label;
-}
-
-static sljit_ins get_bo_bi_flags(struct sljit_compiler *compiler, int type)
-{
- switch (type) {
- case SLJIT_C_EQUAL:
- return (12 << 21) | (2 << 16);
-
- case SLJIT_C_NOT_EQUAL:
- return (4 << 21) | (2 << 16);
-
- case SLJIT_C_LESS:
- case SLJIT_C_FLOAT_LESS:
- return (12 << 21) | ((4 + 0) << 16);
-
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
- return (4 << 21) | ((4 + 0) << 16);
-
- case SLJIT_C_GREATER:
- case SLJIT_C_FLOAT_GREATER:
- return (12 << 21) | ((4 + 1) << 16);
-
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_LESS_EQUAL:
- return (4 << 21) | ((4 + 1) << 16);
-
- case SLJIT_C_SIG_LESS:
- return (12 << 21) | (0 << 16);
-
- case SLJIT_C_SIG_GREATER_EQUAL:
- return (4 << 21) | (0 << 16);
-
- case SLJIT_C_SIG_GREATER:
- return (12 << 21) | (1 << 16);
-
- case SLJIT_C_SIG_LESS_EQUAL:
- return (4 << 21) | (1 << 16);
-
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_MUL_OVERFLOW:
- return (12 << 21) | (3 << 16);
-
- case SLJIT_C_NOT_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
- return (4 << 21) | (3 << 16);
-
- case SLJIT_C_FLOAT_EQUAL:
- return (12 << 21) | ((4 + 2) << 16);
-
- case SLJIT_C_FLOAT_NOT_EQUAL:
- return (4 << 21) | ((4 + 2) << 16);
-
- case SLJIT_C_FLOAT_NAN:
- return (12 << 21) | ((4 + 3) << 16);
-
- case SLJIT_C_FLOAT_NOT_NAN:
- return (4 << 21) | ((4 + 3) << 16);
-
- default:
- SLJIT_ASSERT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);
- return (20 << 21);
- }
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type)
-{
- struct sljit_jump *jump;
- sljit_ins bo_bi_flags;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_jump(compiler, type);
-
- bo_bi_flags = get_bo_bi_flags(compiler, type & 0xff);
- if (!bo_bi_flags)
- return NULL;
-
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- PTR_FAIL_IF(!jump);
- set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
- type &= 0xff;
-
- /* In PPC, we don't need to touch the arguments. */
- if (type >= SLJIT_JUMP)
- jump->flags |= UNCOND_B;
-
- PTR_FAIL_IF(emit_const(compiler, TMP_REG1, 0));
- PTR_FAIL_IF(push_inst(compiler, MTCTR | S(TMP_REG1)));
- jump->addr = compiler->size;
- PTR_FAIL_IF(push_inst(compiler, BCCTR | bo_bi_flags | (type >= SLJIT_FAST_CALL ? 1 : 0)));
- return jump;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)
-{
- sljit_ins bo_bi_flags;
- struct sljit_jump *jump = NULL;
- int src_r;
-
- CHECK_ERROR();
- check_sljit_emit_ijump(compiler, type, src, srcw);
-
- bo_bi_flags = get_bo_bi_flags(compiler, type);
- FAIL_IF(!bo_bi_flags);
-
- if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS)
- src_r = src;
- else if (src & SLJIT_IMM) {
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- FAIL_IF(!jump);
- set_jump(jump, compiler, JUMP_ADDR | UNCOND_B);
- jump->u.target = srcw;
-
- FAIL_IF(emit_const(compiler, TMP_REG2, 0));
- src_r = TMP_REG2;
- }
- else {
- FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
- src_r = TMP_REG2;
- }
-
- FAIL_IF(push_inst(compiler, MTCTR | S(src_r)));
- if (jump)
- jump->addr = compiler->size;
- return push_inst(compiler, BCCTR | bo_bi_flags | (type >= SLJIT_FAST_CALL ? 1 : 0));
-}
-
-/* Get a bit from CR, all other bits are zeroed. */
-#define GET_CR_BIT(bit, dst) \
- FAIL_IF(push_inst(compiler, MFCR | D(dst))); \
- FAIL_IF(push_inst(compiler, RLWINM | S(dst) | A(dst) | ((1 + (bit)) << 11) | (31 << 6) | (31 << 1)));
-
-#define INVERT_BIT(dst) \
- FAIL_IF(push_inst(compiler, XORI | S(dst) | A(dst) | 0x1));
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)
-{
- int reg;
-
- CHECK_ERROR();
- check_sljit_emit_cond_value(compiler, op, dst, dstw, type);
-
- if (dst == SLJIT_UNUSED)
- return SLJIT_SUCCESS;
-
- reg = (op == SLJIT_MOV && dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG2;
-
- switch (type) {
- case SLJIT_C_EQUAL:
- GET_CR_BIT(2, reg);
- break;
-
- case SLJIT_C_NOT_EQUAL:
- GET_CR_BIT(2, reg);
- INVERT_BIT(reg);
- break;
-
- case SLJIT_C_LESS:
- case SLJIT_C_FLOAT_LESS:
- GET_CR_BIT(4 + 0, reg);
- break;
-
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
- GET_CR_BIT(4 + 0, reg);
- INVERT_BIT(reg);
- break;
-
- case SLJIT_C_GREATER:
- case SLJIT_C_FLOAT_GREATER:
- GET_CR_BIT(4 + 1, reg);
- break;
-
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_LESS_EQUAL:
- GET_CR_BIT(4 + 1, reg);
- INVERT_BIT(reg);
- break;
-
- case SLJIT_C_SIG_LESS:
- GET_CR_BIT(0, reg);
- break;
-
- case SLJIT_C_SIG_GREATER_EQUAL:
- GET_CR_BIT(0, reg);
- INVERT_BIT(reg);
- break;
-
- case SLJIT_C_SIG_GREATER:
- GET_CR_BIT(1, reg);
- break;
-
- case SLJIT_C_SIG_LESS_EQUAL:
- GET_CR_BIT(1, reg);
- INVERT_BIT(reg);
- break;
-
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_MUL_OVERFLOW:
- GET_CR_BIT(3, reg);
- break;
-
- case SLJIT_C_NOT_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
- GET_CR_BIT(3, reg);
- INVERT_BIT(reg);
- break;
-
- case SLJIT_C_FLOAT_EQUAL:
- GET_CR_BIT(4 + 2, reg);
- break;
-
- case SLJIT_C_FLOAT_NOT_EQUAL:
- GET_CR_BIT(4 + 2, reg);
- INVERT_BIT(reg);
- break;
-
- case SLJIT_C_FLOAT_NAN:
- GET_CR_BIT(4 + 3, reg);
- break;
-
- case SLJIT_C_FLOAT_NOT_NAN:
- GET_CR_BIT(4 + 3, reg);
- INVERT_BIT(reg);
- break;
-
- default:
- SLJIT_ASSERT_STOP();
- break;
- }
-
- if (GET_OPCODE(op) == SLJIT_OR)
- return emit_op(compiler, GET_OPCODE(op), GET_FLAGS(op) ? ALT_SET_FLAGS : 0, dst, dstw, dst, dstw, TMP_REG2, 0);
-
- if (reg == TMP_REG2)
- return emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0);
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)
-{
- struct sljit_const *const_;
- int reg;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_const(compiler, dst, dstw, init_value);
-
- const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
- PTR_FAIL_IF(!const_);
- set_const(const_, compiler);
-
- reg = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG2;
-
- PTR_FAIL_IF(emit_const(compiler, reg, init_value));
-
- if (dst & SLJIT_MEM)
- PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0));
- return const_;
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativeX86_32.c b/src/third_party/pcre-8.30/sljit/sljitNativeX86_32.c
deleted file mode 100644
index 68bca8441ae..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativeX86_32.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* x86 32-bit arch dependent functions. */
-
-static int emit_do_imm(struct sljit_compiler *compiler, sljit_ub opcode, sljit_w imm)
-{
- sljit_ub *buf;
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1 + sizeof(sljit_w));
- FAIL_IF(!buf);
- INC_SIZE(1 + sizeof(sljit_w));
- *buf++ = opcode;
- *(sljit_w*)buf = imm;
- return SLJIT_SUCCESS;
-}
-
-static sljit_ub* generate_far_jump_code(struct sljit_jump *jump, sljit_ub *code_ptr, int type)
-{
- if (type == SLJIT_JUMP) {
- *code_ptr++ = 0xe9;
- jump->addr++;
- }
- else if (type >= SLJIT_FAST_CALL) {
- *code_ptr++ = 0xe8;
- jump->addr++;
- }
- else {
- *code_ptr++ = 0x0f;
- *code_ptr++ = get_jump_code(type);
- jump->addr += 2;
- }
-
- if (jump->flags & JUMP_LABEL)
- jump->flags |= PATCH_MW;
- else
- *(sljit_w*)code_ptr = jump->u.target - (jump->addr + 4);
- code_ptr += 4;
-
- return code_ptr;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- int size;
- sljit_ub *buf;
-
- CHECK_ERROR();
- check_sljit_emit_enter(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
- compiler->args = args;
- compiler->flags_saved = 0;
-
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
- size = 1 + (saveds <= 3 ? saveds : 3) + (args > 0 ? (args * 2) : 0) + (args > 2 ? 2 : 0);
-#else
- size = 1 + (saveds <= 3 ? saveds : 3) + (args > 0 ? (2 + args * 3) : 0);
-#endif
- buf = (sljit_ub*)ensure_buf(compiler, 1 + size);
- FAIL_IF(!buf);
-
- INC_SIZE(size);
- PUSH_REG(reg_map[TMP_REGISTER]);
-#if !(defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
- if (args > 0) {
- *buf++ = 0x8b;
- *buf++ = 0xc4 | (reg_map[TMP_REGISTER] << 3);
- }
-#endif
- if (saveds > 2)
- PUSH_REG(reg_map[SLJIT_SAVED_REG3]);
- if (saveds > 1)
- PUSH_REG(reg_map[SLJIT_SAVED_REG2]);
- if (saveds > 0)
- PUSH_REG(reg_map[SLJIT_SAVED_REG1]);
-
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
- if (args > 0) {
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (reg_map[SLJIT_SAVED_REG1] << 3) | reg_map[SLJIT_TEMPORARY_REG3];
- }
- if (args > 1) {
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (reg_map[SLJIT_SAVED_REG2] << 3) | reg_map[SLJIT_TEMPORARY_REG2];
- }
- if (args > 2) {
- *buf++ = 0x8b;
- *buf++ = 0x44 | (reg_map[SLJIT_SAVED_REG3] << 3);
- *buf++ = 0x24;
- *buf++ = sizeof(sljit_w) * (3 + 2); /* saveds >= 3 as well. */
- }
-#else
- if (args > 0) {
- *buf++ = 0x8b;
- *buf++ = 0x40 | (reg_map[SLJIT_SAVED_REG1] << 3) | reg_map[TMP_REGISTER];
- *buf++ = sizeof(sljit_w) * 2;
- }
- if (args > 1) {
- *buf++ = 0x8b;
- *buf++ = 0x40 | (reg_map[SLJIT_SAVED_REG2] << 3) | reg_map[TMP_REGISTER];
- *buf++ = sizeof(sljit_w) * 3;
- }
- if (args > 2) {
- *buf++ = 0x8b;
- *buf++ = 0x40 | (reg_map[SLJIT_SAVED_REG3] << 3) | reg_map[TMP_REGISTER];
- *buf++ = sizeof(sljit_w) * 4;
- }
-#endif
-
- local_size = (local_size + sizeof(sljit_uw) - 1) & ~(sizeof(sljit_uw) - 1);
- compiler->temporaries_start = local_size;
- if (temporaries > 3)
- local_size += (temporaries - 3) * sizeof(sljit_uw);
- compiler->saveds_start = local_size;
- if (saveds > 3)
- local_size += (saveds - 3) * sizeof(sljit_uw);
-
-#ifdef _WIN32
- if (local_size > 1024) {
- FAIL_IF(emit_do_imm(compiler, 0xb8 + reg_map[SLJIT_TEMPORARY_REG1], local_size));
- FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_touch_stack)));
- }
-#endif
-
- compiler->local_size = local_size;
- if (local_size > 0)
- return emit_non_cum_binary(compiler, 0x2b, 0x29, 0x5 << 3, 0x2d,
- SLJIT_LOCALS_REG, 0, SLJIT_LOCALS_REG, 0, SLJIT_IMM, local_size);
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- CHECK_ERROR_VOID();
- check_sljit_set_context(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
- compiler->args = args;
- compiler->local_size = (local_size + sizeof(sljit_uw) - 1) & ~(sizeof(sljit_uw) - 1);
- compiler->temporaries_start = compiler->local_size;
- if (temporaries > 3)
- compiler->local_size += (temporaries - 3) * sizeof(sljit_uw);
- compiler->saveds_start = compiler->local_size;
- if (saveds > 3)
- compiler->local_size += (saveds - 3) * sizeof(sljit_uw);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)
-{
- int size;
- sljit_ub *buf;
-
- CHECK_ERROR();
- check_sljit_emit_return(compiler, op, src, srcw);
- SLJIT_ASSERT(compiler->args >= 0);
-
- compiler->flags_saved = 0;
- FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-
- if (compiler->local_size > 0)
- FAIL_IF(emit_cum_binary(compiler, 0x03, 0x01, 0x0 << 3, 0x05,
- SLJIT_LOCALS_REG, 0, SLJIT_LOCALS_REG, 0, SLJIT_IMM, compiler->local_size));
-
- size = 2 + (compiler->saveds <= 3 ? compiler->saveds : 3);
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
- if (compiler->args > 2)
- size += 2;
-#else
- if (compiler->args > 0)
- size += 2;
-#endif
- buf = (sljit_ub*)ensure_buf(compiler, 1 + size);
- FAIL_IF(!buf);
-
- INC_SIZE(size);
-
- if (compiler->saveds > 0)
- POP_REG(reg_map[SLJIT_SAVED_REG1]);
- if (compiler->saveds > 1)
- POP_REG(reg_map[SLJIT_SAVED_REG2]);
- if (compiler->saveds > 2)
- POP_REG(reg_map[SLJIT_SAVED_REG3]);
- POP_REG(reg_map[TMP_REGISTER]);
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
- if (compiler->args > 2)
- RETN(sizeof(sljit_w));
- else
- RET();
-#else
- if (compiler->args > 0)
- RETN(compiler->args * sizeof(sljit_w));
- else
- RET();
-#endif
-
- return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/* Operators */
-/* --------------------------------------------------------------------- */
-
-/* Size contains the flags as well. */
-static sljit_ub* emit_x86_instruction(struct sljit_compiler *compiler, int size,
- /* The register or immediate operand. */
- int a, sljit_w imma,
- /* The general operand (not immediate). */
- int b, sljit_w immb)
-{
- sljit_ub *buf;
- sljit_ub *buf_ptr;
- int flags = size & ~0xf;
- int inst_size;
-
- /* Both cannot be switched on. */
- SLJIT_ASSERT((flags & (EX86_BIN_INS | EX86_SHIFT_INS)) != (EX86_BIN_INS | EX86_SHIFT_INS));
- /* Size flags not allowed for typed instructions. */
- SLJIT_ASSERT(!(flags & (EX86_BIN_INS | EX86_SHIFT_INS)) || (flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) == 0);
- /* Both size flags cannot be switched on. */
- SLJIT_ASSERT((flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) != (EX86_BYTE_ARG | EX86_HALF_ARG));
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- /* SSE2 and immediate is not possible. */
- SLJIT_ASSERT(!(a & SLJIT_IMM) || !(flags & EX86_SSE2));
-#endif
-
- size &= 0xf;
- inst_size = size;
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- if (flags & EX86_PREF_F2)
- inst_size++;
-#endif
- if (flags & EX86_PREF_66)
- inst_size++;
-
- /* Calculate size of b. */
- inst_size += 1; /* mod r/m byte. */
- if (b & SLJIT_MEM) {
- if ((b & 0x0f) == SLJIT_UNUSED)
- inst_size += sizeof(sljit_w);
- else if (immb != 0 && !(b & 0xf0)) {
- /* Immediate operand. */
- if (immb <= 127 && immb >= -128)
- inst_size += sizeof(sljit_b);
- else
- inst_size += sizeof(sljit_w);
- }
-
- if ((b & 0xf) == SLJIT_LOCALS_REG && !(b & 0xf0))
- b |= SLJIT_LOCALS_REG << 4;
-
- if ((b & 0xf0) != SLJIT_UNUSED)
- inst_size += 1; /* SIB byte. */
- }
-
- /* Calculate size of a. */
- if (a & SLJIT_IMM) {
- if (flags & EX86_BIN_INS) {
- if (imma <= 127 && imma >= -128) {
- inst_size += 1;
- flags |= EX86_BYTE_ARG;
- } else
- inst_size += 4;
- }
- else if (flags & EX86_SHIFT_INS) {
- imma &= 0x1f;
- if (imma != 1) {
- inst_size ++;
- flags |= EX86_BYTE_ARG;
- }
- } else if (flags & EX86_BYTE_ARG)
- inst_size++;
- else if (flags & EX86_HALF_ARG)
- inst_size += sizeof(short);
- else
- inst_size += sizeof(sljit_w);
- }
- else
- SLJIT_ASSERT(!(flags & EX86_SHIFT_INS) || a == SLJIT_PREF_SHIFT_REG);
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + inst_size);
- PTR_FAIL_IF(!buf);
-
- /* Encoding the byte. */
- INC_SIZE(inst_size);
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- if (flags & EX86_PREF_F2)
- *buf++ = 0xf2;
-#endif
- if (flags & EX86_PREF_66)
- *buf++ = 0x66;
-
- buf_ptr = buf + size;
-
- /* Encode mod/rm byte. */
- if (!(flags & EX86_SHIFT_INS)) {
- if ((flags & EX86_BIN_INS) && (a & SLJIT_IMM))
- *buf = (flags & EX86_BYTE_ARG) ? 0x83 : 0x81;
-
- if ((a & SLJIT_IMM) || (a == 0))
- *buf_ptr = 0;
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- else if (!(flags & EX86_SSE2))
- *buf_ptr = reg_map[a] << 3;
- else
- *buf_ptr = a << 3;
-#else
- else
- *buf_ptr = reg_map[a] << 3;
-#endif
- }
- else {
- if (a & SLJIT_IMM) {
- if (imma == 1)
- *buf = 0xd1;
- else
- *buf = 0xc1;
- } else
- *buf = 0xd3;
- *buf_ptr = 0;
- }
-
- if (!(b & SLJIT_MEM))
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- *buf_ptr++ |= 0xc0 + ((!(flags & EX86_SSE2)) ? reg_map[b] : b);
-#else
- *buf_ptr++ |= 0xc0 + reg_map[b];
-#endif
- else if ((b & 0x0f) != SLJIT_UNUSED) {
- if ((b & 0xf0) == SLJIT_UNUSED || (b & 0xf0) == (SLJIT_LOCALS_REG << 4)) {
- if (immb != 0) {
- if (immb <= 127 && immb >= -128)
- *buf_ptr |= 0x40;
- else
- *buf_ptr |= 0x80;
- }
-
- if ((b & 0xf0) == SLJIT_UNUSED)
- *buf_ptr++ |= reg_map[b & 0x0f];
- else {
- *buf_ptr++ |= 0x04;
- *buf_ptr++ = reg_map[b & 0x0f] | (reg_map[(b >> 4) & 0x0f] << 3);
- }
-
- if (immb != 0) {
- if (immb <= 127 && immb >= -128)
- *buf_ptr++ = immb; /* 8 bit displacement. */
- else {
- *(sljit_w*)buf_ptr = immb; /* 32 bit displacement. */
- buf_ptr += sizeof(sljit_w);
- }
- }
- }
- else {
- *buf_ptr++ |= 0x04;
- *buf_ptr++ = reg_map[b & 0x0f] | (reg_map[(b >> 4) & 0x0f] << 3) | (immb << 6);
- }
- }
- else {
- *buf_ptr++ |= 0x05;
- *(sljit_w*)buf_ptr = immb; /* 32 bit displacement. */
- buf_ptr += sizeof(sljit_w);
- }
-
- if (a & SLJIT_IMM) {
- if (flags & EX86_BYTE_ARG)
- *buf_ptr = imma;
- else if (flags & EX86_HALF_ARG)
- *(short*)buf_ptr = imma;
- else if (!(flags & EX86_SHIFT_INS))
- *(sljit_w*)buf_ptr = imma;
- }
-
- return !(flags & EX86_SHIFT_INS) ? buf : (buf + 1);
-}
-
-/* --------------------------------------------------------------------- */
-/* Call / return instructions */
-/* --------------------------------------------------------------------- */
-
-static SLJIT_INLINE int call_with_args(struct sljit_compiler *compiler, int type)
-{
- sljit_ub *buf;
-
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
- buf = (sljit_ub*)ensure_buf(compiler, type >= SLJIT_CALL3 ? 1 + 2 + 1 : 1 + 2);
- FAIL_IF(!buf);
- INC_SIZE(type >= SLJIT_CALL3 ? 2 + 1 : 2);
-
- if (type >= SLJIT_CALL3)
- PUSH_REG(reg_map[SLJIT_TEMPORARY_REG3]);
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (reg_map[SLJIT_TEMPORARY_REG3] << 3) | reg_map[SLJIT_TEMPORARY_REG1];
-#else
- buf = (sljit_ub*)ensure_buf(compiler, type - SLJIT_CALL0 + 1);
- FAIL_IF(!buf);
- INC_SIZE(type - SLJIT_CALL0);
- if (type >= SLJIT_CALL3)
- PUSH_REG(reg_map[SLJIT_TEMPORARY_REG3]);
- if (type >= SLJIT_CALL2)
- PUSH_REG(reg_map[SLJIT_TEMPORARY_REG2]);
- PUSH_REG(reg_map[SLJIT_TEMPORARY_REG1]);
-#endif
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size)
-{
- sljit_ub *buf;
-
- CHECK_ERROR();
- check_sljit_emit_fast_enter(compiler, dst, dstw, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
- compiler->args = args;
- compiler->local_size = (local_size + sizeof(sljit_uw) - 1) & ~(sizeof(sljit_uw) - 1);
- compiler->temporaries_start = compiler->local_size;
- if (temporaries > 3)
- compiler->local_size += (temporaries - 3) * sizeof(sljit_uw);
- compiler->saveds_start = compiler->local_size;
- if (saveds > 3)
- compiler->local_size += (saveds - 3) * sizeof(sljit_uw);
-
- CHECK_EXTRA_REGS(dst, dstw, (void)0);
-
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!buf);
-
- INC_SIZE(1);
- POP_REG(reg_map[dst]);
- return SLJIT_SUCCESS;
- }
- else if (dst & SLJIT_MEM) {
- buf = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
- FAIL_IF(!buf);
- *buf++ = 0x8f;
- return SLJIT_SUCCESS;
- }
-
- /* For UNUSED dst. Uncommon, but possible. */
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!buf);
-
- INC_SIZE(1);
- POP_REG(reg_map[TMP_REGISTER]);
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
-{
- sljit_ub *buf;
-
- CHECK_ERROR();
- check_sljit_emit_fast_return(compiler, src, srcw);
-
- CHECK_EXTRA_REGS(src, srcw, (void)0);
-
- if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 1);
- FAIL_IF(!buf);
-
- INC_SIZE(1 + 1);
- PUSH_REG(reg_map[src]);
- }
- else if (src & SLJIT_MEM) {
- buf = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
- FAIL_IF(!buf);
- *buf++ = 0xff;
- *buf |= 6 << 3;
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!buf);
- INC_SIZE(1);
- }
- else {
- /* SLJIT_IMM. */
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 5 + 1);
- FAIL_IF(!buf);
-
- INC_SIZE(5 + 1);
- *buf++ = 0x68;
- *(sljit_w*)buf = srcw;
- buf += sizeof(sljit_w);
- }
-
- RET();
- return SLJIT_SUCCESS;
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativeX86_64.c b/src/third_party/pcre-8.30/sljit/sljitNativeX86_64.c
deleted file mode 100644
index 40d875b8413..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativeX86_64.c
+++ /dev/null
@@ -1,842 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* x86 64-bit arch dependent functions. */
-
-static int emit_load_imm64(struct sljit_compiler *compiler, int reg, sljit_w imm)
-{
- sljit_ub *buf;
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 2 + sizeof(sljit_w));
- FAIL_IF(!buf);
- INC_SIZE(2 + sizeof(sljit_w));
- *buf++ = REX_W | ((reg_map[reg] <= 7) ? 0 : REX_B);
- *buf++ = 0xb8 + (reg_map[reg] & 0x7);
- *(sljit_w*)buf = imm;
- return SLJIT_SUCCESS;
-}
-
-static sljit_ub* generate_far_jump_code(struct sljit_jump *jump, sljit_ub *code_ptr, int type)
-{
- if (type < SLJIT_JUMP) {
- *code_ptr++ = get_jump_code(type ^ 0x1) - 0x10;
- *code_ptr++ = 10 + 3;
- }
-
- SLJIT_COMPILE_ASSERT(reg_map[TMP_REG3] == 9, tmp3_is_9_first);
- *code_ptr++ = REX_W | REX_B;
- *code_ptr++ = 0xb8 + 1;
- jump->addr = (sljit_uw)code_ptr;
-
- if (jump->flags & JUMP_LABEL)
- jump->flags |= PATCH_MD;
- else
- *(sljit_w*)code_ptr = jump->u.target;
-
- code_ptr += sizeof(sljit_w);
- *code_ptr++ = REX_B;
- *code_ptr++ = 0xff;
- *code_ptr++ = (type >= SLJIT_FAST_CALL) ? 0xd1 /* call */ : 0xe1 /* jmp */;
-
- return code_ptr;
-}
-
-static sljit_ub* generate_fixed_jump(sljit_ub *code_ptr, sljit_w addr, int type)
-{
- sljit_w delta = addr - ((sljit_w)code_ptr + 1 + sizeof(sljit_hw));
-
- if (delta <= SLJIT_W(0x7fffffff) && delta >= SLJIT_W(-0x80000000)) {
- *code_ptr++ = (type == 2) ? 0xe8 /* call */ : 0xe9 /* jmp */;
- *(sljit_w*)code_ptr = delta;
- }
- else {
- SLJIT_COMPILE_ASSERT(reg_map[TMP_REG3] == 9, tmp3_is_9_second);
- *code_ptr++ = REX_W | REX_B;
- *code_ptr++ = 0xb8 + 1;
- *(sljit_w*)code_ptr = addr;
- code_ptr += sizeof(sljit_w);
- *code_ptr++ = REX_B;
- *code_ptr++ = 0xff;
- *code_ptr++ = (type == 2) ? 0xd1 /* call */ : 0xe1 /* jmp */;
- }
-
- return code_ptr;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- int size, pushed_size;
- sljit_ub *buf;
-
- CHECK_ERROR();
- check_sljit_emit_enter(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
- compiler->flags_saved = 0;
-
- size = saveds;
- /* Including the return address saved by the call instruction. */
- pushed_size = (saveds + 1) * sizeof(sljit_w);
-#ifndef _WIN64
- if (saveds >= 2)
- size += saveds - 1;
-#else
- /* Saving the virtual stack pointer. */
- compiler->has_locals = local_size > 0;
- if (local_size > 0) {
- size += 2;
- pushed_size += sizeof(sljit_w);
- }
- if (saveds >= 4)
- size += saveds - 3;
- if (temporaries >= 5) {
- size += (5 - 4) * 2;
- pushed_size += sizeof(sljit_w);
- }
-#endif
- size += args * 3;
- if (size > 0) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + size);
- FAIL_IF(!buf);
-
- INC_SIZE(size);
- if (saveds >= 5) {
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_EREG2] >= 8, saved_ereg2_is_hireg);
- *buf++ = REX_B;
- PUSH_REG(reg_lmap[SLJIT_SAVED_EREG2]);
- }
- if (saveds >= 4) {
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_EREG1] >= 8, saved_ereg1_is_hireg);
- *buf++ = REX_B;
- PUSH_REG(reg_lmap[SLJIT_SAVED_EREG1]);
- }
- if (saveds >= 3) {
-#ifndef _WIN64
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG3] >= 8, saved_reg3_is_hireg);
- *buf++ = REX_B;
-#else
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG3] < 8, saved_reg3_is_loreg);
-#endif
- PUSH_REG(reg_lmap[SLJIT_SAVED_REG3]);
- }
- if (saveds >= 2) {
-#ifndef _WIN64
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG2] >= 8, saved_reg2_is_hireg);
- *buf++ = REX_B;
-#else
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG2] < 8, saved_reg2_is_loreg);
-#endif
- PUSH_REG(reg_lmap[SLJIT_SAVED_REG2]);
- }
- if (saveds >= 1) {
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG1] < 8, saved_reg1_is_loreg);
- PUSH_REG(reg_lmap[SLJIT_SAVED_REG1]);
- }
-#ifdef _WIN64
- if (temporaries >= 5) {
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_TEMPORARY_EREG2] >= 8, temporary_ereg2_is_hireg);
- *buf++ = REX_B;
- PUSH_REG(reg_lmap[SLJIT_TEMPORARY_EREG2]);
- }
- if (local_size > 0) {
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_LOCALS_REG] >= 8, locals_reg_is_hireg);
- *buf++ = REX_B;
- PUSH_REG(reg_lmap[SLJIT_LOCALS_REG]);
- }
-#endif
-
-#ifndef _WIN64
- if (args > 0) {
- *buf++ = REX_W;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (reg_map[SLJIT_SAVED_REG1] << 3) | 0x7;
- }
- if (args > 1) {
- *buf++ = REX_W | REX_R;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (reg_lmap[SLJIT_SAVED_REG2] << 3) | 0x6;
- }
- if (args > 2) {
- *buf++ = REX_W | REX_R;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (reg_lmap[SLJIT_SAVED_REG3] << 3) | 0x2;
- }
-#else
- if (args > 0) {
- *buf++ = REX_W;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (reg_map[SLJIT_SAVED_REG1] << 3) | 0x1;
- }
- if (args > 1) {
- *buf++ = REX_W;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (reg_map[SLJIT_SAVED_REG2] << 3) | 0x2;
- }
- if (args > 2) {
- *buf++ = REX_W | REX_B;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (reg_map[SLJIT_SAVED_REG3] << 3) | 0x0;
- }
-#endif
- }
-
- local_size = ((local_size + pushed_size + 16 - 1) & ~(16 - 1)) - pushed_size;
-#ifdef _WIN64
- local_size += 4 * sizeof(sljit_w);
- compiler->local_size = local_size;
- if (local_size > 1024) {
- /* Allocate the stack for the function itself. */
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 4);
- FAIL_IF(!buf);
- INC_SIZE(4);
- *buf++ = REX_W;
- *buf++ = 0x83;
- *buf++ = 0xc0 | (5 << 3) | 4;
- /* Pushed size must be divisible by 8. */
- SLJIT_ASSERT(!(pushed_size & 0x7));
- if (pushed_size & 0x8) {
- *buf++ = 5 * sizeof(sljit_w);
- local_size -= 5 * sizeof(sljit_w);
- } else {
- *buf++ = 4 * sizeof(sljit_w);
- local_size -= 4 * sizeof(sljit_w);
- }
- FAIL_IF(emit_load_imm64(compiler, SLJIT_TEMPORARY_REG1, local_size));
- FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_touch_stack)));
- }
-#else
- compiler->local_size = local_size;
- if (local_size > 0) {
-#endif
- /* In case of Win64, local_size is always > 4 * sizeof(sljit_w) */
- if (local_size <= 127) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 4);
- FAIL_IF(!buf);
- INC_SIZE(4);
- *buf++ = REX_W;
- *buf++ = 0x83;
- *buf++ = 0xc0 | (5 << 3) | 4;
- *buf++ = local_size;
- }
- else {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 7);
- FAIL_IF(!buf);
- INC_SIZE(7);
- *buf++ = REX_W;
- *buf++ = 0x81;
- *buf++ = 0xc0 | (5 << 3) | 4;
- *(sljit_hw*)buf = local_size;
- buf += sizeof(sljit_hw);
- }
-#ifndef _WIN64
- }
-#endif
-
-#ifdef _WIN64
- if (compiler->has_locals) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 5);
- FAIL_IF(!buf);
- INC_SIZE(5);
- *buf++ = REX_W | REX_R;
- *buf++ = 0x8d;
- *buf++ = 0x40 | (reg_lmap[SLJIT_LOCALS_REG] << 3) | 0x4;
- *buf++ = 0x24;
- *buf = 4 * sizeof(sljit_w);
- }
-#endif
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)
-{
- int pushed_size;
-
- CHECK_ERROR_VOID();
- check_sljit_set_context(compiler, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
- /* Including the return address saved by the call instruction. */
- pushed_size = (saveds + 1) * sizeof(sljit_w);
-#ifdef _WIN64
- compiler->has_locals = local_size > 0;
- if (local_size > 0)
- pushed_size += sizeof(sljit_w);
- if (temporaries >= 5)
- pushed_size += sizeof(sljit_w);
-#endif
- compiler->local_size = ((local_size + pushed_size + 16 - 1) & ~(16 - 1)) - pushed_size;
-#ifdef _WIN64
- compiler->local_size += 4 * sizeof(sljit_w);
-#endif
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)
-{
- int size;
- sljit_ub *buf;
-
- CHECK_ERROR();
- check_sljit_emit_return(compiler, op, src, srcw);
-
- compiler->flags_saved = 0;
- FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-
- if (compiler->local_size > 0) {
- if (compiler->local_size <= 127) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 4);
- FAIL_IF(!buf);
- INC_SIZE(4);
- *buf++ = REX_W;
- *buf++ = 0x83;
- *buf++ = 0xc0 | (0 << 3) | 4;
- *buf = compiler->local_size;
- }
- else {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 7);
- FAIL_IF(!buf);
- INC_SIZE(7);
- *buf++ = REX_W;
- *buf++ = 0x81;
- *buf++ = 0xc0 | (0 << 3) | 4;
- *(sljit_hw*)buf = compiler->local_size;
- }
- }
-
- size = 1 + compiler->saveds;
-#ifndef _WIN64
- if (compiler->saveds >= 2)
- size += compiler->saveds - 1;
-#else
- if (compiler->has_locals)
- size += 2;
- if (compiler->saveds >= 4)
- size += compiler->saveds - 3;
- if (compiler->temporaries >= 5)
- size += (5 - 4) * 2;
-#endif
- buf = (sljit_ub*)ensure_buf(compiler, 1 + size);
- FAIL_IF(!buf);
-
- INC_SIZE(size);
-
-#ifdef _WIN64
- if (compiler->has_locals) {
- *buf++ = REX_B;
- POP_REG(reg_lmap[SLJIT_LOCALS_REG]);
- }
- if (compiler->temporaries >= 5) {
- *buf++ = REX_B;
- POP_REG(reg_lmap[SLJIT_TEMPORARY_EREG2]);
- }
-#endif
- if (compiler->saveds >= 1)
- POP_REG(reg_map[SLJIT_SAVED_REG1]);
- if (compiler->saveds >= 2) {
-#ifndef _WIN64
- *buf++ = REX_B;
-#endif
- POP_REG(reg_lmap[SLJIT_SAVED_REG2]);
- }
- if (compiler->saveds >= 3) {
-#ifndef _WIN64
- *buf++ = REX_B;
-#endif
- POP_REG(reg_lmap[SLJIT_SAVED_REG3]);
- }
- if (compiler->saveds >= 4) {
- *buf++ = REX_B;
- POP_REG(reg_lmap[SLJIT_SAVED_EREG1]);
- }
- if (compiler->saveds >= 5) {
- *buf++ = REX_B;
- POP_REG(reg_lmap[SLJIT_SAVED_EREG2]);
- }
-
- RET();
- return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/* Operators */
-/* --------------------------------------------------------------------- */
-
-static int emit_do_imm32(struct sljit_compiler *compiler, sljit_ub rex, sljit_ub opcode, sljit_w imm)
-{
- sljit_ub *buf;
-
- if (rex != 0) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 2 + sizeof(sljit_hw));
- FAIL_IF(!buf);
- INC_SIZE(2 + sizeof(sljit_hw));
- *buf++ = rex;
- *buf++ = opcode;
- *(sljit_hw*)buf = imm;
- }
- else {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1 + sizeof(sljit_hw));
- FAIL_IF(!buf);
- INC_SIZE(1 + sizeof(sljit_hw));
- *buf++ = opcode;
- *(sljit_hw*)buf = imm;
- }
- return SLJIT_SUCCESS;
-}
-
-static sljit_ub* emit_x86_instruction(struct sljit_compiler *compiler, int size,
- /* The register or immediate operand. */
- int a, sljit_w imma,
- /* The general operand (not immediate). */
- int b, sljit_w immb)
-{
- sljit_ub *buf;
- sljit_ub *buf_ptr;
- sljit_ub rex = 0;
- int flags = size & ~0xf;
- int inst_size;
-
- /* The immediate operand must be 32 bit. */
- SLJIT_ASSERT(!(a & SLJIT_IMM) || compiler->mode32 || IS_HALFWORD(imma));
- /* Both cannot be switched on. */
- SLJIT_ASSERT((flags & (EX86_BIN_INS | EX86_SHIFT_INS)) != (EX86_BIN_INS | EX86_SHIFT_INS));
- /* Size flags not allowed for typed instructions. */
- SLJIT_ASSERT(!(flags & (EX86_BIN_INS | EX86_SHIFT_INS)) || (flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) == 0);
- /* Both size flags cannot be switched on. */
- SLJIT_ASSERT((flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) != (EX86_BYTE_ARG | EX86_HALF_ARG));
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- /* SSE2 and immediate is not possible. */
- SLJIT_ASSERT(!(a & SLJIT_IMM) || !(flags & EX86_SSE2));
-#endif
-
- size &= 0xf;
- inst_size = size;
-
- if ((b & SLJIT_MEM) && !(b & 0xf0) && NOT_HALFWORD(immb)) {
- if (emit_load_imm64(compiler, TMP_REG3, immb))
- return NULL;
- immb = 0;
- if (b & 0xf)
- b |= TMP_REG3 << 4;
- else
- b |= TMP_REG3;
- }
-
- if (!compiler->mode32 && !(flags & EX86_NO_REXW))
- rex |= REX_W;
- else if (flags & EX86_REX)
- rex |= REX;
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- if (flags & EX86_PREF_F2)
- inst_size++;
-#endif
- if (flags & EX86_PREF_66)
- inst_size++;
-
- /* Calculate size of b. */
- inst_size += 1; /* mod r/m byte. */
- if (b & SLJIT_MEM) {
- if ((b & 0x0f) == SLJIT_UNUSED)
- inst_size += 1 + sizeof(sljit_hw); /* SIB byte required to avoid RIP based addressing. */
- else {
- if (reg_map[b & 0x0f] >= 8)
- rex |= REX_B;
- if (immb != 0 && !(b & 0xf0)) {
- /* Immediate operand. */
- if (immb <= 127 && immb >= -128)
- inst_size += sizeof(sljit_b);
- else
- inst_size += sizeof(sljit_hw);
- }
- }
-
-#ifndef _WIN64
- if ((b & 0xf) == SLJIT_LOCALS_REG && (b & 0xf0) == 0)
- b |= SLJIT_LOCALS_REG << 4;
-#endif
-
- if ((b & 0xf0) != SLJIT_UNUSED) {
- inst_size += 1; /* SIB byte. */
- if (reg_map[(b >> 4) & 0x0f] >= 8)
- rex |= REX_X;
- }
- }
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- else if (!(flags & EX86_SSE2) && reg_map[b] >= 8)
- rex |= REX_B;
-#else
- else if (reg_map[b] >= 8)
- rex |= REX_B;
-#endif
-
- if (a & SLJIT_IMM) {
- if (flags & EX86_BIN_INS) {
- if (imma <= 127 && imma >= -128) {
- inst_size += 1;
- flags |= EX86_BYTE_ARG;
- } else
- inst_size += 4;
- }
- else if (flags & EX86_SHIFT_INS) {
- imma &= compiler->mode32 ? 0x1f : 0x3f;
- if (imma != 1) {
- inst_size ++;
- flags |= EX86_BYTE_ARG;
- }
- } else if (flags & EX86_BYTE_ARG)
- inst_size++;
- else if (flags & EX86_HALF_ARG)
- inst_size += sizeof(short);
- else
- inst_size += sizeof(sljit_hw);
- }
- else {
- SLJIT_ASSERT(!(flags & EX86_SHIFT_INS) || a == SLJIT_PREF_SHIFT_REG);
- /* reg_map[SLJIT_PREF_SHIFT_REG] is less than 8. */
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- if (!(flags & EX86_SSE2) && reg_map[a] >= 8)
- rex |= REX_R;
-#else
- if (reg_map[a] >= 8)
- rex |= REX_R;
-#endif
- }
-
- if (rex)
- inst_size++;
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + inst_size);
- PTR_FAIL_IF(!buf);
-
- /* Encoding the byte. */
- INC_SIZE(inst_size);
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- if (flags & EX86_PREF_F2)
- *buf++ = 0xf2;
-#endif
- if (flags & EX86_PREF_66)
- *buf++ = 0x66;
- if (rex)
- *buf++ = rex;
- buf_ptr = buf + size;
-
- /* Encode mod/rm byte. */
- if (!(flags & EX86_SHIFT_INS)) {
- if ((flags & EX86_BIN_INS) && (a & SLJIT_IMM))
- *buf = (flags & EX86_BYTE_ARG) ? 0x83 : 0x81;
-
- if ((a & SLJIT_IMM) || (a == 0))
- *buf_ptr = 0;
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- else if (!(flags & EX86_SSE2))
- *buf_ptr = reg_lmap[a] << 3;
- else
- *buf_ptr = a << 3;
-#else
- else
- *buf_ptr = reg_lmap[a] << 3;
-#endif
- }
- else {
- if (a & SLJIT_IMM) {
- if (imma == 1)
- *buf = 0xd1;
- else
- *buf = 0xc1;
- } else
- *buf = 0xd3;
- *buf_ptr = 0;
- }
-
- if (!(b & SLJIT_MEM))
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
- *buf_ptr++ |= 0xc0 + ((!(flags & EX86_SSE2)) ? reg_lmap[b] : b);
-#else
- *buf_ptr++ |= 0xc0 + reg_lmap[b];
-#endif
- else if ((b & 0x0f) != SLJIT_UNUSED) {
-#ifdef _WIN64
- SLJIT_ASSERT((b & 0xf0) != (SLJIT_LOCALS_REG << 4));
-#endif
- if ((b & 0xf0) == SLJIT_UNUSED || (b & 0xf0) == (SLJIT_LOCALS_REG << 4)) {
- if (immb != 0) {
- if (immb <= 127 && immb >= -128)
- *buf_ptr |= 0x40;
- else
- *buf_ptr |= 0x80;
- }
-
- if ((b & 0xf0) == SLJIT_UNUSED)
- *buf_ptr++ |= reg_lmap[b & 0x0f];
- else {
- *buf_ptr++ |= 0x04;
- *buf_ptr++ = reg_lmap[b & 0x0f] | (reg_lmap[(b >> 4) & 0x0f] << 3);
- }
-
- if (immb != 0) {
- if (immb <= 127 && immb >= -128)
- *buf_ptr++ = immb; /* 8 bit displacement. */
- else {
- *(sljit_hw*)buf_ptr = immb; /* 32 bit displacement. */
- buf_ptr += sizeof(sljit_hw);
- }
- }
- }
- else {
- *buf_ptr++ |= 0x04;
- *buf_ptr++ = reg_lmap[b & 0x0f] | (reg_lmap[(b >> 4) & 0x0f] << 3) | (immb << 6);
- }
- }
- else {
- *buf_ptr++ |= 0x04;
- *buf_ptr++ = 0x25;
- *(sljit_hw*)buf_ptr = immb; /* 32 bit displacement. */
- buf_ptr += sizeof(sljit_hw);
- }
-
- if (a & SLJIT_IMM) {
- if (flags & EX86_BYTE_ARG)
- *buf_ptr = imma;
- else if (flags & EX86_HALF_ARG)
- *(short*)buf_ptr = imma;
- else if (!(flags & EX86_SHIFT_INS))
- *(sljit_hw*)buf_ptr = imma;
- }
-
- return !(flags & EX86_SHIFT_INS) ? buf : (buf + 1);
-}
-
-/* --------------------------------------------------------------------- */
-/* Call / return instructions */
-/* --------------------------------------------------------------------- */
-
-static SLJIT_INLINE int call_with_args(struct sljit_compiler *compiler, int type)
-{
- sljit_ub *buf;
-
-#ifndef _WIN64
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_TEMPORARY_REG2] == 6 && reg_map[SLJIT_TEMPORARY_REG1] < 8 && reg_map[SLJIT_TEMPORARY_REG3] < 8, args_registers);
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6));
- FAIL_IF(!buf);
- INC_SIZE((type < SLJIT_CALL3) ? 3 : 6);
- if (type >= SLJIT_CALL3) {
- *buf++ = REX_W;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (0x2 << 3) | reg_lmap[SLJIT_TEMPORARY_REG3];
- }
- *buf++ = REX_W;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (0x7 << 3) | reg_lmap[SLJIT_TEMPORARY_REG1];
-#else
- SLJIT_COMPILE_ASSERT(reg_map[SLJIT_TEMPORARY_REG2] == 2 && reg_map[SLJIT_TEMPORARY_REG1] < 8 && reg_map[SLJIT_TEMPORARY_REG3] < 8, args_registers);
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6));
- FAIL_IF(!buf);
- INC_SIZE((type < SLJIT_CALL3) ? 3 : 6);
- if (type >= SLJIT_CALL3) {
- *buf++ = REX_W | REX_R;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (0x0 << 3) | reg_lmap[SLJIT_TEMPORARY_REG3];
- }
- *buf++ = REX_W;
- *buf++ = 0x8b;
- *buf++ = 0xc0 | (0x1 << 3) | reg_lmap[SLJIT_TEMPORARY_REG1];
-#endif
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size)
-{
- sljit_ub *buf;
-
- CHECK_ERROR();
- check_sljit_emit_fast_enter(compiler, dst, dstw, args, temporaries, saveds, local_size);
-
- compiler->temporaries = temporaries;
- compiler->saveds = saveds;
- compiler->local_size = (local_size + sizeof(sljit_uw) - 1) & ~(sizeof(sljit_uw) - 1);
-#ifdef _WIN64
- compiler->local_size += 4 * sizeof(sljit_w);
-#endif
-
- /* For UNUSED dst. Uncommon, but possible. */
- if (dst == SLJIT_UNUSED)
- dst = TMP_REGISTER;
-
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER) {
- if (reg_map[dst] < 8) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!buf);
-
- INC_SIZE(1);
- POP_REG(reg_lmap[dst]);
- }
- else {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 2);
- FAIL_IF(!buf);
-
- INC_SIZE(2);
- *buf++ = REX_B;
- POP_REG(reg_lmap[dst]);
- }
- }
- else if (dst & SLJIT_MEM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- /* REX_W is not necessary (src is not immediate). */
- compiler->mode32 = 1;
-#endif
- buf = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
- FAIL_IF(!buf);
- *buf++ = 0x8f;
- }
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
-{
- sljit_ub *buf;
-
- CHECK_ERROR();
- check_sljit_emit_fast_return(compiler, src, srcw);
-
- CHECK_EXTRA_REGS(src, srcw, (void)0);
-
- if ((src & SLJIT_IMM) && NOT_HALFWORD(srcw)) {
- FAIL_IF(emit_load_imm64(compiler, TMP_REGISTER, srcw));
- src = TMP_REGISTER;
- }
-
- if (src >= SLJIT_TEMPORARY_REG1 && src <= TMP_REGISTER) {
- if (reg_map[src] < 8) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 1);
- FAIL_IF(!buf);
-
- INC_SIZE(1 + 1);
- PUSH_REG(reg_lmap[src]);
- }
- else {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 2 + 1);
- FAIL_IF(!buf);
-
- INC_SIZE(2 + 1);
- *buf++ = REX_B;
- PUSH_REG(reg_lmap[src]);
- }
- }
- else if (src & SLJIT_MEM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- /* REX_W is not necessary (src is not immediate). */
- compiler->mode32 = 1;
-#endif
- buf = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
- FAIL_IF(!buf);
- *buf++ = 0xff;
- *buf |= 6 << 3;
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!buf);
- INC_SIZE(1);
- }
- else {
- SLJIT_ASSERT(IS_HALFWORD(srcw));
- /* SLJIT_IMM. */
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 5 + 1);
- FAIL_IF(!buf);
-
- INC_SIZE(5 + 1);
- *buf++ = 0x68;
- *(sljit_hw*)buf = srcw;
- buf += sizeof(sljit_hw);
- }
-
- RET();
- return SLJIT_SUCCESS;
-}
-
-
-/* --------------------------------------------------------------------- */
-/* Extend input */
-/* --------------------------------------------------------------------- */
-
-static int emit_mov_int(struct sljit_compiler *compiler, int sign,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- sljit_ub* code;
- int dst_r;
-
- compiler->mode32 = 0;
-
- if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
- return SLJIT_SUCCESS; /* Empty instruction. */
-
- if (src & SLJIT_IMM) {
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- if (sign || ((sljit_uw)srcw <= 0x7fffffff)) {
- code = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_w)(sljit_i)srcw, dst, dstw);
- FAIL_IF(!code);
- *code = 0xc7;
- return SLJIT_SUCCESS;
- }
- return emit_load_imm64(compiler, dst, srcw);
- }
- compiler->mode32 = 1;
- code = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_w)(sljit_i)srcw, dst, dstw);
- FAIL_IF(!code);
- *code = 0xc7;
- compiler->mode32 = 0;
- return SLJIT_SUCCESS;
- }
-
- dst_r = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_SAVED_REG3) ? dst : TMP_REGISTER;
-
- if ((dst & SLJIT_MEM) && (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_SAVED_REG3))
- dst_r = src;
- else {
- if (sign) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, src, srcw);
- FAIL_IF(!code);
- *code++ = 0x63;
- } else {
- compiler->mode32 = 1;
- FAIL_IF(emit_mov(compiler, dst_r, 0, src, srcw));
- compiler->mode32 = 0;
- }
- }
-
- if (dst & SLJIT_MEM) {
- compiler->mode32 = 1;
- code = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x89;
- compiler->mode32 = 0;
- }
-
- return SLJIT_SUCCESS;
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitNativeX86_common.c b/src/third_party/pcre-8.30/sljit/sljitNativeX86_common.c
deleted file mode 100644
index 0a44163802f..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitNativeX86_common.c
+++ /dev/null
@@ -1,2858 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name()
-{
- return "x86" SLJIT_CPUINFO;
-}
-
-/*
- 32b register indexes:
- 0 - EAX
- 1 - ECX
- 2 - EDX
- 3 - EBX
- 4 - none
- 5 - EBP
- 6 - ESI
- 7 - EDI
-*/
-
-/*
- 64b register indexes:
- 0 - RAX
- 1 - RCX
- 2 - RDX
- 3 - RBX
- 4 - none
- 5 - RBP
- 6 - RSI
- 7 - RDI
- 8 - R8 - From now on REX prefix is required
- 9 - R9
- 10 - R10
- 11 - R11
- 12 - R12
- 13 - R13
- 14 - R14
- 15 - R15
-*/
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-
-/* Last register + 1. */
-#define TMP_REGISTER (SLJIT_NO_REGISTERS + 1)
-
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 2] = {
- 0, 0, 2, 1, 0, 0, 3, 6, 7, 0, 0, 4, 5
-};
-
-#define CHECK_EXTRA_REGS(p, w, do) \
- if (p >= SLJIT_TEMPORARY_EREG1 && p <= SLJIT_TEMPORARY_EREG2) { \
- w = compiler->temporaries_start + (p - SLJIT_TEMPORARY_EREG1) * sizeof(sljit_w); \
- p = SLJIT_MEM1(SLJIT_LOCALS_REG); \
- do; \
- } \
- else if (p >= SLJIT_SAVED_EREG1 && p <= SLJIT_SAVED_EREG2) { \
- w = compiler->saveds_start + (p - SLJIT_SAVED_EREG1) * sizeof(sljit_w); \
- p = SLJIT_MEM1(SLJIT_LOCALS_REG); \
- do; \
- }
-
-#else /* SLJIT_CONFIG_X86_32 */
-
-/* Last register + 1. */
-#define TMP_REGISTER (SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2 (SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3 (SLJIT_NO_REGISTERS + 3)
-
-/* Note: r12 & 0x7 == 0b100, which decoded as SIB byte present
- Note: avoid to use r12 and r13 for memory addessing
- therefore r12 is better for SAVED_EREG than SAVED_REG. */
-#ifndef _WIN64
-/* 1st passed in rdi, 2nd argument passed in rsi, 3rd in rdx. */
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 4] = {
- 0, 0, 6, 1, 8, 11, 3, 15, 14, 13, 12, 4, 2, 7, 9
-};
-/* low-map. reg_map & 0x7. */
-static SLJIT_CONST sljit_ub reg_lmap[SLJIT_NO_REGISTERS + 4] = {
- 0, 0, 6, 1, 0, 3, 3, 7, 6, 5, 4, 4, 2, 7, 1
-};
-#else
-/* 1st passed in rcx, 2nd argument passed in rdx, 3rd in r8. */
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 4] = {
- 0, 0, 2, 1, 11, 13, 3, 6, 7, 14, 12, 15, 10, 8, 9
-};
-/* low-map. reg_map & 0x7. */
-static SLJIT_CONST sljit_ub reg_lmap[SLJIT_NO_REGISTERS + 4] = {
- 0, 0, 2, 1, 3, 5, 3, 6, 7, 6, 4, 7, 2, 0, 1
-};
-#endif
-
-#define REX_W 0x48
-#define REX_R 0x44
-#define REX_X 0x42
-#define REX_B 0x41
-#define REX 0x40
-
-typedef unsigned int sljit_uhw;
-typedef int sljit_hw;
-
-#define IS_HALFWORD(x) ((x) <= 0x7fffffffll && (x) >= -0x80000000ll)
-#define NOT_HALFWORD(x) ((x) > 0x7fffffffll || (x) < -0x80000000ll)
-
-#define CHECK_EXTRA_REGS(p, w, do)
-
-#endif /* SLJIT_CONFIG_X86_32 */
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-#define TMP_FREG (SLJIT_FLOAT_REG4 + 1)
-#endif
-
-/* Size flags for emit_x86_instruction: */
-#define EX86_BIN_INS 0x0010
-#define EX86_SHIFT_INS 0x0020
-#define EX86_REX 0x0040
-#define EX86_NO_REXW 0x0080
-#define EX86_BYTE_ARG 0x0100
-#define EX86_HALF_ARG 0x0200
-#define EX86_PREF_66 0x0400
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-#define EX86_PREF_F2 0x0800
-#define EX86_SSE2 0x1000
-#endif
-
-#define INC_SIZE(s) (*buf++ = (s), compiler->size += (s))
-#define INC_CSIZE(s) (*code++ = (s), compiler->size += (s))
-
-#define PUSH_REG(r) (*buf++ = (0x50 + (r)))
-#define POP_REG(r) (*buf++ = (0x58 + (r)))
-#define RET() (*buf++ = (0xc3))
-#define RETN(n) (*buf++ = (0xc2), *buf++ = n, *buf++ = 0)
-/* r32, r/m32 */
-#define MOV_RM(mod, reg, rm) (*buf++ = (0x8b), *buf++ = (mod) << 6 | (reg) << 3 | (rm))
-
-static sljit_ub get_jump_code(int type)
-{
- switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_FLOAT_EQUAL:
- return 0x84;
-
- case SLJIT_C_NOT_EQUAL:
- case SLJIT_C_FLOAT_NOT_EQUAL:
- return 0x85;
-
- case SLJIT_C_LESS:
- case SLJIT_C_FLOAT_LESS:
- return 0x82;
-
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
- return 0x83;
-
- case SLJIT_C_GREATER:
- case SLJIT_C_FLOAT_GREATER:
- return 0x87;
-
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_LESS_EQUAL:
- return 0x86;
-
- case SLJIT_C_SIG_LESS:
- return 0x8c;
-
- case SLJIT_C_SIG_GREATER_EQUAL:
- return 0x8d;
-
- case SLJIT_C_SIG_GREATER:
- return 0x8f;
-
- case SLJIT_C_SIG_LESS_EQUAL:
- return 0x8e;
-
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_MUL_OVERFLOW:
- return 0x80;
-
- case SLJIT_C_NOT_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
- return 0x81;
-
- case SLJIT_C_FLOAT_NAN:
- return 0x8a;
-
- case SLJIT_C_FLOAT_NOT_NAN:
- return 0x8b;
- }
- return 0;
-}
-
-static sljit_ub* generate_far_jump_code(struct sljit_jump *jump, sljit_ub *code_ptr, int type);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-static sljit_ub* generate_fixed_jump(sljit_ub *code_ptr, sljit_w addr, int type);
-#endif
-
-static sljit_ub* generate_near_jump_code(struct sljit_jump *jump, sljit_ub *code_ptr, sljit_ub *code, int type)
-{
- int short_jump;
- sljit_uw label_addr;
-
- if (jump->flags & JUMP_LABEL)
- label_addr = (sljit_uw)(code + jump->u.label->size);
- else
- label_addr = jump->u.target;
- short_jump = (sljit_w)(label_addr - (jump->addr + 2)) >= -128 && (sljit_w)(label_addr - (jump->addr + 2)) <= 127;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if ((sljit_w)(label_addr - (jump->addr + 1)) > 0x7fffffffll || (sljit_w)(label_addr - (jump->addr + 1)) < -0x80000000ll)
- return generate_far_jump_code(jump, code_ptr, type);
-#endif
-
- if (type == SLJIT_JUMP) {
- if (short_jump)
- *code_ptr++ = 0xeb;
- else
- *code_ptr++ = 0xe9;
- jump->addr++;
- }
- else if (type >= SLJIT_FAST_CALL) {
- short_jump = 0;
- *code_ptr++ = 0xe8;
- jump->addr++;
- }
- else if (short_jump) {
- *code_ptr++ = get_jump_code(type) - 0x10;
- jump->addr++;
- }
- else {
- *code_ptr++ = 0x0f;
- *code_ptr++ = get_jump_code(type);
- jump->addr += 2;
- }
-
- if (short_jump) {
- jump->flags |= PATCH_MB;
- code_ptr += sizeof(sljit_b);
- } else {
- jump->flags |= PATCH_MW;
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- code_ptr += sizeof(sljit_w);
-#else
- code_ptr += sizeof(sljit_hw);
-#endif
- }
-
- return code_ptr;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
- struct sljit_memory_fragment *buf;
- sljit_ub *code;
- sljit_ub *code_ptr;
- sljit_ub *buf_ptr;
- sljit_ub *buf_end;
- sljit_ub len;
-
- struct sljit_label *label;
- struct sljit_jump *jump;
- struct sljit_const *const_;
-
- CHECK_ERROR_PTR();
- check_sljit_generate_code(compiler);
- reverse_buf(compiler);
-
- /* Second code generation pass. */
- code = (sljit_ub*)SLJIT_MALLOC_EXEC(compiler->size);
- PTR_FAIL_WITH_EXEC_IF(code);
- buf = compiler->buf;
-
- code_ptr = code;
- label = compiler->labels;
- jump = compiler->jumps;
- const_ = compiler->consts;
- do {
- buf_ptr = buf->memory;
- buf_end = buf_ptr + buf->used_size;
- do {
- len = *buf_ptr++;
- if (len > 0) {
- /* The code is already generated. */
- SLJIT_MEMMOVE(code_ptr, buf_ptr, len);
- code_ptr += len;
- buf_ptr += len;
- }
- else {
- if (*buf_ptr >= 4) {
- jump->addr = (sljit_uw)code_ptr;
- if (!(jump->flags & SLJIT_REWRITABLE_JUMP))
- code_ptr = generate_near_jump_code(jump, code_ptr, code, *buf_ptr - 4);
- else
- code_ptr = generate_far_jump_code(jump, code_ptr, *buf_ptr - 4);
- jump = jump->next;
- }
- else if (*buf_ptr == 0) {
- label->addr = (sljit_uw)code_ptr;
- label->size = code_ptr - code;
- label = label->next;
- }
- else if (*buf_ptr == 1) {
- const_->addr = ((sljit_uw)code_ptr) - sizeof(sljit_w);
- const_ = const_->next;
- }
- else {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- *code_ptr++ = (*buf_ptr == 2) ? 0xe8 /* call */ : 0xe9 /* jmp */;
- buf_ptr++;
- *(sljit_w*)code_ptr = *(sljit_w*)buf_ptr - ((sljit_w)code_ptr + sizeof(sljit_w));
- code_ptr += sizeof(sljit_w);
- buf_ptr += sizeof(sljit_w) - 1;
-#else
- code_ptr = generate_fixed_jump(code_ptr, *(sljit_w*)(buf_ptr + 1), *buf_ptr);
- buf_ptr += sizeof(sljit_w);
-#endif
- }
- buf_ptr++;
- }
- } while (buf_ptr < buf_end);
- SLJIT_ASSERT(buf_ptr == buf_end);
- buf = buf->next;
- } while (buf);
-
- SLJIT_ASSERT(!label);
- SLJIT_ASSERT(!jump);
- SLJIT_ASSERT(!const_);
-
- jump = compiler->jumps;
- while (jump) {
- if (jump->flags & PATCH_MB) {
- SLJIT_ASSERT((sljit_w)(jump->u.label->addr - (jump->addr + sizeof(sljit_b))) >= -128 && (sljit_w)(jump->u.label->addr - (jump->addr + sizeof(sljit_b))) <= 127);
- *(sljit_ub*)jump->addr = (sljit_ub)(jump->u.label->addr - (jump->addr + sizeof(sljit_b)));
- } else if (jump->flags & PATCH_MW) {
- if (jump->flags & JUMP_LABEL) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- *(sljit_w*)jump->addr = (sljit_w)(jump->u.label->addr - (jump->addr + sizeof(sljit_w)));
-#else
- SLJIT_ASSERT((sljit_w)(jump->u.label->addr - (jump->addr + sizeof(sljit_hw))) >= -0x80000000ll && (sljit_w)(jump->u.label->addr - (jump->addr + sizeof(sljit_hw))) <= 0x7fffffffll);
- *(sljit_hw*)jump->addr = (sljit_hw)(jump->u.label->addr - (jump->addr + sizeof(sljit_hw)));
-#endif
- }
- else {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- *(sljit_w*)jump->addr = (sljit_w)(jump->u.target - (jump->addr + sizeof(sljit_w)));
-#else
- SLJIT_ASSERT((sljit_w)(jump->u.target - (jump->addr + sizeof(sljit_hw))) >= -0x80000000ll && (sljit_w)(jump->u.target - (jump->addr + sizeof(sljit_hw))) <= 0x7fffffffll);
- *(sljit_hw*)jump->addr = (sljit_hw)(jump->u.target - (jump->addr + sizeof(sljit_hw)));
-#endif
- }
- }
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- else if (jump->flags & PATCH_MD)
- *(sljit_w*)jump->addr = jump->u.label->addr;
-#endif
-
- jump = jump->next;
- }
-
- /* Maybe we waste some space because of short jumps. */
- SLJIT_ASSERT(code_ptr <= code + compiler->size);
- compiler->error = SLJIT_ERR_COMPILED;
- compiler->executable_size = compiler->size;
- return (void*)code;
-}
-
-/* --------------------------------------------------------------------- */
-/* Operators */
-/* --------------------------------------------------------------------- */
-
-static int emit_cum_binary(struct sljit_compiler *compiler,
- sljit_ub op_rm, sljit_ub op_mr, sljit_ub op_imm, sljit_ub op_eax_imm,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w);
-
-static int emit_non_cum_binary(struct sljit_compiler *compiler,
- sljit_ub op_rm, sljit_ub op_mr, sljit_ub op_imm, sljit_ub op_eax_imm,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w);
-
-static int emit_mov(struct sljit_compiler *compiler,
- int dst, sljit_w dstw,
- int src, sljit_w srcw);
-
-static SLJIT_INLINE int emit_save_flags(struct sljit_compiler *compiler)
-{
- sljit_ub *buf;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 5);
- FAIL_IF(!buf);
- INC_SIZE(5);
- *buf++ = 0x9c; /* pushfd */
-#else
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 6);
- FAIL_IF(!buf);
- INC_SIZE(6);
- *buf++ = 0x9c; /* pushfq */
- *buf++ = 0x48;
-#endif
- *buf++ = 0x8d; /* lea esp/rsp, [esp/rsp + sizeof(sljit_w)] */
- *buf++ = 0x64;
- *buf++ = 0x24;
- *buf++ = sizeof(sljit_w);
- compiler->flags_saved = 1;
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int emit_restore_flags(struct sljit_compiler *compiler, int keep_flags)
-{
- sljit_ub *buf;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 5);
- FAIL_IF(!buf);
- INC_SIZE(5);
-#else
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 6);
- FAIL_IF(!buf);
- INC_SIZE(6);
- *buf++ = 0x48;
-#endif
- *buf++ = 0x8d; /* lea esp/rsp, [esp/rsp - sizeof(sljit_w)] */
- *buf++ = 0x64;
- *buf++ = 0x24;
- *buf++ = (sljit_ub)-(int)sizeof(sljit_w);
- *buf++ = 0x9d; /* popfd / popfq */
- compiler->flags_saved = keep_flags;
- return SLJIT_SUCCESS;
-}
-
-#ifdef _WIN32
-#include <malloc.h>
-
-static void SLJIT_CALL sljit_touch_stack(sljit_w local_size)
-{
- /* Workaround for calling _chkstk. */
- alloca(local_size);
-}
-#endif
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-#include "sljitNativeX86_32.c"
-#else
-#include "sljitNativeX86_64.c"
-#endif
-
-static int emit_mov(struct sljit_compiler *compiler,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- sljit_ub* code;
-
- if (dst == SLJIT_UNUSED) {
- /* No destination, doesn't need to setup flags. */
- if (src & SLJIT_MEM) {
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, src, srcw);
- FAIL_IF(!code);
- *code = 0x8b;
- }
- return SLJIT_SUCCESS;
- }
- if (src >= SLJIT_TEMPORARY_REG1 && src <= TMP_REGISTER) {
- code = emit_x86_instruction(compiler, 1, src, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x89;
- return SLJIT_SUCCESS;
- }
- if (src & SLJIT_IMM) {
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- return emit_do_imm(compiler, 0xb8 + reg_map[dst], srcw);
-#else
- if (!compiler->mode32) {
- if (NOT_HALFWORD(srcw))
- return emit_load_imm64(compiler, dst, srcw);
- }
- else
- return emit_do_imm32(compiler, (reg_map[dst] >= 8) ? REX_B : 0, 0xb8 + reg_lmap[dst], srcw);
-#endif
- }
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if (!compiler->mode32 && NOT_HALFWORD(srcw)) {
- FAIL_IF(emit_load_imm64(compiler, TMP_REG2, srcw));
- code = emit_x86_instruction(compiler, 1, TMP_REG2, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x89;
- return SLJIT_SUCCESS;
- }
-#endif
- code = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, dstw);
- FAIL_IF(!code);
- *code = 0xc7;
- return SLJIT_SUCCESS;
- }
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER) {
- code = emit_x86_instruction(compiler, 1, dst, 0, src, srcw);
- FAIL_IF(!code);
- *code = 0x8b;
- return SLJIT_SUCCESS;
- }
-
- /* Memory to memory move. Requires two instruction. */
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, src, srcw);
- FAIL_IF(!code);
- *code = 0x8b;
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x89;
- return SLJIT_SUCCESS;
-}
-
-#define EMIT_MOV(compiler, dst, dstw, src, srcw) \
- FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw));
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op)
-{
- sljit_ub *buf;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- int size;
-#endif
-
- CHECK_ERROR();
- check_sljit_emit_op0(compiler, op);
-
- switch (GET_OPCODE(op)) {
- case SLJIT_BREAKPOINT:
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!buf);
- INC_SIZE(1);
- *buf = 0xcc;
- break;
- case SLJIT_NOP:
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!buf);
- INC_SIZE(1);
- *buf = 0x90;
- break;
- case SLJIT_UMUL:
- case SLJIT_SMUL:
- case SLJIT_UDIV:
- case SLJIT_SDIV:
- compiler->flags_saved = 0;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-#ifdef _WIN64
- SLJIT_COMPILE_ASSERT(
- reg_map[SLJIT_TEMPORARY_REG1] == 0
- && reg_map[SLJIT_TEMPORARY_REG2] == 2
- && reg_map[TMP_REGISTER] > 7,
- invalid_register_assignment_for_div_mul);
-#else
- SLJIT_COMPILE_ASSERT(
- reg_map[SLJIT_TEMPORARY_REG1] == 0
- && reg_map[SLJIT_TEMPORARY_REG2] < 7
- && reg_map[TMP_REGISTER] == 2,
- invalid_register_assignment_for_div_mul);
-#endif
- compiler->mode32 = op & SLJIT_INT_OP;
-#endif
-
- op = GET_OPCODE(op);
- if (op == SLJIT_UDIV) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || defined(_WIN64)
- EMIT_MOV(compiler, TMP_REGISTER, 0, SLJIT_TEMPORARY_REG2, 0);
- buf = emit_x86_instruction(compiler, 1, SLJIT_TEMPORARY_REG2, 0, SLJIT_TEMPORARY_REG2, 0);
-#else
- buf = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, TMP_REGISTER, 0);
-#endif
- FAIL_IF(!buf);
- *buf = 0x33;
- }
-
- if (op == SLJIT_SDIV) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || defined(_WIN64)
- EMIT_MOV(compiler, TMP_REGISTER, 0, SLJIT_TEMPORARY_REG2, 0);
-#endif
-
- /* CDQ instruction */
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!buf);
- INC_SIZE(1);
- *buf = 0x99;
-#else
- if (compiler->mode32) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!buf);
- INC_SIZE(1);
- *buf = 0x99;
- } else {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 2);
- FAIL_IF(!buf);
- INC_SIZE(2);
- *buf++ = REX_W;
- *buf = 0x99;
- }
-#endif
- }
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 2);
- FAIL_IF(!buf);
- INC_SIZE(2);
- *buf++ = 0xf7;
- *buf = 0xc0 | ((op >= SLJIT_UDIV) ? reg_map[TMP_REGISTER] : reg_map[SLJIT_TEMPORARY_REG2]);
-#else
-#ifdef _WIN64
- size = (!compiler->mode32 || op >= SLJIT_UDIV) ? 3 : 2;
-#else
- size = (!compiler->mode32) ? 3 : 2;
-#endif
- buf = (sljit_ub*)ensure_buf(compiler, 1 + size);
- FAIL_IF(!buf);
- INC_SIZE(size);
-#ifdef _WIN64
- if (!compiler->mode32)
- *buf++ = REX_W | ((op >= SLJIT_UDIV) ? REX_B : 0);
- else if (op >= SLJIT_UDIV)
- *buf++ = REX_B;
- *buf++ = 0xf7;
- *buf = 0xc0 | ((op >= SLJIT_UDIV) ? reg_lmap[TMP_REGISTER] : reg_lmap[SLJIT_TEMPORARY_REG2]);
-#else
- if (!compiler->mode32)
- *buf++ = REX_W;
- *buf++ = 0xf7;
- *buf = 0xc0 | reg_map[SLJIT_TEMPORARY_REG2];
-#endif
-#endif
- switch (op) {
- case SLJIT_UMUL:
- *buf |= 4 << 3;
- break;
- case SLJIT_SMUL:
- *buf |= 5 << 3;
- break;
- case SLJIT_UDIV:
- *buf |= 6 << 3;
- break;
- case SLJIT_SDIV:
- *buf |= 7 << 3;
- break;
- }
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && !defined(_WIN64)
- EMIT_MOV(compiler, SLJIT_TEMPORARY_REG2, 0, TMP_REGISTER, 0);
-#endif
- break;
- }
-
- return SLJIT_SUCCESS;
-}
-
-#define ENCODE_PREFIX(prefix) \
- do { \
- code = (sljit_ub*)ensure_buf(compiler, 1 + 1); \
- FAIL_IF(!code); \
- INC_CSIZE(1); \
- *code = (prefix); \
- } while (0)
-
-static int emit_mov_byte(struct sljit_compiler *compiler, int sign,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- sljit_ub* code;
- int dst_r;
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- int work_r;
-#endif
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = 0;
-#endif
-
- if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
- return SLJIT_SUCCESS; /* Empty instruction. */
-
- if (src & SLJIT_IMM) {
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- return emit_do_imm(compiler, 0xb8 + reg_map[dst], srcw);
-#else
- return emit_load_imm64(compiler, dst, srcw);
-#endif
- }
- code = emit_x86_instruction(compiler, 1 | EX86_BYTE_ARG | EX86_NO_REXW, SLJIT_IMM, srcw, dst, dstw);
- FAIL_IF(!code);
- *code = 0xc6;
- return SLJIT_SUCCESS;
- }
-
- dst_r = (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER) ? dst : TMP_REGISTER;
-
- if ((dst & SLJIT_MEM) && src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- if (reg_map[src] >= 4) {
- SLJIT_ASSERT(dst_r == TMP_REGISTER);
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, 0);
- } else
- dst_r = src;
-#else
- dst_r = src;
-#endif
- }
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- else if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS && reg_map[src] >= 4) {
- /* src, dst are registers. */
- SLJIT_ASSERT(dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER);
- if (reg_map[dst] < 4) {
- if (dst != src)
- EMIT_MOV(compiler, dst, 0, src, 0);
- code = emit_x86_instruction(compiler, 2, dst, 0, dst, 0);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = sign ? 0xbe : 0xb6;
- }
- else {
- if (dst != src)
- EMIT_MOV(compiler, dst, 0, src, 0);
- if (sign) {
- /* shl reg, 24 */
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0);
- FAIL_IF(!code);
- *code |= 0x4 << 3;
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0);
- FAIL_IF(!code);
- /* shr/sar reg, 24 */
- *code |= 0x7 << 3;
- }
- else {
- /* and dst, 0xff */
- code = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 255, dst, 0);
- FAIL_IF(!code);
- *(code + 1) |= 0x4 << 3;
- }
- }
- return SLJIT_SUCCESS;
- }
-#endif
- else {
- /* src can be memory addr or reg_map[src] < 4 on x86_32 architectures. */
- code = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = sign ? 0xbe : 0xb6;
- }
-
- if (dst & SLJIT_MEM) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- if (dst_r == TMP_REGISTER) {
- /* Find a non-used register, whose reg_map[src] < 4. */
- if ((dst & 0xf) == SLJIT_TEMPORARY_REG1) {
- if ((dst & 0xf0) == (SLJIT_TEMPORARY_REG2 << 4))
- work_r = SLJIT_TEMPORARY_REG3;
- else
- work_r = SLJIT_TEMPORARY_REG2;
- }
- else {
- if ((dst & 0xf0) != (SLJIT_TEMPORARY_REG1 << 4))
- work_r = SLJIT_TEMPORARY_REG1;
- else if ((dst & 0xf) == SLJIT_TEMPORARY_REG2)
- work_r = SLJIT_TEMPORARY_REG3;
- else
- work_r = SLJIT_TEMPORARY_REG2;
- }
-
- if (work_r == SLJIT_TEMPORARY_REG1) {
- ENCODE_PREFIX(0x90 + reg_map[TMP_REGISTER]);
- }
- else {
- code = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0);
- FAIL_IF(!code);
- *code = 0x87;
- }
-
- code = emit_x86_instruction(compiler, 1, work_r, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x88;
-
- if (work_r == SLJIT_TEMPORARY_REG1) {
- ENCODE_PREFIX(0x90 + reg_map[TMP_REGISTER]);
- }
- else {
- code = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0);
- FAIL_IF(!code);
- *code = 0x87;
- }
- }
- else {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x88;
- }
-#else
- code = emit_x86_instruction(compiler, 1 | EX86_REX | EX86_NO_REXW, dst_r, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x88;
-#endif
- }
-
- return SLJIT_SUCCESS;
-}
-
-static int emit_mov_half(struct sljit_compiler *compiler, int sign,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- sljit_ub* code;
- int dst_r;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = 0;
-#endif
-
- if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
- return SLJIT_SUCCESS; /* Empty instruction. */
-
- if (src & SLJIT_IMM) {
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- return emit_do_imm(compiler, 0xb8 + reg_map[dst], srcw);
-#else
- return emit_load_imm64(compiler, dst, srcw);
-#endif
- }
- code = emit_x86_instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, srcw, dst, dstw);
- FAIL_IF(!code);
- *code = 0xc7;
- return SLJIT_SUCCESS;
- }
-
- dst_r = (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER) ? dst : TMP_REGISTER;
-
- if ((dst & SLJIT_MEM) && (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS))
- dst_r = src;
- else {
- code = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = sign ? 0xbf : 0xb7;
- }
-
- if (dst & SLJIT_MEM) {
- code = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x89;
- }
-
- return SLJIT_SUCCESS;
-}
-
-static int emit_unary(struct sljit_compiler *compiler, int un_index,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- sljit_ub* code;
-
- if (dst == SLJIT_UNUSED) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, srcw);
- code = emit_x86_instruction(compiler, 1, 0, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code++ = 0xf7;
- *code |= (un_index) << 3;
- return SLJIT_SUCCESS;
- }
- if (dst == src && dstw == srcw) {
- /* Same input and output */
- code = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
- FAIL_IF(!code);
- *code++ = 0xf7;
- *code |= (un_index) << 3;
- return SLJIT_SUCCESS;
- }
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- EMIT_MOV(compiler, dst, 0, src, srcw);
- code = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
- FAIL_IF(!code);
- *code++ = 0xf7;
- *code |= (un_index) << 3;
- return SLJIT_SUCCESS;
- }
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, srcw);
- code = emit_x86_instruction(compiler, 1, 0, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code++ = 0xf7;
- *code |= (un_index) << 3;
- EMIT_MOV(compiler, dst, dstw, TMP_REGISTER, 0);
- return SLJIT_SUCCESS;
-}
-
-static int emit_not_with_flags(struct sljit_compiler *compiler,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- sljit_ub* code;
-
- if (dst == SLJIT_UNUSED) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, srcw);
- code = emit_x86_instruction(compiler, 1, 0, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code++ = 0xf7;
- *code |= 0x2 << 3;
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code = 0x0b;
- return SLJIT_SUCCESS;
- }
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- EMIT_MOV(compiler, dst, 0, src, srcw);
- code = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
- FAIL_IF(!code);
- *code++ = 0xf7;
- *code |= 0x2 << 3;
- code = emit_x86_instruction(compiler, 1, dst, 0, dst, 0);
- FAIL_IF(!code);
- *code = 0x0b;
- return SLJIT_SUCCESS;
- }
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, srcw);
- code = emit_x86_instruction(compiler, 1, 0, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code++ = 0xf7;
- *code |= 0x2 << 3;
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code = 0x0b;
- EMIT_MOV(compiler, dst, dstw, TMP_REGISTER, 0);
- return SLJIT_SUCCESS;
-}
-
-static int emit_clz(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- sljit_ub* code;
- int dst_r;
-
- SLJIT_UNUSED_ARG(op);
- if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
- /* Just set the zero flag. */
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, srcw);
- code = emit_x86_instruction(compiler, 1, 0, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code++ = 0xf7;
- *code |= 0x2 << 3;
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 31, TMP_REGISTER, 0);
-#else
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, !(op & SLJIT_INT_OP) ? 63 : 31, TMP_REGISTER, 0);
-#endif
- FAIL_IF(!code);
- *code |= 0x5 << 3;
- return SLJIT_SUCCESS;
- }
-
- if (SLJIT_UNLIKELY(src & SLJIT_IMM)) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, srcw);
- src = TMP_REGISTER;
- srcw = 0;
- }
-
- code = emit_x86_instruction(compiler, 2, TMP_REGISTER, 0, src, srcw);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = 0xbd;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER)
- dst_r = dst;
- else {
- /* Find an unused temporary register. */
- if ((dst & 0xf) != SLJIT_TEMPORARY_REG1 && (dst & 0xf0) != (SLJIT_TEMPORARY_REG1 << 4))
- dst_r = SLJIT_TEMPORARY_REG1;
- else if ((dst & 0xf) != SLJIT_TEMPORARY_REG2 && (dst & 0xf0) != (SLJIT_TEMPORARY_REG2 << 4))
- dst_r = SLJIT_TEMPORARY_REG2;
- else
- dst_r = SLJIT_TEMPORARY_REG3;
- EMIT_MOV(compiler, dst, dstw, dst_r, 0);
- }
- EMIT_MOV(compiler, dst_r, 0, SLJIT_IMM, 32 + 31);
-#else
- dst_r = (dst >= SLJIT_TEMPORARY_REG1 && dst <= TMP_REGISTER) ? dst : TMP_REG2;
- compiler->mode32 = 0;
- EMIT_MOV(compiler, dst_r, 0, SLJIT_IMM, !(op & SLJIT_INT_OP) ? 64 + 63 : 32 + 31);
- compiler->mode32 = op & SLJIT_INT_OP;
-#endif
-
- code = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = 0x45;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- code = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 31, dst_r, 0);
-#else
- code = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, !(op & SLJIT_INT_OP) ? 63 : 31, dst_r, 0);
-#endif
- FAIL_IF(!code);
- *(code + 1) |= 0x6 << 3;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- if (dst & SLJIT_MEM) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x87;
- }
-#else
- if (dst & SLJIT_MEM)
- EMIT_MOV(compiler, dst, dstw, TMP_REG2, 0);
-#endif
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- sljit_ub* code;
- int update = 0;
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- int dst_is_ereg = 0;
- int src_is_ereg = 0;
-#else
- #define src_is_ereg 0
-#endif
-
- CHECK_ERROR();
- check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = op & SLJIT_INT_OP;
-#endif
- CHECK_EXTRA_REGS(dst, dstw, dst_is_ereg = 1);
- CHECK_EXTRA_REGS(src, srcw, src_is_ereg = 1);
-
- if (GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_MOVU_SI) {
- op = GET_OPCODE(op);
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = 0;
-#endif
-
- SLJIT_COMPILE_ASSERT(SLJIT_MOV + 7 == SLJIT_MOVU, movu_offset);
- if (op >= SLJIT_MOVU) {
- update = 1;
- op -= 7;
- }
-
- if (src & SLJIT_IMM) {
- switch (op) {
- case SLJIT_MOV_UB:
- srcw = (unsigned char)srcw;
- break;
- case SLJIT_MOV_SB:
- srcw = (signed char)srcw;
- break;
- case SLJIT_MOV_UH:
- srcw = (unsigned short)srcw;
- break;
- case SLJIT_MOV_SH:
- srcw = (signed short)srcw;
- break;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- case SLJIT_MOV_UI:
- srcw = (unsigned int)srcw;
- break;
- case SLJIT_MOV_SI:
- srcw = (signed int)srcw;
- break;
-#endif
- }
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- if (SLJIT_UNLIKELY(dst_is_ereg))
- return emit_mov(compiler, dst, dstw, src, srcw);
-#endif
- }
-
- if (SLJIT_UNLIKELY(update) && (src & SLJIT_MEM) && !src_is_ereg && (src & 0xf) && (srcw != 0 || (src & 0xf0) != 0)) {
- code = emit_x86_instruction(compiler, 1, src & 0xf, 0, src, srcw);
- FAIL_IF(!code);
- *code = 0x8d;
- src &= SLJIT_MEM | 0xf;
- srcw = 0;
- }
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- if (SLJIT_UNLIKELY(dst_is_ereg) && (!(op == SLJIT_MOV || op == SLJIT_MOV_UI || op == SLJIT_MOV_SI) || (src & SLJIT_MEM))) {
- SLJIT_ASSERT(dst == SLJIT_MEM1(SLJIT_LOCALS_REG));
- dst = TMP_REGISTER;
- }
-#endif
-
- switch (op) {
- case SLJIT_MOV:
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- case SLJIT_MOV_UI:
- case SLJIT_MOV_SI:
-#endif
- FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw));
- break;
- case SLJIT_MOV_UB:
- FAIL_IF(emit_mov_byte(compiler, 0, dst, dstw, src, (src & SLJIT_IMM) ? (unsigned char)srcw : srcw));
- break;
- case SLJIT_MOV_SB:
- FAIL_IF(emit_mov_byte(compiler, 1, dst, dstw, src, (src & SLJIT_IMM) ? (signed char)srcw : srcw));
- break;
- case SLJIT_MOV_UH:
- FAIL_IF(emit_mov_half(compiler, 0, dst, dstw, src, (src & SLJIT_IMM) ? (unsigned short)srcw : srcw));
- break;
- case SLJIT_MOV_SH:
- FAIL_IF(emit_mov_half(compiler, 1, dst, dstw, src, (src & SLJIT_IMM) ? (signed short)srcw : srcw));
- break;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- case SLJIT_MOV_UI:
- FAIL_IF(emit_mov_int(compiler, 0, dst, dstw, src, (src & SLJIT_IMM) ? (unsigned int)srcw : srcw));
- break;
- case SLJIT_MOV_SI:
- FAIL_IF(emit_mov_int(compiler, 1, dst, dstw, src, (src & SLJIT_IMM) ? (signed int)srcw : srcw));
- break;
-#endif
- }
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- if (SLJIT_UNLIKELY(dst_is_ereg) && dst == TMP_REGISTER)
- return emit_mov(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), dstw, TMP_REGISTER, 0);
-#endif
-
- if (SLJIT_UNLIKELY(update) && (dst & SLJIT_MEM) && (dst & 0xf) && (dstw != 0 || (dst & 0xf0) != 0)) {
- code = emit_x86_instruction(compiler, 1, dst & 0xf, 0, dst, dstw);
- FAIL_IF(!code);
- *code = 0x8d;
- }
- return SLJIT_SUCCESS;
- }
-
- if (SLJIT_UNLIKELY(GET_FLAGS(op)))
- compiler->flags_saved = 0;
-
- switch (GET_OPCODE(op)) {
- case SLJIT_NOT:
- if (SLJIT_UNLIKELY(op & SLJIT_SET_E))
- return emit_not_with_flags(compiler, dst, dstw, src, srcw);
- return emit_unary(compiler, 0x2, dst, dstw, src, srcw);
-
- case SLJIT_NEG:
- if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
- FAIL_IF(emit_save_flags(compiler));
- return emit_unary(compiler, 0x3, dst, dstw, src, srcw);
-
- case SLJIT_CLZ:
- if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
- FAIL_IF(emit_save_flags(compiler));
- return emit_clz(compiler, op, dst, dstw, src, srcw);
- }
-
- return SLJIT_SUCCESS;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- #undef src_is_ereg
-#endif
-}
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-
-#define BINARY_IMM(_op_imm_, _op_mr_, immw, arg, argw) \
- if (IS_HALFWORD(immw) || compiler->mode32) { \
- code = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
- FAIL_IF(!code); \
- *(code + 1) |= (_op_imm_); \
- } \
- else { \
- FAIL_IF(emit_load_imm64(compiler, TMP_REG2, immw)); \
- code = emit_x86_instruction(compiler, 1, TMP_REG2, 0, arg, argw); \
- FAIL_IF(!code); \
- *code = (_op_mr_); \
- }
-
-#define BINARY_EAX_IMM(_op_eax_imm_, immw) \
- FAIL_IF(emit_do_imm32(compiler, (!compiler->mode32) ? REX_W : 0, (_op_eax_imm_), immw))
-
-#else
-
-#define BINARY_IMM(_op_imm_, _op_mr_, immw, arg, argw) \
- code = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
- FAIL_IF(!code); \
- *(code + 1) |= (_op_imm_);
-
-#define BINARY_EAX_IMM(_op_eax_imm_, immw) \
- FAIL_IF(emit_do_imm(compiler, (_op_eax_imm_), immw))
-
-#endif
-
-static int emit_cum_binary(struct sljit_compiler *compiler,
- sljit_ub op_rm, sljit_ub op_mr, sljit_ub op_imm, sljit_ub op_eax_imm,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- sljit_ub* code;
-
- if (dst == SLJIT_UNUSED) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- if (src2 & SLJIT_IMM) {
- BINARY_IMM(op_imm, op_mr, src2w, TMP_REGISTER, 0);
- }
- else {
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, src2, src2w);
- FAIL_IF(!code);
- *code = op_rm;
- }
- return SLJIT_SUCCESS;
- }
-
- if (dst == src1 && dstw == src1w) {
- if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if ((dst == SLJIT_TEMPORARY_REG1) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
-#else
- if ((dst == SLJIT_TEMPORARY_REG1) && (src2w > 127 || src2w < -128)) {
-#endif
- BINARY_EAX_IMM(op_eax_imm, src2w);
- }
- else {
- BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
- }
- }
- else if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- code = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
- FAIL_IF(!code);
- *code = op_rm;
- }
- else if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= TMP_REGISTER) {
- /* Special exception for sljit_emit_cond_value. */
- code = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
- FAIL_IF(!code);
- *code = op_mr;
- }
- else {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src2, src2w);
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, dst, dstw);
- FAIL_IF(!code);
- *code = op_mr;
- }
- return SLJIT_SUCCESS;
- }
-
- /* Only for cumulative operations. */
- if (dst == src2 && dstw == src2w) {
- if (src1 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if ((dst == SLJIT_TEMPORARY_REG1) && (src1w > 127 || src1w < -128) && (compiler->mode32 || IS_HALFWORD(src1w))) {
-#else
- if ((dst == SLJIT_TEMPORARY_REG1) && (src1w > 127 || src1w < -128)) {
-#endif
- BINARY_EAX_IMM(op_eax_imm, src1w);
- }
- else {
- BINARY_IMM(op_imm, op_mr, src1w, dst, dstw);
- }
- }
- else if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- code = emit_x86_instruction(compiler, 1, dst, dstw, src1, src1w);
- FAIL_IF(!code);
- *code = op_rm;
- }
- else if (src1 >= SLJIT_TEMPORARY_REG1 && src1 <= SLJIT_NO_REGISTERS) {
- code = emit_x86_instruction(compiler, 1, src1, src1w, dst, dstw);
- FAIL_IF(!code);
- *code = op_mr;
- }
- else {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, dst, dstw);
- FAIL_IF(!code);
- *code = op_mr;
- }
- return SLJIT_SUCCESS;
- }
-
- /* General version. */
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- EMIT_MOV(compiler, dst, 0, src1, src1w);
- if (src2 & SLJIT_IMM) {
- BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
- }
- else {
- code = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
- FAIL_IF(!code);
- *code = op_rm;
- }
- }
- else {
- /* This version requires less memory writing. */
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- if (src2 & SLJIT_IMM) {
- BINARY_IMM(op_imm, op_mr, src2w, TMP_REGISTER, 0);
- }
- else {
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, src2, src2w);
- FAIL_IF(!code);
- *code = op_rm;
- }
- EMIT_MOV(compiler, dst, dstw, TMP_REGISTER, 0);
- }
-
- return SLJIT_SUCCESS;
-}
-
-static int emit_non_cum_binary(struct sljit_compiler *compiler,
- sljit_ub op_rm, sljit_ub op_mr, sljit_ub op_imm, sljit_ub op_eax_imm,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- sljit_ub* code;
-
- if (dst == SLJIT_UNUSED) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- if (src2 & SLJIT_IMM) {
- BINARY_IMM(op_imm, op_mr, src2w, TMP_REGISTER, 0);
- }
- else {
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, src2, src2w);
- FAIL_IF(!code);
- *code = op_rm;
- }
- return SLJIT_SUCCESS;
- }
-
- if (dst == src1 && dstw == src1w) {
- if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if ((dst == SLJIT_TEMPORARY_REG1) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
-#else
- if ((dst == SLJIT_TEMPORARY_REG1) && (src2w > 127 || src2w < -128)) {
-#endif
- BINARY_EAX_IMM(op_eax_imm, src2w);
- }
- else {
- BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
- }
- }
- else if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- code = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
- FAIL_IF(!code);
- *code = op_rm;
- }
- else if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= SLJIT_NO_REGISTERS) {
- code = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
- FAIL_IF(!code);
- *code = op_mr;
- }
- else {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src2, src2w);
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, dst, dstw);
- FAIL_IF(!code);
- *code = op_mr;
- }
- return SLJIT_SUCCESS;
- }
-
- /* General version. */
- if ((dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) && dst != src2) {
- EMIT_MOV(compiler, dst, 0, src1, src1w);
- if (src2 & SLJIT_IMM) {
- BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
- }
- else {
- code = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
- FAIL_IF(!code);
- *code = op_rm;
- }
- }
- else {
- /* This version requires less memory writing. */
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- if (src2 & SLJIT_IMM) {
- BINARY_IMM(op_imm, op_mr, src2w, TMP_REGISTER, 0);
- }
- else {
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, src2, src2w);
- FAIL_IF(!code);
- *code = op_rm;
- }
- EMIT_MOV(compiler, dst, dstw, TMP_REGISTER, 0);
- }
-
- return SLJIT_SUCCESS;
-}
-
-static int emit_mul(struct sljit_compiler *compiler,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- sljit_ub* code;
- int dst_r;
-
- dst_r = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REGISTER;
-
- /* Register destination. */
- if (dst_r == src1 && !(src2 & SLJIT_IMM)) {
- code = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = 0xaf;
- }
- else if (dst_r == src2 && !(src1 & SLJIT_IMM)) {
- code = emit_x86_instruction(compiler, 2, dst_r, 0, src1, src1w);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = 0xaf;
- }
- else if (src1 & SLJIT_IMM) {
- if (src2 & SLJIT_IMM) {
- EMIT_MOV(compiler, dst_r, 0, SLJIT_IMM, src2w);
- src2 = dst_r;
- src2w = 0;
- }
-
- if (src1w <= 127 && src1w >= -128) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
- FAIL_IF(!code);
- *code = 0x6b;
- code = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!code);
- INC_CSIZE(1);
- *code = (sljit_b)src1w;
- }
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- else {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
- FAIL_IF(!code);
- *code = 0x69;
- code = (sljit_ub*)ensure_buf(compiler, 1 + 4);
- FAIL_IF(!code);
- INC_CSIZE(4);
- *(sljit_w*)code = src1w;
- }
-#else
- else if (IS_HALFWORD(src1w)) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
- FAIL_IF(!code);
- *code = 0x69;
- code = (sljit_ub*)ensure_buf(compiler, 1 + 4);
- FAIL_IF(!code);
- INC_CSIZE(4);
- *(sljit_hw*)code = (sljit_hw)src1w;
- }
- else {
- EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_IMM, src1w);
- if (dst_r != src2)
- EMIT_MOV(compiler, dst_r, 0, src2, src2w);
- code = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = 0xaf;
- }
-#endif
- }
- else if (src2 & SLJIT_IMM) {
- /* Note: src1 is NOT immediate. */
-
- if (src2w <= 127 && src2w >= -128) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
- FAIL_IF(!code);
- *code = 0x6b;
- code = (sljit_ub*)ensure_buf(compiler, 1 + 1);
- FAIL_IF(!code);
- INC_CSIZE(1);
- *code = (sljit_b)src2w;
- }
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- else {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
- FAIL_IF(!code);
- *code = 0x69;
- code = (sljit_ub*)ensure_buf(compiler, 1 + 4);
- FAIL_IF(!code);
- INC_CSIZE(4);
- *(sljit_w*)code = src2w;
- }
-#else
- else if (IS_HALFWORD(src2w)) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
- FAIL_IF(!code);
- *code = 0x69;
- code = (sljit_ub*)ensure_buf(compiler, 1 + 4);
- FAIL_IF(!code);
- INC_CSIZE(4);
- *(sljit_hw*)code = (sljit_hw)src2w;
- }
- else {
- EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_IMM, src1w);
- if (dst_r != src1)
- EMIT_MOV(compiler, dst_r, 0, src1, src1w);
- code = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = 0xaf;
- }
-#endif
- }
- else {
- /* Neither argument is immediate. */
- if (ADDRESSING_DEPENDS_ON(src2, dst_r))
- dst_r = TMP_REGISTER;
- EMIT_MOV(compiler, dst_r, 0, src1, src1w);
- code = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
- FAIL_IF(!code);
- *code++ = 0x0f;
- *code = 0xaf;
- }
-
- if (dst_r == TMP_REGISTER)
- EMIT_MOV(compiler, dst, dstw, TMP_REGISTER, 0);
-
- return SLJIT_SUCCESS;
-}
-
-static int emit_lea_binary(struct sljit_compiler *compiler,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- sljit_ub* code;
- int dst_r, done = 0;
-
- /* These cases better be left to handled by normal way. */
- if (dst == src1 && dstw == src1w)
- return SLJIT_ERR_UNSUPPORTED;
- if (dst == src2 && dstw == src2w)
- return SLJIT_ERR_UNSUPPORTED;
-
- dst_r = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REGISTER;
-
- if (src1 >= SLJIT_TEMPORARY_REG1 && src1 <= SLJIT_NO_REGISTERS) {
- if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= SLJIT_NO_REGISTERS) {
- /* It is not possible to be both SLJIT_LOCALS_REG. */
- if (src1 != SLJIT_LOCALS_REG || src2 != SLJIT_LOCALS_REG) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM2(src1, src2), 0);
- FAIL_IF(!code);
- *code = 0x8d;
- done = 1;
- }
- }
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if ((src2 & SLJIT_IMM) && (compiler->mode32 || IS_HALFWORD(src2w))) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), (int)src2w);
-#else
- if (src2 & SLJIT_IMM) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), src2w);
-#endif
- FAIL_IF(!code);
- *code = 0x8d;
- done = 1;
- }
- }
- else if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= SLJIT_NO_REGISTERS) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if ((src1 & SLJIT_IMM) && (compiler->mode32 || IS_HALFWORD(src1w))) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), (int)src1w);
-#else
- if (src1 & SLJIT_IMM) {
- code = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), src1w);
-#endif
- FAIL_IF(!code);
- *code = 0x8d;
- done = 1;
- }
- }
-
- if (done) {
- if (dst_r == TMP_REGISTER)
- return emit_mov(compiler, dst, dstw, TMP_REGISTER, 0);
- return SLJIT_SUCCESS;
- }
- return SLJIT_ERR_UNSUPPORTED;
-}
-
-static int emit_cmp_binary(struct sljit_compiler *compiler,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- sljit_ub* code;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if (src1 == SLJIT_TEMPORARY_REG1 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
-#else
- if (src1 == SLJIT_TEMPORARY_REG1 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128)) {
-#endif
- BINARY_EAX_IMM(0x3d, src2w);
- return SLJIT_SUCCESS;
- }
-
- if (src1 >= SLJIT_TEMPORARY_REG1 && src1 <= SLJIT_NO_REGISTERS) {
- if (src2 & SLJIT_IMM) {
- BINARY_IMM(0x7 << 3, 0x39, src2w, src1, 0);
- }
- else {
- code = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
- FAIL_IF(!code);
- *code = 0x3b;
- }
- return SLJIT_SUCCESS;
- }
-
- if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= SLJIT_NO_REGISTERS && !(src1 & SLJIT_IMM)) {
- code = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
- FAIL_IF(!code);
- *code = 0x39;
- return SLJIT_SUCCESS;
- }
-
- if (src2 & SLJIT_IMM) {
- if (src1 & SLJIT_IMM) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- src1 = TMP_REGISTER;
- src1w = 0;
- }
- BINARY_IMM(0x7 << 3, 0x39, src2w, src1, src1w);
- }
- else {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, src2, src2w);
- FAIL_IF(!code);
- *code = 0x3b;
- }
- return SLJIT_SUCCESS;
-}
-
-static int emit_test_binary(struct sljit_compiler *compiler,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- sljit_ub* code;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if (src1 == SLJIT_TEMPORARY_REG1 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
-#else
- if (src1 == SLJIT_TEMPORARY_REG1 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128)) {
-#endif
- BINARY_EAX_IMM(0xa9, src2w);
- return SLJIT_SUCCESS;
- }
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if (src2 == SLJIT_TEMPORARY_REG1 && (src2 & SLJIT_IMM) && (src1w > 127 || src1w < -128) && (compiler->mode32 || IS_HALFWORD(src1w))) {
-#else
- if (src2 == SLJIT_TEMPORARY_REG1 && (src1 & SLJIT_IMM) && (src1w > 127 || src1w < -128)) {
-#endif
- BINARY_EAX_IMM(0xa9, src1w);
- return SLJIT_SUCCESS;
- }
-
- if (src1 >= SLJIT_TEMPORARY_REG1 && src1 <= SLJIT_NO_REGISTERS) {
- if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if (IS_HALFWORD(src2w) || compiler->mode32) {
- code = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, 0);
- FAIL_IF(!code);
- *code = 0xf7;
- }
- else {
- FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src2w));
- code = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src1, 0);
- FAIL_IF(!code);
- *code = 0x85;
- }
-#else
- code = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, 0);
- FAIL_IF(!code);
- *code = 0xf7;
-#endif
- }
- else {
- code = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
- FAIL_IF(!code);
- *code = 0x85;
- }
- return SLJIT_SUCCESS;
- }
-
- if (src2 >= SLJIT_TEMPORARY_REG1 && src2 <= SLJIT_NO_REGISTERS) {
- if (src1 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if (IS_HALFWORD(src1w) || compiler->mode32) {
- code = emit_x86_instruction(compiler, 1, SLJIT_IMM, src1w, src2, 0);
- FAIL_IF(!code);
- *code = 0xf7;
- }
- else {
- FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src1w));
- code = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src2, 0);
- FAIL_IF(!code);
- *code = 0x85;
- }
-#else
- code = emit_x86_instruction(compiler, 1, src1, src1w, src2, 0);
- FAIL_IF(!code);
- *code = 0xf7;
-#endif
- }
- else {
- code = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
- FAIL_IF(!code);
- *code = 0x85;
- }
- return SLJIT_SUCCESS;
- }
-
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if (IS_HALFWORD(src2w) || compiler->mode32) {
- code = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code = 0xf7;
- }
- else {
- FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src2w));
- code = emit_x86_instruction(compiler, 1, TMP_REG2, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code = 0x85;
- }
-#else
- code = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code = 0xf7;
-#endif
- }
- else {
- code = emit_x86_instruction(compiler, 1, TMP_REGISTER, 0, src2, src2w);
- FAIL_IF(!code);
- *code = 0x85;
- }
- return SLJIT_SUCCESS;
-}
-
-static int emit_shift(struct sljit_compiler *compiler,
- sljit_ub mode,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- sljit_ub* code;
-
- if ((src2 & SLJIT_IMM) || (src2 == SLJIT_PREF_SHIFT_REG)) {
- if (dst == src1 && dstw == src1w) {
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, dstw);
- FAIL_IF(!code);
- *code |= mode;
- return SLJIT_SUCCESS;
- }
- if (dst == SLJIT_UNUSED) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code |= mode;
- return SLJIT_SUCCESS;
- }
- if (dst == SLJIT_PREF_SHIFT_REG && src2 == SLJIT_PREF_SHIFT_REG) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code |= mode;
- EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REGISTER, 0);
- return SLJIT_SUCCESS;
- }
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) {
- EMIT_MOV(compiler, dst, 0, src1, src1w);
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, 0);
- FAIL_IF(!code);
- *code |= mode;
- return SLJIT_SUCCESS;
- }
-
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code |= mode;
- EMIT_MOV(compiler, dst, dstw, TMP_REGISTER, 0);
- return SLJIT_SUCCESS;
- }
-
- if (dst == SLJIT_PREF_SHIFT_REG) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
- EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, src2, src2w);
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code |= mode;
- EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REGISTER, 0);
- }
- else if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS && dst != src2 && !ADDRESSING_DEPENDS_ON(src2, dst)) {
- if (src1 != dst)
- EMIT_MOV(compiler, dst, 0, src1, src1w);
- EMIT_MOV(compiler, TMP_REGISTER, 0, SLJIT_PREF_SHIFT_REG, 0);
- EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, src2, src2w);
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, dst, 0);
- FAIL_IF(!code);
- *code |= mode;
- EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REGISTER, 0);
- }
- else {
- /* This case is really difficult, since ecx itself may used for
- addressing, and we must ensure to work even in that case. */
- EMIT_MOV(compiler, TMP_REGISTER, 0, src1, src1w);
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_PREF_SHIFT_REG, 0);
-#else
- /* [esp - 4] is reserved for eflags. */
- EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), -(int)(2 * sizeof(sljit_w)), SLJIT_PREF_SHIFT_REG, 0);
-#endif
- EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, src2, src2w);
- code = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REGISTER, 0);
- FAIL_IF(!code);
- *code |= mode;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG2, 0);
-#else
- /* [esp - 4] is reserved for eflags. */
- EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), -(int)(2 * sizeof(sljit_w)));
-#endif
- EMIT_MOV(compiler, dst, dstw, TMP_REGISTER, 0);
- }
-
- return SLJIT_SUCCESS;
-}
-
-static int emit_shift_with_flags(struct sljit_compiler *compiler,
- sljit_ub mode, int set_flags,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- /* The CPU does not set flags if the shift count is 0. */
- if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if ((src2w & 0x3f) != 0 || (compiler->mode32 && (src2w & 0x1f) != 0))
- return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
-#else
- if ((src2w & 0x1f) != 0)
- return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
-#endif
- if (!set_flags)
- return emit_mov(compiler, dst, dstw, src1, src1w);
- /* OR dst, src, 0 */
- return emit_cum_binary(compiler, 0x0b, 0x09, 0x1 << 3, 0x0d,
- dst, dstw, src1, src1w, SLJIT_IMM, 0);
- }
-
- if (!set_flags)
- return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
-
- if (!(dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS))
- FAIL_IF(emit_cmp_binary(compiler, src1, src1w, SLJIT_IMM, 0));
-
- FAIL_IF(emit_shift(compiler,mode, dst, dstw, src1, src1w, src2, src2w));
-
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS)
- return emit_cmp_binary(compiler, dst, dstw, SLJIT_IMM, 0);
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- CHECK_ERROR();
- check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = op & SLJIT_INT_OP;
-#endif
- CHECK_EXTRA_REGS(dst, dstw, (void)0);
- CHECK_EXTRA_REGS(src1, src1w, (void)0);
- CHECK_EXTRA_REGS(src2, src2w, (void)0);
-
- if (GET_OPCODE(op) >= SLJIT_MUL) {
- if (SLJIT_UNLIKELY(GET_FLAGS(op)))
- compiler->flags_saved = 0;
- else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
- FAIL_IF(emit_save_flags(compiler));
- }
-
- switch (GET_OPCODE(op)) {
- case SLJIT_ADD:
- if (!GET_FLAGS(op)) {
- if (emit_lea_binary(compiler, dst, dstw, src1, src1w, src2, src2w) != SLJIT_ERR_UNSUPPORTED)
- return compiler->error;
- }
- else
- compiler->flags_saved = 0;
- if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
- FAIL_IF(emit_save_flags(compiler));
- return emit_cum_binary(compiler, 0x03, 0x01, 0x0 << 3, 0x05,
- dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_ADDC:
- if (SLJIT_UNLIKELY(compiler->flags_saved)) /* C flag must be restored. */
- FAIL_IF(emit_restore_flags(compiler, 1));
- else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS))
- FAIL_IF(emit_save_flags(compiler));
- if (SLJIT_UNLIKELY(GET_FLAGS(op)))
- compiler->flags_saved = 0;
- return emit_cum_binary(compiler, 0x13, 0x11, 0x2 << 3, 0x15,
- dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_SUB:
- if (!GET_FLAGS(op)) {
- if ((src2 & SLJIT_IMM) && emit_lea_binary(compiler, dst, dstw, src1, src1w, SLJIT_IMM, -src2w) != SLJIT_ERR_UNSUPPORTED)
- return compiler->error;
- }
- else
- compiler->flags_saved = 0;
- if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
- FAIL_IF(emit_save_flags(compiler));
- if (dst == SLJIT_UNUSED)
- return emit_cmp_binary(compiler, src1, src1w, src2, src2w);
- return emit_non_cum_binary(compiler, 0x2b, 0x29, 0x5 << 3, 0x2d,
- dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_SUBC:
- if (SLJIT_UNLIKELY(compiler->flags_saved)) /* C flag must be restored. */
- FAIL_IF(emit_restore_flags(compiler, 1));
- else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS))
- FAIL_IF(emit_save_flags(compiler));
- if (SLJIT_UNLIKELY(GET_FLAGS(op)))
- compiler->flags_saved = 0;
- return emit_non_cum_binary(compiler, 0x1b, 0x19, 0x3 << 3, 0x1d,
- dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_MUL:
- return emit_mul(compiler, dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_AND:
- if (dst == SLJIT_UNUSED)
- return emit_test_binary(compiler, src1, src1w, src2, src2w);
- return emit_cum_binary(compiler, 0x23, 0x21, 0x4 << 3, 0x25,
- dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_OR:
- return emit_cum_binary(compiler, 0x0b, 0x09, 0x1 << 3, 0x0d,
- dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_XOR:
- return emit_cum_binary(compiler, 0x33, 0x31, 0x6 << 3, 0x35,
- dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_SHL:
- return emit_shift_with_flags(compiler, 0x4 << 3, GET_FLAGS(op),
- dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_LSHR:
- return emit_shift_with_flags(compiler, 0x5 << 3, GET_FLAGS(op),
- dst, dstw, src1, src1w, src2, src2w);
- case SLJIT_ASHR:
- return emit_shift_with_flags(compiler, 0x7 << 3, GET_FLAGS(op),
- dst, dstw, src1, src1w, src2, src2w);
- }
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
-{
- check_sljit_get_register_index(reg);
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- if (reg == SLJIT_TEMPORARY_EREG1 || reg == SLJIT_TEMPORARY_EREG2
- || reg == SLJIT_SAVED_EREG1 || reg == SLJIT_SAVED_EREG2)
- return -1;
-#endif
- return reg_map[reg];
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, int size)
-{
- sljit_ub *buf;
-
- CHECK_ERROR();
- check_sljit_emit_op_custom(compiler, instruction, size);
- SLJIT_ASSERT(size > 0 && size < 16);
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + size);
- FAIL_IF(!buf);
- INC_SIZE(size);
- SLJIT_MEMMOVE(buf, instruction, size);
- return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/* Floating point operators */
-/* --------------------------------------------------------------------- */
-
-#if (defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO)
-static int sse2_available = 0;
-#endif
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-
-/* Alignment + 2 * 16 bytes. */
-static sljit_i sse2_data[3 + 4 + 4];
-static sljit_i *sse2_buffer;
-
-static void init_compiler()
-{
-#if (defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO)
- int features = 0;
-#endif
-
- sse2_buffer = (sljit_i*)(((sljit_uw)sse2_data + 15) & ~0xf);
- sse2_buffer[0] = 0;
- sse2_buffer[1] = 0x80000000;
- sse2_buffer[4] = 0xffffffff;
- sse2_buffer[5] = 0x7fffffff;
-
-#if (defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO)
-#ifdef __GNUC__
- /* AT&T syntax. */
- asm (
- "pushl %%ebx\n"
- "movl $0x1, %%eax\n"
- "cpuid\n"
- "popl %%ebx\n"
- "movl %%edx, %0\n"
- : "=g" (features)
- :
- : "%eax", "%ecx", "%edx"
- );
-#elif defined(_MSC_VER) || defined(__BORLANDC__)
- /* Intel syntax. */
- __asm {
- mov eax, 1
- push ebx
- cpuid
- pop ebx
- mov features, edx
- }
-#else
- #error "SLJIT_SSE2_AUTO is not implemented for this C compiler"
-#endif
- sse2_available = (features >> 26) & 0x1;
-#endif
-}
-
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)
-{
- /* Always available. */
- return 1;
-}
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-
-static int emit_sse2(struct sljit_compiler *compiler, sljit_ub opcode,
- int xmm1, int xmm2, sljit_w xmm2w)
-{
- sljit_ub *buf;
-
- buf = emit_x86_instruction(compiler, 2 | EX86_PREF_F2 | EX86_SSE2, xmm1, 0, xmm2, xmm2w);
- FAIL_IF(!buf);
- *buf++ = 0x0f;
- *buf = opcode;
- return SLJIT_SUCCESS;
-}
-
-static int emit_sse2_logic(struct sljit_compiler *compiler, sljit_ub opcode,
- int xmm1, int xmm2, sljit_w xmm2w)
-{
- sljit_ub *buf;
-
- buf = emit_x86_instruction(compiler, 2 | EX86_PREF_66 | EX86_SSE2, xmm1, 0, xmm2, xmm2w);
- FAIL_IF(!buf);
- *buf++ = 0x0f;
- *buf = opcode;
- return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE int emit_sse2_load(struct sljit_compiler *compiler,
- int dst, int src, sljit_w srcw)
-{
- return emit_sse2(compiler, 0x10, dst, src, srcw);
-}
-
-static SLJIT_INLINE int emit_sse2_store(struct sljit_compiler *compiler,
- int dst, sljit_w dstw, int src)
-{
- return emit_sse2(compiler, 0x11, src, dst, dstw);
-}
-
-#if !(defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO)
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
-#else
-static int sljit_emit_sse2_fop1(struct sljit_compiler *compiler, int op,
-#endif
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- int dst_r;
-
- CHECK_ERROR();
- check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = 1;
-#endif
-
- if (GET_OPCODE(op) == SLJIT_FCMP) {
- compiler->flags_saved = 0;
- if (dst >= SLJIT_FLOAT_REG1 && dst <= SLJIT_FLOAT_REG4)
- dst_r = dst;
- else {
- dst_r = TMP_FREG;
- FAIL_IF(emit_sse2_load(compiler, dst_r, dst, dstw));
- }
- return emit_sse2_logic(compiler, 0x2e, dst_r, src, srcw);
- }
-
- if (op == SLJIT_FMOV) {
- if (dst >= SLJIT_FLOAT_REG1 && dst <= SLJIT_FLOAT_REG4)
- return emit_sse2_load(compiler, dst, src, srcw);
- if (src >= SLJIT_FLOAT_REG1 && src <= SLJIT_FLOAT_REG4)
- return emit_sse2_store(compiler, dst, dstw, src);
- FAIL_IF(emit_sse2_load(compiler, TMP_FREG, src, srcw));
- return emit_sse2_store(compiler, dst, dstw, TMP_FREG);
- }
-
- if (dst >= SLJIT_FLOAT_REG1 && dst <= SLJIT_FLOAT_REG4) {
- dst_r = dst;
- if (dst != src)
- FAIL_IF(emit_sse2_load(compiler, dst_r, src, srcw));
- }
- else {
- dst_r = TMP_FREG;
- FAIL_IF(emit_sse2_load(compiler, dst_r, src, srcw));
- }
-
- switch (op) {
- case SLJIT_FNEG:
- FAIL_IF(emit_sse2_logic(compiler, 0x57, dst_r, SLJIT_MEM0(), (sljit_w)sse2_buffer));
- break;
-
- case SLJIT_FABS:
- FAIL_IF(emit_sse2_logic(compiler, 0x54, dst_r, SLJIT_MEM0(), (sljit_w)(sse2_buffer + 4)));
- break;
- }
-
- if (dst_r == TMP_FREG)
- return emit_sse2_store(compiler, dst, dstw, TMP_FREG);
- return SLJIT_SUCCESS;
-}
-
-#if !(defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO)
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
-#else
-static int sljit_emit_sse2_fop2(struct sljit_compiler *compiler, int op,
-#endif
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- int dst_r;
-
- CHECK_ERROR();
- check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = 1;
-#endif
-
- if (dst >= SLJIT_FLOAT_REG1 && dst <= SLJIT_FLOAT_REG4) {
- dst_r = dst;
- if (dst == src1)
- ; /* Do nothing here. */
- else if (dst == src2 && (op == SLJIT_FADD || op == SLJIT_FMUL)) {
- /* Swap arguments. */
- src2 = src1;
- src2w = src1w;
- }
- else if (dst != src2)
- FAIL_IF(emit_sse2_load(compiler, dst_r, src1, src1w));
- else {
- dst_r = TMP_FREG;
- FAIL_IF(emit_sse2_load(compiler, TMP_FREG, src1, src1w));
- }
- }
- else {
- dst_r = TMP_FREG;
- FAIL_IF(emit_sse2_load(compiler, TMP_FREG, src1, src1w));
- }
-
- switch (op) {
- case SLJIT_FADD:
- FAIL_IF(emit_sse2(compiler, 0x58, dst_r, src2, src2w));
- break;
-
- case SLJIT_FSUB:
- FAIL_IF(emit_sse2(compiler, 0x5c, dst_r, src2, src2w));
- break;
-
- case SLJIT_FMUL:
- FAIL_IF(emit_sse2(compiler, 0x59, dst_r, src2, src2w));
- break;
-
- case SLJIT_FDIV:
- FAIL_IF(emit_sse2(compiler, 0x5e, dst_r, src2, src2w));
- break;
- }
-
- if (dst_r == TMP_FREG)
- return emit_sse2_store(compiler, dst, dstw, TMP_FREG);
- return SLJIT_SUCCESS;
-}
-
-#endif
-
-#if (defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO) || !(defined SLJIT_SSE2 && SLJIT_SSE2)
-
-static int emit_fld(struct sljit_compiler *compiler,
- int src, sljit_w srcw)
-{
- sljit_ub *buf;
-
- if (src >= SLJIT_FLOAT_REG1 && src <= SLJIT_FLOAT_REG4) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 2);
- FAIL_IF(!buf);
- INC_SIZE(2);
- *buf++ = 0xd9;
- *buf = 0xc0 + src - 1;
- return SLJIT_SUCCESS;
- }
-
- buf = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
- FAIL_IF(!buf);
- *buf = 0xdd;
- return SLJIT_SUCCESS;
-}
-
-static int emit_fop(struct sljit_compiler *compiler,
- sljit_ub st_arg, sljit_ub st_arg2,
- sljit_ub m64fp_arg, sljit_ub m64fp_arg2,
- int src, sljit_w srcw)
-{
- sljit_ub *buf;
-
- if (src >= SLJIT_FLOAT_REG1 && src <= SLJIT_FLOAT_REG4) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 2);
- FAIL_IF(!buf);
- INC_SIZE(2);
- *buf++ = st_arg;
- *buf = st_arg2 + src;
- return SLJIT_SUCCESS;
- }
-
- buf = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
- FAIL_IF(!buf);
- *buf++ = m64fp_arg;
- *buf |= m64fp_arg2;
- return SLJIT_SUCCESS;
-}
-
-static int emit_fop_regs(struct sljit_compiler *compiler,
- sljit_ub st_arg, sljit_ub st_arg2,
- int src)
-{
- sljit_ub *buf;
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 2);
- FAIL_IF(!buf);
- INC_SIZE(2);
- *buf++ = st_arg;
- *buf = st_arg2 + src;
- return SLJIT_SUCCESS;
-}
-
-#if !(defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO)
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
-#else
-static int sljit_emit_fpu_fop1(struct sljit_compiler *compiler, int op,
-#endif
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
-#if !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- sljit_ub *buf;
-#endif
-
- CHECK_ERROR();
- check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = 1;
-#endif
-
- if (GET_OPCODE(op) == SLJIT_FCMP) {
- compiler->flags_saved = 0;
-#if !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- FAIL_IF(emit_fld(compiler, dst, dstw));
- FAIL_IF(emit_fop(compiler, 0xd8, 0xd8, 0xdc, 0x3 << 3, src, srcw));
-
- /* Copy flags. */
- EMIT_MOV(compiler, TMP_REGISTER, 0, SLJIT_TEMPORARY_REG1, 0);
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 3);
- FAIL_IF(!buf);
- INC_SIZE(3);
- *buf++ = 0xdf;
- *buf++ = 0xe0;
- /* Note: lahf is not supported on all x86-64 architectures. */
- *buf++ = 0x9e;
- EMIT_MOV(compiler, SLJIT_TEMPORARY_REG1, 0, TMP_REGISTER, 0);
-#else
- if (src >= SLJIT_FLOAT_REG1 && src <= SLJIT_FLOAT_REG4) {
- FAIL_IF(emit_fld(compiler, dst, dstw));
- FAIL_IF(emit_fop_regs(compiler, 0xdf, 0xe8, src));
- } else {
- FAIL_IF(emit_fld(compiler, src, srcw));
- FAIL_IF(emit_fld(compiler, dst + ((dst >= SLJIT_FLOAT_REG1 && dst <= SLJIT_FLOAT_REG4) ? 1 : 0), dstw));
- FAIL_IF(emit_fop_regs(compiler, 0xdf, 0xe8, src));
- FAIL_IF(emit_fop_regs(compiler, 0xdd, 0xd8, 0));
- }
-#endif
- return SLJIT_SUCCESS;
- }
-
- FAIL_IF(emit_fld(compiler, src, srcw));
-
- switch (op) {
- case SLJIT_FNEG:
- FAIL_IF(emit_fop_regs(compiler, 0xd9, 0xe0, 0));
- break;
- case SLJIT_FABS:
- FAIL_IF(emit_fop_regs(compiler, 0xd9, 0xe1, 0));
- break;
- }
-
- FAIL_IF(emit_fop(compiler, 0xdd, 0xd8, 0xdd, 0x3 << 3, dst, dstw));
-
- return SLJIT_SUCCESS;
-}
-
-#if !(defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO)
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
-#else
-static int sljit_emit_fpu_fop2(struct sljit_compiler *compiler, int op,
-#endif
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- CHECK_ERROR();
- check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = 1;
-#endif
-
- if (src1 >= SLJIT_FLOAT_REG1 && src1 <= SLJIT_FLOAT_REG4 && dst == src1) {
- FAIL_IF(emit_fld(compiler, src2, src2w));
-
- switch (op) {
- case SLJIT_FADD:
- FAIL_IF(emit_fop_regs(compiler, 0xde, 0xc0, src1));
- break;
- case SLJIT_FSUB:
- FAIL_IF(emit_fop_regs(compiler, 0xde, 0xe8, src1));
- break;
- case SLJIT_FMUL:
- FAIL_IF(emit_fop_regs(compiler, 0xde, 0xc8, src1));
- break;
- case SLJIT_FDIV:
- FAIL_IF(emit_fop_regs(compiler, 0xde, 0xf8, src1));
- break;
- }
- return SLJIT_SUCCESS;
- }
-
- FAIL_IF(emit_fld(compiler, src1, src1w));
-
- if (src2 >= SLJIT_FLOAT_REG1 && src2 <= SLJIT_FLOAT_REG4 && dst == src2) {
- switch (op) {
- case SLJIT_FADD:
- FAIL_IF(emit_fop_regs(compiler, 0xde, 0xc0, src2));
- break;
- case SLJIT_FSUB:
- FAIL_IF(emit_fop_regs(compiler, 0xde, 0xe0, src2));
- break;
- case SLJIT_FMUL:
- FAIL_IF(emit_fop_regs(compiler, 0xde, 0xc8, src2));
- break;
- case SLJIT_FDIV:
- FAIL_IF(emit_fop_regs(compiler, 0xde, 0xf0, src2));
- break;
- }
- return SLJIT_SUCCESS;
- }
-
- switch (op) {
- case SLJIT_FADD:
- FAIL_IF(emit_fop(compiler, 0xd8, 0xc0, 0xdc, 0x0 << 3, src2, src2w));
- break;
- case SLJIT_FSUB:
- FAIL_IF(emit_fop(compiler, 0xd8, 0xe0, 0xdc, 0x4 << 3, src2, src2w));
- break;
- case SLJIT_FMUL:
- FAIL_IF(emit_fop(compiler, 0xd8, 0xc8, 0xdc, 0x1 << 3, src2, src2w));
- break;
- case SLJIT_FDIV:
- FAIL_IF(emit_fop(compiler, 0xd8, 0xf0, 0xdc, 0x6 << 3, src2, src2w));
- break;
- }
-
- FAIL_IF(emit_fop(compiler, 0xdd, 0xd8, 0xdd, 0x3 << 3, dst, dstw));
-
- return SLJIT_SUCCESS;
-}
-#endif
-
-#if (defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO)
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src, sljit_w srcw)
-{
- if (sse2_available)
- return sljit_emit_sse2_fop1(compiler, op, dst, dstw, src, srcw);
- else
- return sljit_emit_fpu_fop1(compiler, op, dst, dstw, src, srcw);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
- int dst, sljit_w dstw,
- int src1, sljit_w src1w,
- int src2, sljit_w src2w)
-{
- if (sse2_available)
- return sljit_emit_sse2_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
- else
- return sljit_emit_fpu_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-}
-
-#endif
-
-/* --------------------------------------------------------------------- */
-/* Conditional instructions */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
- sljit_ub *buf;
- struct sljit_label *label;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_label(compiler);
-
- /* We should restore the flags before the label,
- since other taken jumps has their own flags as well. */
- if (SLJIT_UNLIKELY(compiler->flags_saved))
- PTR_FAIL_IF(emit_restore_flags(compiler, 0));
-
- if (compiler->last_label && compiler->last_label->size == compiler->size)
- return compiler->last_label;
-
- label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
- PTR_FAIL_IF(!label);
- set_label(label, compiler);
-
- buf = (sljit_ub*)ensure_buf(compiler, 2);
- PTR_FAIL_IF(!buf);
-
- *buf++ = 0;
- *buf++ = 0;
-
- return label;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type)
-{
- sljit_ub *buf;
- struct sljit_jump *jump;
-
- CHECK_ERROR_PTR();
- check_sljit_emit_jump(compiler, type);
-
- if (SLJIT_UNLIKELY(compiler->flags_saved)) {
- if ((type & 0xff) <= SLJIT_JUMP)
- PTR_FAIL_IF(emit_restore_flags(compiler, 0));
- compiler->flags_saved = 0;
- }
-
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- PTR_FAIL_IF_NULL(jump);
- set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
- type &= 0xff;
-
- if (type >= SLJIT_CALL1)
- PTR_FAIL_IF(call_with_args(compiler, type));
-
- /* Worst case size. */
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- compiler->size += (type >= SLJIT_JUMP) ? 5 : 6;
-#else
- compiler->size += (type >= SLJIT_JUMP) ? (10 + 3) : (2 + 10 + 3);
-#endif
-
- buf = (sljit_ub*)ensure_buf(compiler, 2);
- PTR_FAIL_IF_NULL(buf);
-
- *buf++ = 0;
- *buf++ = type + 4;
- return jump;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)
-{
- sljit_ub *code;
- struct sljit_jump *jump;
-
- CHECK_ERROR();
- check_sljit_emit_ijump(compiler, type, src, srcw);
-
- CHECK_EXTRA_REGS(src, srcw, (void)0);
- if (SLJIT_UNLIKELY(compiler->flags_saved)) {
- if (type <= SLJIT_JUMP)
- FAIL_IF(emit_restore_flags(compiler, 0));
- compiler->flags_saved = 0;
- }
-
- if (type >= SLJIT_CALL1) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
- if (src == SLJIT_TEMPORARY_REG3) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, 0);
- src = TMP_REGISTER;
- }
- if ((src & SLJIT_MEM) && (src & 0xf) == SLJIT_LOCALS_REG && type >= SLJIT_CALL3) {
- if (src & 0xf0) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, srcw);
- src = TMP_REGISTER;
- }
- else
- srcw += sizeof(sljit_w);
- }
-#else
- if ((src & SLJIT_MEM) && (src & 0xf) == SLJIT_LOCALS_REG) {
- if (src & 0xf0) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, srcw);
- src = TMP_REGISTER;
- }
- else
- srcw += sizeof(sljit_w) * (type - SLJIT_CALL0);
- }
-#endif
-#endif
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && defined(_WIN64)
- if (src == SLJIT_TEMPORARY_REG3) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, src, 0);
- src = TMP_REGISTER;
- }
-#endif
- FAIL_IF(call_with_args(compiler, type));
- }
-
- if (src == SLJIT_IMM) {
- jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
- FAIL_IF_NULL(jump);
- set_jump(jump, compiler, JUMP_ADDR);
- jump->u.target = srcw;
-
- /* Worst case size. */
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- compiler->size += 5;
-#else
- compiler->size += 10 + 3;
-#endif
-
- code = (sljit_ub*)ensure_buf(compiler, 2);
- FAIL_IF_NULL(code);
-
- *code++ = 0;
- *code++ = type + 4;
- }
- else {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- /* REX_W is not necessary (src is not immediate). */
- compiler->mode32 = 1;
-#endif
- code = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
- FAIL_IF(!code);
- *code++ = 0xff;
- *code |= (type >= SLJIT_FAST_CALL) ? (2 << 3) : (4 << 3);
- }
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)
-{
- sljit_ub *buf;
- sljit_ub cond_set = 0;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- int reg;
-#endif
-
- CHECK_ERROR();
- check_sljit_emit_cond_value(compiler, op, dst, dstw, type);
-
- if (dst == SLJIT_UNUSED)
- return SLJIT_SUCCESS;
-
- CHECK_EXTRA_REGS(dst, dstw, (void)0);
- if (SLJIT_UNLIKELY(compiler->flags_saved))
- FAIL_IF(emit_restore_flags(compiler, 0));
-
- switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_FLOAT_EQUAL:
- cond_set = 0x94;
- break;
-
- case SLJIT_C_NOT_EQUAL:
- case SLJIT_C_FLOAT_NOT_EQUAL:
- cond_set = 0x95;
- break;
-
- case SLJIT_C_LESS:
- case SLJIT_C_FLOAT_LESS:
- cond_set = 0x92;
- break;
-
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
- cond_set = 0x93;
- break;
-
- case SLJIT_C_GREATER:
- case SLJIT_C_FLOAT_GREATER:
- cond_set = 0x97;
- break;
-
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_LESS_EQUAL:
- cond_set = 0x96;
- break;
-
- case SLJIT_C_SIG_LESS:
- cond_set = 0x9c;
- break;
-
- case SLJIT_C_SIG_GREATER_EQUAL:
- cond_set = 0x9d;
- break;
-
- case SLJIT_C_SIG_GREATER:
- cond_set = 0x9f;
- break;
-
- case SLJIT_C_SIG_LESS_EQUAL:
- cond_set = 0x9e;
- break;
-
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_MUL_OVERFLOW:
- cond_set = 0x90;
- break;
-
- case SLJIT_C_NOT_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
- cond_set = 0x91;
- break;
-
- case SLJIT_C_FLOAT_NAN:
- cond_set = 0x9a;
- break;
-
- case SLJIT_C_FLOAT_NOT_NAN:
- cond_set = 0x9b;
- break;
- }
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- reg = (op == SLJIT_MOV && dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REGISTER;
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 4 + 4);
- FAIL_IF(!buf);
- INC_SIZE(4 + 4);
- /* Set low register to conditional flag. */
- *buf++ = (reg_map[reg] <= 7) ? 0x40 : REX_B;
- *buf++ = 0x0f;
- *buf++ = cond_set;
- *buf++ = 0xC0 | reg_lmap[reg];
- *buf++ = REX_W | (reg_map[reg] <= 7 ? 0 : (REX_B | REX_R));
- *buf++ = 0x0f;
- *buf++ = 0xb6;
- *buf = 0xC0 | (reg_lmap[reg] << 3) | reg_lmap[reg];
-
- if (reg == TMP_REGISTER) {
- if (op == SLJIT_MOV) {
- compiler->mode32 = 0;
- EMIT_MOV(compiler, dst, dstw, TMP_REGISTER, 0);
- }
- else {
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- return sljit_emit_op2(compiler, op, dst, dstw, dst, dstw, TMP_REGISTER, 0);
- }
- }
-#else
- if (op == SLJIT_MOV) {
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_TEMPORARY_REG3) {
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 3 + 3);
- FAIL_IF(!buf);
- INC_SIZE(3 + 3);
- /* Set low byte to conditional flag. */
- *buf++ = 0x0f;
- *buf++ = cond_set;
- *buf++ = 0xC0 | reg_map[dst];
-
- *buf++ = 0x0f;
- *buf++ = 0xb6;
- *buf = 0xC0 | (reg_map[dst] << 3) | reg_map[dst];
- }
- else {
- EMIT_MOV(compiler, TMP_REGISTER, 0, SLJIT_TEMPORARY_REG1, 0);
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 3 + 3);
- FAIL_IF(!buf);
- INC_SIZE(3 + 3);
- /* Set al to conditional flag. */
- *buf++ = 0x0f;
- *buf++ = cond_set;
- *buf++ = 0xC0;
-
- *buf++ = 0x0f;
- *buf++ = 0xb6;
- if (dst >= SLJIT_SAVED_REG1 && dst <= SLJIT_NO_REGISTERS)
- *buf = 0xC0 | (reg_map[dst] << 3);
- else {
- *buf = 0xC0;
- EMIT_MOV(compiler, dst, dstw, SLJIT_TEMPORARY_REG1, 0);
- }
-
- EMIT_MOV(compiler, SLJIT_TEMPORARY_REG1, 0, TMP_REGISTER, 0);
- }
- }
- else {
- if (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_TEMPORARY_REG3) {
- EMIT_MOV(compiler, TMP_REGISTER, 0, dst, 0);
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 3);
- FAIL_IF(!buf);
- INC_SIZE(3);
-
- *buf++ = 0x0f;
- *buf++ = cond_set;
- *buf++ = 0xC0 | reg_map[dst];
- }
- else {
- EMIT_MOV(compiler, TMP_REGISTER, 0, SLJIT_TEMPORARY_REG1, 0);
-
- buf = (sljit_ub*)ensure_buf(compiler, 1 + 3 + 3 + 1);
- FAIL_IF(!buf);
- INC_SIZE(3 + 3 + 1);
- /* Set al to conditional flag. */
- *buf++ = 0x0f;
- *buf++ = cond_set;
- *buf++ = 0xC0;
-
- *buf++ = 0x0f;
- *buf++ = 0xb6;
- *buf++ = 0xC0;
-
- *buf++ = 0x90 + reg_map[TMP_REGISTER];
- }
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
- compiler->skip_checks = 1;
-#endif
- return sljit_emit_op2(compiler, op, dst, dstw, dst, dstw, TMP_REGISTER, 0);
- }
-#endif
-
- return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)
-{
- sljit_ub *buf;
- struct sljit_const *const_;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- int reg;
-#endif
-
- CHECK_ERROR_PTR();
- check_sljit_emit_const(compiler, dst, dstw, init_value);
-
- CHECK_EXTRA_REGS(dst, dstw, (void)0);
-
- const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
- PTR_FAIL_IF(!const_);
- set_const(const_, compiler);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- compiler->mode32 = 0;
- reg = (dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REGISTER;
-
- if (emit_load_imm64(compiler, reg, init_value))
- return NULL;
-#else
- if (dst == SLJIT_UNUSED)
- dst = TMP_REGISTER;
-
- if (emit_mov(compiler, dst, dstw, SLJIT_IMM, init_value))
- return NULL;
-#endif
-
- buf = (sljit_ub*)ensure_buf(compiler, 2);
- PTR_FAIL_IF(!buf);
-
- *buf++ = 0;
- *buf++ = 1;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- if (reg == TMP_REGISTER && dst != SLJIT_UNUSED)
- if (emit_mov(compiler, dst, dstw, TMP_REGISTER, 0))
- return NULL;
-#endif
-
- return const_;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- *(sljit_w*)addr = new_addr - (addr + 4);
-#else
- *(sljit_uw*)addr = new_addr;
-#endif
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant)
-{
- *(sljit_w*)addr = new_constant;
-}
diff --git a/src/third_party/pcre-8.30/sljit/sljitUtils.c b/src/third_party/pcre-8.30/sljit/sljitUtils.c
deleted file mode 100644
index 98beaa0b5ee..00000000000
--- a/src/third_party/pcre-8.30/sljit/sljitUtils.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Stack-less Just-In-Time compiler
- *
- * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* ------------------------------------------------------------------------ */
-/* Locks */
-/* ------------------------------------------------------------------------ */
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR) || (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
-
-#ifdef _WIN32
-
-#include "windows.h"
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-
-static HANDLE allocator_mutex = 0;
-
-static SLJIT_INLINE void allocator_grab_lock(void)
-{
- /* No idea what to do if an error occures. Static mutexes should never fail... */
- if (!allocator_mutex)
- allocator_mutex = CreateMutex(NULL, TRUE, NULL);
- else
- WaitForSingleObject(allocator_mutex, INFINITE);
-}
-
-static SLJIT_INLINE void allocator_release_lock(void)
-{
- ReleaseMutex(allocator_mutex);
-}
-
-#endif /* SLJIT_EXECUTABLE_ALLOCATOR */
-
-#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
-
-static HANDLE global_mutex = 0;
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void)
-{
- /* No idea what to do if an error occures. Static mutexes should never fail... */
- if (!global_mutex)
- global_mutex = CreateMutex(NULL, TRUE, NULL);
- else
- WaitForSingleObject(global_mutex, INFINITE);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void)
-{
- ReleaseMutex(global_mutex);
-}
-
-#endif /* SLJIT_UTIL_GLOBAL_LOCK */
-
-#else /* _WIN32 */
-
-#include "pthread.h"
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-
-static pthread_mutex_t allocator_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-static SLJIT_INLINE void allocator_grab_lock(void)
-{
- pthread_mutex_lock(&allocator_mutex);
-}
-
-static SLJIT_INLINE void allocator_release_lock(void)
-{
- pthread_mutex_unlock(&allocator_mutex);
-}
-
-#endif /* SLJIT_EXECUTABLE_ALLOCATOR */
-
-#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
-
-static pthread_mutex_t global_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void)
-{
- pthread_mutex_lock(&global_mutex);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void)
-{
- pthread_mutex_unlock(&global_mutex);
-}
-
-#endif /* SLJIT_UTIL_GLOBAL_LOCK */
-
-#endif /* _WIN32 */
-
-/* ------------------------------------------------------------------------ */
-/* Stack */
-/* ------------------------------------------------------------------------ */
-
-#if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK)
-
-#ifdef _WIN32
-#include "windows.h"
-#else
-#include <sys/mman.h>
-#include <unistd.h>
-#endif
-
-/* Planning to make it even more clever in the future. */
-static sljit_w sljit_page_align = 0;
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(sljit_uw limit, sljit_uw max_limit)
-{
- struct sljit_stack *stack;
- union {
- void *ptr;
- sljit_uw uw;
- } base;
-#ifdef _WIN32
- SYSTEM_INFO si;
-#endif
-
- if (limit > max_limit || limit < 1)
- return NULL;
-
-#ifdef _WIN32
- if (!sljit_page_align) {
- GetSystemInfo(&si);
- sljit_page_align = si.dwPageSize - 1;
- }
-#else
- if (!sljit_page_align) {
- sljit_page_align = sysconf(_SC_PAGESIZE);
- /* Should never happen. */
- if (sljit_page_align < 0)
- sljit_page_align = 4096;
- sljit_page_align--;
- }
-#endif
-
- /* Align limit and max_limit. */
- max_limit = (max_limit + sljit_page_align) & ~sljit_page_align;
-
- stack = (struct sljit_stack*)SLJIT_MALLOC(sizeof(struct sljit_stack));
- if (!stack)
- return NULL;
-
-#ifdef _WIN32
- base.ptr = VirtualAlloc(0, max_limit, MEM_RESERVE, PAGE_READWRITE);
- if (!base.ptr) {
- SLJIT_FREE(stack);
- return NULL;
- }
- stack->base = base.uw;
- stack->limit = stack->base;
- stack->max_limit = stack->base + max_limit;
- if (sljit_stack_resize(stack, stack->base + limit)) {
- sljit_free_stack(stack);
- return NULL;
- }
-#else
- base.ptr = mmap(0, max_limit, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
- if (base.ptr == MAP_FAILED) {
- SLJIT_FREE(stack);
- return NULL;
- }
- stack->base = base.uw;
- stack->limit = stack->base + limit;
- stack->max_limit = stack->base + max_limit;
-#endif
- stack->top = stack->base;
- return stack;
-}
-
-#undef PAGE_ALIGN
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_free_stack(struct sljit_stack* stack)
-{
-#ifdef _WIN32
- VirtualFree((void*)stack->base, 0, MEM_RELEASE);
-#else
- munmap((void*)stack->base, stack->max_limit - stack->base);
-#endif
- SLJIT_FREE(stack);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_w SLJIT_CALL sljit_stack_resize(struct sljit_stack* stack, sljit_uw new_limit)
-{
- sljit_uw aligned_old_limit;
- sljit_uw aligned_new_limit;
-
- if ((new_limit > stack->max_limit) || (new_limit < stack->base))
- return -1;
-#ifdef _WIN32
- aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
- aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
- if (aligned_new_limit != aligned_old_limit) {
- if (aligned_new_limit > aligned_old_limit) {
- if (!VirtualAlloc((void*)aligned_old_limit, aligned_new_limit - aligned_old_limit, MEM_COMMIT, PAGE_READWRITE))
- return -1;
- }
- else {
- if (!VirtualFree((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MEM_DECOMMIT))
- return -1;
- }
- }
- stack->limit = new_limit;
- return 0;
-#else
- if (new_limit >= stack->limit) {
- stack->limit = new_limit;
- return 0;
- }
- aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
- aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
- if (aligned_new_limit < aligned_old_limit)
- madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MADV_DONTNEED);
- stack->limit = new_limit;
- return 0;
-#endif
-}
-
-#endif /* SLJIT_UTIL_STACK */
-
-#endif
diff --git a/src/third_party/pcre-8.30/testdata/grepinput b/src/third_party/pcre-8.30/testdata/grepinput
deleted file mode 100644
index 0f00edd93ca..00000000000
--- a/src/third_party/pcre-8.30/testdata/grepinput
+++ /dev/null
@@ -1,611 +0,0 @@
-This is a file of miscellaneous text that is used as test data for checking
-that the pcregrep command is working correctly. The file must be more than 24K
-long so that it needs more than a single read() call to process it. New
-features should be added at the end, because some of the tests involve the
-output of line numbers, and we don't want these to change.
-
-PATTERN at the start of a line.
-In the middle of a line, PATTERN appears.
-
-This pattern is in lower case.
-
-Here follows a whole lot of stuff that makes the file over 24K long.
-
--------------------------------------------------------------------------------
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
-lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
-jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
-brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
-
-aaaaa0
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-bbbbbb
-cccccccccccccccccccccccccccccccccccccccccc
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-eeeee
-aaaaa2
-ffffffffff
-
-This is a line before the binary zero.
-This line contains a binary zero here >
-This is a line after the binary zero.
-
-ABOVE the elephant
-ABOVE
-ABOVE theatre
-AB.VE
-AB.VE the turtle
-
-010203040506
-
-PUT NEW DATA ABOVE THIS LINE.
-=============================
-
-Check up on PATTERN near the end.
-This is the last line of this file.
diff --git a/src/third_party/pcre-8.30/testdata/grepinput3 b/src/third_party/pcre-8.30/testdata/grepinput3
deleted file mode 100644
index 7409cfc07a6..00000000000
--- a/src/third_party/pcre-8.30/testdata/grepinput3
+++ /dev/null
@@ -1,15 +0,0 @@
-triple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt
-
-triple: t2_txt s1_tag s_txt p_tag p_txt o_tag
-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.
-
-triple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt
-
-triple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt
-
-triple: t5_txt s1_tag s_txt p_tag p_txt o_tag
-o_txt
-
-triple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
-
-triple: t7_txt s1_tag s_txt p_tag p_txt o_tag o_txt
diff --git a/src/third_party/pcre-8.30/testdata/grepinput8 b/src/third_party/pcre-8.30/testdata/grepinput8
deleted file mode 100644
index c4b8c440f23..00000000000
--- a/src/third_party/pcre-8.30/testdata/grepinput8
+++ /dev/null
@@ -1,11 +0,0 @@
-X one
-X two X three X four X five
-X six
-X seven…X eight
X nine
X ten
-
-Before 111
-Before 222
Before 333…Match
-After 111
-After 222
After 333
-And so on and so on
-And so on and so on
diff --git a/src/third_party/pcre-8.30/testdata/grepinputv b/src/third_party/pcre-8.30/testdata/grepinputv
deleted file mode 100644
index d33d326b01d..00000000000
--- a/src/third_party/pcre-8.30/testdata/grepinputv
+++ /dev/null
@@ -1,4 +0,0 @@
-The quick brown
-fox jumps
-over the lazy dog.
-This time it jumps and jumps and jumps.
diff --git a/src/third_party/pcre-8.30/testdata/grepinputx b/src/third_party/pcre-8.30/testdata/grepinputx
deleted file mode 100644
index 730cc8a0d05..00000000000
--- a/src/third_party/pcre-8.30/testdata/grepinputx
+++ /dev/null
@@ -1,43 +0,0 @@
-This is a second file of input for the pcregrep tests.
-
-Here is the pattern again.
-
-Pattern
-That time it was on a line by itself.
-
-To pat or not to pat, that is the question.
-
-complete pair
-of lines
-
-That was a complete pair
-of lines all by themselves.
-
-complete pair
-of lines
-
-And there they were again, to check line numbers.
-
-one
-two
-three
-four
-five
-six
-seven
-eight
-nine
-ten
-eleven
-twelve
-thirteen
-fourteen
-fifteen
-sixteen
-seventeen
-eighteen
-nineteen
-twenty
-
-This line contains pattern not on a line by itself.
-This is the last line of this file.
diff --git a/src/third_party/pcre-8.30/testdata/greplist b/src/third_party/pcre-8.30/testdata/greplist
deleted file mode 100644
index 1434ae96f61..00000000000
--- a/src/third_party/pcre-8.30/testdata/greplist
+++ /dev/null
@@ -1,7 +0,0 @@
-This is a file of patterns for testing the -f option. Don't include any blank
-lines because they will match everything! This is no longer true, so have one.
-
-pattern
-line by itself
-
-End of the list of patterns.
diff --git a/src/third_party/pcre-8.30/testdata/grepoutput b/src/third_party/pcre-8.30/testdata/grepoutput
deleted file mode 100644
index 9b3fb296d13..00000000000
--- a/src/third_party/pcre-8.30/testdata/grepoutput
+++ /dev/null
@@ -1,640 +0,0 @@
----------------------------- Test 1 ------------------------------
-PATTERN at the start of a line.
-In the middle of a line, PATTERN appears.
-Check up on PATTERN near the end.
-RC=0
----------------------------- Test 2 ------------------------------
-PATTERN at the start of a line.
-RC=0
----------------------------- Test 3 ------------------------------
-7:PATTERN at the start of a line.
-8:In the middle of a line, PATTERN appears.
-10:This pattern is in lower case.
-610:Check up on PATTERN near the end.
-RC=0
----------------------------- Test 4 ------------------------------
-4
-RC=0
----------------------------- Test 5 ------------------------------
-./testdata/grepinput:7:PATTERN at the start of a line.
-./testdata/grepinput:8:In the middle of a line, PATTERN appears.
-./testdata/grepinput:10:This pattern is in lower case.
-./testdata/grepinput:610:Check up on PATTERN near the end.
-./testdata/grepinputx:3:Here is the pattern again.
-./testdata/grepinputx:5:Pattern
-./testdata/grepinputx:42:This line contains pattern not on a line by itself.
-RC=0
----------------------------- Test 6 ------------------------------
-7:PATTERN at the start of a line.
-8:In the middle of a line, PATTERN appears.
-10:This pattern is in lower case.
-610:Check up on PATTERN near the end.
-3:Here is the pattern again.
-5:Pattern
-42:This line contains pattern not on a line by itself.
-RC=0
----------------------------- Test 7 ------------------------------
-./testdata/grepinput
-./testdata/grepinputx
-RC=0
----------------------------- Test 8 ------------------------------
-./testdata/grepinput
-RC=0
----------------------------- Test 9 ------------------------------
-RC=0
----------------------------- Test 10 -----------------------------
-RC=1
----------------------------- Test 11 -----------------------------
-1:This is a second file of input for the pcregrep tests.
-2:
-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:
-43:This is the last line of this file.
-RC=0
----------------------------- Test 12 -----------------------------
-Pattern
-RC=0
----------------------------- Test 13 -----------------------------
-Here is the pattern again.
-That time it was on a line by itself.
-This line contains pattern not on a line by itself.
-RC=0
----------------------------- Test 14 -----------------------------
-./testdata/grepinputx:To pat or not to pat, that is the question.
-RC=0
----------------------------- Test 15 -----------------------------
-pcregrep: Error in command-line regex at offset 4: nothing to repeat
-RC=2
----------------------------- Test 16 -----------------------------
-pcregrep: Failed to open ./testdata/nonexistfile: No such file or directory
-RC=2
----------------------------- Test 17 -----------------------------
-features should be added at the end, because some of the tests involve the
-output of line numbers, and we don't want these to change.
-RC=0
----------------------------- Test 18 -----------------------------
-4:features should be added at the end, because some of the tests involve the
-output of line numbers, and we don't want these to change.
-583:brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
-RC=0
----------------------------- Test 19 -----------------------------
-Pattern
-RC=0
----------------------------- Test 20 -----------------------------
-10:complete pair
-of lines
-16:complete pair
-of lines
-RC=0
----------------------------- Test 21 -----------------------------
-24:four
-25-five
-26-six
-27-seven
---
-34:fourteen
-35-fifteen
-36-sixteen
-37-seventeen
-RC=0
----------------------------- Test 22 -----------------------------
-21-one
-22-two
-23-three
-24:four
---
-31-eleven
-32-twelve
-33-thirteen
-34:fourteen
-RC=0
----------------------------- Test 23 -----------------------------
-one
-two
-three
-four
-five
-six
-seven
---
-eleven
-twelve
-thirteen
-fourteen
-fifteen
-sixteen
-seventeen
-RC=0
----------------------------- Test 24 -----------------------------
-four
-five
-six
-seven
-eight
-nine
-ten
-eleven
-twelve
-thirteen
-fourteen
-fifteen
-sixteen
-seventeen
-eighteen
-nineteen
-twenty
-
-This line contains pattern not on a line by itself.
-This is the last line of this file.
-RC=0
----------------------------- Test 25 -----------------------------
-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
-RC=0
----------------------------- Test 26 -----------------------------
-
-complete pair
-of lines
-
-And there they were again, to check line numbers.
-
-one
-two
-three
-four
-five
-six
-seven
-eight
-nine
-ten
-eleven
-twelve
-thirteen
-fourteen
-fifteen
-sixteen
-seventeen
-eighteen
-nineteen
-twenty
-
-This line contains pattern not on a line by itself.
-This is the last line of this file.
-RC=0
----------------------------- Test 27 -----------------------------
-four
-five
-six
-seven
-eight
-nine
-ten
-eleven
-twelve
-thirteen
-fourteen
-fifteen
-sixteen
-seventeen
-eighteen
-nineteen
-twenty
-
-This line contains pattern not on a line by itself.
-This is the last line of this file.
-RC=0
----------------------------- Test 28 -----------------------------
-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
-RC=0
----------------------------- Test 29 -----------------------------
-of lines all by themselves.
-
-complete pair
-of lines
-
-And there they were again, to check line numbers.
-
-one
-two
-three
-four
-five
-six
-seven
-eight
-nine
-ten
-eleven
-twelve
-thirteen
-fourteen
-fifteen
-sixteen
-seventeen
-eighteen
-nineteen
-twenty
-
-This line contains pattern not on a line by itself.
-This is the last line of this file.
-RC=0
----------------------------- Test 30 -----------------------------
-./testdata/grepinput-4-features should be added at the end, because some of the tests involve the
-./testdata/grepinput-5-output of line numbers, and we don't want these to change.
-./testdata/grepinput-6-
-./testdata/grepinput:7:PATTERN at the start of a line.
-./testdata/grepinput:8:In the middle of a line, PATTERN appears.
-./testdata/grepinput-9-
-./testdata/grepinput:10:This pattern is in lower case.
---
-./testdata/grepinput-607-PUT NEW DATA ABOVE THIS LINE.
-./testdata/grepinput-608-=============================
-./testdata/grepinput-609-
-./testdata/grepinput:610:Check up on PATTERN near the end.
---
-./testdata/grepinputx-1-This is a second file of input for the pcregrep tests.
-./testdata/grepinputx-2-
-./testdata/grepinputx:3:Here is the pattern again.
-./testdata/grepinputx-4-
-./testdata/grepinputx:5:Pattern
---
-./testdata/grepinputx-39-nineteen
-./testdata/grepinputx-40-twenty
-./testdata/grepinputx-41-
-./testdata/grepinputx:42:This line contains pattern not on a line by itself.
-RC=0
----------------------------- Test 31 -----------------------------
-./testdata/grepinput:7:PATTERN at the start of a line.
-./testdata/grepinput:8:In the middle of a line, PATTERN appears.
-./testdata/grepinput-9-
-./testdata/grepinput:10:This pattern is in lower case.
-./testdata/grepinput-11-
-./testdata/grepinput-12-Here follows a whole lot of stuff that makes the file over 24K long.
-./testdata/grepinput-13-
---
-./testdata/grepinput:610:Check up on PATTERN near the end.
-./testdata/grepinput-611-This is the last line of this file.
---
-./testdata/grepinputx:3:Here is the pattern again.
-./testdata/grepinputx-4-
-./testdata/grepinputx:5:Pattern
-./testdata/grepinputx-6-That time it was on a line by itself.
-./testdata/grepinputx-7-
-./testdata/grepinputx-8-To pat or not to pat, that is the question.
---
-./testdata/grepinputx:42:This line contains pattern not on a line by itself.
-./testdata/grepinputx-43-This is the last line of this file.
-RC=0
----------------------------- Test 32 -----------------------------
-./testdata/grepinputx
-RC=0
----------------------------- Test 33 -----------------------------
-pcregrep: Failed to open ./testdata/grepnonexist: No such file or directory
-RC=2
----------------------------- Test 34 -----------------------------
-RC=2
----------------------------- Test 35 -----------------------------
-./testdata/grepinputx
-RC=0
----------------------------- Test 36 -----------------------------
-./testdata/grepinput3
-./testdata/grepinput8
-./testdata/grepinputx
-RC=0
----------------------------- Test 37 -----------------------------
-aaaaa0
-aaaaa2
-010203040506
-RC=0
-======== STDERR ========
-pcregrep: pcre_exec() gave error -8 while matching this text:
-
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-pcregrep: pcre_exec() gave error -8 while matching this text:
-
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-pcregrep: Error -8, -21 or -27 means that a resource limit was exceeded.
-pcregrep: Check your regex for nested unlimited loops.
----------------------------- Test 38 ------------------------------
-This line contains a binary zero here >
-RC=0
----------------------------- Test 39 ------------------------------
-This is a line before the binary zero.
-This line contains a binary zero here >
-RC=0
----------------------------- Test 40 ------------------------------
-This line contains a binary zero here >
-This is a line after the binary zero.
-RC=0
----------------------------- Test 41 ------------------------------
-before the binary zero
-after the binary zero
-RC=0
----------------------------- Test 42 ------------------------------
-./testdata/grepinput:595:before the binary zero
-./testdata/grepinput:597:after the binary zero
-RC=0
----------------------------- Test 43 ------------------------------
-595:before
-595:zero
-596:zero
-597:after
-597:zero
-RC=0
----------------------------- Test 44 ------------------------------
-595:before
-595:zero
-596:zero
-597:zero
-RC=0
----------------------------- Test 45 ------------------------------
-10:pattern
-595:binary
-596:binary
-597:binary
-RC=0
----------------------------- Test 46 ------------------------------
-pcregrep: Error in 2nd command-line regex at offset 9: missing )
-RC=2
----------------------------- Test 47 ------------------------------
-AB.VE
-RC=0
----------------------------- Test 48 ------------------------------
-ABOVE the elephant
-AB.VE
-AB.VE the turtle
-RC=0
----------------------------- Test 49 ------------------------------
-ABOVE the elephant
-AB.VE
-AB.VE the turtle
-PUT NEW DATA ABOVE THIS LINE.
-RC=0
----------------------------- Test 50 ------------------------------
-RC=1
----------------------------- Test 51 ------------------------------
-over the lazy dog.
-This time it jumps and jumps and jumps.
-RC=0
----------------------------- Test 52 ------------------------------
-fox jumps
-This time it jumps and jumps and jumps.
-RC=0
----------------------------- Test 53 ------------------------------
-36972,6
-36990,4
-37024,4
-37066,5
-37083,4
-RC=0
----------------------------- Test 54 ------------------------------
-595:15,6
-595:33,4
-596:28,4
-597:15,5
-597:32,4
-RC=0
----------------------------- Test 55 -----------------------------
-Here is the pattern again.
-That time it was on a line by itself.
-This line contains pattern not on a line by itself.
-RC=0
----------------------------- Test 56 -----------------------------
-./testdata/grepinput:456
-./testdata/grepinput3:0
-./testdata/grepinput8:0
-./testdata/grepinputv:1
-./testdata/grepinputx:0
-RC=0
----------------------------- Test 57 -----------------------------
-./testdata/grepinput:456
-./testdata/grepinputv:1
-RC=0
----------------------------- Test 58 -----------------------------
-PATTERN at the start of a line.
-In the middle of a line, PATTERN appears.
-Check up on PATTERN near the end.
-RC=0
----------------------------- Test 59 -----------------------------
-PATTERN at the start of a line.
-In the middle of a line, PATTERN appears.
-Check up on PATTERN near the end.
-RC=0
----------------------------- Test 60 -----------------------------
-PATTERN at the start of a line.
-In the middle of a line, PATTERN appears.
-Check up on PATTERN near the end.
-RC=0
----------------------------- Test 61 -----------------------------
-PATTERN at the start of a line.
-In the middle of a line, PATTERN appears.
-Check up on PATTERN near the end.
-RC=0
----------------------------- Test 62 -----------------------------
-pcregrep: pcre_exec() gave error -8 while matching text that starts:
-
-This is a file of miscellaneous text that is used as test data for checking
-that the pcregrep command is working correctly. The file must be more than 24K
-long so that it needs more than a single read
-
-pcregrep: Error -8, -21 or -27 means that a resource limit was exceeded.
-pcregrep: Check your regex for nested unlimited loops.
-RC=1
----------------------------- Test 63 -----------------------------
-pcregrep: pcre_exec() gave error -21 while matching text that starts:
-
-This is a file of miscellaneous text that is used as test data for checking
-that the pcregrep command is working correctly. The file must be more than 24K
-long so that it needs more than a single read
-
-pcregrep: Error -8, -21 or -27 means that a resource limit was exceeded.
-pcregrep: Check your regex for nested unlimited loops.
-RC=1
----------------------------- Test 64 ------------------------------
-appears
-RC=0
----------------------------- Test 65 ------------------------------
-pear
-RC=0
----------------------------- Test 66 ------------------------------
-RC=0
----------------------------- Test 67 ------------------------------
-RC=0
----------------------------- Test 68 ------------------------------
-pear
-RC=0
----------------------------- Test 69 -----------------------------
-1:This is a second file of input for the pcregrep tests.
-2:
-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:
-43:This is the last line of this file.
-RC=0
----------------------------- Test 70 -----------------------------
-triple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt
-
-triple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt
-
-triple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt
-
-triple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
-
-RC=0
----------------------------- Test 71 -----------------------------
-01
-RC=0
----------------------------- Test 72 -----------------------------
-010203040506
-RC=0
----------------------------- Test 73 -----------------------------
-01
-RC=0
----------------------------- Test 74 -----------------------------
-01
-02
-RC=0
----------------------------- Test 75 -----------------------------
-010203040506
-RC=0
----------------------------- Test 76 -----------------------------
-01
-02
-RC=0
----------------------------- Test 77 -----------------------------
-01
-03
-RC=0
----------------------------- Test 78 -----------------------------
-010203040506
-RC=0
----------------------------- Test 79 -----------------------------
-01
-03
-RC=0
----------------------------- Test 80 -----------------------------
-01
-RC=0
----------------------------- Test 81 -----------------------------
-010203040506
-RC=0
----------------------------- Test 82 -----------------------------
-01
-RC=0
----------------------------- Test 83 -----------------------------
-pcregrep: line 4 of file ./testdata/grepinput3 is too long for the internal buffer
-pcregrep: check the --buffer-size option
-RC=2
diff --git a/src/third_party/pcre-8.30/testdata/grepoutput8 b/src/third_party/pcre-8.30/testdata/grepoutput8
deleted file mode 100644
index 91493bdcf07..00000000000
--- a/src/third_party/pcre-8.30/testdata/grepoutput8
+++ /dev/null
@@ -1,12 +0,0 @@
----------------------------- Test U1 ------------------------------
-1:X one
-2:X two 3:X three 4:X four 5:X five
-6:X six
-7:X seven…8:X eight
9:X nine
10:X ten
-RC=0
----------------------------- Test U2 ------------------------------
-12-Before 111
-13-Before 222
14-Before 333…15:Match
-16-After 111
-17-After 222
18-After 333
-RC=0
diff --git a/src/third_party/pcre-8.30/testdata/grepoutputN b/src/third_party/pcre-8.30/testdata/grepoutputN
deleted file mode 100644
index 1f9f8801e3b..00000000000
--- a/src/third_party/pcre-8.30/testdata/grepoutputN
+++ /dev/null
@@ -1,16 +0,0 @@
----------------------------- Test N1 ------------------------------
-1:abc 2:def ---------------------------- Test N2 ------------------------------
-1:abc def
-2:ghi
-jkl---------------------------- Test N3 ------------------------------
-2:def 3:
-ghi
-jkl---------------------------- Test N4 ------------------------------
-2:ghi
-jkl---------------------------- Test N5 ------------------------------
-1:abc 2:def
-3:ghi
-4:jkl---------------------------- Test N6 ------------------------------
-1:abc 2:def
-3:ghi
-4:jkl \ No newline at end of file
diff --git a/src/third_party/pcre-8.30/testdata/greppatN4 b/src/third_party/pcre-8.30/testdata/greppatN4
deleted file mode 100644
index ea1bfc78ac4..00000000000
--- a/src/third_party/pcre-8.30/testdata/greppatN4
+++ /dev/null
@@ -1,2 +0,0 @@
-xxx
-jkl \ No newline at end of file
diff --git a/src/third_party/pcre-8.30/testdata/saved16 b/src/third_party/pcre-8.30/testdata/saved16
deleted file mode 100644
index ff5b11dff9b..00000000000
--- a/src/third_party/pcre-8.30/testdata/saved16
+++ /dev/null
Binary files differ
diff --git a/src/third_party/pcre-8.30/testdata/saved16BE-1 b/src/third_party/pcre-8.30/testdata/saved16BE-1
deleted file mode 100644
index 297f2f2f063..00000000000
--- a/src/third_party/pcre-8.30/testdata/saved16BE-1
+++ /dev/null
Binary files differ
diff --git a/src/third_party/pcre-8.30/testdata/saved16BE-2 b/src/third_party/pcre-8.30/testdata/saved16BE-2
deleted file mode 100644
index dade400e965..00000000000
--- a/src/third_party/pcre-8.30/testdata/saved16BE-2
+++ /dev/null
Binary files differ
diff --git a/src/third_party/pcre-8.30/testdata/saved16LE-1 b/src/third_party/pcre-8.30/testdata/saved16LE-1
deleted file mode 100644
index deb44919bbb..00000000000
--- a/src/third_party/pcre-8.30/testdata/saved16LE-1
+++ /dev/null
Binary files differ
diff --git a/src/third_party/pcre-8.30/testdata/saved16LE-2 b/src/third_party/pcre-8.30/testdata/saved16LE-2
deleted file mode 100644
index c8be985756c..00000000000
--- a/src/third_party/pcre-8.30/testdata/saved16LE-2
+++ /dev/null
Binary files differ
diff --git a/src/third_party/pcre-8.30/testdata/saved8 b/src/third_party/pcre-8.30/testdata/saved8
deleted file mode 100644
index 9b63b1db729..00000000000
--- a/src/third_party/pcre-8.30/testdata/saved8
+++ /dev/null
Binary files differ
diff --git a/src/third_party/pcre-8.30/testdata/testinput1 b/src/third_party/pcre-8.30/testdata/testinput1
deleted file mode 100644
index e0529e39635..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput1
+++ /dev/null
@@ -1,5253 +0,0 @@
-/-- This set of tests is for features that are compatible with all versions of
- Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and
- 16-bit PCRE libraries. --/
-
-/the quick brown fox/
- the quick brown fox
- The quick brown FOX
- What do you know about the quick brown fox?
- What do you know about THE QUICK BROWN FOX?
-
-/The quick brown fox/i
- the quick brown fox
- The quick brown FOX
- What do you know about the quick brown fox?
- What do you know about THE QUICK BROWN FOX?
-
-/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
- abcd\t\n\r\f\a\e9;\$\\?caxyz
-
-/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
- abxyzpqrrrabbxyyyypqAzz
- abxyzpqrrrabbxyyyypqAzz
- aabxyzpqrrrabbxyyyypqAzz
- aaabxyzpqrrrabbxyyyypqAzz
- aaaabxyzpqrrrabbxyyyypqAzz
- abcxyzpqrrrabbxyyyypqAzz
- aabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypAzz
- aaabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqAzz
- aaabcxyzpqrrrabbxyyyypqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- aaaabcxyzpqrrrabbxyyyypqAzz
- abxyzzpqrrrabbxyyyypqAzz
- aabxyzzzpqrrrabbxyyyypqAzz
- aaabxyzzzzpqrrrabbxyyyypqAzz
- aaaabxyzzzzpqrrrabbxyyyypqAzz
- abcxyzzpqrrrabbxyyyypqAzz
- aabcxyzzzpqrrrabbxyyyypqAzz
- aaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- aaabcxyzpqrrrabbxyyyypABzz
- aaabcxyzpqrrrabbxyyyypABBzz
- >>>aaabxyzpqrrrabbxyyyypqAzz
- >aaaabxyzpqrrrabbxyyyypqAzz
- >>>>abcxyzpqrrrabbxyyyypqAzz
- *** Failers
- abxyzpqrrabbxyyyypqAzz
- abxyzpqrrrrabbxyyyypqAzz
- abxyzpqrrrabxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
-
-/^(abc){1,2}zz/
- abczz
- abcabczz
- *** Failers
- zz
- abcabcabczz
- >>abczz
-
-/^(b+?|a){1,2}?c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- *** Failers
- aaac
- abbbbbbbbbbbac
-
-/^(b+|a){1,2}c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- *** Failers
- aaac
- abbbbbbbbbbbac
-
-/^(b+|a){1,2}?bc/
- bbc
-
-/^(b*|ba){1,2}?bc/
- babc
- bbabc
- bababc
- *** Failers
- bababbc
- babababc
-
-/^(ba|b*){1,2}?bc/
- babc
- bbabc
- bababc
- *** Failers
- bababbc
- babababc
-
-/^\ca\cA\c[\c{\c:/
- \x01\x01\e;z
-
-/^[ab\]cde]/
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
- *** Failers
- fthing
- [thing
- \\thing
-
-/^[]cde]/
- ]thing
- cthing
- dthing
- ething
- *** Failers
- athing
- fthing
-
-/^[^ab\]cde]/
- fthing
- [thing
- \\thing
- *** Failers
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
-
-/^[^]cde]/
- athing
- fthing
- *** Failers
- ]thing
- cthing
- dthing
- ething
-
-/^\/
-
-
-/^/
-
-
-/^[0-9]+$/
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 100
- *** Failers
- abc
-
-/^.*nter/
- enter
- inter
- uponter
-
-/^xxx[0-9]+$/
- xxx0
- xxx1234
- *** Failers
- xxx
-
-/^.+[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- *** Failers
- 123
- x1234
-
-/^.+?[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- *** Failers
- 123
- x1234
-
-/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
- abc!pqr=apquxz.ixr.zzz.ac.uk
- *** Failers
- !pqr=apquxz.ixr.zzz.ac.uk
- abc!=apquxz.ixr.zzz.ac.uk
- abc!pqr=apquxz:ixr.zzz.ac.uk
- abc!pqr=apquxz.ixr.zzz.ac.ukk
-
-/:/
- Well, we need a colon: somewhere
- *** Fail if we don't
-
-/([\da-f:]+)$/i
- 0abc
- abc
- fed
- E
- ::
- 5f03:12C0::932e
- fed def
- Any old stuff
- *** Failers
- 0zzz
- gzzz
- fed\x20
- Any old rubbish
-
-/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
- .1.2.3
- A.12.123.0
- *** Failers
- .1.2.3333
- 1.2.3
- 1234.2.3
-
-/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- 1 IN SOA non-sp1 non-sp2 (
- *** Failers
- 1IN SOA non-sp1 non-sp2(
-
-/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
- a.
- Z.
- 2.
- ab-c.pq-r.
- sxk.zzz.ac.uk.
- x-.y-.
- *** Failers
- -abc.peq.
-
-/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
- *.a
- *.b0-a
- *.c3-b.c
- *.c-a.b-c
- *** Failers
- *.0
- *.a-
- *.a-b.c-
- *.c-a.0-c
-
-/^(?=ab(de))(abd)(e)/
- abde
-
-/^(?!(ab)de|x)(abd)(f)/
- abdf
-
-/^(?=(ab(cd)))(ab)/
- abcd
-
-/^[\da-f](\.[\da-f])*$/i
- a.b.c.d
- A.B.C.D
- a.b.c.1.2.3.C
-
-/^\".*\"\s*(;.*)?$/
- \"1234\"
- \"abcd\" ;
- \"\" ; rhubarb
- *** Failers
- \"1234\" : things
-
-/^$/
- \
- *** Failers
-
-/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
- ab c
- *** Failers
- abc
- ab cde
-
-/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
- ab c
- *** Failers
- abc
- ab cde
-
-/^ a\ b[c ]d $/x
- a bcd
- a b d
- *** Failers
- abcd
- ab d
-
-/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
- abcdefhijklm
-
-/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
- abcdefhijklm
-
-/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
- a+ Z0+\x08\n\x1d\x12
-
-/^[.^$|()*+?{,}]+/
- .^\$(*+)|{?,?}
-
-/^a*\w/
- z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
-
-/^a*?\w/
- z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
-
-/^a+\w/
- az
- aaaz
- aa
- aaaa
- aa+
-
-/^a+?\w/
- az
- aaaz
- aa
- aaaa
- aa+
-
-/^\d{8}\w{2,}/
- 1234567890
- 12345678ab
- 12345678__
- *** Failers
- 1234567
-
-/^[aeiou\d]{4,5}$/
- uoie
- 1234
- 12345
- aaaaa
- *** Failers
- 123456
-
-/^[aeiou\d]{4,5}?/
- uoie
- 1234
- 12345
- aaaaa
- 123456
-
-/\A(abc|def)=(\1){2,3}\Z/
- abc=abcabc
- def=defdefdef
- *** Failers
- abc=defdef
-
-/^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/
- abcdefghijkcda2
- abcdefghijkkkkcda2
-
-/(cat(a(ract|tonic)|erpillar)) \1()2(3)/
- cataract cataract23
- catatonic catatonic23
- caterpillar caterpillar23
-
-
-/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
- From abcd Mon Sep 01 12:33:02 1997
-
-/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
- From abcd Mon Sep 01 12:33:02 1997
- From abcd Mon Sep 1 12:33:02 1997
- *** Failers
- From abcd Sep 01 12:33:02 1997
-
-/^12.34/s
- 12\n34
- 12\r34
-
-/\w+(?=\t)/
- the quick brown\t fox
-
-/foo(?!bar)(.*)/
- foobar is foolish see?
-
-/(?:(?!foo)...|^.{0,2})bar(.*)/
- foobar crowbar etc
- barrel
- 2barrel
- A barrel
-
-/^(\D*)(?=\d)(?!123)/
- abc456
- *** Failers
- abc123
-
-/^1234(?# test newlines
- inside)/
- 1234
-
-/^1234 #comment in extended re
- /x
- 1234
-
-/#rhubarb
- abcd/x
- abcd
-
-/^abcd#rhubarb/x
- abcd
-
-/^(a)\1{2,3}(.)/
- aaab
- aaaab
- aaaaab
- aaaaaab
-
-/(?!^)abc/
- the abc
- *** Failers
- abc
-
-/(?=^)abc/
- abc
- *** Failers
- the abc
-
-/^[ab]{1,3}(ab*|b)/
- aabbbbb
-
-/^[ab]{1,3}?(ab*|b)/
- aabbbbb
-
-/^[ab]{1,3}?(ab*?|b)/
- aabbbbb
-
-/^[ab]{1,3}(ab*?|b)/
- aabbbbb
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- *** Failers
- The quick brown fox
-
-/[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional leading comment
-(?:
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-# leading word
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
-(?:
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-|
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-) # "special" comment or quoted string
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
-)*
-<
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# <
-(?:
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-(?: ,
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-)* # additional domains
-:
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address spec
-> # >
-# name and address
-)
-/x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- *** Failers
- The quick brown fox
-
-/abc\0def\00pqr\000xyz\0000AB/
- abc\0def\00pqr\000xyz\0000AB
- abc456 abc\0def\00pqr\000xyz\0000ABCDE
-
-/abc\x0def\x00pqr\x000xyz\x0000AB/
- abc\x0def\x00pqr\x000xyz\x0000AB
- abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
-
-/^[\000-\037]/
- \0A
- \01B
- \037C
-
-/\0*/
- \0\0\0\0
-
-/A\x0{2,3}Z/
- The A\x0\x0Z
- An A\0\x0\0Z
- *** Failers
- A\0Z
- A\0\x0\0\x0Z
-
-/^(cow|)\1(bell)/
- cowcowbell
- bell
- *** Failers
- cowbell
-
-/^\s/
- \040abc
- \x0cabc
- \nabc
- \rabc
- \tabc
- *** Failers
- abc
-
-/^a b
- c/x
- abc
-
-/^(a|)\1*b/
- ab
- aaaab
- b
- *** Failers
- acb
-
-/^(a|)\1+b/
- aab
- aaaab
- b
- *** Failers
- ab
-
-/^(a|)\1?b/
- ab
- aab
- b
- *** Failers
- acb
-
-/^(a|)\1{2}b/
- aaab
- b
- *** Failers
- ab
- aab
- aaaab
-
-/^(a|)\1{2,3}b/
- aaab
- aaaab
- b
- *** Failers
- ab
- aab
- aaaaab
-
-/ab{1,3}bc/
- abbbbc
- abbbc
- abbc
- *** Failers
- abc
- abbbbbc
-
-/([^.]*)\.([^:]*):[T ]+(.*)/
- track1.title:TBlah blah blah
-
-/([^.]*)\.([^:]*):[T ]+(.*)/i
- track1.title:TBlah blah blah
-
-/([^.]*)\.([^:]*):[t ]+(.*)/i
- track1.title:TBlah blah blah
-
-/^[W-c]+$/
- WXY_^abc
- *** Failers
- wxy
-
-/^[W-c]+$/i
- WXY_^abc
- wxy_^ABC
-
-/^[\x3f-\x5F]+$/i
- WXY_^abc
- wxy_^ABC
-
-/^abc$/m
- abc
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
-/^abc$/
- abc
- *** Failers
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
-/\Aabc\Z/m
- abc
- abc\n
- *** Failers
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
-/\A(.)*\Z/s
- abc\ndef
-
-/\A(.)*\Z/m
- *** Failers
- abc\ndef
-
-/(?:b)|(?::+)/
- b::c
- c::b
-
-/[-az]+/
- az-
- *** Failers
- b
-
-/[az-]+/
- za-
- *** Failers
- b
-
-/[a\-z]+/
- a-z
- *** Failers
- b
-
-/[a-z]+/
- abcdxyz
-
-/[\d-]+/
- 12-34
- *** Failers
- aaa
-
-/[\d-z]+/
- 12-34z
- *** Failers
- aaa
-
-/\x5c/
- \\
-
-/\x20Z/
- the Zoo
- *** Failers
- Zulu
-
-/(abc)\1/i
- abcabc
- ABCabc
- abcABC
-
-/ab{3cd/
- ab{3cd
-
-/ab{3,cd/
- ab{3,cd
-
-/ab{3,4a}cd/
- ab{3,4a}cd
-
-/{4,5a}bc/
- {4,5a}bc
-
-/abc$/
- abc
- abc\n
- *** Failers
- abc\ndef
-
-/(abc)\123/
- abc\x53
-
-/(abc)\223/
- abc\x93
-
-/(abc)\323/
- abc\xd3
-
-/(abc)\100/
- abc\x40
- abc\100
-
-/(abc)\1000/
- abc\x400
- abc\x40\x30
- abc\1000
- abc\100\x30
- abc\100\060
- abc\100\60
-
-/abc\81/
- abc\081
- abc\0\x38\x31
-
-/abc\91/
- abc\091
- abc\0\x39\x31
-
-/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/
- abcdefghijkllS
-
-/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
- abcdefghijk\12S
-
-/ab\idef/
- abidef
-
-/a{0}bc/
- bc
-
-/(a|(bc)){0,0}?xyz/
- xyz
-
-/abc[\10]de/
- abc\010de
-
-/abc[\1]de/
- abc\1de
-
-/(abc)[\1]de/
- abc\1de
-
-/(?s)a.b/
- a\nb
-
-/^([^a])([^\b])([^c]*)([^d]{3,4})/
- baNOTccccd
- baNOTcccd
- baNOTccd
- bacccd
- *** Failers
- anything
- b\bc
- baccd
-
-/[^a]/
- Abc
-
-/[^a]/i
- Abc
-
-/[^a]+/
- AAAaAbc
-
-/[^a]+/i
- AAAaAbc
-
-/[^a]+/
- bbb\nccc
-
-/[^k]$/
- abc
- *** Failers
- abk
-
-/[^k]{2,3}$/
- abc
- kbc
- kabc
- *** Failers
- abk
- akb
- akk
-
-/^\d{8,}\@.+[^k]$/
- 12345678\@a.b.c.d
- 123456789\@x.y.z
- *** Failers
- 12345678\@x.y.uk
- 1234567\@a.b.c.d
-
-/(a)\1{8,}/
- aaaaaaaaa
- aaaaaaaaaa
- *** Failers
- aaaaaaa
-
-/[^a]/
- aaaabcd
- aaAabcd
-
-/[^a]/i
- aaaabcd
- aaAabcd
-
-/[^az]/
- aaaabcd
- aaAabcd
-
-/[^az]/i
- aaaabcd
- aaAabcd
-
-/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
- \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
-
-/P[^*]TAIRE[^*]{1,6}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
-
-/P[^*]TAIRE[^*]{1,}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
-
-/(\.\d\d[1-9]?)\d+/
- 1.230003938
- 1.875000282
- 1.235
-
-/(\.\d\d((?=0)|\d(?=\d)))/
- 1.230003938
- 1.875000282
- *** Failers
- 1.235
-
-/a(?)b/
- ab
-
-/\b(foo)\s+(\w+)/i
- Food is on the foo table
-
-/foo(.*)bar/
- The food is under the bar in the barn.
-
-/foo(.*?)bar/
- The food is under the bar in the barn.
-
-/(.*)(\d*)/
- I have 2 numbers: 53147
-
-/(.*)(\d+)/
- I have 2 numbers: 53147
-
-/(.*?)(\d*)/
- I have 2 numbers: 53147
-
-/(.*?)(\d+)/
- I have 2 numbers: 53147
-
-/(.*)(\d+)$/
- I have 2 numbers: 53147
-
-/(.*?)(\d+)$/
- I have 2 numbers: 53147
-
-/(.*)\b(\d+)$/
- I have 2 numbers: 53147
-
-/(.*\D)(\d+)$/
- I have 2 numbers: 53147
-
-/^\D*(?!123)/
- ABC123
-
-/^(\D*)(?=\d)(?!123)/
- ABC445
- *** Failers
- ABC123
-
-/^[W-]46]/
- W46]789
- -46]789
- *** Failers
- Wall
- Zebra
- 42
- [abcd]
- ]abcd[
-
-/^[W-\]46]/
- W46]789
- Wall
- Zebra
- Xylophone
- 42
- [abcd]
- ]abcd[
- \\backslash
- *** Failers
- -46]789
- well
-
-/\d\d\/\d\d\/\d\d\d\d/
- 01/01/2000
-
-/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-
-/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-
-/^(a){0,0}/
- bcd
- abc
- aab
-
-/^(a){0,1}/
- bcd
- abc
- aab
-
-/^(a){0,2}/
- bcd
- abc
- aab
-
-/^(a){0,3}/
- bcd
- abc
- aab
- aaa
-
-/^(a){0,}/
- bcd
- abc
- aab
- aaa
- aaaaaaaa
-
-/^(a){1,1}/
- bcd
- abc
- aab
-
-/^(a){1,2}/
- bcd
- abc
- aab
-
-/^(a){1,3}/
- bcd
- abc
- aab
- aaa
-
-/^(a){1,}/
- bcd
- abc
- aab
- aaa
- aaaaaaaa
-
-/.*\.gif/
- borfle\nbib.gif\nno
-
-/.{0,}\.gif/
- borfle\nbib.gif\nno
-
-/.*\.gif/m
- borfle\nbib.gif\nno
-
-/.*\.gif/s
- borfle\nbib.gif\nno
-
-/.*\.gif/ms
- borfle\nbib.gif\nno
-
-/.*$/
- borfle\nbib.gif\nno
-
-/.*$/m
- borfle\nbib.gif\nno
-
-/.*$/s
- borfle\nbib.gif\nno
-
-/.*$/ms
- borfle\nbib.gif\nno
-
-/.*$/
- borfle\nbib.gif\nno\n
-
-/.*$/m
- borfle\nbib.gif\nno\n
-
-/.*$/s
- borfle\nbib.gif\nno\n
-
-/.*$/ms
- borfle\nbib.gif\nno\n
-
-/(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/(.*X|^B)/m
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
-
-/(.*X|^B)/s
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/(.*X|^B)/ms
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
-
-/(?s)(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/(?s:.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/^.*B/
- **** Failers
- abc\nB
-
-/(?s)^.*B/
- abc\nB
-
-/(?m)^.*B/
- abc\nB
-
-/(?ms)^.*B/
- abc\nB
-
-/(?ms)^B/
- abc\nB
-
-/(?s)B$/
- B\n
-
-/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
- 123456654321
-
-/^\d\d\d\d\d\d\d\d\d\d\d\d/
- 123456654321
-
-/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
- 123456654321
-
-/^[abc]{12}/
- abcabcabcabc
-
-/^[a-c]{12}/
- abcabcabcabc
-
-/^(a|b|c){12}/
- abcabcabcabc
-
-/^[abcdefghijklmnopqrstuvwxy0123456789]/
- n
- *** Failers
- z
-
-/abcde{0,0}/
- abcd
- *** Failers
- abce
-
-/ab[cd]{0,0}e/
- abe
- *** Failers
- abcde
-
-/ab(c){0,0}d/
- abd
- *** Failers
- abcd
-
-/a(b*)/
- a
- ab
- abbbb
- *** Failers
- bbbbb
-
-/ab\d{0}e/
- abe
- *** Failers
- ab1e
-
-/"([^\\"]+|\\.)*"/
- the \"quick\" brown fox
- \"the \\\"quick\\\" brown fox\"
-
-/.*?/g+
- abc
-
-/\b/g+
- abc
-
-/\b/+g
- abc
-
-//g
- abc
-
-/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
- <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
-
-/a[^a]b/
- acb
- a\nb
-
-/a.b/
- acb
- *** Failers
- a\nb
-
-/a[^a]b/s
- acb
- a\nb
-
-/a.b/s
- acb
- a\nb
-
-/^(b+?|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
-
-/^(b+|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
-
-/(?!\A)x/m
- x\nb\n
- a\bx\n
-
-/\x0{ab}/
- \0{ab}
-
-/(A|B)*?CD/
- CD
-
-/(A|B)*CD/
- CD
-
-/(AB)*?\1/
- ABABAB
-
-/(AB)*\1/
- ABABAB
-
-/(?<!bar)foo/
- foo
- catfood
- arfootle
- rfoosh
- *** Failers
- barfoo
- towbarfoo
-
-/\w{3}(?<!bar)foo/
- catfood
- *** Failers
- foo
- barfoo
- towbarfoo
-
-/(?<=(foo)a)bar/
- fooabar
- *** Failers
- bar
- foobbar
-
-/\Aabc\z/m
- abc
- *** Failers
- abc\n
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
-
-/(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 1.875000282
- *** Failers
- 1.235
-
-/^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- *** Failers
- this is not a line with only words and spaces!
-
-/(\d+)(\w)/
- 12345a
- 12345+
-
-/((?>\d+))(\w)/
- 12345a
- *** Failers
- 12345+
-
-/(?>a+)b/
- aaab
-
-/((?>a+)b)/
- aaab
-
-/(?>(a+))b/
- aaab
-
-/(?>b)+/
- aaabbbccc
-
-/(?>a+|b+|c+)*c/
- aaabbbbccccd
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
-
-/\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- (abc(def)xyz)
- *** Failers
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/a(?-i)b/i
- ab
- Ab
- *** Failers
- aB
- AB
-
-/(a (?x)b c)d e/
- a bcd e
- *** Failers
- a b cd e
- abcd e
- a bcde
-
-/(a b(?x)c d (?-x)e f)/
- a bcde f
- *** Failers
- abcdef
-
-/(a(?i)b)c/
- abc
- aBc
- *** Failers
- abC
- aBC
- Abc
- ABc
- ABC
- AbC
-
-/a(?i:b)c/
- abc
- aBc
- *** Failers
- ABC
- abC
- aBC
-
-/a(?i:b)*c/
- aBc
- aBBc
- *** Failers
- aBC
- aBBC
-
-/a(?=b(?i)c)\w\wd/
- abcd
- abCd
- *** Failers
- aBCd
- abcD
-
-/(?s-i:more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
-
-/(?:(?s-i)more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
-
-/(?>a(?i)b+)+c/
- abc
- aBbc
- aBBc
- *** Failers
- Abc
- abAb
- abbC
-
-/(?=a(?i)b)\w\wc/
- abc
- aBc
- *** Failers
- Ab
- abC
- aBC
-
-/(?<=a(?i)b)(\w\w)c/
- abxxc
- aBxxc
- *** Failers
- Abxxc
- ABxxc
- abxxC
-
-/(?:(a)|b)(?(1)A|B)/
- aA
- bB
- *** Failers
- aB
- bA
-
-/^(a)?(?(1)a|b)+$/
- aa
- b
- bb
- *** Failers
- ab
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/(?(?<=foo)bar|cat)/
- foobar
- cat
- fcat
- focat
- *** Failers
- foocat
-
-/(?(?<!foo)cat|bar)/
- foobar
- cat
- fcat
- focat
- *** Failers
- foocat
-
-/( \( )? [^()]+ (?(1) \) |) /x
- abcd
- (abcd)
- the quick (abcd) fox
- (abcd
-
-/( \( )? [^()]+ (?(1) \) ) /x
- abcd
- (abcd)
- the quick (abcd) fox
- (abcd
-
-/^(?(2)a|(1)(2))+$/
- 12
- 12a
- 12aa
- *** Failers
- 1234
-
-/((?i)blah)\s+\1/
- blah blah
- BLAH BLAH
- Blah Blah
- blaH blaH
- *** Failers
- blah BLAH
- Blah blah
- blaH blah
-
-/((?i)blah)\s+(?i:\1)/
- blah blah
- BLAH BLAH
- Blah Blah
- blaH blaH
- blah BLAH
- Blah blah
- blaH blah
-
-/(?>a*)*/
- a
- aa
- aaaa
-
-/(abc|)+/
- abc
- abcabc
- abcabcabc
- xyz
-
-/([a]*)*/
- a
- aaaaa
-
-/([ab]*)*/
- a
- b
- ababab
- aaaabcde
- bbbb
-
-/([^a]*)*/
- b
- bbbb
- aaa
-
-/([^ab]*)*/
- cccc
- abab
-
-/([a]*?)*/
- a
- aaaa
-
-/([ab]*?)*/
- a
- b
- abab
- baba
-
-/([^a]*?)*/
- b
- bbbb
- aaa
-
-/([^ab]*?)*/
- c
- cccc
- baba
-
-/(?>a*)*/
- a
- aaabcde
-
-/((?>a*))*/
- aaaaa
- aabbaa
-
-/((?>a*?))*/
- aaaaa
- aabbaa
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 12-09-98
- *** Failers
- sep-12-98
-
-/(?<=(foo))bar\1/
- foobarfoo
- foobarfootling
- *** Failers
- foobar
- barfoo
-
-/(?i:saturday|sunday)/
- saturday
- sunday
- Saturday
- Sunday
- SATURDAY
- SUNDAY
- SunDay
-
-/(a(?i)bc|BB)x/
- abcx
- aBCx
- bbx
- BBx
- *** Failers
- abcX
- aBCX
- bbX
- BBX
-
-/^([ab](?i)[cd]|[ef])/
- ac
- aC
- bD
- elephant
- Europe
- frog
- France
- *** Failers
- Africa
-
-/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- aBd
- xy
- xY
- zebra
- Zambesi
- *** Failers
- aCD
- XY
-
-/(?<=foo\n)^bar/m
- foo\nbar
- *** Failers
- bar
- baz\nbar
-
-/(?<=(?<!foo)bar)baz/
- barbaz
- barbarbaz
- koobarbaz
- *** Failers
- baz
- foobarbaz
-
-/The cases of aaaa and aaaaaa are missed out below because Perl does things/
-/differently. We know that odd, and maybe incorrect, things happen with/
-/recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./
-
-/^(a\1?){4}$/
- a
- aa
- aaa
- aaaaa
- aaaaaaa
- aaaaaaaa
- aaaaaaaaa
- aaaaaaaaaa
- aaaaaaaaaaa
- aaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaaa
- aaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaa
-
-/^(a\1?)(a\1?)(a\2?)(a\3?)$/
- a
- aa
- aaa
- aaaa
- aaaaa
- aaaaaa
- aaaaaaa
- aaaaaaaa
- aaaaaaaaa
- aaaaaaaaaa
- aaaaaaaaaaa
- aaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaaa
- aaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaa
-
-/The following tests are taken from the Perl 5.005 test suite; some of them/
-/are compatible with 5.004, but I'd rather not have to sort them out./
-
-/abc/
- abc
- xabcy
- ababc
- *** Failers
- xbc
- axc
- abx
-
-/ab*c/
- abc
-
-/ab*bc/
- abc
- abbc
- abbbbc
-
-/.{1}/
- abbbbc
-
-/.{3,4}/
- abbbbc
-
-/ab{0,}bc/
- abbbbc
-
-/ab+bc/
- abbc
- *** Failers
- abc
- abq
-
-/ab{1,}bc/
-
-/ab+bc/
- abbbbc
-
-/ab{1,}bc/
- abbbbc
-
-/ab{1,3}bc/
- abbbbc
-
-/ab{3,4}bc/
- abbbbc
-
-/ab{4,5}bc/
- *** Failers
- abq
- abbbbc
-
-/ab?bc/
- abbc
- abc
-
-/ab{0,1}bc/
- abc
-
-/ab?bc/
-
-/ab?c/
- abc
-
-/ab{0,1}c/
- abc
-
-/^abc$/
- abc
- *** Failers
- abbbbc
- abcc
-
-/^abc/
- abcc
-
-/^abc$/
-
-/abc$/
- aabc
- *** Failers
- aabc
- aabcd
-
-/^/
- abc
-
-/$/
- abc
-
-/a.c/
- abc
- axc
-
-/a.*c/
- axyzc
-
-/a[bc]d/
- abd
- *** Failers
- axyzd
- abc
-
-/a[b-d]e/
- ace
-
-/a[b-d]/
- aac
-
-/a[-b]/
- a-
-
-/a[b-]/
- a-
-
-/a]/
- a]
-
-/a[]]b/
- a]b
-
-/a[^bc]d/
- aed
- *** Failers
- abd
- abd
-
-/a[^-b]c/
- adc
-
-/a[^]b]c/
- adc
- *** Failers
- a-c
- a]c
-
-/\ba\b/
- a-
- -a
- -a-
-
-/\by\b/
- *** Failers
- xy
- yz
- xyz
-
-/\Ba\B/
- *** Failers
- a-
- -a
- -a-
-
-/\By\b/
- xy
-
-/\by\B/
- yz
-
-/\By\B/
- xyz
-
-/\w/
- a
-
-/\W/
- -
- *** Failers
- -
- a
-
-/a\sb/
- a b
-
-/a\Sb/
- a-b
- *** Failers
- a-b
- a b
-
-/\d/
- 1
-
-/\D/
- -
- *** Failers
- -
- 1
-
-/[\w]/
- a
-
-/[\W]/
- -
- *** Failers
- -
- a
-
-/a[\s]b/
- a b
-
-/a[\S]b/
- a-b
- *** Failers
- a-b
- a b
-
-/[\d]/
- 1
-
-/[\D]/
- -
- *** Failers
- -
- 1
-
-/ab|cd/
- abc
- abcd
-
-/()ef/
- def
-
-/$b/
-
-/a\(b/
- a(b
-
-/a\(*b/
- ab
- a((b
-
-/a\\b/
- a\b
-
-/((a))/
- abc
-
-/(a)b(c)/
- abc
-
-/a+b+c/
- aabbabc
-
-/a{1,}b{1,}c/
- aabbabc
-
-/a.+?c/
- abcabc
-
-/(a+|b)*/
- ab
-
-/(a+|b){0,}/
- ab
-
-/(a+|b)+/
- ab
-
-/(a+|b){1,}/
- ab
-
-/(a+|b)?/
- ab
-
-/(a+|b){0,1}/
- ab
-
-/[^ab]*/
- cde
-
-/abc/
- *** Failers
- b
-
-
-/a*/
-
-
-/([abc])*d/
- abbbcd
-
-/([abc])*bcd/
- abcd
-
-/a|b|c|d|e/
- e
-
-/(a|b|c|d|e)f/
- ef
-
-/abcd*efg/
- abcdefg
-
-/ab*/
- xabyabbbz
- xayabbbz
-
-/(ab|cd)e/
- abcde
-
-/[abhgefdc]ij/
- hij
-
-/^(ab|cd)e/
-
-/(abc|)ef/
- abcdef
-
-/(a|b)c*d/
- abcd
-
-/(ab|ab*)bc/
- abc
-
-/a([bc]*)c*/
- abc
-
-/a([bc]*)(c*d)/
- abcd
-
-/a([bc]+)(c*d)/
- abcd
-
-/a([bc]*)(c+d)/
- abcd
-
-/a[bcd]*dcdcde/
- adcdcde
-
-/a[bcd]+dcdcde/
- *** Failers
- abcde
- adcdcde
-
-/(ab|a)b*c/
- abc
-
-/((a)(b)c)(d)/
- abcd
-
-/[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
-
-/^a(bc+|b[eh])g|.h$/
- abh
-
-/(bc+d$|ef*g.|h?i(j|k))/
- effgz
- ij
- reffgz
- *** Failers
- effg
- bcdd
-
-/((((((((((a))))))))))/
- a
-
-/((((((((((a))))))))))\10/
- aa
-
-/(((((((((a)))))))))/
- a
-
-/multiple words of text/
- *** Failers
- aa
- uh-uh
-
-/multiple words/
- multiple words, yeah
-
-/(.*)c(.*)/
- abcde
-
-/\((.*), (.*)\)/
- (a, b)
-
-/[k]/
-
-/abcd/
- abcd
-
-/a(bc)d/
- abcd
-
-/a[-]?c/
- ac
-
-/(abc)\1/
- abcabc
-
-/([a-c]*)\1/
- abcabc
-
-/(a)|\1/
- a
- *** Failers
- ab
- x
-
-/(([a-c])b*?\2)*/
- ababbbcbc
-
-/(([a-c])b*?\2){3}/
- ababbbcbc
-
-/((\3|b)\2(a)x)+/
- aaaxabaxbaaxbbax
-
-/((\3|b)\2(a)){2,}/
- bbaababbabaaaaabbaaaabba
-
-/abc/i
- ABC
- XABCY
- ABABC
- *** Failers
- aaxabxbaxbbx
- XBC
- AXC
- ABX
-
-/ab*c/i
- ABC
-
-/ab*bc/i
- ABC
- ABBC
-
-/ab*?bc/i
- ABBBBC
-
-/ab{0,}?bc/i
- ABBBBC
-
-/ab+?bc/i
- ABBC
-
-/ab+bc/i
- *** Failers
- ABC
- ABQ
-
-/ab{1,}bc/i
-
-/ab+bc/i
- ABBBBC
-
-/ab{1,}?bc/i
- ABBBBC
-
-/ab{1,3}?bc/i
- ABBBBC
-
-/ab{3,4}?bc/i
- ABBBBC
-
-/ab{4,5}?bc/i
- *** Failers
- ABQ
- ABBBBC
-
-/ab??bc/i
- ABBC
- ABC
-
-/ab{0,1}?bc/i
- ABC
-
-/ab??bc/i
-
-/ab??c/i
- ABC
-
-/ab{0,1}?c/i
- ABC
-
-/^abc$/i
- ABC
- *** Failers
- ABBBBC
- ABCC
-
-/^abc/i
- ABCC
-
-/^abc$/i
-
-/abc$/i
- AABC
-
-/^/i
- ABC
-
-/$/i
- ABC
-
-/a.c/i
- ABC
- AXC
-
-/a.*?c/i
- AXYZC
-
-/a.*c/i
- *** Failers
- AABC
- AXYZD
-
-/a[bc]d/i
- ABD
-
-/a[b-d]e/i
- ACE
- *** Failers
- ABC
- ABD
-
-/a[b-d]/i
- AAC
-
-/a[-b]/i
- A-
-
-/a[b-]/i
- A-
-
-/a]/i
- A]
-
-/a[]]b/i
- A]B
-
-/a[^bc]d/i
- AED
-
-/a[^-b]c/i
- ADC
- *** Failers
- ABD
- A-C
-
-/a[^]b]c/i
- ADC
-
-/ab|cd/i
- ABC
- ABCD
-
-/()ef/i
- DEF
-
-/$b/i
- *** Failers
- A]C
- B
-
-/a\(b/i
- A(B
-
-/a\(*b/i
- AB
- A((B
-
-/a\\b/i
- A\B
-
-/((a))/i
- ABC
-
-/(a)b(c)/i
- ABC
-
-/a+b+c/i
- AABBABC
-
-/a{1,}b{1,}c/i
- AABBABC
-
-/a.+?c/i
- ABCABC
-
-/a.*?c/i
- ABCABC
-
-/a.{0,5}?c/i
- ABCABC
-
-/(a+|b)*/i
- AB
-
-/(a+|b){0,}/i
- AB
-
-/(a+|b)+/i
- AB
-
-/(a+|b){1,}/i
- AB
-
-/(a+|b)?/i
- AB
-
-/(a+|b){0,1}/i
- AB
-
-/(a+|b){0,1}?/i
- AB
-
-/[^ab]*/i
- CDE
-
-/abc/i
-
-/a*/i
-
-
-/([abc])*d/i
- ABBBCD
-
-/([abc])*bcd/i
- ABCD
-
-/a|b|c|d|e/i
- E
-
-/(a|b|c|d|e)f/i
- EF
-
-/abcd*efg/i
- ABCDEFG
-
-/ab*/i
- XABYABBBZ
- XAYABBBZ
-
-/(ab|cd)e/i
- ABCDE
-
-/[abhgefdc]ij/i
- HIJ
-
-/^(ab|cd)e/i
- ABCDE
-
-/(abc|)ef/i
- ABCDEF
-
-/(a|b)c*d/i
- ABCD
-
-/(ab|ab*)bc/i
- ABC
-
-/a([bc]*)c*/i
- ABC
-
-/a([bc]*)(c*d)/i
- ABCD
-
-/a([bc]+)(c*d)/i
- ABCD
-
-/a([bc]*)(c+d)/i
- ABCD
-
-/a[bcd]*dcdcde/i
- ADCDCDE
-
-/a[bcd]+dcdcde/i
-
-/(ab|a)b*c/i
- ABC
-
-/((a)(b)c)(d)/i
- ABCD
-
-/[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
-
-/^a(bc+|b[eh])g|.h$/i
- ABH
-
-/(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- IJ
- REFFGZ
- *** Failers
- ADCDCDE
- EFFG
- BCDD
-
-/((((((((((a))))))))))/i
- A
-
-/((((((((((a))))))))))\10/i
- AA
-
-/(((((((((a)))))))))/i
- A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
-
-/multiple words of text/i
- *** Failers
- AA
- UH-UH
-
-/multiple words/i
- MULTIPLE WORDS, YEAH
-
-/(.*)c(.*)/i
- ABCDE
-
-/\((.*), (.*)\)/i
- (A, B)
-
-/[k]/i
-
-/abcd/i
- ABCD
-
-/a(bc)d/i
- ABCD
-
-/a[-]?c/i
- AC
-
-/(abc)\1/i
- ABCABC
-
-/([a-c]*)\1/i
- ABCABC
-
-/a(?!b)./
- abad
-
-/a(?=d)./
- abad
-
-/a(?=c|d)./
- abad
-
-/a(?:b|c|d)(.)/
- ace
-
-/a(?:b|c|d)*(.)/
- ace
-
-/a(?:b|c|d)+?(.)/
- ace
- acdbcdbe
-
-/a(?:b|c|d)+(.)/
- acdbcdbe
-
-/a(?:b|c|d){2}(.)/
- acdbcdbe
-
-/a(?:b|c|d){4,5}(.)/
- acdbcdbe
-
-/a(?:b|c|d){4,5}?(.)/
- acdbcdbe
-
-/((foo)|(bar))*/
- foobar
-
-/a(?:b|c|d){6,7}(.)/
- acdbcdbe
-
-/a(?:b|c|d){6,7}?(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,6}(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,6}?(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,7}(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,7}?(.)/
- acdbcdbe
-
-/a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
-
-/^(.+)?B/
- AB
-
-/^([^a-z])|(\^)$/
- .
-
-/^[<>]&/
- <&OUT
-
-/^(a\1?){4}$/
- aaaaaaaaaa
- *** Failers
- AB
- aaaaaaaaa
- aaaaaaaaaaa
-
-/^(a(?(1)\1)){4}$/
- aaaaaaaaaa
- *** Failers
- aaaaaaaaa
- aaaaaaaaaaa
-
-/(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
-
-/(?<=a)b/
- ab
- *** Failers
- cb
- b
-
-/(?<!c)b/
- ab
- b
- b
-
-/(?:..)*a/
- aba
-
-/(?:..)*?a/
- aba
-
-/^(?:b|a(?=(.)))*\1/
- abc
-
-/^(){3,5}/
- abc
-
-/^(a+)*ax/
- aax
-
-/^((a|b)+)*ax/
- aax
-
-/^((a|bc)+)*ax/
- aax
-
-/(a|x)*ab/
- cab
-
-/(a)*ab/
- cab
-
-/(?:(?i)a)b/
- ab
-
-/((?i)a)b/
- ab
-
-/(?:(?i)a)b/
- Ab
-
-/((?i)a)b/
- Ab
-
-/(?:(?i)a)b/
- *** Failers
- cb
- aB
-
-/((?i)a)b/
-
-/(?i:a)b/
- ab
-
-/((?i:a))b/
- ab
-
-/(?i:a)b/
- Ab
-
-/((?i:a))b/
- Ab
-
-/(?i:a)b/
- *** Failers
- aB
- aB
-
-/((?i:a))b/
-
-/(?:(?-i)a)b/i
- ab
-
-/((?-i)a)b/i
- ab
-
-/(?:(?-i)a)b/i
- aB
-
-/((?-i)a)b/i
- aB
-
-/(?:(?-i)a)b/i
- *** Failers
- aB
- Ab
-
-/((?-i)a)b/i
-
-/(?:(?-i)a)b/i
- aB
-
-/((?-i)a)b/i
- aB
-
-/(?:(?-i)a)b/i
- *** Failers
- Ab
- AB
-
-/((?-i)a)b/i
-
-/(?-i:a)b/i
- ab
-
-/((?-i:a))b/i
- ab
-
-/(?-i:a)b/i
- aB
-
-/((?-i:a))b/i
- aB
-
-/(?-i:a)b/i
- *** Failers
- AB
- Ab
-
-/((?-i:a))b/i
-
-/(?-i:a)b/i
- aB
-
-/((?-i:a))b/i
- aB
-
-/(?-i:a)b/i
- *** Failers
- Ab
- AB
-
-/((?-i:a))b/i
-
-/((?-i:a.))b/i
- *** Failers
- AB
- a\nB
-
-/((?s-i:a.))b/i
- a\nB
-
-/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-
-/(ab)\d\1/i
- Ab4ab
- ab4Ab
-
-/foo\w*\d{4}baz/
- foobar1234baz
-
-/x(~~)*(?:(?:F)?)?/
- x~~
-
-/^a(?#xxx){3}c/
- aaac
-
-/^a (?#xxx) (?#yyy) {3}c/x
- aaac
-
-/(?<![cd])b/
- *** Failers
- B\nB
- dbcb
-
-/(?<![cd])[ab]/
- dbaacb
-
-/(?<!(c|d))b/
-
-/(?<!(c|d))[ab]/
- dbaacb
-
-/(?<!cd)[ab]/
- cdaccb
-
-/^(?:a?b?)*$/
- \
- a
- ab
- aaa
- *** Failers
- dbcb
- a--
- aa--
-
-/((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
-
-/((?m)^b$)/
- a\nb\nc\n
-
-/(?m)^b/
- a\nb\n
-
-/(?m)^(b)/
- a\nb\n
-
-/((?m)^b)/
- a\nb\n
-
-/\n((?m)^b)/
- a\nb\n
-
-/((?s).)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
-
-/((?s)b.)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
-
-/^b/
-
-/()^b/
- *** Failers
- a\nb\nc\n
- a\nb\nc\n
-
-/((?m)^b)/
- a\nb\nc\n
-
-/(x)?(?(1)a|b)/
- *** Failers
- a
- a
-
-/(x)?(?(1)b|a)/
- a
-
-/()?(?(1)b|a)/
- a
-
-/()(?(1)b|a)/
-
-/()?(?(1)a|b)/
- a
-
-/^(\()?blah(?(1)(\)))$/
- (blah)
- blah
- *** Failers
- a
- blah)
- (blah
-
-/^(\(+)?blah(?(1)(\)))$/
- (blah)
- blah
- *** Failers
- blah)
- (blah
-
-/(?(?!a)a|b)/
-
-/(?(?!a)b|a)/
- a
-
-/(?(?=a)b|a)/
- *** Failers
- a
- a
-
-/(?(?=a)a|b)/
- a
-
-/(?=(a+?))(\1ab)/
- aaab
-
-/^(?=(a+?))\1ab/
-
-/(\w+:)+/
- one:
-
-/$(?<=^(a))/
- a
-
-/(?=(a+?))(\1ab)/
- aaab
-
-/^(?=(a+?))\1ab/
- *** Failers
- aaab
- aaab
-
-/([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
-
-/^[^bcd]*(c+)/
- aexycd
-
-/(a*)b+/
- caab
-
-/([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
- *** Failers
- abcd:
- abcd:
-
-/^[^bcd]*(c+)/
- aexycd
-
-/(>a+)ab/
-
-/(?>a+)b/
- aaab
-
-/([[:]+)/
- a:[b]:
-
-/([[=]+)/
- a=[b]=
-
-/([[.]+)/
- a.[b].
-
-/((?>a+)b)/
- aaab
-
-/(?>(a+))b/
- aaab
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
-
-/a\Z/
- *** Failers
- aaab
- a\nb\n
-
-/b\Z/
- a\nb\n
-
-/b\z/
-
-/b\Z/
- a\nb
-
-/b\z/
- a\nb
- *** Failers
-
-/^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
- a
- abc
- a-b
- 0-9
- a.b
- 5.6.7
- the.quick.brown.fox
- a100.b200.300c
- 12-ab.1245
- *** Failers
- \
- .a
- -a
- a-
- a.
- a_b
- a.-
- a..
- ab..bc
- the.quick.brown.fox-
- the.quick.brown.fox.
- the.quick.brown.fox_
- the.quick.brown.fox+
-
-/(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- endingwxyz
- *** Failers
- a rather long string that doesn't end with one of them
-
-/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-
-/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-
-/(?<=\d{3}(?!999))foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
-
-/(?<=(?!...999)\d{3})foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
-
-/(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
-
-/(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
-
-/<a[\s]+href[\s]*=[\s]* # find <a href=
- ([\"\'])? # find single or double quote
- (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- <a href=\"abcd xyz pqr\" cats
- <a href=\'abcd xyz pqr\' cats
-
-/<a\s+href\s*=\s* # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- <a href=\"abcd xyz pqr\" cats
- <a href = \'abcd xyz pqr\' cats
-
-/<a\s+href(?>\s*)=(?>\s*) # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- <a href=\"abcd xyz pqr\" cats
- <a href = \'abcd xyz pqr\' cats
-
-/((Z)+|A)*/
- ZABCDEFG
-
-/(Z()|A)*/
- ZABCDEFG
-
-/(Z(())|A)*/
- ZABCDEFG
-
-/((?>Z)+|A)*/
- ZABCDEFG
-
-/((?>)+|A)*/
- ZABCDEFG
-
-/a*/g
- abbab
-
-/^[a-\d]/
- abcde
- -things
- 0digit
- *** Failers
- bcdef
-
-/^[\d-a]/
- abcde
- -things
- 0digit
- *** Failers
- bcdef
-
-/[[:space:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/[[:blank:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/[\s]+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/\s+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/a b/x
- ab
-
-/(?!\A)x/m
- a\nxb\n
-
-/(?!^)x/m
- a\nxb\n
-
-/abc\Qabc\Eabc/
- abcabcabc
-
-/abc\Q(*+|\Eabc/
- abc(*+|abc
-
-/ abc\Q abc\Eabc/x
- abc abcabc
- *** Failers
- abcabcabc
-
-/abc#comment
- \Q#not comment
- literal\E/x
- abc#not comment\n literal
-
-/abc#comment
- \Q#not comment
- literal/x
- abc#not comment\n literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment
- /x
- abc#not comment\n literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment/x
- abc#not comment\n literal
-
-/\Qabc\$xyz\E/
- abc\\\$xyz
-
-/\Qabc\E\$\Qxyz\E/
- abc\$xyz
-
-/\Gabc/
- abc
- *** Failers
- xyzabc
-
-/\Gabc./g
- abc1abc2xyzabc3
-
-/abc./g
- abc1abc2xyzabc3
-
-/a(?x: b c )d/
- XabcdY
- *** Failers
- Xa b c d Y
-
-/((?x)x y z | a b c)/
- XabcY
- AxyzB
-
-/(?i)AB(?-i)C/
- XabCY
- *** Failers
- XabcY
-
-/((?i)AB(?-i)C|D)E/
- abCE
- DE
- *** Failers
- abcE
- abCe
- dE
- De
-
-/(.*)\d+\1/
- abc123abc
- abc123bc
-
-/(.*)\d+\1/s
- abc123abc
- abc123bc
-
-/((.*))\d+\1/
- abc123abc
- abc123bc
-
-/-- This tests for an IPv6 address in the form where it can have up to --/
-/-- eight components, one and only one of which is empty. This must be --/
-/-- an internal component. --/
-
-/^(?!:) # colon disallowed at start
- (?: # start of item
- (?: [0-9a-f]{1,4} | # 1-4 hex digits or
- (?(1)0 | () ) ) # if null previously matched, fail; else null
- : # followed by colon
- ){1,7} # end item; 1-7 of them required
- [0-9a-f]{1,4} $ # final hex number at end of string
- (?(1)|.) # check that there was an empty component
- /xi
- a123::a123
- a123:b342::abcd
- a123:b342::324e:abcd
- a123:ddde:b342::324e:abcd
- a123:ddde:b342::324e:dcba:abcd
- a123:ddde:9999:b342::324e:dcba:abcd
- *** Failers
- 1:2:3:4:5:6:7:8
- a123:bce:ddde:9999:b342::324e:dcba:abcd
- a123::9999:b342::324e:dcba:abcd
- abcde:2:3:4:5:6:7:8
- ::1
- abcd:fee0:123::
- :1
- 1:
-
-/[z\Qa-d]\E]/
- z
- a
- -
- d
- ]
- *** Failers
- b
-
-/[\z\C]/
- z
- C
-
-/\M/
- M
-
-/(a+)*b/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/(?i)reg(?:ul(?:[a]|ae)r|ex)/
- REGular
- regulaer
- Regex
- regulr
-
-/[--]+/
-
-
-
-
-
-/(?<=Z)X./
- \x84XAZXB
-
-/ab cd (?x) de fg/
- ab cd defg
-
-/ab cd(?x) de fg/
- ab cddefg
- ** Failers
- abcddefg
-
-/(?<![^f]oo)(bar)/
- foobarX
- ** Failers
- boobarX
-
-/(?<![^f])X/
- offX
- ** Failers
- onyX
-
-/(?<=[^f])X/
- onyX
- ** Failers
- offX
-
-/^/mg
- a\nb\nc\n
- \
-
-/(?<=C\n)^/mg
- A\nC\nC\n
-
-/(?:(?(1)a|b)(X))+/
- bXaX
-
-/(?:(?(1)\1a|b)(X|Y))+/
- bXXaYYaY
- bXYaXXaX
-
-/()()()()()()()()()(?:(?(10)\10a|b)(X|Y))+/
- bXXaYYaY
-
-/[[,abc,]+]/
- abc]
- a,b]
- [a,b,c]
-
-/(?-x: )/x
- A\x20B
-
-"(?x)(?-x: \s*#\s*)"
- A # B
- ** Failers
- #
-
-"(?x-is)(?:(?-ixs) \s*#\s*) include"
- A #include
- ** Failers
- A#include
- A #Include
-
-/a*b*\w/
- aaabbbb
- aaaa
- a
-
-/a*b?\w/
- aaabbbb
- aaaa
- a
-
-/a*b{0,4}\w/
- aaabbbb
- aaaa
- a
-
-/a*b{0,}\w/
- aaabbbb
- aaaa
- a
-
-/a*\d*\w/
- 0a
- a
-
-/a*b *\w/x
- a
-
-/a*b#comment
- *\w/x
- a
-
-/a* b *\w/x
- a
-
-/^\w+=.*(\\\n.*)*/
- abc=xyz\\\npqr
-
-/(?=(\w+))\1:/
- abcd:
-
-/^(?=(\w+))\1:/
- abcd:
-
-/^\Eabc/
- abc
-
-/^[\Eabc]/
- a
- ** Failers
- E
-
-/^[a-\Ec]/
- b
- ** Failers
- -
- E
-
-/^[a\E\E-\Ec]/
- b
- ** Failers
- -
- E
-
-/^[\E\Qa\E-\Qz\E]+/
- b
- ** Failers
- -
-
-/^[a\Q]bc\E]/
- a
- ]
- c
-
-/^[a-\Q\E]/
- a
- -
-
-/^(a()*)*/
- aaaa
-
-/^(?:a(?:(?:))*)*/
- aaaa
-
-/^(a()+)+/
- aaaa
-
-/^(?:a(?:(?:))+)+/
- aaaa
-
-/(a){0,3}(?(1)b|(c|))*D/
- abbD
- ccccD
- D
-
-/(a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?>a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?:a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/\Z/g
- abc\n
-
-/^(?s)(?>.*)(?<!\n)/
- abc
- abc\n
-
-/^(?![^\n]*\n\z)/
- abc
- abc\n
-
-/\z(?<!\n)/
- abc
- abc\n
-
-/(.*(.)?)*/
- abcd
-
-/( (A | (?(1)0|) )* )/x
- abcd
-
-/( ( (?(1)0|) )* )/x
- abcd
-
-/( (?(1)0|)* )/x
- abcd
-
-/[[:abcd:xyz]]/
- a]
- :]
-
-/[abc[:x\]pqr]/
- a
- [
- :
- ]
- p
-
-/.*[op][xyz]/
- fooabcfoo
-
-/(?(?=.*b)b|^)/
- adc
- abc
-
-/(?(?=^.*b)b|^)/
- adc
- abc
-
-/(?(?=.*b)b|^)*/
- adc
- abc
-
-/(?(?=.*b)b|^)+/
- adc
- abc
-
-/(?(?=b).*b|^d)/
- abc
-
-/(?(?=.*b).*b|^d)/
- abc
-
-/^%((?(?=[a])[^%])|b)*%$/
- %ab%
-
-/(?i)a(?-i)b|c/
- XabX
- XAbX
- CcC
- ** Failers
- XABX
-
-/[\x00-\xff\s]+/
- \x0a\x0b\x0c\x0d
-
-/^\c/
- ?
-
-/(abc)\1/i
- abc
-
-/(abc)\1/
- abc
-
-/[^a]*/i
- 12abc
- 12ABC
-
-/[^a]*+/i
- 12abc
- 12ABC
-
-/[^a]*?X/i
- ** Failers
- 12abc
- 12ABC
-
-/[^a]+?X/i
- ** Failers
- 12abc
- 12ABC
-
-/[^a]?X/i
- 12aXbcX
- 12AXBCX
- BCX
-
-/[^a]??X/i
- 12aXbcX
- 12AXBCX
- BCX
-
-/[^a]?+X/i
- 12aXbcX
- 12AXBCX
- BCX
-
-/[^a]{2,3}/i
- abcdef
- ABCDEF
-
-/[^a]{2,3}?/i
- abcdef
- ABCDEF
-
-/[^a]{2,3}+/i
- abcdef
- ABCDEF
-
-/((a|)+)+Z/
- Z
-
-/(a)b|(a)c/
- ac
-
-/(?>(a))b|(a)c/
- ac
-
-/(?=(a))ab|(a)c/
- ac
-
-/((?>(a))b|(a)c)/
- ac
-
-/((?>(a))b|(a)c)++/
- ac
-
-/(?:(?>(a))b|(a)c)++/
- ac
-
-/(?=(?>(a))b|(a)c)(..)/
- ac
-
-/(?>(?>(a))b|(a)c)/
- ac
-
-/(?:(?>([ab])))+a=/+
- =ba=
-
-/(?>([ab]))+a=/+
- =ba=
-
-/((?>(a+)b)+(aabab))/
- aaaabaaabaabab
-
-/(?>a+|ab)+?c/
- aabc
-
-/(?>a+|ab)+c/
- aabc
-
-/(?:a+|ab)+c/
- aabc
-
-/(?(?=(a))a)/
- a
-
-/(?(?=(a))a)(b)/
- ab
-
-/^(?:a|ab)++c/
- aaaabc
-
-/^(?>a|ab)++c/
- aaaabc
-
-/^(?:a|ab)+c/
- aaaabc
-
-/(?=abc){3}abc/+
- abcabcabc
- ** Failers
- xyz
-
-/(?=abc)+abc/+
- abcabcabc
- ** Failers
- xyz
-
-/(?=abc)++abc/+
- abcabcabc
- ** Failers
- xyz
-
-/(?=abc){0}xyz/
- xyz
-
-/(?=abc){1}xyz/
- ** Failers
- xyz
-
-/(?=(a))?./
- ab
- bc
-
-/(?=(a))??./
- ab
- bc
-
-/^(?=(a)){0}b(?1)/
- backgammon
-
-/^(?=(?1))?[az]([abc])d/
- abd
- zcdxx
-
-/^(?!a){0}\w+/
- aaaaa
-
-/(?<=(abc))?xyz/
- abcxyz
- pqrxyz
-
-/^[\g<a>]+/
- ggg<<<aaa>>>
- ** Failers
- \\ga
-
-/^[\ga]+/
- gggagagaxyz
-
-/^[:a[:digit:]]+/
- aaaa444:::Z
-
-/^[:a[:digit:]:b]+/
- aaaa444:::bbbZ
-
-/[:a]xxx[b:]/
- :xxx:
-
-/(?<=a{2})b/i
- xaabc
- ** Failers
- xabc
-
-/(?<!a{2})b/i
- xabc
- ** Failers
- xaabc
-
-/(?<=a\h)c/
- xa c
-
-/(?<=[^a]{2})b/
- axxbc
- aAAbc
- ** Failers
- xaabc
-
-/(?<=[^a]{2})b/i
- axxbc
- ** Failers
- aAAbc
- xaabc
-
-/(?<=a\H)c/
- abc
-
-/(?<=a\V)c/
- abc
-
-/(?<=a\v)c/
- a\nc
-
-/(?(?=c)c|d)++Y/
- XcccddYX
-
-/(?(?=c)c|d)*+Y/
- XcccddYX
-
-/^(a{2,3}){2,}+a/
- aaaaaaa
- ** Failers
- aaaaaa
- aaaaaaaaa
-
-/^(a{2,3})++a/
- ** Failers
- aaaaaa
-
-/^(a{2,3})*+a/
- ** Failers
- aaaaaa
-
-/ab\Cde/
- abXde
-
-/(?<=ab\Cde)X/
- abZdeX
-
-/a[\CD]b/
- aCb
- aDb
-
-/a[\C-X]b/
- aJb
-
-/\H\h\V\v/
- X X\x0a
- X\x09X\x0b
- ** Failers
- \xa0 X\x0a
-
-/\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c
- ** Failers
- \x09\x20\xa0\x0a\x0b
-
-/\H{3,4}/
- XY ABCDE
- XY PQR ST
-
-/.\h{3,4}./
- XY AB PQRS
-
-/\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- > X NYQZ
- ** Failers
- >XYZ
- > X NY Z
-
-/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
-
-/(foo)\Kbar/
- foobar
-
-/(foo)(\Kbar|baz)/
- foobar
- foobaz
-
-/(foo\Kbar)baz/
- foobarbaz
-
-/abc\K|def\K/g+
- Xabcdefghi
-
-/ab\Kc|de\Kf/g+
- Xabcdefghi
-
-/(?=C)/g+
- ABCDECBA
-
-/^abc\K/+
- abcdef
- ** Failers
- defabcxyz
-
-/^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
- ababababbbabZXXXX
-
-/(?<A>tom|bon)-\g{A}/
- tom-tom
- bon-bon
-
-/(^(a|b\g{-1}))/
- bacxxx
-
-/(?|(abc)|(xyz))\1/
- abcabc
- xyzxyz
- ** Failers
- abcxyz
- xyzabc
-
-/(?|(abc)|(xyz))(?1)/
- abcabc
- xyzabc
- ** Failers
- xyzxyz
-
-/^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/
- XYabcdY
-
-/^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/
- XYabcdY
-
-/^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/
- XYabcdY
-
-/(?'abc'\w+):\k<abc>{2}/
- a:aaxyz
- ab:ababxyz
- ** Failers
- a:axyz
- ab:abxyz
-
-/(?'abc'\w+):\g{abc}{2}/
- a:aaxyz
- ab:ababxyz
- ** Failers
- a:axyz
- ab:abxyz
-
-/^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
- abd
- ce
-
-/^(a.)\g-1Z/
- aXaXZ
-
-/^(a.)\g{-1}Z/
- aXaXZ
-
-/^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
- abcd
-
-/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
- (?(DEFINE)
- (?<NAME_PAT>[a-z]+)
- (?<ADDRESS_PAT>\d+)
- )/x
- metcalfe 33
-
-/(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
- 1.2.3.4
- 131.111.10.206
- 10.0.0.0
- ** Failers
- 10.6
- 455.3.4.5
-
-/\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
- 1.2.3.4
- 131.111.10.206
- 10.0.0.0
- ** Failers
- 10.6
- 455.3.4.5
-
-/^(\w++|\s++)*$/
- now is the time for all good men to come to the aid of the party
- *** Failers
- this is not a line with only words and spaces!
-
-/(\d++)(\w)/
- 12345a
- *** Failers
- 12345+
-
-/a++b/
- aaab
-
-/(a++b)/
- aaab
-
-/(a++)b/
- aaab
-
-/([^()]++|\([^()]*\))+/
- ((abc(ade)ufh()()x
-
-/\(([^()]++|\([^()]+\))+\)/
- (abc)
- (abc(def)xyz)
- *** Failers
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/^([^()]|\((?1)*\))*$/
- abc
- a(b)c
- a(b(c))d
- *** Failers)
- a(b(c)d
-
-/^>abc>([^()]|\((?1)*\))*<xyz<$/
- >abc>123<xyz<
- >abc>1(2)3<xyz<
- >abc>(1(2)3)<xyz<
-
-/^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
- 1221
- Satanoscillatemymetallicsonatas
- AmanaplanacanalPanama
- AblewasIereIsawElba
- *** Failers
- Thequickbrownfox
-
-/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
- 12
- (((2+2)*-3)-7)
- -12
- *** Failers
- ((2+2)*-3)-7)
-
-/^(x(y|(?1){2})z)/
- xyz
- xxyzxyzz
- *** Failers
- xxyzz
- xxyzxyzxyzz
-
-/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
- <>
- <abcd>
- <abc <123> hij>
- <abc <def> hij>
- <abc<>def>
- <abc<>
- *** Failers
- <abc
-
-/^a+(*FAIL)/
- aaaaaa
-
-/a+b?c+(*FAIL)/
- aaabccc
-
-/a+b?(*PRUNE)c+(*FAIL)/
- aaabccc
-
-/a+b?(*COMMIT)c+(*FAIL)/
- aaabccc
-
-/a+b?(*SKIP)c+(*FAIL)/
- aaabcccaaabccc
-
-/^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
- aaaxxxxxx
- aaa++++++
- bbbxxxxx
- bbb+++++
- cccxxxx
- ccc++++
- dddddddd
-
-/^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
- aaaxxxxxx
- aaa++++++
- bbbxxxxx
- bbb+++++
- cccxxxx
- ccc++++
- dddddddd
-
-/a+b?(*THEN)c+(*FAIL)/
- aaabccc
-
-/(A (A|B(*ACCEPT)|C) D)(E)/x
- AB
- ABX
- AADE
- ACDE
- ** Failers
- AD
-
-/^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$/i
- 1221
- Satan, oscillate my metallic sonatas!
- A man, a plan, a canal: Panama!
- Able was I ere I saw Elba.
- *** Failers
- The quick brown fox
-
-/^((.)(?1)\2|.)$/
- a
- aba
- aabaa
- abcdcba
- pqaabaaqp
- ablewasiereisawelba
- rhubarb
- the quick brown fox
-
-/(a)(?<=b(?1))/
- baz
- ** Failers
- caz
-
-/(?<=b(?1))(a)/
- zbaaz
- ** Failers
- aaa
-
-/(?<X>a)(?<=b(?&X))/
- baz
-
-/^(?|(abc)|(def))\1/
- abcabc
- defdef
- ** Failers
- abcdef
- defabc
-
-/^(?|(abc)|(def))(?1)/
- abcabc
- defabc
- ** Failers
- defdef
- abcdef
-
-/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
- a\"aaaaa
- b\"aaaaa
- ** Failers
- b\"11111
-
-/(?:(?1)|B)(A(*F)|C)/
- ABCD
- CCD
- ** Failers
- CAD
-
-/^(?:(?1)|B)(A(*F)|C)/
- CCD
- BCD
- ** Failers
- ABCD
- CAD
- BAD
-
-/(?:(?1)|B)(A(*ACCEPT)XX|C)D/
- AAD
- ACD
- BAD
- BCD
- BAX
- ** Failers
- ACX
- ABC
-
-/(?(DEFINE)(A))B(?1)C/
- BAC
-
-/(?(DEFINE)((A)\2))B(?1)C/
- BAAC
-
-/(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
- (ab(cd)ef)
-
-/^(?!a(*SKIP)b)/
- ac
-
-/^(?=a(*SKIP)b|ac)/
- ** Failers
- ac
-
-/^(?=a(*THEN)b|ac)/
- ac
-
-/^(?=a(*PRUNE)b)/
- ab
- ** Failers
- ac
-
-/^(?=a(*ACCEPT)b)/
- ac
-
-/^(?(?!a(*SKIP)b))/
- ac
-
-/(?>a\Kb)/
- ab
-
-/((?>a\Kb))/
- ab
-
-/(a\Kb)/
- ab
-
-/^a\Kcz|ac/
- ac
-
-/(?>a\Kbz|ab)/
- ab
-
-/^(?&t)(?(DEFINE)(?<t>a\Kb))$/
- ab
-
-/^([^()]|\((?1)*\))*$/
- a(b)c
- a(b(c)d)e
-
-/(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
- 0
- 00
- 0000
-
-/(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
- 0
- 00
- 0000
-
-/--- This one does fail, as expected, in Perl. It needs the complex item at the
- end of the pattern. A single letter instead of (B|D) makes it not fail,
- which I think is a Perl bug. --- /
-
-/A(*COMMIT)(B|D)/
- ACABX
-
-/--- Check the use of names for failure ---/
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
- ** Failers
- AC
- CB
-
-/--- Force no study, otherwise mark is not seen. The studied version is in
- test 2 because it isn't Perl-compatible. ---/
-
-/(*MARK:A)(*SKIP:B)(C|X)/KSS
- C
- D
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/K
- ** Failers
- CB
-
-/^(?:A(*THEN:A)B|C(*THEN:B)D)/K
- CB
-
-/^(?>A(*THEN:A)B|C(*THEN:B)D)/K
- CB
-
-/--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
-that we have to have something complicated such as (B|Z) at the end because,
-for Perl, a simple character somehow causes an unwanted optimization to mess
-with the handling of backtracking verbs. ---/
-
-/A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
- AAAC
-
-/--- Test skipping over a non-matching mark. ---/
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
- AAAC
-
-/--- Check shorthand for MARK ---/
-
-/A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
- AAAC
-
-/--- Don't loop! Force no study, otherwise mark is not seen. ---/
-
-/(*:A)A+(*SKIP:A)(B|Z)/KSS
- AAAC
-
-/--- This should succeed, as a non-existent skip name disables the skip ---/
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
- AAAC
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
- AAAC
-
-/--- COMMIT at the start of a pattern should act like an anchor. Again,
-however, we need the complication for Perl. ---/
-
-/(*COMMIT)(A|P)(B|P)(C|P)/
- ABCDEFG
- ** Failers
- DEFGABC
-
-/--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
-
-/(\w+)(?>b(*COMMIT))\w{2}/
- abbb
-
-/(\w+)b(*COMMIT)\w{2}/
- abbb
-
-/--- Check opening parens in comment when seeking forward reference. ---/
-
-/(?&t)(?#()(?(DEFINE)(?<t>a))/
- bac
-
-/--- COMMIT should override THEN ---/
-
-/(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/
- yes
-
-/(?>(*COMMIT)(yes|no)(*THEN)(*F))?/
- yes
-
-/b?(*SKIP)c/
- bc
- abc
-
-/(*SKIP)bc/
- a
-
-/(*SKIP)b/
- a
-
-/(?P<abn>(?P=abn)xxx|)+/
- xxx
-
-/(?i:([^b]))(?1)/
- aa
- aA
- ** Failers
- ab
- aB
- Ba
- ba
-
-/^(?&t)*+(?(DEFINE)(?<t>a))\w$/
- aaaaaaX
- ** Failers
- aaaaaa
-
-/^(?&t)*(?(DEFINE)(?<t>a))\w$/
- aaaaaaX
- aaaaaa
-
-/^(a)*+(\w)/
- aaaaX
- YZ
- ** Failers
- aaaa
-
-/^(?:a)*+(\w)/
- aaaaX
- YZ
- ** Failers
- aaaa
-
-/^(a)++(\w)/
- aaaaX
- ** Failers
- aaaa
- YZ
-
-/^(?:a)++(\w)/
- aaaaX
- ** Failers
- aaaa
- YZ
-
-/^(a)?+(\w)/
- aaaaX
- YZ
-
-/^(?:a)?+(\w)/
- aaaaX
- YZ
-
-/^(a){2,}+(\w)/
- aaaaX
- ** Failers
- aaa
- YZ
-
-/^(?:a){2,}+(\w)/
- aaaaX
- ** Failers
- aaa
- YZ
-
-/(a|)*(?1)b/
- b
- ab
- aab
-
-/(a)++(?1)b/
- ** Failers
- ab
- aab
-
-/(a)*+(?1)b/
- ** Failers
- ab
- aab
-
-/(?1)(?:(b)){0}/
- b
-
-/(foo ( \( ((?:(?> [^()]+ )|(?2))*) \) ) )/x
- foo(bar(baz)+baz(bop))
-
-/(A (A|B(*ACCEPT)|C) D)(E)/x
- AB
-
-/\A.*?(?:a|b(*THEN)c)/
- ba
-
-/\A.*?(?:a|bc)/
- ba
-
-/\A.*?(a|b(*THEN)c)/
- ba
-
-/\A.*?(a|bc)/
- ba
-
-/\A.*?(?:a|b(*THEN)c)++/
- ba
-
-/\A.*?(?:a|bc)++/
- ba
-
-/\A.*?(a|b(*THEN)c)++/
- ba
-
-/\A.*?(a|bc)++/
- ba
-
-/\A.*?(?:a|b(*THEN)c|d)/
- ba
-
-/\A.*?(?:a|bc|d)/
- ba
-
-/(?:(b))++/
- beetle
-
-/(?(?=(a(*ACCEPT)z))a)/
- a
-
-/^(a)(?1)+ab/
- aaaab
-
-/^(a)(?1)++ab/
- aaaab
-
-/^(?=a(*:M))aZ/K
- aZbc
-
-/^(?!(*:M)b)aZ/K
- aZbc
-
-/(?(DEFINE)(a))?b(?1)/
- backgammon
-
-/^\N+/
- abc\ndef
-
-/^\N{1,}/
- abc\ndef
-
-/(?(R)a+|(?R)b)/
- aaaabcde
-
-/(?(R)a+|((?R))b)/
- aaaabcde
-
-/((?(R)a+|(?1)b))/
- aaaabcde
-
-/((?(R1)a+|(?1)b))/
- aaaabcde
-
-/a(*:any
-name)/K
- abc
-
-/(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
- a
- ba
- bba
-
-/--- Checking revised (*THEN) handling ---/
-
-/--- Capture ---/
-
-/^.*? (a(*THEN)b) c/x
- aabc
-
-/^.*? (a(*THEN)b|(*F)) c/x
- aabc
-
-/^.*? ( (a(*THEN)b) | (*F) ) c/x
- aabc
-
-/^.*? ( (a(*THEN)b) ) c/x
- aabc
-
-/--- Non-capture ---/
-
-/^.*? (?:a(*THEN)b) c/x
- aabc
-
-/^.*? (?:a(*THEN)b|(*F)) c/x
- aabc
-
-/^.*? (?: (?:a(*THEN)b) | (*F) ) c/x
- aabc
-
-/^.*? (?: (?:a(*THEN)b) ) c/x
- aabc
-
-/--- Atomic ---/
-
-/^.*? (?>a(*THEN)b) c/x
- aabc
-
-/^.*? (?>a(*THEN)b|(*F)) c/x
- aabc
-
-/^.*? (?> (?>a(*THEN)b) | (*F) ) c/x
- aabc
-
-/^.*? (?> (?>a(*THEN)b) ) c/x
- aabc
-
-/--- Possessive capture ---/
-
-/^.*? (a(*THEN)b)++ c/x
- aabc
-
-/^.*? (a(*THEN)b|(*F))++ c/x
- aabc
-
-/^.*? ( (a(*THEN)b)++ | (*F) )++ c/x
- aabc
-
-/^.*? ( (a(*THEN)b)++ )++ c/x
- aabc
-
-/--- Possessive non-capture ---/
-
-/^.*? (?:a(*THEN)b)++ c/x
- aabc
-
-/^.*? (?:a(*THEN)b|(*F))++ c/x
- aabc
-
-/^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c/x
- aabc
-
-/^.*? (?: (?:a(*THEN)b)++ )++ c/x
- aabc
-
-/--- Condition assertion ---/
-
-/^(?(?=a(*THEN)b)ab|ac)/
- ac
-
-/--- Condition ---/
-
-/^.*?(?(?=a)a|b(*THEN)c)/
- ba
-
-/^.*?(?:(?(?=a)a|b(*THEN)c)|d)/
- ba
-
-/^.*?(?(?=a)a(*THEN)b|c)/
- ac
-
-/--- Assertion ---/
-
-/^.*(?=a(*THEN)b)/
- aabc
-
-/------------------------------/
-
-/(?>a(*:m))/imsxSK
- a
-
-/(?>(a)(*:m))/imsxSK
- a
-
-/(?<=a(*ACCEPT)b)c/
- xacd
-
-/(?<=(a(*ACCEPT)b))c/
- xacd
-
-/(?<=(a(*COMMIT)b))c/
- xabcd
- ** Failers
- xacd
-
-/(?<!a(*FAIL)b)c/
- xcd
- acd
-
-/(?<=a(*:N)b)c/K
- xabcd
-
-/(?<=a(*PRUNE)b)c/
- xabcd
-
-/(?<=a(*SKIP)b)c/
- xabcd
-
-/(?<=a(*THEN)b)c/
- xabcd
-
-/(a)(?2){2}(.)/
- abcd
-
-/(*MARK:A)(*PRUNE:B)(C|X)/KS
- C
- D
-
-/(*MARK:A)(*PRUNE:B)(C|X)/KSS
- C
- D
-
-/(*MARK:A)(*THEN:B)(C|X)/KS
- C
- D
-
-/(*MARK:A)(*THEN:B)(C|X)/KSY
- C
- D
-
-/(*MARK:A)(*THEN:B)(C|X)/KSS
- C
- D
-
-/--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
-
-/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-
-/--- Same --/
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
- AAAC
-
-/A(*:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-
-/--- This should fail, as a null name is the same as no name ---/
-
-/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
- AAAC
-
-/--- A check on what happens after hitting a mark and them bumping along to
-something that does not even start. Perl reports tags after the failures here,
-though it does not when the individual letters are made into something
-more complicated. ---/
-
-/A(*:A)B|XX(*:B)Y/K
- AABC
- XXYZ
- ** Failers
- XAQQ
- XAQQXZZ
- AXQQQ
- AXXQQQ
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/K
- AB
- CD
- ** Failers
- AC
- CB
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
- AB
- CD
- ** Failers
- AC
- CB
-
-/--- An empty name does not pass back an empty string. It is the same as if no
-name were given. ---/
-
-/^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
- AB
- CD
-
-/--- PRUNE goes to next bumpalong; COMMIT does not. ---/
-
-/A(*PRUNE:A)B/K
- ACAB
-
-/--- Mark names can be duplicated ---/
-
-/A(*:A)B|X(*:A)Y/K
- AABC
- XXYZ
-
-/b(*:m)f|a(*:n)w/K
- aw
- ** Failers
- abc
-
-/b(*:m)f|aw/K
- abaw
- ** Failers
- abc
- abax
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
- AAAC
-
-/a(*PRUNE:X)bc|qq/KY
- ** Failers
- axy
-
-/a(*THEN:X)bc|qq/KY
- ** Failers
- axy
-
-/(?=a(*MARK:A)b)..x/K
- abxy
- ** Failers
- abpq
-
-/(?=a(*MARK:A)b)..(*:Y)x/K
- abxy
- ** Failers
- abpq
-
-/(?=a(*PRUNE:A)b)..x/K
- abxy
- ** Failers
- abpq
-
-/(?=a(*PRUNE:A)b)..(*:Y)x/K
- abxy
- ** Failers
- abpq
-
-/(?=a(*THEN:A)b)..x/K
- abxy
- ** Failers
- abpq
-
-/(?=a(*THEN:A)b)..(*:Y)x/K
- abxy
- ** Failers
- abpq
-
-/(another)?(\1?)test/
- hello world test
-
-/(another)?(\1+)test/
- hello world test
-
-/-- End of testinput1 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput10 b/src/third_party/pcre-8.30/testdata/testinput10
deleted file mode 100644
index 7b85f4d1851..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput10
+++ /dev/null
@@ -1,989 +0,0 @@
-/-- This set of tests check Unicode property support with the DFA matching
- functionality of pcre_dfa_exec(). The -dfa flag must be used with pcretest
- when running it. --/
-
-/\pL\P{Nd}/8
- AB
- *** Failers
- A0
- 00
-
-/\X./8
- AB
- A\x{300}BC
- A\x{300}\x{301}\x{302}BC
- *** Failers
- \x{300}
-
-/\X\X/8
- ABC
- A\x{300}B\x{300}\x{301}C
- A\x{300}\x{301}\x{302}BC
- *** Failers
- \x{300}
-
-/^\pL+/8
- abcd
- a
- *** Failers
-
-/^\PL+/8
- 1234
- =
- *** Failers
- abcd
-
-/^\X+/8
- abcdA\x{300}\x{301}\x{302}
- A\x{300}\x{301}\x{302}
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
- a
- *** Failers
- \x{300}\x{301}\x{302}
-
-/\X?abc/8
- abc
- A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- \x{300}abc
- *** Failers
-
-/^\X?abc/8
- abc
- A\x{300}abc
- *** Failers
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- \x{300}abc
-
-/\X*abc/8
- abc
- A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- \x{300}abc
- *** Failers
-
-/^\X*abc/8
- abc
- A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- *** Failers
- \x{300}abc
-
-/^\pL?=./8
- A=b
- =c
- *** Failers
- 1=2
- AAAA=b
-
-/^\pL*=./8
- AAAA=b
- =c
- *** Failers
- 1=2
-
-/^\X{2,3}X/8
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- *** Failers
- X
- A\x{300}\x{301}\x{302}X
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
-
-/^\pC\pL\pM\pN\pP\pS\pZ</8
- \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- \np\x{300}9!\$ <
- ** Failers
- ap\x{300}9!\$ <
-
-/^\PC/8
- X
- ** Failers
- \x7f
-
-/^\PL/8
- 9
- ** Failers
- \x{c0}
-
-/^\PM/8
- X
- ** Failers
- \x{30f}
-
-/^\PN/8
- X
- ** Failers
- \x{660}
-
-/^\PP/8
- X
- ** Failers
- \x{66c}
-
-/^\PS/8
- X
- ** Failers
- \x{f01}
-
-/^\PZ/8
- X
- ** Failers
- \x{1680}
-
-/^\p{Cc}/8
- \x{017}
- \x{09f}
- ** Failers
- \x{0600}
-
-/^\p{Cf}/8
- \x{601}
- ** Failers
- \x{09f}
-
-/^\p{Cn}/8
- ** Failers
- \x{09f}
-
-/^\p{Co}/8
- \x{f8ff}
- ** Failers
- \x{09f}
-
-/^\p{Cs}/8
- \?\x{dfff}
- ** Failers
- \x{09f}
-
-/^\p{Ll}/8
- a
- ** Failers
- Z
- \x{e000}
-
-/^\p{Lm}/8
- \x{2b0}
- ** Failers
- a
-
-/^\p{Lo}/8
- \x{1bb}
- ** Failers
- a
- \x{2b0}
-
-/^\p{Lt}/8
- \x{1c5}
- ** Failers
- a
- \x{2b0}
-
-/^\p{Lu}/8
- A
- ** Failers
- \x{2b0}
-
-/^\p{Mc}/8
- \x{903}
- ** Failers
- X
- \x{300}
-
-/^\p{Me}/8
- \x{488}
- ** Failers
- X
- \x{903}
- \x{300}
-
-/^\p{Mn}/8
- \x{300}
- ** Failers
- X
- \x{903}
-
-/^\p{Nd}+/8
- 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
- \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
- \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
- ** Failers
- X
-
-/^\p{Nl}/8
- \x{16ee}
- ** Failers
- X
- \x{966}
-
-/^\p{No}/8
- \x{b2}
- \x{b3}
- ** Failers
- X
- \x{16ee}
-
-/^\p{Pc}/8
- \x5f
- \x{203f}
- ** Failers
- X
- -
- \x{58a}
-
-/^\p{Pd}/8
- -
- \x{58a}
- ** Failers
- X
- \x{203f}
-
-/^\p{Pe}/8
- )
- ]
- }
- \x{f3b}
- ** Failers
- X
- \x{203f}
- (
- [
- {
- \x{f3c}
-
-/^\p{Pf}/8
- \x{bb}
- \x{2019}
- ** Failers
- X
- \x{203f}
-
-/^\p{Pi}/8
- \x{ab}
- \x{2018}
- ** Failers
- X
- \x{203f}
-
-/^\p{Po}/8
- !
- \x{37e}
- ** Failers
- X
- \x{203f}
-
-/^\p{Ps}/8
- (
- [
- {
- \x{f3c}
- ** Failers
- X
- )
- ]
- }
- \x{f3b}
-
-/^\p{Sc}+/8
- $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
- \x{9f2}
- ** Failers
- X
- \x{2c2}
-
-/^\p{Sk}/8
- \x{2c2}
- ** Failers
- X
- \x{9f2}
-
-/^\p{Sm}+/8
- +<|~\x{ac}\x{2044}
- ** Failers
- X
- \x{9f2}
-
-/^\p{So}/8
- \x{a6}
- \x{482}
- ** Failers
- X
- \x{9f2}
-
-/^\p{Zl}/8
- \x{2028}
- ** Failers
- X
- \x{2029}
-
-/^\p{Zp}/8
- \x{2029}
- ** Failers
- X
- \x{2028}
-
-/^\p{Zs}/8
- \ \
- \x{a0}
- \x{1680}
- \x{180e}
- \x{2000}
- \x{2001}
- ** Failers
- \x{2028}
- \x{200d}
-
-/\p{Nd}+(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}+?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,}(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,}?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2}(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,3}(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,3}?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}??(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(...)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(....)/8
- ** Failers
- \x{660}\x{661}\x{662}ABC
-
-/\p{Lu}/8i
- A
- a\x{10a0}B
- ** Failers
- a
- \x{1d00}
-
-/\p{^Lu}/8i
- 1234
- ** Failers
- ABC
-
-/\P{Lu}/8i
- 1234
- ** Failers
- ABC
-
-/(?<=A\p{Nd})XYZ/8
- A2XYZ
- 123A5XYZPQR
- ABA\x{660}XYZpqr
- ** Failers
- AXYZ
- XYZ
-
-/(?<!\pL)XYZ/8
- 1XYZ
- AB=XYZ..
- XYZ
- ** Failers
- WXYZ
-
-/[\p{Nd}]/8
- 1234
-
-/[\p{Nd}+-]+/8
- 1234
- 12-34
- 12+\x{661}-34
- ** Failers
- abcd
-
-/[\P{Nd}]+/8
- abcd
- ** Failers
- 1234
-
-/\D+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\P{Nd}+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\pL/8
- a
- A
-
-/\pL/8i
- a
- A
-
-/\p{Lu}/8
- A
- aZ
- ** Failers
- abc
-
-/\p{Lu}/8i
- A
- aZ
- ** Failers
- abc
-
-/\p{Ll}/8
- a
- Az
- ** Failers
- ABC
-
-/\p{Ll}/8i
- a
- Az
- ** Failers
- ABC
-
-/^\x{c0}$/8i
- \x{c0}
- \x{e0}
-
-/^\x{e0}$/8i
- \x{c0}
- \x{e0}
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- ** Failers
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/\x{391}+/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
-
-/\x{391}{3,5}(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
-
-/\x{391}{3,5}?(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
-
-/[\x{391}\x{ff3a}]/8i
- \x{391}
- \x{ff3a}
- \x{3b1}
- \x{ff5a}
-
-/[\x{c0}\x{391}]/8i
- \x{c0}
- \x{e0}
-
-/[\x{105}-\x{109}]/8i
- \x{104}
- \x{105}
- \x{109}
- ** Failers
- \x{100}
- \x{10a}
-
-/[z-\x{100}]/8i
- Z
- z
- \x{39c}
- \x{178}
- |
- \x{80}
- \x{ff}
- \x{100}
- \x{101}
- ** Failers
- \x{102}
- Y
- y
-
-/[z-\x{100}]/8i
-
-/^\X/8
- A
- A\x{300}BC
- A\x{300}\x{301}\x{302}BC
- *** Failers
- \x{300}
-
-/^[\X]/8
- X123
- *** Failers
- AXYZ
-
-/^(\X*)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-
-/^(\X*?)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-
-/^(\X*)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-
-/^(\X*?)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-
-/^\X(.)/8
- *** Failers
- A\x{300}\x{301}\x{302}
-
-/^\X{2,3}(.)/8
- A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
-
-/^\X{2,3}?(.)/8
- A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
-
-/^\pN{2,3}X/
- 12X
- 123X
- *** Failers
- X
- 1X
- 1234X
-
-/\x{100}/i8
- \x{100}
- \x{101}
-
-/^\p{Han}+/8
- \x{2e81}\x{3007}\x{2f804}\x{31a0}
- ** Failers
- \x{2e7f}
-
-/^\P{Katakana}+/8
- \x{3105}
- ** Failers
- \x{30ff}
-
-/^[\p{Arabic}]/8
- \x{06e9}
- \x{060b}
- ** Failers
- X\x{06e9}
-
-/^[\P{Yi}]/8
- \x{2f800}
- ** Failers
- \x{a014}
- \x{a4c6}
-
-/^\p{Any}X/8
- AXYZ
- \x{1234}XYZ
- ** Failers
- X
-
-/^\P{Any}X/8
- ** Failers
- AX
-
-/^\p{Any}?X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- ** Failers
- ABXYZ
-
-/^\P{Any}?X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- ABXYZ
-
-/^\p{Any}+X/8
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
- XYZ
-
-/^\P{Any}+X/8
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- XYZ
-
-/^\p{Any}*X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
-
-/^\P{Any}*X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
-
-/^[\p{Any}]X/8
- AXYZ
- \x{1234}XYZ
- ** Failers
- X
-
-/^[\P{Any}]X/8
- ** Failers
- AX
-
-/^[\p{Any}]?X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- ** Failers
- ABXYZ
-
-/^[\P{Any}]?X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- ABXYZ
-
-/^[\p{Any}]+X/8
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
- XYZ
-
-/^[\P{Any}]+X/8
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- XYZ
-
-/^[\p{Any}]*X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
-
-/^[\P{Any}]*X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
-
-/^\p{Any}{3,5}?/8
- abcdefgh
- \x{1234}\n\r\x{3456}xyz
-
-/^\p{Any}{3,5}/8
- abcdefgh
- \x{1234}\n\r\x{3456}xyz
-
-/^\P{Any}{3,5}?/8
- ** Failers
- abcdefgh
- \x{1234}\n\r\x{3456}xyz
-
-/^\p{L&}X/8
- AXY
- aXY
- \x{1c5}XY
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^[\p{L&}]X/8
- AXY
- aXY
- \x{1c5}XY
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^\p{L&}+X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^[\p{L&}]+X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^\p{L&}+?X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^[\p{L&}]+?X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^\P{L&}X/8
- !XY
- \x{1bb}XY
- \x{2b0}XY
- ** Failers
- \x{1c5}XY
- AXY
-
-/^[\P{L&}]X/8
- !XY
- \x{1bb}XY
- \x{2b0}XY
- ** Failers
- \x{1c5}XY
- AXY
-
-/^\x{023a}+?(\x{0130}+)/8i
- \x{023a}\x{2c65}\x{0130}
-
-/^\x{023a}+([^X])/8i
- \x{023a}\x{2c65}X
-
-/\x{c0}+\x{116}+/8i
- \x{c0}\x{e0}\x{116}\x{117}
-
-/[\x{c0}\x{116}]+/8i
- \x{c0}\x{e0}\x{116}\x{117}
-
-/Check property support in non-UTF-8 mode/
-
-/\p{L}{4}/
- 123abcdefg
- 123abc\xc4\xc5zz
-
-/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8
- \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
-
-/\x{a77d}\x{1d79}/8i
- \x{a77d}\x{1d79}
- \x{1d79}\x{a77d}
-
-/\x{a77d}\x{1d79}/8
- \x{a77d}\x{1d79}
- ** Failers
- \x{1d79}\x{a77d}
-
-/^\p{Xan}/8
- ABCD
- 1234
- \x{6ca}
- \x{a6c}
- \x{10a7}
- ** Failers
- _ABC
-
-/^\p{Xan}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- ** Failers
- _ABC
-
-/^\p{Xan}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xan}{2,9}/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^[\p{Xan}]/8
- ABCD1234_
- 1234abcd_
- \x{6ca}
- \x{a6c}
- \x{10a7}
- ** Failers
- _ABC
-
-/^[\p{Xan}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- ** Failers
- _ABC
-
-/^>\p{Xsp}/8
- >\x{1680}\x{2028}\x{0b}
- ** Failers
- \x{0b}
-
-/^>\p{Xsp}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xsp}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xsp}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>[\p{Xsp}]/8
- >\x{2028}\x{0b}
-
-/^>[\p{Xsp}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}/8
- >\x{1680}\x{2028}\x{0b}
- >\x{a0}
- ** Failers
- \x{0b}
-
-/^>\p{Xps}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}+?/8
- >\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}{2,9}?/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>[\p{Xps}]/8
- >\x{2028}\x{0b}
-
-/^>[\p{Xps}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^\p{Xwd}/8
- ABCD
- 1234
- \x{6ca}
- \x{a6c}
- \x{10a7}
- _ABC
- ** Failers
- []
-
-/^\p{Xwd}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xwd}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xwd}{2,9}/8
- A_12\x{6ca}\x{a6c}\x{10a7}
-
-/^[\p{Xwd}]/8
- ABCD1234_
- 1234abcd_
- \x{6ca}
- \x{a6c}
- \x{10a7}
- _ABC
- ** Failers
- []
-
-/^[\p{Xwd}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/-- Unicode properties for \b abd \B --/
-
-/\b...\B/8W
- abc_
- \x{37e}abc\x{376}
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
-
-/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
-
-/\b...\B/8
- abc_
- ** Failers
- \x{37e}abc\x{376}
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
-
-/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
-
-/\b...\B/W
- abc_
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
-
-/-- End of testinput10 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput11 b/src/third_party/pcre-8.30/testdata/testinput11
deleted file mode 100644
index 391ada7aa8c..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput11
+++ /dev/null
@@ -1,135 +0,0 @@
-/-- These are a few representative patterns whose lengths and offsets are to be
-shown when the link size is 2. This is just a doublecheck test to ensure the
-sizes don't go horribly wrong when something is changed. The pattern contents
-are all themselves checked in other tests. Unicode, including property support,
-is required for these tests. --/
-
-/((?i)b)/BM
-
-/(?s)(.*X|^B)/BM
-
-/(?s:.*X|^B)/BM
-
-/^[[:alnum:]]/BM
-
-/#/IxMD
-
-/a#/IxMD
-
-/x?+/BM
-
-/x++/BM
-
-/x{1,3}+/BM
-
-/(x)*+/BM
-
-/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/BM
-
-|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-
-|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-
-/(a(?1)b)/BM
-
-/(a(?1)+b)/BM
-
-/a(?P<name1>b|c)d(?P<longername2>e)/BM
-
-/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/BM
-
-/(?P<a>a)...(?P=a)bbb(?P>a)d/BM
-
-/abc(?C255)de(?C)f/BM
-
-/abcde/CBM
-
-/\x{100}/8BM
-
-/\x{1000}/8BM
-
-/\x{10000}/8BM
-
-/\x{100000}/8BM
-
-/\x{10ffff}/8BM
-
-/\x{110000}/8BM
-
-/[\x{ff}]/8BM
-
-/[\x{100}]/8BM
-
-/\x80/8BM
-
-/\xff/8BM
-
-/\x{0041}\x{2262}\x{0391}\x{002e}/D8M
-
-/\x{D55c}\x{ad6d}\x{C5B4}/D8M
-
-/\x{65e5}\x{672c}\x{8a9e}/D8M
-
-/[\x{100}]/8BM
-
-/[Z\x{100}]/8BM
-
-/^[\x{100}\E-\Q\E\x{150}]/B8M
-
-/^[\QĀ\E-\QŐ\E]/B8M
-
-/^[\QĀ\E-\QŐ\E/B8M
-
-/[\p{L}]/BM
-
-/[\p{^L}]/BM
-
-/[\P{L}]/BM
-
-/[\P{^L}]/BM
-
-/[abc\p{L}\x{0660}]/8BM
-
-/[\p{Nd}]/8BM
-
-/[\p{Nd}+-]+/8BM
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iBM
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8BM
-
-/[\x{105}-\x{109}]/8iBM
-
-/( ( (?(1)0|) )* )/xBM
-
-/( (?(1)0|)* )/xBM
-
-/[a]/BM
-
-/[a]/8BM
-
-/[\xaa]/BM
-
-/[\xaa]/8BM
-
-/[^a]/BM
-
-/[^a]/8BM
-
-/[^\xaa]/BM
-
-/[^\xaa]/8BM
-
-/[^\d]/8WB
-
-/[[:^alpha:][:^cntrl:]]+/8WB
-
-/[[:^cntrl:][:^alpha:]]+/8WB
-
-/[[:alpha:]]+/8WB
-
-/[[:^alpha:]\S]+/8WB
-
-/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
-
-/-- End of testinput11 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput12 b/src/third_party/pcre-8.30/testdata/testinput12
deleted file mode 100644
index 286d5091085..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput12
+++ /dev/null
@@ -1,19 +0,0 @@
-/-- This test is run only when JIT support is available. It checks for a
-successful and an unsuccessful JIT compile and save and restore behaviour,
-and a couple of things that are different with JIT. --/
-
-/abc/S+I
-
-/ab(*COMMIT)/S+I
-
-/abc/S+I>testsavedregex
-
-<testsavedregex
- abc
-
-/a*/SI
-
-/(?(R)a*(?1)|((?R))b)/S+
- aaaabcde
-
-/-- End of testinput12 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput13 b/src/third_party/pcre-8.30/testdata/testinput13
deleted file mode 100644
index c7bc67bb172..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput13
+++ /dev/null
@@ -1,9 +0,0 @@
-/-- This test is run only when JIT support is not available. It checks that an
-attempt to use it has the expected behaviour. It also tests things that
-are different without JIT. --/
-
-/abc/S+I
-
-/a*/SI
-
-/-- End of testinput13 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput14 b/src/third_party/pcre-8.30/testdata/testinput14
deleted file mode 100644
index 0db5346177c..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput14
+++ /dev/null
@@ -1,317 +0,0 @@
-/-- This set of tests is run only with the 8-bit library. It starts with all
- the tests of the POSIX interface, because that is supported only with the
- 8-bit library. --/
-
-/abc/P
- abc
- *** Failers
-
-/^abc|def/P
- abcdef
- abcdef\B
-
-/.*((abc)$|(def))/P
- defabc
- \Zdefabc
-
-/the quick brown fox/P
- the quick brown fox
- *** Failers
- The Quick Brown Fox
-
-/the quick brown fox/Pi
- the quick brown fox
- The Quick Brown Fox
-
-/abc.def/P
- *** Failers
- abc\ndef
-
-/abc$/P
- abc
- abc\n
-
-/(abc)\2/P
-
-/(abc\1)/P
- abc
-
-/a*(b+)(z)(z)/P
- aaaabbbbzzzz
- aaaabbbbzzzz\O0
- aaaabbbbzzzz\O1
- aaaabbbbzzzz\O2
- aaaabbbbzzzz\O3
- aaaabbbbzzzz\O4
- aaaabbbbzzzz\O5
-
-/ab.cd/P
- ab-cd
- ab=cd
- ** Failers
- ab\ncd
-
-/ab.cd/Ps
- ab-cd
- ab=cd
- ab\ncd
-
-/a(b)c/PN
- abc
-
-/a(?P<name>b)c/PN
- abc
-
-/a?|b?/P
- abc
- ** Failers
- ddd\N
-
-/\w+A/P
- CDAAAAB
-
-/\w+A/PU
- CDAAAAB
-
-/\Biss\B/I+P
- Mississippi
-
-/abc/\P
-
-/-- End of POSIX tests --/
-
-/a\Cb/
- aXb
- a\nb
- ** Failers (too big char)
- A\x{123}B
-
-/\x{100}/I
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/xSI
-
-/-- Although this saved pattern was compiled with link-size=2, it does no harm
-to run this test with other link sizes because it is going to generated a
-"compiled in wrong mode" error as soon as it is loaded, so the link size does
-not matter. --/
-
-<!testsaved16
-
-/\h/SI
-
-/\v/SI
-
-/\R/SI
-
-/[\h]/BZ
- >\x09<
-
-/[\h]+/BZ
- >\x09\x20\xa0<
-
-/[\v]/BZ
-
-/[\H]/BZ
-
-/[^\h]/BZ
-
-/[\V]/BZ
-
-/[\x0a\V]/BZ
-
-/\777/I
-
-/-- End of testinput14 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput15 b/src/third_party/pcre-8.30/testdata/testinput15
deleted file mode 100644
index f995646aab4..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput15
+++ /dev/null
@@ -1,280 +0,0 @@
-/-- This set of tests is for UTF-8 support, and is relevant only to the 8-bit
- library. --/
-
-/X(\C{3})/8
- X\x{1234}
-
-/X(\C{4})/8
- X\x{1234}YZ
-
-/X\C*/8
- XYZabcdce
-
-/X\C*?/8
- XYZabcde
-
-/X\C{3,5}/8
- Xabcdefg
- X\x{1234}
- X\x{1234}YZ
- X\x{1234}\x{512}
- X\x{1234}\x{512}YZ
-
-/X\C{3,5}?/8
- Xabcdefg
- X\x{1234}
- X\x{1234}YZ
- X\x{1234}\x{512}
-
-/a\Cb/8
- aXb
- a\nb
-
-/a\C\Cb/8
- a\x{100}b
-
-/ab\Cde/8
- abXde
-
-/a\C\Cb/8
- a\x{100}b
- ** Failers
- a\x{12257}b
-
-/[]/8
-
-//8
-
-/xxx/8
-
-/xxx/8?DZSS
-
-/abc/8
- ]
-
-
- \?
- \xe1\x88
- \P\xe1\x88
- \P\P\xe1\x88
- XX\xea
- \O0XX\xea
- \O1XX\xea
- \O2XX\xea
- XX\xf1
- XX\xf8
- XX\xfc
- ZZ\xea\xaf\x20YY
- ZZ\xfd\xbf\xbf\x2f\xbf\xbfYY
- ZZ\xfd\xbf\xbf\xbf\x2f\xbfYY
- ZZ\xfd\xbf\xbf\xbf\xbf\x2fYY
- ZZ\xffYY
- ZZ\xfeYY
-
-/anything/8
- \xc0\x80
- \xc1\x8f
- \xe0\x9f\x80
- \xf0\x8f\x80\x80
- \xf8\x87\x80\x80\x80
- \xfc\x83\x80\x80\x80\x80
- \xfe\x80\x80\x80\x80\x80
- \xff\x80\x80\x80\x80\x80
- \xc3\x8f
- \xe0\xaf\x80
- \xe1\x80\x80
- \xf0\x9f\x80\x80
- \xf1\x8f\x80\x80
- \xf8\x88\x80\x80\x80
- \xf9\x87\x80\x80\x80
- \xfc\x84\x80\x80\x80\x80
- \xfd\x83\x80\x80\x80\x80
- \?\xf8\x88\x80\x80\x80
- \?\xf9\x87\x80\x80\x80
- \?\xfc\x84\x80\x80\x80\x80
- \?\xfd\x83\x80\x80\x80\x80
-
-/\x{100}/8DZ
-
-/\x{1000}/8DZ
-
-/\x{10000}/8DZ
-
-/\x{100000}/8DZ
-
-/\x{10ffff}/8DZ
-
-/[\x{ff}]/8DZ
-
-/[\x{100}]/8DZ
-
-/\x80/8DZ
-
-/\xff/8DZ
-
-/\x{D55c}\x{ad6d}\x{C5B4}/DZ8
- \x{D55c}\x{ad6d}\x{C5B4}
-
-/\x{65e5}\x{672c}\x{8a9e}/DZ8
- \x{65e5}\x{672c}\x{8a9e}
-
-/\x{80}/DZ8
-
-/\x{084}/DZ8
-
-/\x{104}/DZ8
-
-/\x{861}/DZ8
-
-/\x{212ab}/DZ8
-
-/-- This one is here not because it's different to Perl, but because the way
-the captured single-byte is displayed. (In Perl it becomes a character, and you
-can't tell the difference.) --/
-
-/X(\C)(.*)/8
- X\x{1234}
- X\nabc
-
-/-- This one is here because Perl gives out a grumbly error message (quite
-correctly, but that messes up comparisons). --/
-
-/a\Cb/8
- *** Failers
- a\x{100}b
-
-/[^ab\xC0-\xF0]/8SDZ
- \x{f1}
- \x{bf}
- \x{100}
- \x{1000}
- *** Failers
- \x{c0}
- \x{f0}
-
-/Ā{3,4}/8SDZ
- \x{100}\x{100}\x{100}\x{100\x{100}
-
-/(\x{100}+|x)/8SDZ
-
-/(\x{100}*a|x)/8SDZ
-
-/(\x{100}{0,2}a|x)/8SDZ
-
-/(\x{100}{1,2}a|x)/8SDZ
-
-/\x{100}/8DZ
-
-/a\x{100}\x{101}*/8DZ
-
-/a\x{100}\x{101}+/8DZ
-
-/[^\x{c4}]/DZ
-
-/[\x{100}]/8DZ
- \x{100}
- Z\x{100}
- \x{100}Z
- *** Failers
-
-/[\xff]/DZ8
- >\x{ff}<
-
-/[^\xff]/8DZ
-
-/\x{100}abc(xyz(?1))/8DZ
-
-/a\x{1234}b/P8
- a\x{1234}b
-
-/\777/8I
- \x{1ff}
- \777
-
-/\x{100}+\x{200}/8DZ
-
-/\x{100}+X/8DZ
-
-/^[\QĀ\E-\QŐ\E/BZ8
-
-/-- This tests the stricter UTF-8 check according to RFC 3629. --/
-
-/X/8
- \x{0}\x{d7ff}\x{e000}\x{10ffff}
- \x{d800}
- \x{d800}\?
- \x{da00}
- \x{da00}\?
- \x{dfff}
- \x{dfff}\?
- \x{110000}
- \x{110000}\?
- \x{2000000}
- \x{2000000}\?
- \x{7fffffff}
- \x{7fffffff}\?
-
-/(*UTF8)\x{1234}/
- abcd\x{1234}pqr
-
-/(*CRLF)(*UTF8)(*BSR_UNICODE)a\Rb/I
-
-/\h/SI8
- ABC\x{09}
- ABC\x{20}
- ABC\x{a0}
- ABC\x{1680}
- ABC\x{180e}
- ABC\x{2000}
- ABC\x{202f}
- ABC\x{205f}
- ABC\x{3000}
-
-/\v/SI8
- ABC\x{0a}
- ABC\x{0b}
- ABC\x{0c}
- ABC\x{0d}
- ABC\x{85}
- ABC\x{2028}
-
-/\h*A/SI8
- CDBABC
-
-/\v+A/SI8
-
-/\s?xxx\s/8SI
-
-/\sxxx\s/I8ST1
- AB\x{85}xxx\x{a0}XYZ
- AB\x{a0}xxx\x{85}XYZ
-
-/\S \S/I8ST1
- \x{a2} \x{84}
- A Z
-
-/a+/8
- a\x{123}aa\>1
- a\x{123}aa\>2
- a\x{123}aa\>3
- a\x{123}aa\>4
- a\x{123}aa\>5
- a\x{123}aa\>6
-
-/\x{1234}+/iS8I
-
-/\x{1234}+?/iS8I
-
-/\x{1234}++/iS8I
-
-/\x{1234}{2}/iS8I
-
-/[^\x{c4}]/8DZ
-
-/X+\x{200}/8DZ
-
-/\R/SI8
-
-/\777/8DZ
-
-/-- End of testinput15 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput16 b/src/third_party/pcre-8.30/testdata/testinput16
deleted file mode 100644
index e7a05ae0d45..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput16
+++ /dev/null
@@ -1,35 +0,0 @@
-/-- This set of tests is run only with the 8-bit library when Unicode property
- support is available. It starts with tests of the POSIX interface, because
- that is supported only with the 8-bit library. --/
-
-/\w/P
- +++\x{c2}
-
-/\w/WP
- +++\x{c2}
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iDZ
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8DZ
-
-/AB\x{1fb0}/8DZ
-
-/AB\x{1fb0}/8DZi
-
-/\x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}/8iSI
- \x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}
- \x{451}\x{440}\x{441}\x{442}\x{443}\x{444}\x{445}\x{446}\x{447}\x{448}\x{449}\x{44a}\x{44b}\x{44c}\x{44d}\x{44e}\x{44f}
-
-/[ⱥ]/8iBZ
-
-/[^ⱥ]/8iBZ
-
-/\h/SI
-
-/\v/SI
-
-/\R/SI
-
-/[[:blank:]]/WBZ
-
-/-- End of testinput16 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput17 b/src/third_party/pcre-8.30/testdata/testinput17
deleted file mode 100644
index 5bdbfb7520d..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput17
+++ /dev/null
@@ -1,275 +0,0 @@
-/-- This set of tests is for the 16-bit library's basic (non-UTF-16) features
- that are not compatible with the 8-bit library, or which give different
- output in 16-bit mode. --/
-
-/a\Cb/
- aXb
- a\nb
-
-/-- Check maximum non-UTF character size --/
-
-/\x{ffff}/
- A\x{ffff}B
-
-/\x{10000}/
-
-/[^\x{c4}]/DZ
-
-
-/\x{100}/I
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/xSI
-
-/[\h]/BZ
- >\x09<
-
-/[\h]+/BZ
- >\x09\x20\xa0<
-
-/[\v]/BZ
-
-/[\H]/BZ
-
-/[^\h]/BZ
-
-/[\V]/BZ
-
-/[\x0a\V]/BZ
-
-/\h+/SI
- \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
- \x{3001}\x{2fff}\x{200a}\xa0\x{2000}
-
-/[\h\x{dc00}]+/BZSI
- \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
- \x{3001}\x{2fff}\x{200a}\xa0\x{2000}
-
-/\H+/SI
- \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
- \x{2000}\x{200a}\x{1fff}\x{200b}
- \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
- \xa0\x{3000}\x9f\xa1\x{2fff}\x{3001}
-
-/[\H\x{d800}]+/BZSI
- \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
- \x{2000}\x{200a}\x{1fff}\x{200b}
- \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
- \xa0\x{3000}\x9f\xa1\x{2fff}\x{3001}
-
-/\v+/SI
- \x{2027}\x{2030}\x{2028}\x{2029}
- \x09\x0e\x84\x86\x85\x0a\x0b\x0c\x0d
-
-/[\v\x{dc00}]+/BZSI
- \x{2027}\x{2030}\x{2028}\x{2029}
- \x09\x0e\x84\x86\x85\x0a\x0b\x0c\x0d
-
-/\V+/SI
- \x{2028}\x{2029}\x{2027}\x{2030}
- \x85\x0a\x0b\x0c\x0d\x09\x0e\x84\x86
-
-/[\V\x{d800}]+/BZSI
- \x{2028}\x{2029}\x{2027}\x{2030}
- \x85\x0a\x0b\x0c\x0d\x09\x0e\x84\x86
-
-/\R+/SI<bsr_unicode>
- \x{2027}\x{2030}\x{2028}\x{2029}
- \x09\x0e\x84\x86\x85\x0a\x0b\x0c\x0d
-
-/\x{d800}\x{d7ff}\x{dc00}\x{dc00}\x{dcff}\x{dd00}/I
- \x{d800}\x{d7ff}\x{dc00}\x{dc00}\x{dcff}\x{dd00}
-
-/-- End of testinput17 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput18 b/src/third_party/pcre-8.30/testdata/testinput18
deleted file mode 100644
index e6c77a89bdd..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput18
+++ /dev/null
@@ -1,243 +0,0 @@
-/-- This set of tests is for UTF-16 support, and is relevant only to the 16-bit
- library. --/
-
-/xxx/8?DZSS
-
-/abc/8
- ]
-
-/X(\C{3})/8
- X\x{11234}Y
-
-/X(\C{4})/8
- X\x{11234}YZ
-
-/X\C*/8
- XYZabcdce
-
-/X\C*?/8
- XYZabcde
-
-/X\C{3,5}/8
- Xabcdefg
- X\x{11234}Y
- X\x{11234}YZ
- X\x{11234}\x{512}
- X\x{11234}\x{512}YZ
- X\x{11234}\x{512}\x{11234}Z
-
-/X\C{3,5}?/8
- Xabcdefg
- X\x{11234}Y
- X\x{11234}YZ
- X\x{11234}\x{512}YZ
- *** Failers
- X\x{11234}
-
-/a\Cb/8
- aXb
- a\nb
-
-/a\C\Cb/8
- a\x{12257}b
- ** Failers
- a\x{100}b
-
-/ab\Cde/8
- abXde
-
-/-- Check maximum character size --/
-
-/\x{ffff}/8DZ
-
-/\x{10000}/8DZ
-
-/\x{100}/8DZ
-
-/\x{1000}/8DZ
-
-/\x{10000}/8DZ
-
-/\x{100000}/8DZ
-
-/\x{10ffff}/8DZ
-
-/[\x{ff}]/8DZ
-
-/[\x{100}]/8DZ
-
-/\x80/8DZ
-
-/\xff/8DZ
-
-/\x{D55c}\x{ad6d}\x{C5B4}/DZ8
- \x{D55c}\x{ad6d}\x{C5B4}
-
-/\x{65e5}\x{672c}\x{8a9e}/DZ8
- \x{65e5}\x{672c}\x{8a9e}
-
-/\x{80}/DZ8
-
-/\x{084}/DZ8
-
-/\x{104}/DZ8
-
-/\x{861}/DZ8
-
-/\x{212ab}/DZ8
-
-/-- This one is here not because it's different to Perl, but because the way
-the captured single-byte is displayed. (In Perl it becomes a character, and you
-can't tell the difference.) --/
-
-/X(\C)(.*)/8
- X\x{1234}
- X\nabc
-
-/-- This one is here because Perl gives out a grumbly error message (quite
-correctly, but that messes up comparisons). --/
-
-/a\Cb/8
- *** Failers
- a\x{100}b
-
-/[^ab\xC0-\xF0]/8SDZ
- \x{f1}
- \x{bf}
- \x{100}
- \x{1000}
- *** Failers
- \x{c0}
- \x{f0}
-
-/Ā{3,4}/8SDZ
- \x{100}\x{100}\x{100}\x{100\x{100}
-
-/(\x{100}+|x)/8SDZ
-
-/(\x{100}*a|x)/8SDZ
-
-/(\x{100}{0,2}a|x)/8SDZ
-
-/(\x{100}{1,2}a|x)/8SDZ
-
-/\x{100}/8DZ
-
-/a\x{100}\x{101}*/8DZ
-
-/a\x{100}\x{101}+/8DZ
-
-/[^\x{c4}]/DZ
-
-/[\x{100}]/8DZ
- \x{100}
- Z\x{100}
- \x{100}Z
- *** Failers
-
-/[\xff]/DZ8
- >\x{ff}<
-
-/[^\xff]/8DZ
-
-/\x{100}abc(xyz(?1))/8DZ
-
-/\777/8I
- \x{1ff}
- \777
-
-/\x{100}+\x{200}/8DZ
-
-/\x{100}+X/8DZ
-
-/^[\QĀ\E-\QŐ\E/BZ8
-
-/X/8
- \x{0}\x{d7ff}\x{e000}\x{10ffff}
- \x{d800}
- \x{d800}\?
- \x{da00}
- \x{da00}\?
- \x{dc00}
- \x{dc00}\?
- \x{de00}
- \x{de00}\?
- \x{dfff}
- \x{dfff}\?
- \x{110000}
- \x{d800}\x{1234}
- \x{fffe}
-
-/(*UTF16)\x{11234}/
- abcd\x{11234}pqr
-
-/(*CRLF)(*UTF16)(*BSR_UNICODE)a\Rb/I
-
-/\h/SI8
- ABC\x{09}
- ABC\x{20}
- ABC\x{a0}
- ABC\x{1680}
- ABC\x{180e}
- ABC\x{2000}
- ABC\x{202f}
- ABC\x{205f}
- ABC\x{3000}
-
-/\v/SI8
- ABC\x{0a}
- ABC\x{0b}
- ABC\x{0c}
- ABC\x{0d}
- ABC\x{85}
- ABC\x{2028}
-
-/\h*A/SI8
- CDBABC
-
-/\v+A/SI8
-
-/\s?xxx\s/8SI
-
-/\sxxx\s/I8ST1
- AB\x{85}xxx\x{a0}XYZ
- AB\x{a0}xxx\x{85}XYZ
-
-/\S \S/I8ST1
- \x{a2} \x{84}
- A Z
-
-/a+/8
- a\x{123}aa\>1
- a\x{123}aa\>2
- a\x{123}aa\>3
- a\x{123}aa\>4
- a\x{123}aa\>5
- a\x{123}aa\>6
-
-/\x{1234}+/iS8I
-
-/\x{1234}+?/iS8I
-
-/\x{1234}++/iS8I
-
-/\x{1234}{2}/iS8I
-
-/[^\x{c4}]/8DZ
-
-/X+\x{200}/8DZ
-
-/\R/SI8
-
-/-- Check bad offset --/
-
-/a/8
- \x{10000}\>1
- \x{10000}ab\>2
- \x{10000}ab\>3
- \x{10000}ab\>4
- \x{10000}ab\>5
-
-//8
-
-/-- End of testinput18 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput19 b/src/third_party/pcre-8.30/testdata/testinput19
deleted file mode 100644
index 4b002f46e5e..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput19
+++ /dev/null
@@ -1,22 +0,0 @@
-/-- This set of tests is for Unicode property support, relevant only to the
- 16-bit library. --/
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iDZ
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8DZ
-
-/AB\x{1fb0}/8DZ
-
-/AB\x{1fb0}/8DZi
-
-/\x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}/8iSI
- \x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}
- \x{451}\x{440}\x{441}\x{442}\x{443}\x{444}\x{445}\x{446}\x{447}\x{448}\x{449}\x{44a}\x{44b}\x{44c}\x{44d}\x{44e}\x{44f}
-
-/[ⱥ]/8iBZ
-
-/[^ⱥ]/8iBZ
-
-/[[:blank:]]/WBZ
-
-/-- End of testinput19 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput2 b/src/third_party/pcre-8.30/testdata/testinput2
deleted file mode 100644
index bdae8895d5b..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput2
+++ /dev/null
@@ -1,3604 +0,0 @@
-/-- This set of tests is not Perl-compatible. It checks on special features
- of PCRE's API, error diagnostics, and the compiled code of some patterns.
- It also checks the non-Perl syntax the PCRE supports (Python, .NET,
- Oniguruma). Finally, there are some tests where PCRE and Perl differ,
- either because PCRE can't be compatible, or there is a possible Perl
- bug.
-
- NOTE: This is a non-UTF set of tests. When UTF support is needed, use
- test 5, and if Unicode Property Support is needed, use test 7. --/
-
-/(a)b|/I
-
-/abc/I
- abc
- defabc
- \Aabc
- *** Failers
- \Adefabc
- ABC
-
-/^abc/I
- abc
- \Aabc
- *** Failers
- defabc
- \Adefabc
-
-/a+bc/I
-
-/a*bc/I
-
-/a{3}bc/I
-
-/(abc|a+z)/I
-
-/^abc$/I
- abc
- *** Failers
- def\nabc
-
-/ab\idef/X
-
-/(?X)ab\idef/X
-
-/x{5,4}/
-
-/z{65536}/
-
-/[abcd/
-
-/(?X)[\B]/
-
-/(?X)[\R]/
-
-/(?X)[\X]/
-
-/[\B]/BZ
-
-/[\R]/BZ
-
-/[\X]/BZ
-
-/[z-a]/
-
-/^*/
-
-/(abc/
-
-/(?# abc/
-
-/(?z)abc/
-
-/.*b/I
-
-/.*?b/I
-
-/cat|dog|elephant/I
- this sentence eventually mentions a cat
- this sentences rambles on and on for a while and then reaches elephant
-
-/cat|dog|elephant/IS
- this sentence eventually mentions a cat
- this sentences rambles on and on for a while and then reaches elephant
-
-/cat|dog|elephant/IiS
- this sentence eventually mentions a CAT cat
- this sentences rambles on and on for a while to elephant ElePhant
-
-/a|[bcd]/IS
-
-/(a|[^\dZ])/IS
-
-/(a|b)*[\s]/IS
-
-/(ab\2)/
-
-/{4,5}abc/
-
-/(a)(b)(c)\2/I
- abcb
- \O0abcb
- \O3abcb
- \O6abcb
- \O9abcb
- \O12abcb
-
-/(a)bc|(a)(b)\2/I
- abc
- \O0abc
- \O3abc
- \O6abc
- aba
- \O0aba
- \O3aba
- \O6aba
- \O9aba
- \O12aba
-
-/abc$/IE
- abc
- *** Failers
- abc\n
- abc\ndef
-
-/(a)(b)(c)(d)(e)\6/
-
-/the quick brown fox/I
- the quick brown fox
- this is a line with the quick brown fox
-
-/the quick brown fox/IA
- the quick brown fox
- *** Failers
- this is a line with the quick brown fox
-
-/ab(?z)cd/
-
-/^abc|def/I
- abcdef
- abcdef\B
-
-/.*((abc)$|(def))/I
- defabc
- \Zdefabc
-
-/)/
-
-/a[]b/
-
-/[^aeiou ]{3,}/I
- co-processors, and for
-
-/<.*>/I
- abc<def>ghi<klm>nop
-
-/<.*?>/I
- abc<def>ghi<klm>nop
-
-/<.*>/IU
- abc<def>ghi<klm>nop
-
-/(?U)<.*>/I
- abc<def>ghi<klm>nop
-
-/<.*?>/IU
- abc<def>ghi<klm>nop
-
-/={3,}/IU
- abc========def
-
-/(?U)={3,}?/I
- abc========def
-
-/(?<!bar|cattle)foo/I
- foo
- catfoo
- *** Failers
- the barfoo
- and cattlefoo
-
-/(?<=a+)b/
-
-/(?<=aaa|b{0,3})b/
-
-/(?<!(foo)a\1)bar/
-
-/(?i)abc/I
-
-/(a|(?m)a)/I
-
-/(?i)^1234/I
-
-/(^b|(?i)^d)/I
-
-/(?s).*/I
-
-/[abcd]/IS
-
-/(?i)[abcd]/IS
-
-/(?m)[xy]|(b|c)/IS
-
-/(^a|^b)/Im
-
-/(?i)(^a|^b)/Im
-
-/(a)(?(1)a|b|c)/
-
-/(?(?=a)a|b|c)/
-
-/(?(1a)/
-
-/(?(1a))/
-
-/(?(?i))/
-
-/(?(abc))/
-
-/(?(?<ab))/
-
-/((?s)blah)\s+\1/I
-
-/((?i)blah)\s+\1/I
-
-/((?i)b)/IDZS
-
-/(a*b|(?i:c*(?-i)d))/IS
-
-/a$/I
- a
- a\n
- *** Failers
- \Za
- \Za\n
-
-/a$/Im
- a
- a\n
- \Za\n
- *** Failers
- \Za
-
-/\Aabc/Im
-
-/^abc/Im
-
-/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
- aaaaabbbbbcccccdef
-
-/(?<=foo)[ab]/IS
-
-/(?<!foo)(alpha|omega)/IS
-
-/(?!alphabet)[ab]/IS
-
-/(?<=foo\n)^bar/Im
- foo\nbarbar
- ***Failers
- rhubarb
- barbell
- abc\nbarton
-
-/^(?<=foo\n)bar/Im
- foo\nbarbar
- ***Failers
- rhubarb
- barbell
- abc\nbarton
-
-/(?>^abc)/Im
- abc
- def\nabc
- *** Failers
- defabc
-
-/(?<=ab(c+)d)ef/
-
-/(?<=ab(?<=c+)d)ef/
-
-/(?<=ab(c|de)f)g/
-
-/The next three are in testinput2 because they have variable length branches/
-
-/(?<=bullock|donkey)-cart/I
- the bullock-cart
- a donkey-cart race
- *** Failers
- cart
- horse-and-cart
-
-/(?<=ab(?i)x|y|z)/I
-
-/(?>.*)(?<=(abcd)|(xyz))/I
- alphabetabcd
- endingxyz
-
-/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
- abxyZZ
- abXyZZ
- ZZZ
- zZZ
- bZZ
- BZZ
- *** Failers
- ZZ
- abXYZZ
- zzz
- bzz
-
-/(?<!(foo)a)bar/I
- bar
- foobbar
- *** Failers
- fooabar
-
-/This one is here because Perl 5.005_02 doesn't fail it/I
-
-/^(a)?(?(1)a|b)+$/I
- *** Failers
- a
-
-/This one is here because Perl behaves differently; see also the following/I
-
-/^(a\1?){4}$/I
- aaaa
- aaaaaa
-
-/Perl does not fail these two for the final subjects. Neither did PCRE until/
-/release 8.01. The problem is in backtracking into a subpattern that contains/
-/a recursive reference to itself. PCRE has now made these into atomic patterns./
-
-/^(xa|=?\1a){2}$/
- xa=xaa
- ** Failers
- xa=xaaa
-
-/^(xa|=?\1a)+$/
- xa=xaa
- ** Failers
- xa=xaaa
-
-/These are syntax tests from Perl 5.005/I
-
-/a[b-a]/
-
-/a[]b/
-
-/a[/
-
-/*a/
-
-/(*)b/
-
-/abc)/
-
-/(abc/
-
-/a**/
-
-/)(/
-
-/\1/
-
-/\2/
-
-/(a)|\2/
-
-/a[b-a]/Ii
-
-/a[]b/Ii
-
-/a[/Ii
-
-/*a/Ii
-
-/(*)b/Ii
-
-/abc)/Ii
-
-/(abc/Ii
-
-/a**/Ii
-
-/)(/Ii
-
-/:(?:/
-
-/(?<%)b/
-
-/a(?{)b/
-
-/a(?{{})b/
-
-/a(?{}})b/
-
-/a(?{"{"})b/
-
-/a(?{"{"}})b/
-
-/(?(1?)a|b)/
-
-/[a[:xyz:/
-
-/(?<=x+)y/
-
-/a{37,17}/
-
-/abc/\
-
-/abc/\i
-
-/(a)bc(d)/I
- abcd
- abcd\C2
- abcd\C5
-
-/(.{20})/I
- abcdefghijklmnopqrstuvwxyz
- abcdefghijklmnopqrstuvwxyz\C1
- abcdefghijklmnopqrstuvwxyz\G1
-
-/(.{15})/I
- abcdefghijklmnopqrstuvwxyz
- abcdefghijklmnopqrstuvwxyz\C1\G1
-
-/(.{16})/I
- abcdefghijklmnopqrstuvwxyz
- abcdefghijklmnopqrstuvwxyz\C1\G1\L
-
-/^(a|(bc))de(f)/I
- adef\G1\G2\G3\G4\L
- bcdef\G1\G2\G3\G4\L
- adefghijk\C0
-
-/^abc\00def/I
- abc\00def\L\C0
-
-/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
-)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
-)?)?)?)?)?)?)?)?)?otherword/I
-
-/.*X/IDZ
-
-/.*X/IDZs
-
-/(.*X|^B)/IDZ
-
-/(.*X|^B)/IDZs
-
-/(?s)(.*X|^B)/IDZ
-
-/(?s:.*X|^B)/IDZ
-
-/\Biss\B/I+
- Mississippi
-
-/iss/IG+
- Mississippi
-
-/\Biss\B/IG+
- Mississippi
-
-/\Biss\B/Ig+
- Mississippi
- *** Failers
- Mississippi\A
-
-/(?<=[Ms])iss/Ig+
- Mississippi
-
-/(?<=[Ms])iss/IG+
- Mississippi
-
-/^iss/Ig+
- ississippi
-
-/.*iss/Ig+
- abciss\nxyzisspqr
-
-/.i./I+g
- Mississippi
- Mississippi\A
- Missouri river
- Missouri river\A
-
-/^.is/I+g
- Mississippi
-
-/^ab\n/Ig+
- ab\nab\ncd
-
-/^ab\n/Img+
- ab\nab\ncd
-
-/abc/I
-
-/abc|bac/I
-
-/(abc|bac)/I
-
-/(abc|(c|dc))/I
-
-/(abc|(d|de)c)/I
-
-/a*/I
-
-/a+/I
-
-/(baa|a+)/I
-
-/a{0,3}/I
-
-/baa{3,}/I
-
-/"([^\\"]+|\\.)*"/I
-
-/(abc|ab[cd])/I
-
-/(a|.)/I
-
-/a|ba|\w/I
-
-/abc(?=pqr)/I
-
-/...(?<=abc)/I
-
-/abc(?!pqr)/I
-
-/ab./I
-
-/ab[xyz]/I
-
-/abc*/I
-
-/ab.c*/I
-
-/a.c*/I
-
-/.c*/I
-
-/ac*/I
-
-/(a.c*|b.c*)/I
-
-/a.c*|aba/I
-
-/.+a/I
-
-/(?=abcda)a.*/I
-
-/(?=a)a.*/I
-
-/a(b)*/I
-
-/a\d*/I
-
-/ab\d*/I
-
-/a(\d)*/I
-
-/abcde{0,0}/I
-
-/ab\d+/I
-
-/a(?(1)b)(.)/I
-
-/a(?(1)bag|big)(.)/I
-
-/a(?(1)bag|big)*(.)/I
-
-/a(?(1)bag|big)+(.)/I
-
-/a(?(1)b..|b..)(.)/I
-
-/ab\d{0}e/I
-
-/a?b?/I
- a
- b
- ab
- \
- *** Failers
- \N
-
-/|-/I
- abcd
- -abc
- \Nab-c
- *** Failers
- \Nabc
-
-/^.?abcd/IS
-
-/\( # ( at start
- (?: # Non-capturing bracket
- (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
- | # Or
- (?R) # Recurse - i.e. nested bracketed string
- )* # Zero or more contents
- \) # Closing )
- /Ix
- (abcd)
- (abcd)xyz
- xyz(abcd)
- (ab(xy)cd)pqr
- (ab(xycd)pqr
- () abc ()
- 12(abcde(fsh)xyz(foo(bar))lmno)89
- *** Failers
- abcd
- abcd)
- (abcd
-
-/\( ( (?>[^()]+) | (?R) )* \) /Ixg
- (ab(xy)cd)pqr
- 1(abcd)(x(y)z)pqr
-
-/\( (?: (?>[^()]+) | (?R) ) \) /Ix
- (abcd)
- (ab(xy)cd)
- (a(b(c)d)e)
- ((ab))
- *** Failers
- ()
-
-/\( (?: (?>[^()]+) | (?R) )? \) /Ix
- ()
- 12(abcde(fsh)xyz(foo(bar))lmno)89
-
-/\( ( (?>[^()]+) | (?R) )* \) /Ix
- (ab(xy)cd)
-
-/\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
- (ab(xy)cd)
-
-/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
- (ab(xy)cd)
- (123ab(xy)cd)
-
-/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
- (ab(xy)cd)
- (123ab(xy)cd)
-
-/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
- (ab(xy)cd)
-
-/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
- (abcd(xyz<p>qrs)123)
-
-/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
- (ab(cd)ef)
- (ab(cd(ef)gh)ij)
-
-/^[[:alnum:]]/DZ
-
-/^[[:^alnum:]]/DZ
-
-/^[[:alpha:]]/DZ
-
-/^[[:^alpha:]]/DZ
-
-/[_[:alpha:]]/IS
-
-/^[[:ascii:]]/DZ
-
-/^[[:^ascii:]]/DZ
-
-/^[[:blank:]]/DZ
-
-/^[[:^blank:]]/DZ
-
-/[\n\x0b\x0c\x0d[:blank:]]/IS
-
-/^[[:cntrl:]]/DZ
-
-/^[[:digit:]]/DZ
-
-/^[[:graph:]]/DZ
-
-/^[[:lower:]]/DZ
-
-/^[[:print:]]/DZ
-
-/^[[:punct:]]/DZ
-
-/^[[:space:]]/DZ
-
-/^[[:upper:]]/DZ
-
-/^[[:xdigit:]]/DZ
-
-/^[[:word:]]/DZ
-
-/^[[:^cntrl:]]/DZ
-
-/^[12[:^digit:]]/DZ
-
-/^[[:^blank:]]/DZ
-
-/[01[:alpha:]%]/DZ
-
-/[[.ch.]]/I
-
-/[[=ch=]]/I
-
-/[[:rhubarb:]]/I
-
-/[[:upper:]]/Ii
- A
- a
-
-/[[:lower:]]/Ii
- A
- a
-
-/((?-i)[[:lower:]])[[:lower:]]/Ii
- ab
- aB
- *** Failers
- Ab
- AB
-
-/[\200-\110]/I
-
-/^(?(0)f|b)oo/I
-
-/This one's here because of the large output vector needed/I
-
-/(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/I
- \O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC
-
-/This one's here because Perl does this differently and PCRE can't at present/I
-
-/(main(O)?)+/I
- mainmain
- mainOmain
-
-/These are all cases where Perl does it differently (nested captures)/I
-
-/^(a(b)?)+$/I
- aba
-
-/^(aa(bb)?)+$/I
- aabbaa
-
-/^(aa|aa(bb))+$/I
- aabbaa
-
-/^(aa(bb)??)+$/I
- aabbaa
-
-/^(?:aa(bb)?)+$/I
- aabbaa
-
-/^(aa(b(b))?)+$/I
- aabbaa
-
-/^(?:aa(b(b))?)+$/I
- aabbaa
-
-/^(?:aa(b(?:b))?)+$/I
- aabbaa
-
-/^(?:aa(bb(?:b))?)+$/I
- aabbbaa
-
-/^(?:aa(b(?:bb))?)+$/I
- aabbbaa
-
-/^(?:aa(?:b(b))?)+$/I
- aabbaa
-
-/^(?:aa(?:b(bb))?)+$/I
- aabbbaa
-
-/^(aa(b(bb))?)+$/I
- aabbbaa
-
-/^(aa(bb(bb))?)+$/I
- aabbbbaa
-
-/--------------------------------------------------------------------/I
-
-/#/IxDZ
-
-/a#/IxDZ
-
-/[\s]/DZ
-
-/[\S]/DZ
-
-/a(?i)b/DZ
- ab
- aB
- *** Failers
- AB
-
-/(a(?i)b)/DZ
- ab
- aB
- *** Failers
- AB
-
-/ (?i)abc/IxDZ
-
-/#this is a comment
- (?i)abc/IxDZ
-
-/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
-
-/\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
-
-/\Q\E/DZ
- \
-
-/\Q\Ex/DZ
-
-/ \Q\E/DZ
-
-/a\Q\E/DZ
- abc
- bca
- bac
-
-/a\Q\Eb/DZ
- abc
-
-/\Q\Eabc/DZ
-
-/x*+\w/DZ
- *** Failers
- xxxxx
-
-/x?+/DZ
-
-/x++/DZ
-
-/x{1,3}+/DZ
-
-/(x)*+/DZ
-
-/^(\w++|\s++)*$/I
- now is the time for all good men to come to the aid of the party
- *** Failers
- this is not a line with only words and spaces!
-
-/(\d++)(\w)/I
- 12345a
- *** Failers
- 12345+
-
-/a++b/I
- aaab
-
-/(a++b)/I
- aaab
-
-/(a++)b/I
- aaab
-
-/([^()]++|\([^()]*\))+/I
- ((abc(ade)ufh()()x
-
-/\(([^()]++|\([^()]+\))+\)/I
- (abc)
- (abc(def)xyz)
- *** Failers
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/(abc){1,3}+/DZ
-
-/a+?+/I
-
-/a{2,3}?+b/I
-
-/(?U)a+?+/I
-
-/a{2,3}?+b/IU
-
-/x(?U)a++b/DZ
- xaaaab
-
-/(?U)xa++b/DZ
- xaaaab
-
-/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
-
-/^x(?U)a+b/DZ
-
-/^x(?U)(a+)b/DZ
-
-/[.x.]/I
-
-/[=x=]/I
-
-/[:x:]/I
-
-/\l/I
-
-/\L/I
-
-/\N{name}/I
-
-/\u/I
-
-/\U/I
-
-/[/I
-
-/[a-/I
-
-/[[:space:]/I
-
-/[\s]/IDZ
-
-/[[:space:]]/IDZ
-
-/[[:space:]abcde]/IDZ
-
-/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix
- <>
- <abcd>
- <abc <123> hij>
- <abc <def> hij>
- <abc<>def>
- <abc<>
- *** Failers
- <abc
-
-|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
-
-|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
-
-/(.*)\d+\1/I
-
-/(.*)\d+/I
-
-/(.*)\d+\1/Is
-
-/(.*)\d+/Is
-
-/(.*(xyz))\d+\2/I
-
-/((.*))\d+\1/I
- abc123bc
-
-/a[b]/I
-
-/(?=a).*/I
-
-/(?=abc).xyz/IiI
-
-/(?=abc)(?i).xyz/I
-
-/(?=a)(?=b)/I
-
-/(?=.)a/I
-
-/((?=abcda)a)/I
-
-/((?=abcda)ab)/I
-
-/()a/I
-
-/(?(1)ab|ac)(.)/I
-
-/(?(1)abz|acz)(.)/I
-
-/(?(1)abz)(.)/I
-
-/(?(1)abz)(1)23/I
-
-/(a)+/I
-
-/(a){2,3}/I
-
-/(a)*/I
-
-/[a]/I
-
-/[ab]/I
-
-/[ab]/IS
-
-/[^a]/I
-
-/\d456/I
-
-/\d456/IS
-
-/a^b/I
-
-/^a/Im
- abcde
- xy\nabc
- *** Failers
- xyabc
-
-/c|abc/I
-
-/(?i)[ab]/IS
-
-/[ab](?i)cd/IS
-
-/abc(?C)def/I
- abcdef
- 1234abcdef
- *** Failers
- abcxyz
- abcxyzf
-
-/abc(?C)de(?C1)f/I
- 123abcdef
-
-/(?C1)\dabc(?C2)def/IS
- 1234abcdef
- *** Failers
- abcdef
-
-/(?C1)\dabc(?C2)def/ISS
- 1234abcdef
- *** Failers
- abcdef
-
-/(?C255)ab/I
-
-/(?C256)ab/I
-
-/(?Cab)xx/I
-
-/(?C12vr)x/I
-
-/abc(?C)def/I
- *** Failers
- \x83\x0\x61bcdef
-
-/(abc)(?C)de(?C1)f/I
- 123abcdef
- 123abcdef\C+
- 123abcdef\C-
- *** Failers
- 123abcdef\C!1
-
-/(?C0)(abc(?C1))*/I
- abcabcabc
- abcabc\C!1!3
- *** Failers
- abcabcabc\C!1!3
-
-/(\d{3}(?C))*/I
- 123\C+
- 123456\C+
- 123456789\C+
-
-/((xyz)(?C)p|(?C1)xyzabc)/I
- xyzabc\C+
-
-/(X)((xyz)(?C)p|(?C1)xyzabc)/I
- Xxyzabc\C+
-
-/(?=(abc))(?C)abcdef/I
- abcdef\C+
-
-/(?!(abc)(?C1)d)(?C2)abcxyz/I
- abcxyz\C+
-
-/(?<=(abc)(?C))xyz/I
- abcxyz\C+
-
-/a(b+)(c*)(?C1)/I
- abbbbbccc\C*1
-
-/a(b+?)(c*?)(?C1)/I
- abbbbbccc\C*1
-
-/(?C)abc/I
-
-/(?C)^abc/I
-
-/(?C)a|b/IS
-
-/(?R)/I
-
-/(a|(?R))/I
-
-/(ab|(bc|(de|(?R))))/I
-
-/x(ab|(bc|(de|(?R))))/I
- xab
- xbc
- xde
- xxab
- xxxab
- *** Failers
- xyab
-
-/(ab|(bc|(de|(?1))))/I
-
-/x(ab|(bc|(de|(?1)x)x)x)/I
-
-/^([^()]|\((?1)*\))*$/I
- abc
- a(b)c
- a(b(c))d
- *** Failers)
- a(b(c)d
-
-/^>abc>([^()]|\((?1)*\))*<xyz<$/I
- >abc>123<xyz<
- >abc>1(2)3<xyz<
- >abc>(1(2)3)<xyz<
-
-/(a(?1)b)/DZ
-
-/(a(?1)+b)/DZ
-
-/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
- 12
- (((2+2)*-3)-7)
- -12
- *** Failers
- ((2+2)*-3)-7)
-
-/^(x(y|(?1){2})z)/I
- xyz
- xxyzxyzz
- *** Failers
- xxyzz
- xxyzxyzxyzz
-
-/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix
- <>
- <abcd>
- <abc <123> hij>
- <abc <def> hij>
- <abc<>def>
- <abc<>
- *** Failers
- <abc
-
-/(?1)/I
-
-/((?2)(abc)/I
-
-/^(abc)def(?1)/I
- abcdefabc
-
-/^(a|b|c)=(?1)+/I
- a=a
- a=b
- a=bc
-
-/^(a|b|c)=((?1))+/I
- a=a
- a=b
- a=bc
-
-/a(?P<name1>b|c)d(?P<longername2>e)/DZ
- abde
- acde
-
-/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
-
-/(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
-
-/^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/Ii
- 1221
- Satan, oscillate my metallic sonatas!
- A man, a plan, a canal: Panama!
- Able was I ere I saw Elba.
- *** Failers
- The quick brown fox
-
-/((?(R)a|b))\1(?1)?/I
- bb
- bbaa
-
-/(.*)a/Is
-
-/(.*)a\1/Is
-
-/(.*)a(b)\2/Is
-
-/((.*)a|(.*)b)z/Is
-
-/((.*)a|(.*)b)z\1/Is
-
-/((.*)a|(.*)b)z\2/Is
-
-/((.*)a|(.*)b)z\3/Is
-
-/((.*)a|^(.*)b)z\3/Is
-
-/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
-
-/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
-
-/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
-
-/(a)(bc)/INDZ
- abc
-
-/(?P<one>a)(bc)/INDZ
- abc
-
-/(a)(?P<named>bc)/INDZ
-
-/(a+)*zz/I
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
- aaaaaaaaaaaaaz\M
-
-/(aaa(?C1)bbb|ab)/I
- aaabbb
- aaabbb\C*0
- aaabbb\C*1
- aaabbb\C*-1
-
-/ab(?P<one>cd)ef(?P<two>gh)/I
- abcdefgh
- abcdefgh\C1\Gtwo
- abcdefgh\Cone\Ctwo
- abcdefgh\Cthree
-
-/(?P<Tes>)(?P<Test>)/DZ
-
-/(?P<Test>)(?P<Tes>)/DZ
-
-/(?P<Z>zz)(?P<A>aa)/I
- zzaa\CZ
- zzaa\CA
-
-/(?P<x>eks)(?P<x>eccs)/I
-
-/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
-
-"\[((?P<elem>\d+)(,(?P>elem))*)\]"I
- [10,20,30,5,5,4,4,2,43,23,4234]
- *** Failers
- []
-
-"\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
- [10,20,30,5,5,4,4,2,43,23,4234]
- []
-
-/(a(b(?2)c))?/DZ
-
-/(a(b(?2)c))*/DZ
-
-/(a(b(?2)c)){0,2}/DZ
-
-/[ab]{1}+/DZ
-
-/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
- Baby Bjorn Active Carrier - With free SHIPPING!!
-
-/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
- Baby Bjorn Active Carrier - With free SHIPPING!!
-
-/a*.*b/ISDZ
-
-/(a|b)*.?c/ISDZ
-
-/abc(?C255)de(?C)f/DZ
-
-/abcde/ICDZ
- abcde
- abcdfe
-
-/a*b/ICDZS
- ab
- aaaab
- aaaacb
-
-/a*b/ICDZSS
- ab
- aaaab
- aaaacb
-
-/a+b/ICDZ
- ab
- aaaab
- aaaacb
-
-/(abc|def)x/ICDZS
- abcx
- defx
- ** Failers
- abcdefzx
-
-/(abc|def)x/ICDZSS
- abcx
- defx
- ** Failers
- abcdefzx
-
-/(ab|cd){3,4}/IC
- ababab
- abcdabcd
- abcdcdcdcdcd
-
-/([ab]{,4}c|xy)/ICDZS
- Note: that { does NOT introduce a quantifier
-
-/([ab]{,4}c|xy)/ICDZSS
- Note: that { does NOT introduce a quantifier
-
-/([ab]{1,4}c|xy){4,5}?123/ICDZ
- aacaacaacaacaac123
-
-/\b.*/I
- ab cd\>1
-
-/\b.*/Is
- ab cd\>1
-
-/(?!.bcd).*/I
- Xbcd12345
-
-/abcde/I
- ab\P
- abc\P
- abcd\P
- abcde\P
- the quick brown abc\P
- ** Failers\P
- the quick brown abxyz fox\P
-
-"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
- 13/05/04\P
- 13/5/2004\P
- 02/05/09\P
- 1\P
- 1/2\P
- 1/2/0\P
- 1/2/04\P
- 0\P
- 02/\P
- 02/0\P
- 02/1\P
- ** Failers\P
- \P
- 123\P
- 33/4/04\P
- 3/13/04\P
- 0/1/2003\P
- 0/\P
- 02/0/\P
- 02/13\P
-
-/0{0,2}ABC/I
-
-/\d{3,}ABC/I
-
-/\d*ABC/I
-
-/[abc]+DE/I
-
-/[abc]?123/I
- 123\P
- a\P
- b\P
- c\P
- c12\P
- c123\P
-
-/^(?:\d){3,5}X/I
- 1\P
- 123\P
- 123X
- 1234\P
- 1234X
- 12345\P
- 12345X
- *** Failers
- 1X
- 123456\P
-
-/abc/IS>testsavedregex
-<testsavedregex
- abc
- ** Failers
- bca
-
-/abc/ISS>testsavedregex
-<testsavedregex
- abc
- ** Failers
- bca
-
-/abc/IFS>testsavedregex
-<testsavedregex
- abc
- ** Failers
- bca
-
-/abc/IFSS>testsavedregex
-<testsavedregex
- abc
- ** Failers
- bca
-
-/(a|b)/IS>testsavedregex
-<testsavedregex
- abc
- ** Failers
- def
-
-/(a|b)/ISS>testsavedregex
-<testsavedregex
- abc
- ** Failers
- def
-
-/(a|b)/ISF>testsavedregex
-<testsavedregex
- abc
- ** Failers
- def
-
-/(a|b)/ISSF>testsavedregex
-<testsavedregex
- abc
- ** Failers
- def
-
-~<(\w+)/?>(.)*</(\1)>~smgI
- \J1024<!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
-
-/^a/IF
-
-/line\nbreak/I
- this is a line\nbreak
- line one\nthis is a line\nbreak in the second line
-
-/line\nbreak/If
- this is a line\nbreak
- ** Failers
- line one\nthis is a line\nbreak in the second line
-
-/line\nbreak/Imf
- this is a line\nbreak
- ** Failers
- line one\nthis is a line\nbreak in the second line
-
-/(?i)(?-i)AbCd/I
- AbCd
- ** Failers
- abcd
-
-/a{11111111111111111111}/I
-
-/(){64294967295}/I
-
-/(){2,4294967295}/I
-
-"(?i:a)(?i:b)(?i:c)(?i:d)(?i:e)(?i:f)(?i:g)(?i:h)(?i:i)(?i:j)(k)(?i:l)A\1B"I
- abcdefghijklAkB
-
-"(?P<n0>a)(?P<n1>b)(?P<n2>c)(?P<n3>d)(?P<n4>e)(?P<n5>f)(?P<n6>g)(?P<n7>h)(?P<n8>i)(?P<n9>j)(?P<n10>k)(?P<n11>l)A\11B"I
- abcdefghijklAkB
-
-"(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
- abcdefghijklAkB
-
-"(?P<name0>a)(?P<name1>a)(?P<name2>a)(?P<name3>a)(?P<name4>a)(?P<name5>a)(?P<name6>a)(?P<name7>a)(?P<name8>a)(?P<name9>a)(?P<name10>a)(?P<name11>a)(?P<name12>a)(?P<name13>a)(?P<name14>a)(?P<name15>a)(?P<name16>a)(?P<name17>a)(?P<name18>a)(?P<name19>a)(?P<name20>a)(?P<name21>a)(?P<name22>a)(?P<name23>a)(?P<name24>a)(?P<name25>a)(?P<name26>a)(?P<name27>a)(?P<name28>a)(?P<name29>a)(?P<name30>a)(?P<name31>a)(?P<name32>a)(?P<name33>a)(?P<name34>a)(?P<name35>a)(?P<name36>a)(?P<name37>a)(?P<name38>a)(?P<name39>a)(?P<name40>a)(?P<name41>a)(?P<name42>a)(?P<name43>a)(?P<name44>a)(?P<name45>a)(?P<name46>a)(?P<name47>a)(?P<name48>a)(?P<name49>a)(?P<name50>a)(?P<name51>a)(?P<name52>a)(?P<name53>a)(?P<name54>a)(?P<name55>a)(?P<name56>a)(?P<name57>a)(?P<name58>a)(?P<name59>a)(?P<name60>a)(?P<name61>a)(?P<name62>a)(?P<name63>a)(?P<name64>a)(?P<name65>a)(?P<name66>a)(?P<name67>a)(?P<name68>a)(?P<name69>a)(?P<name70>a)(?P<name71>a)(?P<name72>a)(?P<name73>a)(?P<name74>a)(?P<name75>a)(?P<name76>a)(?P<name77>a)(?P<name78>a)(?P<name79>a)(?P<name80>a)(?P<name81>a)(?P<name82>a)(?P<name83>a)(?P<name84>a)(?P<name85>a)(?P<name86>a)(?P<name87>a)(?P<name88>a)(?P<name89>a)(?P<name90>a)(?P<name91>a)(?P<name92>a)(?P<name93>a)(?P<name94>a)(?P<name95>a)(?P<name96>a)(?P<name97>a)(?P<name98>a)(?P<name99>a)(?P<name100>a)"I
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-"(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)"I
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[^()]*(?:\((?R)\)[^()]*)*/I
- (this(and)that
- (this(and)that)
- (this(and)that)stuff
-
-/[^()]*(?:\((?>(?R))\)[^()]*)*/I
- (this(and)that
- (this(and)that)
-
-/[^()]*(?:\((?R)\))*[^()]*/I
- (this(and)that
- (this(and)that)
-
-/(?:\((?R)\))*[^()]*/I
- (this(and)that
- (this(and)that)
- ((this))
-
-/(?:\((?R)\))|[^()]*/I
- (this(and)that
- (this(and)that)
- (this)
- ((this))
-
-/\x{0000ff}/I
-
-/^((?P<A>a1)|(?P<A>a2)b)/I
-
-/^((?P<A>a1)|(?P<A>a2)b)/IJ
- a1b\CA
- a2b\CA
- ** Failers
- a1b\CZ\CA
-
-/^(?P<A>a)(?P<A>b)/IJ
- ab\CA
-
-/^(?P<A>a)(?P<A>b)|cd/IJ
- ab\CA
- cd\CA
-
-/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
- cdefgh\CA
-
-/^((?P<A>a1)|(?P<A>a2)b)/IJ
- a1b\GA
- a2b\GA
- ** Failers
- a1b\GZ\GA
-
-/^(?P<A>a)(?P<A>b)/IJ
- ab\GA
-
-/^(?P<A>a)(?P<A>b)|cd/IJ
- ab\GA
- cd\GA
-
-/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
- cdefgh\GA
-
-/(?J)^((?P<A>a1)|(?P<A>a2)b)/I
- a1b\CA
- a2b\CA
-
-/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
-
-/ In this next test, J is not set at the outer level; consequently it isn't
-set in the pattern's options; consequently pcre_get_named_substring() produces
-a random value. /Ix
-
-/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
- a bc d\CA\CB\CC
-
-/^(?P<A>a)?(?(A)a|b)/I
- aabc
- bc
- ** Failers
- abc
-
-/(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
- bXaX
-
-/(?:(?(2y)a|b)(X))+/I
-
-/(?:(?(ZA)a|b)(?P<ZZ>X))+/I
-
-/(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
- bbXaaX
-
-/(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
- (b)\\Xa\\X
-
-/(?P<ABC/I
-
-/(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
- bXXaYYaY
- bXYaXXaX
-
-/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
- bXXaYYaY
-
-/\s*,\s*/IS
- \x0b,\x0b
- \x0c,\x0d
-
-/^abc/Im
- xyz\nabc
- xyz\nabc\<lf>
- xyz\r\nabc\<lf>
- xyz\rabc\<cr>
- xyz\r\nabc\<crlf>
- ** Failers
- xyz\nabc\<cr>
- xyz\r\nabc\<cr>
- xyz\nabc\<crlf>
- xyz\rabc\<crlf>
- xyz\rabc\<lf>
-
-/abc$/Im<lf>
- xyzabc
- xyzabc\n
- xyzabc\npqr
- xyzabc\r\<cr>
- xyzabc\rpqr\<cr>
- xyzabc\r\n\<crlf>
- xyzabc\r\npqr\<crlf>
- ** Failers
- xyzabc\r
- xyzabc\rpqr
- xyzabc\r\n
- xyzabc\r\npqr
-
-/^abc/Im<cr>
- xyz\rabcdef
- xyz\nabcdef\<lf>
- ** Failers
- xyz\nabcdef
-
-/^abc/Im<lf>
- xyz\nabcdef
- xyz\rabcdef\<cr>
- ** Failers
- xyz\rabcdef
-
-/^abc/Im<crlf>
- xyz\r\nabcdef
- xyz\rabcdef\<cr>
- ** Failers
- xyz\rabcdef
-
-/^abc/Im<bad>
-
-/abc/I
- xyz\rabc\<bad>
- abc
-
-/.*/I<lf>
- abc\ndef
- abc\rdef
- abc\r\ndef
- \<cr>abc\ndef
- \<cr>abc\rdef
- \<cr>abc\r\ndef
- \<crlf>abc\ndef
- \<crlf>abc\rdef
- \<crlf>abc\r\ndef
-
-/\w+(.)(.)?def/Is
- abc\ndef
- abc\rdef
- abc\r\ndef
-
-+((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
- /* this is a C style comment */\M
-
-/(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
-
-/()()()()()()()()()()()()()()()()()()()()
- ()()()()()()()()()()()()()()()()()()()()
- ()()()()()()()()()()()()()()()()()()()()
- ()()()()()()()()()()()()()()()()()()()()
- ()()()()()()()()()()()()()()()()()()()()
- (.(.))/Ix
- XY\O400
-
-/(a*b|(?i:c*(?-i)d))/IS
-
-/()[ab]xyz/IS
-
-/(|)[ab]xyz/IS
-
-/(|c)[ab]xyz/IS
-
-/(|c?)[ab]xyz/IS
-
-/(d?|c?)[ab]xyz/IS
-
-/(d?|c)[ab]xyz/IS
-
-/^a*b\d/DZ
-
-/^a*+b\d/DZ
-
-/^a*?b\d/DZ
-
-/^a+A\d/DZ
- aaaA5
- ** Failers
- aaaa5
-
-/^a*A\d/IiDZ
- aaaA5
- aaaa5
-
-/(a*|b*)[cd]/IS
-
-/(a+|b*)[cd]/IS
-
-/(a*|b+)[cd]/IS
-
-/(a+|b+)[cd]/IS
-
-/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
- ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
- (((
- a
- ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
- ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
- )))
-/Ix
- large nest
-
-/a*\d/BZ
-
-/a*\D/BZ
-
-/0*\d/BZ
-
-/0*\D/BZ
-
-/a*\s/BZ
-
-/a*\S/BZ
-
-/ *\s/BZ
-
-/ *\S/BZ
-
-/a*\w/BZ
-
-/a*\W/BZ
-
-/=*\w/BZ
-
-/=*\W/BZ
-
-/\d*a/BZ
-
-/\d*2/BZ
-
-/\d*\d/BZ
-
-/\d*\D/BZ
-
-/\d*\s/BZ
-
-/\d*\S/BZ
-
-/\d*\w/BZ
-
-/\d*\W/BZ
-
-/\D*a/BZ
-
-/\D*2/BZ
-
-/\D*\d/BZ
-
-/\D*\D/BZ
-
-/\D*\s/BZ
-
-/\D*\S/BZ
-
-/\D*\w/BZ
-
-/\D*\W/BZ
-
-/\s*a/BZ
-
-/\s*2/BZ
-
-/\s*\d/BZ
-
-/\s*\D/BZ
-
-/\s*\s/BZ
-
-/\s*\S/BZ
-
-/\s*\w/BZ
-
-/\s*\W/BZ
-
-/\S*a/BZ
-
-/\S*2/BZ
-
-/\S*\d/BZ
-
-/\S*\D/BZ
-
-/\S*\s/BZ
-
-/\S*\S/BZ
-
-/\S*\w/BZ
-
-/\S*\W/BZ
-
-/\w*a/BZ
-
-/\w*2/BZ
-
-/\w*\d/BZ
-
-/\w*\D/BZ
-
-/\w*\s/BZ
-
-/\w*\S/BZ
-
-/\w*\w/BZ
-
-/\w*\W/BZ
-
-/\W*a/BZ
-
-/\W*2/BZ
-
-/\W*\d/BZ
-
-/\W*\D/BZ
-
-/\W*\s/BZ
-
-/\W*\S/BZ
-
-/\W*\w/BZ
-
-/\W*\W/BZ
-
-/[^a]+a/BZ
-
-/[^a]+a/BZi
-
-/[^a]+A/BZi
-
-/[^a]+b/BZ
-
-/[^a]+\d/BZ
-
-/a*[^a]/BZ
-
-/(?P<abc>x)(?P<xyz>y)/I
- xy\Cabc\Cxyz
-
-/(?<abc>x)(?'xyz'y)/I
- xy\Cabc\Cxyz
-
-/(?<abc'x)(?'xyz'y)/I
-
-/(?<abc>x)(?'xyz>y)/I
-
-/(?P'abc'x)(?P<xyz>y)/I
-
-/^(?:(?(ZZ)a|b)(?<ZZ>X))+/
- bXaX
- bXbX
- ** Failers
- aXaX
- aXbX
-
-/^(?P>abc)(?<abcd>xxx)/
-
-/^(?P>abc)(?<abc>x|y)/
- xx
- xy
- yy
- yx
-
-/^(?P>abc)(?P<abc>x|y)/
- xx
- xy
- yy
- yx
-
-/^((?(abc)a|b)(?<abc>x|y))+/
- bxay
- bxby
- ** Failers
- axby
-
-/^(((?P=abc)|X)(?<abc>x|y))+/
- XxXxxx
- XxXyyx
- XxXyxx
- ** Failers
- x
-
-/^(?1)(abc)/
- abcabc
-
-/^(?:(?:\1|X)(a|b))+/
- Xaaa
- Xaba
-
-/^[\E\Qa\E-\Qz\E]+/BZ
-
-/^[a\Q]bc\E]/BZ
-
-/^[a-\Q\E]/BZ
-
-/^(?P>abc)[()](?<abc>)/BZ
-
-/^((?(abc)y)[()](?P<abc>x))+/BZ
- (xy)x
-
-/^(?P>abc)\Q()\E(?<abc>)/BZ
-
-/^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
-
-/^(?P>abc) # this is (a comment)
- (?<abc>)/BZx
-
-/^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
- 1221
- Satan, oscillate my metallic sonatas!
- A man, a plan, a canal: Panama!
- Able was I ere I saw Elba.
- *** Failers
- The quick brown fox
-
-/(?=(\w+))\1:/I
- abcd:
-
-/(?=(?'abc'\w+))\k<abc>:/I
- abcd:
-
-/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
- adaa
- ** Failers
- addd
- adbb
-
-/(?'abc'a|b)(?<abc>d|e)(?&abc){2}/J
- bdaa
- bdab
- ** Failers
- bddd
-
-/(?(<bc))/
-
-/(?(''))/
-
-/(?('R')stuff)/
-
-/((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) /x
- abcabc1Xabc2XabcXabcabc
-
-/(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
- abcabc1Xabc2XabcXabcabc
-
-/(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
-
-/(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
- abcabc1Xabc2XabcXabcabc
-
-/^(?(DEFINE) abc | xyz ) /x
-
-/(?(DEFINE) abc) xyz/xI
-
-/(a|)*\d/
- \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/^a.b/<lf>
- a\rb
- a\nb\<cr>
- a\x85b\<anycrlf>
- ** Failers
- a\nb
- a\nb\<any>
- a\rb\<cr>
- a\rb\<any>
- a\x85b\<any>
- a\rb\<anycrlf>
-
-/^abc./mgx<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
-
-/abc.$/mgx<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
-
-/a/<cr><any>
-
-/a/<any><crlf>
-
-/^a\Rb/<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- ** Failers
- a\n\rb
-
-/^a\R*b/<bsr_unicode>
- ab
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- a\n\rb
- a\n\r\x85\x0cb
-
-/^a\R+b/<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- a\n\rb
- a\n\r\x85\x0cb
- ** Failers
- ab
-
-/^a\R{1,3}b/<bsr_unicode>
- a\nb
- a\n\rb
- a\n\r\x85b
- a\r\n\r\nb
- a\r\n\r\n\r\nb
- a\n\r\n\rb
- a\n\n\r\nb
- ** Failers
- a\n\n\n\rb
- a\r
-
-/^a[\R]b/<bsr_unicode>
- aRb
- ** Failers
- a\nb
-
-/(?&abc)X(?<abc>P)/I
- abcPXP123
-
-/(?1)X(?<abc>P)/I
- abcPXP123
-
-/(?:a(?&abc)b)*(?<abc>x)/
- 123axbaxbaxbx456
- 123axbaxbaxb456
-
-/(?:a(?&abc)b){1,5}(?<abc>x)/
- 123axbaxbaxbx456
-
-/(?:a(?&abc)b){2,5}(?<abc>x)/
- 123axbaxbaxbx456
-
-/(?:a(?&abc)b){2,}(?<abc>x)/
- 123axbaxbaxbx456
-
-/(abc)(?i:(?1))/
- defabcabcxyz
- DEFabcABCXYZ
-
-/(abc)(?:(?i)(?1))/
- defabcabcxyz
- DEFabcABCXYZ
-
-/^(a)\g-2/
-
-/^(a)\g/
-
-/^(a)\g{0}/
-
-/^(a)\g{3/
-
-/^(a)\g{4a}/
-
-/^a.b/<lf>
- a\rb
- *** Failers
- a\nb
-
-/.+foo/
- afoo
- ** Failers
- \r\nfoo
- \nfoo
-
-/.+foo/<crlf>
- afoo
- \nfoo
- ** Failers
- \r\nfoo
-
-/.+foo/<any>
- afoo
- ** Failers
- \nfoo
- \r\nfoo
-
-/.+foo/s
- afoo
- \r\nfoo
- \nfoo
-
-/^$/mg<any>
- abc\r\rxyz
- abc\n\rxyz
- ** Failers
- abc\r\nxyz
-
-/(?m)^$/<any>g+
- abc\r\n\r\n
-
-/(?m)^$|^\r\n/<any>g+
- abc\r\n\r\n
-
-/(?m)$/<any>g+
- abc\r\n\r\n
-
-/abc.$/mgx<anycrlf>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
-
-/^X/m
- XABC
- ** Failers
- XABC\B
-
-/(ab|c)(?-1)/BZ
- abc
-
-/xy(?+1)(abc)/BZ
- xyabcabc
- ** Failers
- xyabc
-
-/x(?-0)y/
-
-/x(?-1)y/
-
-/x(?+0)y/
-
-/x(?+1)y/
-
-/^(abc)?(?(-1)X|Y)/BZ
- abcX
- Y
- ** Failers
- abcY
-
-/^((?(+1)X|Y)(abc))+/BZ
- YabcXabc
- YabcXabcXabc
- ** Failers
- XabcXabc
-
-/(?(-1)a)/BZ
-
-/((?(-1)a))/BZ
-
-/((?(-2)a))/BZ
-
-/^(?(+1)X|Y)(.)/BZ
- Y!
-
-/(?<A>tom|bon)-\k{A}/
- tom-tom
- bon-bon
- ** Failers
- tom-bon
-
-/\g{A/
-
-/(?|(abc)|(xyz))/BZ
- >abc<
- >xyz<
-
-/(x)(?|(abc)|(xyz))(x)/BZ
- xabcx
- xxyzx
-
-/(x)(?|(abc)(pqr)|(xyz))(x)/BZ
- xabcpqrx
- xxyzx
-
-/\H++X/BZ
- ** Failers
- XXXX
-
-/\H+\hY/BZ
- XXXX Y
-
-/\H+ Y/BZ
-
-/\h+A/BZ
-
-/\v*B/BZ
-
-/\V+\x0a/BZ
-
-/A+\h/BZ
-
-/ *\H/BZ
-
-/A*\v/BZ
-
-/\x0b*\V/BZ
-
-/\d+\h/BZ
-
-/\d*\v/BZ
-
-/S+\h\S+\v/BZ
-
-/\w{3,}\h\w+\v/BZ
-
-/\h+\d\h+\w\h+\S\h+\H/BZ
-
-/\v+\d\v+\w\v+\S\v+\V/BZ
-
-/\H+\h\H+\d/BZ
-
-/\V+\v\V+\w/BZ
-
-/\( (?: [^()]* | (?R) )* \)/x
-\J1024(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
-
-/[\E]AAA/
-
-/[\Q\E]AAA/
-
-/[^\E]AAA/
-
-/[^\Q\E]AAA/
-
-/[\E^]AAA/
-
-/[\Q\E^]AAA/
-
-/A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ
-
-/^a+(*FAIL)/C
- aaaaaa
-
-/a+b?c+(*FAIL)/C
- aaabccc
-
-/a+b?(*PRUNE)c+(*FAIL)/C
- aaabccc
-
-/a+b?(*COMMIT)c+(*FAIL)/C
- aaabccc
-
-/a+b?(*SKIP)c+(*FAIL)/C
- aaabcccaaabccc
-
-/a+b?(*THEN)c+(*FAIL)/C
- aaabccc
-
-/a(*MARK)b/
-
-/(?i:A{1,}\6666666666)/
-
-/\g6666666666/
-
-/[\g6666666666]/BZ
-
-/(?1)\c[/
-
-/.+A/<crlf>
- \r\nA
-
-/\nA/<crlf>
- \r\nA
-
-/[\r\n]A/<crlf>
- \r\nA
-
-/(\r|\n)A/<crlf>
- \r\nA
-
-/a(*CR)b/
-
-/(*CR)a.b/
- a\nb
- ** Failers
- a\rb
-
-/(*CR)a.b/<lf>
- a\nb
- ** Failers
- a\rb
-
-/(*LF)a.b/<CRLF>
- a\rb
- ** Failers
- a\nb
-
-/(*CRLF)a.b/
- a\rb
- a\nb
- ** Failers
- a\r\nb
-
-/(*ANYCRLF)a.b/<CR>
- ** Failers
- a\rb
- a\nb
- a\r\nb
-
-/(*ANY)a.b/<cr>
- ** Failers
- a\rb
- a\nb
- a\r\nb
- a\x85b
-
-/(*ANY).*/g
- abc\r\ndef
-
-/(*ANYCRLF).*/g
- abc\r\ndef
-
-/(*CRLF).*/g
- abc\r\ndef
-
-/a\Rb/I<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
- ** Failers
- a\x85b
- a\x0bb
-
-/a\Rb/I<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x85b
- a\x0bb
- ** Failers
- a\x85b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
-
-/a\R?b/I<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
- ** Failers
- a\x85b
- a\x0bb
-
-/a\R?b/I<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x85b
- a\x0bb
- ** Failers
- a\x85b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
-
-/a\R{2,4}b/I<bsr_anycrlf>
- a\r\n\nb
- a\n\r\rb
- a\r\n\r\n\r\n\r\nb
- ** Failers
- a\x85\85b
- a\x0b\0bb
-
-/a\R{2,4}b/I<bsr_unicode>
- a\r\rb
- a\n\n\nb
- a\r\n\n\r\rb
- a\x85\85b
- a\x0b\0bb
- ** Failers
- a\r\r\r\r\rb
- a\x85\85b\<bsr_anycrlf>
- a\x0b\0bb\<bsr_anycrlf>
-
-/(*BSR_ANYCRLF)a\Rb/I
- a\nb
- a\rb
-
-/(*BSR_UNICODE)a\Rb/I
- a\x85b
-
-/(*BSR_ANYCRLF)(*CRLF)a\Rb/I
- a\nb
- a\rb
-
-/(*CRLF)(*BSR_UNICODE)a\Rb/I
- a\x85b
-
-/(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
-
-/(?<a>)(?&)/
-
-/(?<abc>)(?&a)/
-
-/(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
-
-/(?+-a)/
-
-/(?-+a)/
-
-/(?(-1))/
-
-/(?(+10))/
-
-/(?(10))/
-
-/(?(+2))()()/
-
-/(?(2))()()/
-
-/\k''/
-
-/\k<>/
-
-/\k{}/
-
-/\k/
-
-/\kabc/
-
-/(?P=)/
-
-/(?P>)/
-
-/(?!\w)(?R)/
-
-/(?=\w)(?R)/
-
-/(?<!\w)(?R)/
-
-/(?<=\w)(?R)/
-
-/[[:foo:]]/
-
-/[[:1234:]]/
-
-/[[:f\oo:]]/
-
-/[[: :]]/
-
-/[[:...:]]/
-
-/[[:l\ower:]]/
-
-/[[:abc\:]]/
-
-/[abc[:x\]pqr:]]/
-
-/[[:a\dz:]]/
-
-/(^(a|b\g<-1'c))/
-
-/^(?+1)(?<a>x|y){0}z/
- xzxx
- yzyy
- ** Failers
- xxz
-
-/(\3)(\1)(a)/
- cat
-
-/(\3)(\1)(a)/<JS>
- cat
-
-/TA]/
- The ACTA] comes
-
-/TA]/<JS>
- The ACTA] comes
-
-/(?2)[]a()b](abc)/
- abcbabc
-
-/(?2)[^]a()b](abc)/
- abcbabc
-
-/(?1)[]a()b](abc)/
- abcbabc
- ** Failers
- abcXabc
-
-/(?1)[^]a()b](abc)/
- abcXabc
- ** Failers
- abcbabc
-
-/(?2)[]a()b](abc)(xyz)/
- xyzbabcxyz
-
-/(?&N)[]a(?<N>)](?<M>abc)/
- abc<abc
-
-/(?&N)[]a(?<N>)](abc)/
- abc<abc
-
-/a[]b/
-
-/a[^]b/
-
-/a[]b/<JS>
- ** Failers
- ab
-
-/a[]+b/<JS>
- ** Failers
- ab
-
-/a[]*+b/<JS>
- ** Failers
- ab
-
-/a[^]b/<JS>
- aXb
- a\nb
- ** Failers
- ab
-
-/a[^]+b/<JS>
- aXb
- a\nX\nXb
- ** Failers
- ab
-
-/a(?!)+b/
-
-/a(*FAIL)+b/
-
-/(abc|pqr|123){0}[xyz]/SI
-
-/(?(?=.*b)b|^)/CI
- adc
- abc
-
-/(?(?=b).*b|^d)/I
-
-/(?(?=.*b).*b|^d)/I
-
-/xyz/C
- xyz
- abcxyz
- abcxyz\Y
- ** Failers
- abc
- abc\Y
- abcxypqr
- abcxypqr\Y
-
-/(*NO_START_OPT)xyz/C
- abcxyz
-
-/xyz/CY
- abcxyz
-
-/^"((?(?=[a])[^"])|b)*"$/C
- "ab"
-
-/^"((?(?=[a])[^"])|b)*"$/
- "ab"
-
-/^X(?5)(a)(?|(b)|(q))(c)(d)Y/
- XYabcdY
-
-/^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
- XYabcdY
-
-/Xa{2,4}b/
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/Xa{2,4}?b/
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/Xa{2,4}+b/
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X\d{2,4}b/
- X\P
- X3\P
- X33\P
- X333\P
- X3333\P
-
-/X\d{2,4}?b/
- X\P
- X3\P
- X33\P
- X333\P
- X3333\P
-
-/X\d{2,4}+b/
- X\P
- X3\P
- X33\P
- X333\P
- X3333\P
-
-/X\D{2,4}b/
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X\D{2,4}?b/
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X\D{2,4}+b/
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X[abc]{2,4}b/
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X[abc]{2,4}?b/
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X[abc]{2,4}+b/
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X[^a]{2,4}b/
- X\P
- Xz\P
- Xzz\P
- Xzzz\P
- Xzzzz\P
-
-/X[^a]{2,4}?b/
- X\P
- Xz\P
- Xzz\P
- Xzzz\P
- Xzzzz\P
-
-/X[^a]{2,4}+b/
- X\P
- Xz\P
- Xzz\P
- Xzzz\P
- Xzzzz\P
-
-/(Y)X\1{2,4}b/
- YX\P
- YXY\P
- YXYY\P
- YXYYY\P
- YXYYYY\P
-
-/(Y)X\1{2,4}?b/
- YX\P
- YXY\P
- YXYY\P
- YXYYY\P
- YXYYYY\P
-
-/(Y)X\1{2,4}+b/
- YX\P
- YXY\P
- YXYY\P
- YXYYY\P
- YXYYYY\P
-
-/\++\KZ|\d+X|9+Y/
- ++++123999\P
- ++++123999Y\P
- ++++Z1234\P
-
-/Z(*F)/
- Z\P
- ZA\P
-
-/Z(?!)/
- Z\P
- ZA\P
-
-/dog(sbody)?/
- dogs\P
- dogs\P\P
-
-/dog(sbody)??/
- dogs\P
- dogs\P\P
-
-/dog|dogsbody/
- dogs\P
- dogs\P\P
-
-/dogsbody|dog/
- dogs\P
- dogs\P\P
-
-/\bthe cat\b/
- the cat\P
- the cat\P\P
-
-/abc/
- abc\P
- abc\P\P
-
-/abc\K123/
- xyzabc123pqr
- xyzabc12\P
- xyzabc12\P\P
-
-/(?<=abc)123/
- xyzabc123pqr
- xyzabc12\P
- xyzabc12\P\P
-
-/\babc\b/
- +++abc+++
- +++ab\P
- +++ab\P\P
-
-/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
-
-/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
-
-/(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
-
-/abc\K/+
- abcdef
- abcdef\N\N
- xyzabcdef\N\N
- ** Failers
- abcdef\N
- xyzabcdef\N
-
-/^(?:(?=abc)|abc\K)/+
- abcdef
- abcdef\N\N
- ** Failers
- abcdef\N
-
-/a?b?/+
- xyz
- xyzabc
- xyzabc\N
- xyzabc\N\N
- xyz\N\N
- ** Failers
- xyz\N
-
-/^a?b?/+
- xyz
- xyzabc
- ** Failers
- xyzabc\N
- xyzabc\N\N
- xyz\N\N
- xyz\N
-
-/^(?<name>a|b\g<name>c)/
- aaaa
- bacxxx
- bbaccxxx
- bbbacccxx
-
-/^(?<name>a|b\g'name'c)/
- aaaa
- bacxxx
- bbaccxxx
- bbbacccxx
-
-/^(a|b\g<1>c)/
- aaaa
- bacxxx
- bbaccxxx
- bbbacccxx
-
-/^(a|b\g'1'c)/
- aaaa
- bacxxx
- bbaccxxx
- bbbacccxx
-
-/^(a|b\g'-1'c)/
- aaaa
- bacxxx
- bbaccxxx
- bbbacccxx
-
-/(^(a|b\g<-1>c))/
- aaaa
- bacxxx
- bbaccxxx
- bbbacccxx
-
-/(?-i:\g<name>)(?i:(?<name>a))/
- XaaX
- XAAX
-
-/(?i:\g<name>)(?-i:(?<name>a))/
- XaaX
- ** Failers
- XAAX
-
-/(?-i:\g<+1>)(?i:(a))/
- XaaX
- XAAX
-
-/(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/
-
-/(?<n>a|b|c)\g<n>*/
- abc
- accccbbb
-
-/^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
- XYabcdY
-
-/(?<=b(?1)|zzz)(a)/
- xbaax
- xzzzax
-
-/(a)(?<=b\1)/
-
-/(a)(?<=b+(?1))/
-
-/(a+)(?<=b(?1))/
-
-/(a(?<=b(?1)))/
-
-/(?<=b(?1))xyz/
-
-/(?<=b(?1))xyz(b+)pqrstuvew/
-
-/(a|bc)\1/SI
-
-/(a|bc)\1{2,3}/SI
-
-/(a|bc)(?1)/SI
-
-/(a|b\1)(a|b\1)/SI
-
-/(a|b\1){2}/SI
-
-/(a|bbbb\1)(a|bbbb\1)/SI
-
-/(a|bbbb\1){2}/SI
-
-/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/SI
-
-/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS
-
-"(?>.*/)foo"SI
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /xSI
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
-
-/<a[\s]+href[\s]*=[\s]* # find <a href=
- ([\"\'])? # find single or double quote
- (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isxSI
-
-/^(?!:) # colon disallowed at start
- (?: # start of item
- (?: [0-9a-f]{1,4} | # 1-4 hex digits or
- (?(1)0 | () ) ) # if null previously matched, fail; else null
- : # followed by colon
- ){1,7} # end item; 1-7 of them required
- [0-9a-f]{1,4} $ # final hex number at end of string
- (?(1)|.) # check that there was an empty component
- /xiIS
-
-/(?|(?<a>A)|(?<a>B))/I
- AB\Ca
- BA\Ca
-
-/(?|(?<a>A)|(?<b>B))/
-
-/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
- b(?<quote> (?<apostrophe>')|(?<realquote>")) )
- (?('quote')[a-z]+|[0-9]+)/JIx
- a"aaaaa
- b"aaaaa
- ** Failers
- b"11111
- a"11111
-
-/^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
- abcdX
- eX
- ** Failers
- abcdY
- ey
-
-/(?<A>a) (b)(c) (?<A>d (?(R&A)$ | (?4)) )/JDZx
- abcdd
- ** Failers
- abcdde
-
-/abcd*/
- xxxxabcd\P
- xxxxabcd\P\P
-
-/abcd*/i
- xxxxabcd\P
- xxxxabcd\P\P
- XXXXABCD\P
- XXXXABCD\P\P
-
-/abc\d*/
- xxxxabc1\P
- xxxxabc1\P\P
-
-/(a)bc\1*/
- xxxxabca\P
- xxxxabca\P\P
-
-/abc[de]*/
- xxxxabcde\P
- xxxxabcde\P\P
-
-/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
- broken and not behaving as specified in that it *does* bumpalong after
- hitting (*COMMIT). --/
-
-/(?1)(A(*COMMIT)|B)D/
- ABD
- XABD
- BAD
- ABXABD
- ** Failers
- ABX
- BAXBAD
-
-/(\3)(\1)(a)/<JS>
- cat
-
-/(\3)(\1)(a)/SI<JS>
- cat
-
-/(\3)(\1)(a)/SI
- cat
-
-/i(?(DEFINE)(?<s>a))/SI
- i
-
-/()i(?(1)a)/SI
- ia
-
-/(?i)a(?-i)b|c/BZ
- XabX
- XAbX
- CcC
- ** Failers
- XABX
-
-/(?i)a(?s)b|c/BZ
-
-/(?i)a(?s-i)b|c/BZ
-
-/^(ab(c\1)d|x){2}$/BZ
- xabcxd
-
-/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
-
-/^(?&t)*(?(DEFINE)(?<t>.))$/BZ
-
-/ -- The first four of these are not in the Perl >= 5.10 test because Perl
- documents that the use of \K in assertions is "not well defined". The
- last is here because Perl gives the match as "b" rather than "ab". I
- believe this to be a Perl bug. --/
-
-/(?=a\Kb)ab/
- ab
-
-/(?!a\Kb)ac/
- ac
-
-/^abc(?<=b\Kc)d/
- abcd
-
-/^abc(?<!b\Kq)d/
- abcd
-
-/(?>a\Kb)z|(ab)/
- ab
-
-/----------------------/
-
-/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
-
-/abc(*MARK:)pqr/
-
-/abc(*:)pqr/
-
-/abc(*FAIL:123)xyz/
-
-/--- This should, and does, fail. In Perl, it does not, which I think is a
- bug because replacing the B in the pattern by (B|D) does make it fail. ---/
-
-/A(*COMMIT)B/+K
- ACABX
-
-/--- These should be different, but in Perl 5.11 are not, which I think
- is a bug in Perl. ---/
-
-/A(*THEN)B|A(*THEN)C/K
- AC
-
-/A(*PRUNE)B|A(*PRUNE)C/K
- AC
-
-/--- This should fail; the SKIP advances by one, but when we get to AC, the
- PRUNE kills it. Perl behaves differently. ---/
-
-/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
- AAAC
-
-/--- Mark names can be duplicated. Perl doesn't give a mark for this one,
-though PCRE does. ---/
-
-/^A(*:A)B|^X(*:A)Y/K
- ** Failers
- XAQQ
-
-/--- COMMIT at the start of a pattern should be the same as an anchor. Perl
-optimizations defeat this. So does the PCRE optimization unless we disable it
-with \Y. ---/
-
-/(*COMMIT)ABC/
- ABCDEFG
- ** Failers
- DEFGABC\Y
-
-/^(ab (c+(*THEN)cd) | xyz)/x
- abcccd
-
-/^(ab (c+(*PRUNE)cd) | xyz)/x
- abcccd
-
-/^(ab (c+(*FAIL)cd) | xyz)/x
- abcccd
-
-/--- Perl 5.11 gets some of these wrong ---/
-
-/(?>.(*ACCEPT))*?5/
- abcde
-
-/(.(*ACCEPT))*?5/
- abcde
-
-/(.(*ACCEPT))5/
- abcde
-
-/(.(*ACCEPT))*5/
- abcde
-
-/A\NB./BZ
- ACBD
- *** Failers
- A\nB
- ACB\n
-
-/A\NB./sBZ
- ACBD
- ACB\n
- *** Failers
- A\nB
-
-/A\NB/<crlf>
- A\nB
- A\rB
- ** Failers
- A\r\nB
-
-/\R+b/BZ
-
-/\R+\n/BZ
-
-/\R+\d/BZ
-
-/\d*\R/BZ
-
-/\s*\R/BZ
-
-/-- Perl treats this one differently, not failing the second string. I believe
- that is a bug in Perl. --/
-
-/^((abc|abcx)(*THEN)y|abcd)/
- abcd
- *** Failers
- abcxy
-
-/(?<=abc)def/
- abc\P\P
-
-/abc$/
- abc
- abc\P
- abc\P\P
-
-/abc$/m
- abc
- abc\n
- abc\P\P
- abc\n\P\P
- abc\P
- abc\n\P
-
-/abc\z/
- abc
- abc\P
- abc\P\P
-
-/abc\Z/
- abc
- abc\P
- abc\P\P
-
-/abc\b/
- abc
- abc\P
- abc\P\P
-
-/abc\B/
- abc
- abc\P
- abc\P\P
-
-/.+/
- abc\>0
- abc\>1
- abc\>2
- abc\>3
- abc\>4
- abc\>-4
-
-/^\cģ/
-
-/(?P<abn>(?P=abn)xxx)/BZ
-
-/(a\1z)/BZ
-
-/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
-
-/(?P<abn>(?P=axn)xxx)/BZ
-
-/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
-
-/-- These tests are here because Perl gets the first one wrong. --/
-
-/(\R*)(.)/s
- \r\n
- \r\r\n\n\r
- \r\r\n\n\r\n
-
-/(\R)*(.)/s
- \r\n
- \r\r\n\n\r
- \r\r\n\n\r\n
-
-/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
- \r\n
- \r\r\n\n\r
- \r\r\n\n\r\n
-
-/-- --/
-
-/^abc$/BZ
-
-/^abc$/BZm
-
-/^(a)*+(\w)/S
- aaaaX
- ** Failers
- aaaa
-
-/^(?:a)*+(\w)/S
- aaaaX
- ** Failers
- aaaa
-
-/(a)++1234/SDZ
-
-/([abc])++1234/SI
-
-/(?<=(abc)+)X/
-
-/(^ab)/I
-
-/(^ab)++/I
-
-/(^ab|^)+/I
-
-/(^ab|^)++/I
-
-/(?:^ab)/I
-
-/(?:^ab)++/I
-
-/(?:^ab|^)+/I
-
-/(?:^ab|^)++/I
-
-/(.*ab)/I
-
-/(.*ab)++/I
-
-/(.*ab|.*)+/I
-
-/(.*ab|.*)++/I
-
-/(?:.*ab)/I
-
-/(?:.*ab)++/I
-
-/(?:.*ab|.*)+/I
-
-/(?:.*ab|.*)++/I
-
-/(?=a)[bcd]/I
-
-/((?=a))[bcd]/I
-
-/((?=a))+[bcd]/I
-
-/((?=a))++[bcd]/I
-
-/(?=a+)[bcd]/iI
-
-/(?=a+?)[bcd]/iI
-
-/(?=a++)[bcd]/iI
-
-/(?=a{3})[bcd]/iI
-
-/(abc)\1+/S
-
-/-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
-
-/(?1)(?:(b(*ACCEPT))){0}/
- b
-
-/(?1)(?:(b(*ACCEPT))){0}c/
- bc
- ** Failers
- b
-
-/(?1)(?:((*ACCEPT))){0}c/
- c
- c\N
-
-/^.*?(?(?=a)a|b(*THEN)c)/
- ba
-
-/^.*?(?(?=a)a|bc)/
- ba
-
-/^.*?(?(?=a)a(*THEN)b|c)/
- ac
-
-/^.*?(?(?=a)a(*THEN)b)c/
- ac
-
-/^.*?(a(*THEN)b)c/
- aabc
-
-/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
- aabc
-
-/^.*?(a(*THEN)b|z)c/
- aabc
-
-/^.*?(z|a(*THEN)b)c/
- aabc
-
-/-- --/
-
-/-- These studied versions are here because they are not Perl-compatible; the
- studying means the mark is not seen. --/
-
-/(*MARK:A)(*SKIP:B)(C|X)/KS
- C
- D
-
-/(*:A)A+(*SKIP:A)(B|Z)/KS
- AAAC
-
-/-- --/
-
-"(?=a*(*ACCEPT)b)c"
- c
- c\N
-
-/(?1)c(?(DEFINE)((*ACCEPT)b))/
- c
- c\N
-
-/(?>(*ACCEPT)b)c/
- c
- c\N
-
-/(?:(?>(a)))+a%/++
- %aa%
-
-/(a)b|ac/++SS
- ac\O3
-
-/(a)(b)x|abc/++
- abc\O6
-
-/(a)bc|(a)(b)\2/
- \O3abc
- \O4abc
-
-/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
-
-/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
-
-/(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
-
-/(abc)(?1)/SI
-
-/^(?>a)++/
- aa\M
- aaaaaaaaa\M
-
-/(a)(?1)++/
- aa\M
- aaaaaaaaa\M
-
-/(?:(foo)|(bar)|(baz))X/SS=
- bazfooX
- foobazbarX
- barfooX
- bazX
- foobarbazX
- bazfooX\O0
- bazfooX\O2
- bazfooX\O4
- bazfooX\O6
- bazfooX\O8
- bazfooX\O10
-
-/(?=abc){3}abc/BZ
-
-/(?=abc)+abc/BZ
-
-/(?=abc)++abc/BZ
-
-/(?=abc){0}xyz/BZ
-
-/(?=(a))?./BZ
-
-/(?=(a))??./BZ
-
-/^(?=(a)){0}b(?1)/BZ
-
-/(?(DEFINE)(a))?b(?1)/BZ
-
-/^(?=(?1))?[az]([abc])d/BZ
-
-/^(?!a){0}\w+/BZ
-
-/(?<=(abc))?xyz/BZ
-
-/[:a[:abc]b:]/BZ
-
-/((?2))((?1))/SS
- abc
-
-/((?(R2)a+|(?1)b))/SS
- aaaabcde
-
-/(?(R)a*(?1)|((?R))b)/SS
- aaaabcde
-
-/(a+|(?R)b)/
-
-/^(a(*:A)(d|e(*:B))z|aeq)/C
- adz
- aez
- aeqwerty
-
-/.(*F)/
- \P\Pabc
-
-/\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
-
-/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
-
-/a(*SKIP)c|b(*ACCEPT)|/+SI
- a
-
-/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
- ax
-
-'a*(*ACCEPT)b'+
- \N\N
- abc\N\N
- bbb\N\N
-
-/(*ACCEPT)a/+I
- bax
-
-/z(*ACCEPT)a/+I
- baxzbx
-
-/a(?:.)*?a/ims
- \Mabbbbbbbbbbbbbbbbbbbbba
-
-/a(?:.(*THEN))*?a/ims
- \Mabbbbbbbbbbbbbbbbbbbbba
-
-/a(?:.(*THEN:ABC))*?a/ims
- \Mabbbbbbbbbbbbbbbbbbbbba
-
-/-- These tests are in agreement with development Perl 5.015, which has fixed
- some things, but they don't all work with 5.012, so they aren't in the
- Perl-compatible tests. Those after the first come from Perl's own test
- files. --/
-
-/^((yes|no)(*THEN)(*F))?/
- yes
-
-/(A (.*) C? (*THEN) | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*) C? (*THEN) | A D) z/x
-AbcdCBefgBhiBqz
-
-/(A (.*) C? (*THEN) | A D) \s* (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*) C? (*THEN) | A D) \s* z/x
-AbcdCBefgBhiBqz
-
-/(A (.*) (?:C|) (*THEN) | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*) (?:C|) (*THEN) | A D) z/x
-AbcdCBefgBhiBqz
-
-/(A (.*) C{0,6} (*THEN) | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*) C{0,6} (*THEN) | A D) z/x
-AbcdCBefgBhiBqz
-
-/(A (.*) (CE){0,6} (*THEN) | A D) (*FAIL)/x
-AbcdCEBefgBhiBqz
-
-/(A (.*) (CE){0,6} (*THEN) | A D) z/x
-AbcdCEBefgBhiBqz
-
-/(A (.*) (CE*){0,6} (*THEN) | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*) (CE*){0,6} (*THEN) | A D) z/x
-AbcdCBefgBhiBqz
-
-/-----------------------------------------------/
-
-/^(?>a+)(?>(z+))\w/BZ
- aaaazzzzb
- ** Failers
- aazz
-
-/(.)(\1|a(?2))/
- bab
-
-/\1|(.)(?R)\1/
- cbbbc
-
-/(.)((?(1)c|a)|a(?2))/
- baa
-
-/(?P<abn>(?P=abn)xxx)/BZ
-
-/(a\1z)/BZ
-
-/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
- \Maabbccddee
-
-/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
- \Maabbccddee
-
-/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
- \Maabbccddee
-
-/^a\x41z/<JS>
- aAz
- *** Failers
- ax41z
-
-/^a[m\x41]z/<JS>
- aAz
-
-/^a\x1z/<JS>
- ax1z
-
-/^a\u0041z/<JS>
- aAz
- *** Failers
- au0041z
-
-/^a[m\u0041]z/<JS>
- aAz
-
-/^a\u041z/<JS>
- au041z
- *** Failers
- aAz
-
-/^a\U0041z/<JS>
- aU0041z
- *** Failers
- aAz
-
-/(?(?=c)c|d)++Y/BZ
-
-/(?(?=c)c|d)*+Y/BZ
-
-/a[\NB]c/
- aNc
-
-/a[B-\Nc]/
-
-/(a)(?2){0,1999}?(b)/
-
-/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
-
-/--- This test, with something more complicated than individual letters, causes
-different behaviour in Perl. Perhaps it disables some optimization; no tag is
-passed back for the failures, whereas in PCRE there is a tag. ---/
-
-/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
- AABC
- XXYZ
- ** Failers
- XAQQ
- XAQQXZZ
- AXQQQ
- AXXQQQ
-
-/-- Perl doesn't give marks for these, though it does if the alternatives are
-replaced by single letters. --/
-
-/(b|q)(*:m)f|a(*:n)w/K
- aw
- ** Failers
- abc
-
-/(q|b)(*:m)f|a(*:n)w/K
- aw
- ** Failers
- abc
-
-/-- After a partial match, the behaviour is as for a failure. --/
-
-/^a(*:X)bcde/K
- abc\P
-
-/-- These are here because Perl doesn't return a mark, except for the first --/
-
-/(?=(*:x))(q|)/K+
- abc
-
-/(?=(*:x))((*:y)q|)/K+
- abc
-
-/(?=(*:x))(?:(*:y)q|)/K+
- abc
-
-/(?=(*:x))(?>(*:y)q|)/K+
- abc
-
-/(?=a(*:x))(?!a(*:y)c)/K+
- ab
-
-/(?=a(*:x))(?=a(*:y)c|)/K+
- ab
-
-/-- End of testinput2 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput20 b/src/third_party/pcre-8.30/testdata/testinput20
deleted file mode 100644
index d3dcaa54752..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput20
+++ /dev/null
@@ -1,19 +0,0 @@
-/-- These tests are for the handling of characters greater than 255 in 16-bit,
- non-UTF-16 mode. --/
-
-/^\x{ffff}+/i
- \x{ffff}
-
-/^\x{ffff}?/i
- \x{ffff}
-
-/^\x{ffff}*/i
- \x{ffff}
-
-/^\x{ffff}{3}/i
- \x{ffff}\x{ffff}\x{ffff}
-
-/^\x{ffff}{0,3}/i
- \x{ffff}
-
-/-- End of testinput20 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput21 b/src/third_party/pcre-8.30/testdata/testinput21
deleted file mode 100644
index e0fd236674b..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput21
+++ /dev/null
@@ -1,12 +0,0 @@
-/-- Tests for reloading pre-compile patterns. The first one gives an error
-right away. The others require the linke size to be 2. */
-
-<!testsaved8
-
-/-- Generated from: ^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]|[^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ --/
-
-<!testsaved16LE-1
-
-<!testsaved16BE-1
-
-/-- End of testinput21 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput22 b/src/third_party/pcre-8.30/testdata/testinput22
deleted file mode 100644
index f8276c81581..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput22
+++ /dev/null
@@ -1,9 +0,0 @@
-/-- Tests for reloading pre-compile patterns with UTF-16 support. */
-
-/-- Generated from: (?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,}[\x{f123}\x{10039}\x{20000}-\x{21234}]?|[A-Cx-z\x{100000}-\x{1000a7}\x{101234}])(?<cb2>[^az]) --/8
-
-<!testsaved16LE-2
-
-<!testsaved16BE-2
-
-/-- End of testinput22 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput3 b/src/third_party/pcre-8.30/testdata/testinput3
deleted file mode 100644
index 6fea2f5b3bd..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput3
+++ /dev/null
@@ -1,95 +0,0 @@
-/-- This set of tests checks local-specific features, using the fr_FR locale.
- It is not Perl-compatible. There is different version called wintestinput3
- f or use on Windows, where the locale is called "french". --/
-
-/^[\w]+/
- *** Failers
- cole
-
-/^[\w]+/Lfr_FR
- cole
-
-/^[\w]+/
- *** Failers
- cole
-
-/^[\W]+/
- cole
-
-/^[\W]+/Lfr_FR
- *** Failers
- cole
-
-/[\b]/
- \b
- *** Failers
- a
-
-/[\b]/Lfr_FR
- \b
- *** Failers
- a
-
-/^\w+/
- *** Failers
- cole
-
-/^\w+/Lfr_FR
- cole
-
-/(.+)\b(.+)/
- cole
-
-/(.+)\b(.+)/Lfr_FR
- *** Failers
- cole
-
-/cole/i
- cole
- *** Failers
- cole
-
-/cole/iLfr_FR
- cole
- cole
-
-/\w/IS
-
-/\w/ISLfr_FR
-
-/^[\xc8-\xc9]/iLfr_FR
- cole
- cole
-
-/^[\xc8-\xc9]/Lfr_FR
- cole
- *** Failers
- cole
-
-/\W+/Lfr_FR
- >>>\xaa<<<
- >>>\xba<<<
-
-/[\W]+/Lfr_FR
- >>>\xaa<<<
- >>>\xba<<<
-
-/[^[:alpha:]]+/Lfr_FR
- >>>\xaa<<<
- >>>\xba<<<
-
-/\w+/Lfr_FR
- >>>\xaa<<<
- >>>\xba<<<
-
-/[\w]+/Lfr_FR
- >>>\xaa<<<
- >>>\xba<<<
-
-/[[:alpha:]]+/Lfr_FR
- >>>\xaa<<<
- >>>\xba<<<
-
-/[[:alpha:]][[:lower:]][[:upper:]]/DZLfr_FR
-
-/-- End of testinput3 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput4 b/src/third_party/pcre-8.30/testdata/testinput4
deleted file mode 100644
index c7bb370cfdf..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput4
+++ /dev/null
@@ -1,624 +0,0 @@
-/-- This set of tests is for UTF support, excluding Unicode properties. It is
- compatible with all versions of Perl >= 5.10 and both the 8-bit and 16-bit
- PCRE libraries. --/
-
-/a.b/8
- acb
- a\x7fb
- a\x{100}b
- *** Failers
- a\nb
-
-/a(.{3})b/8
- a\x{4000}xyb
- a\x{4000}\x7fyb
- a\x{4000}\x{100}yb
- *** Failers
- a\x{4000}b
- ac\ncb
-
-/a(.*?)(.)/
- a\xc0\x88b
-
-/a(.*?)(.)/8
- a\x{100}b
-
-/a(.*)(.)/
- a\xc0\x88b
-
-/a(.*)(.)/8
- a\x{100}b
-
-/a(.)(.)/
- a\xc0\x92bcd
-
-/a(.)(.)/8
- a\x{240}bcd
-
-/a(.?)(.)/
- a\xc0\x92bcd
-
-/a(.?)(.)/8
- a\x{240}bcd
-
-/a(.??)(.)/
- a\xc0\x92bcd
-
-/a(.??)(.)/8
- a\x{240}bcd
-
-/a(.{3})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- *** Failers
- a\x{1234}b
- ac\ncb
-
-/a(.{3,})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- *** Failers
- a\x{1234}b
-
-/a(.{3,}?)b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- *** Failers
- a\x{1234}b
-
-/a(.{3,5})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- axxxxxbcdefghijb
- *** Failers
- a\x{1234}b
- axxxxxxbcdefghijb
-
-/a(.{3,5}?)b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- axxxxxbcdefghijb
- *** Failers
- a\x{1234}b
- axxxxxxbcdefghijb
-
-/^[a\x{c0}]/8
- *** Failers
- \x{100}
-
-/(?<=aXb)cd/8
- aXbcd
-
-/(?<=a\x{100}b)cd/8
- a\x{100}bcd
-
-/(?<=a\x{100000}b)cd/8
- a\x{100000}bcd
-
-/(?:\x{100}){3}b/8
- \x{100}\x{100}\x{100}b
- *** Failers
- \x{100}\x{100}b
-
-/\x{ab}/8
- \x{ab}
- \xc2\xab
- *** Failers
- \x00{ab}
-
-/(?<=(.))X/8
- WXYZ
- \x{256}XYZ
- *** Failers
- XYZ
-
-/[^a]+/8g
- bcd
- \x{100}aY\x{256}Z
-
-/^[^a]{2}/8
- \x{100}bc
-
-/^[^a]{2,}/8
- \x{100}bcAa
-
-/^[^a]{2,}?/8
- \x{100}bca
-
-/[^a]+/8ig
- bcd
- \x{100}aY\x{256}Z
-
-/^[^a]{2}/8i
- \x{100}bc
-
-/^[^a]{2,}/8i
- \x{100}bcAa
-
-/^[^a]{2,}?/8i
- \x{100}bca
-
-/\x{100}{0,0}/8
- abcd
-
-/\x{100}?/8
- abcd
- \x{100}\x{100}
-
-/\x{100}{0,3}/8
- \x{100}\x{100}
- \x{100}\x{100}\x{100}\x{100}
-
-/\x{100}*/8
- abce
- \x{100}\x{100}\x{100}\x{100}
-
-/\x{100}{1,1}/8
- abcd\x{100}\x{100}\x{100}\x{100}
-
-/\x{100}{1,3}/8
- abcd\x{100}\x{100}\x{100}\x{100}
-
-/\x{100}+/8
- abcd\x{100}\x{100}\x{100}\x{100}
-
-/\x{100}{3}/8
- abcd\x{100}\x{100}\x{100}XX
-
-/\x{100}{3,5}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
-
-/\x{100}{3,}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
-
-/(?<=a\x{100}{2}b)X/8+
- Xyyya\x{100}\x{100}bXzzz
-
-/\D*/8
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\D*/8
- \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-
-/\D/8
- 1X2
- 1\x{100}2
-
-/>\S/8
- > >X Y
- > >\x{100} Y
-
-/\d/8
- \x{100}3
-
-/\s/8
- \x{100} X
-
-/\D+/8
- 12abcd34
- *** Failers
- 1234
-
-/\D{2,3}/8
- 12abcd34
- 12ab34
- *** Failers
- 1234
- 12a34
-
-/\D{2,3}?/8
- 12abcd34
- 12ab34
- *** Failers
- 1234
- 12a34
-
-/\d+/8
- 12abcd34
- *** Failers
-
-/\d{2,3}/8
- 12abcd34
- 1234abcd
- *** Failers
- 1.4
-
-/\d{2,3}?/8
- 12abcd34
- 1234abcd
- *** Failers
- 1.4
-
-/\S+/8
- 12abcd34
- *** Failers
- \ \
-
-/\S{2,3}/8
- 12abcd34
- 1234abcd
- *** Failers
- \ \
-
-/\S{2,3}?/8
- 12abcd34
- 1234abcd
- *** Failers
- \ \
-
-/>\s+</8+
- 12> <34
- *** Failers
-
-/>\s{2,3}</8+
- ab> <cd
- ab> <ce
- *** Failers
- ab> <cd
-
-/>\s{2,3}?</8+
- ab> <cd
- ab> <ce
- *** Failers
- ab> <cd
-
-/\w+/8
- 12 34
- *** Failers
- +++=*!
-
-/\w{2,3}/8
- ab cd
- abcd ce
- *** Failers
- a.b.c
-
-/\w{2,3}?/8
- ab cd
- abcd ce
- *** Failers
- a.b.c
-
-/\W+/8
- 12====34
- *** Failers
- abcd
-
-/\W{2,3}/8
- ab====cd
- ab==cd
- *** Failers
- a.b.c
-
-/\W{2,3}?/8
- ab====cd
- ab==cd
- *** Failers
- a.b.c
-
-/[\x{100}]/8
- \x{100}
- Z\x{100}
- \x{100}Z
- *** Failers
-
-/[Z\x{100}]/8
- Z\x{100}
- \x{100}
- \x{100}Z
- *** Failers
-
-/[\x{100}\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- *** Failers
-
-/[\x{100}-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- *** Failers
-
-/[z-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- abzcd
- ab|cd
- *** Failers
-
-/[Q\x{100}\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- Q?
- *** Failers
-
-/[Q\x{100}-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- Q?
- *** Failers
-
-/[Qz-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- abzcd
- ab|cd
- Q?
- *** Failers
-
-/[\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/[\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/[Q\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/[Q\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/(?<=[\x{100}\x{200}])X/8
- abc\x{200}X
- abc\x{100}X
- *** Failers
- X
-
-/(?<=[Q\x{100}\x{200}])X/8
- abc\x{200}X
- abc\x{100}X
- abQX
- *** Failers
- X
-
-/(?<=[\x{100}\x{200}]{3})X/8
- abc\x{100}\x{200}\x{100}X
- *** Failers
- abc\x{200}X
- X
-
-/[^\x{100}\x{200}]X/8
- AX
- \x{150}X
- \x{500}X
- *** Failers
- \x{100}X
- \x{200}X
-
-/[^Q\x{100}\x{200}]X/8
- AX
- \x{150}X
- \x{500}X
- *** Failers
- \x{100}X
- \x{200}X
- QX
-
-/[^\x{100}-\x{200}]X/8
- AX
- \x{500}X
- *** Failers
- \x{100}X
- \x{150}X
- \x{200}X
-
-/[z-\x{100}]/8i
- z
- Z
- \x{100}
- *** Failers
- \x{102}
- y
-
-/[\xFF]/
- >\xff<
-
-/[\xff]/8
- >\x{ff}<
-
-/[^\xFF]/
- XYZ
-
-/[^\xff]/8
- XYZ
- \x{123}
-
-/^[ac]*b/8
- xb
-
-/^[ac\x{100}]*b/8
- xb
-
-/^[^x]*b/8i
- xb
-
-/^[^x]*b/8
- xb
-
-/^\d*b/8
- xb
-
-/(|a)/g8
- catac
- a\x{256}a
-
-/^\x{85}$/8i
- \x{85}
-
-/^ሴ/8
- ሴ
-
-/^\ሴ/8
- ሴ
-
-"(?s)(.{1,5})"8
- abcdefg
- ab
-
-/a*\x{100}*\w/8
- a
-
-/\S\S/8g
- A\x{a3}BC
-
-/\S{2}/8g
- A\x{a3}BC
-
-/\W\W/8g
- +\x{a3}==
-
-/\W{2}/8g
- +\x{a3}==
-
-/\S/8g
- \x{442}\x{435}\x{441}\x{442}
-
-/[\S]/8g
- \x{442}\x{435}\x{441}\x{442}
-
-/\D/8g
- \x{442}\x{435}\x{441}\x{442}
-
-/[\D]/8g
- \x{442}\x{435}\x{441}\x{442}
-
-/\W/8g
- \x{2442}\x{2435}\x{2441}\x{2442}
-
-/[\W]/8g
- \x{2442}\x{2435}\x{2441}\x{2442}
-
-/[\S\s]*/8
- abc\n\r\x{442}\x{435}\x{441}\x{442}xyz
-
-/[\x{41f}\S]/8g
- \x{442}\x{435}\x{441}\x{442}
-
-/.[^\S]./8g
- abc def\x{442}\x{443}xyz\npqr
-
-/.[^\S\n]./8g
- abc def\x{442}\x{443}xyz\npqr
-
-/[[:^alnum:]]/8g
- +\x{2442}
-
-/[[:^alpha:]]/8g
- +\x{2442}
-
-/[[:^ascii:]]/8g
- A\x{442}
-
-/[[:^blank:]]/8g
- A\x{442}
-
-/[[:^cntrl:]]/8g
- A\x{442}
-
-/[[:^digit:]]/8g
- A\x{442}
-
-/[[:^graph:]]/8g
- \x19\x{e01ff}
-
-/[[:^lower:]]/8g
- A\x{422}
-
-/[[:^print:]]/8g
- \x{19}\x{e01ff}
-
-/[[:^punct:]]/8g
- A\x{442}
-
-/[[:^space:]]/8g
- A\x{442}
-
-/[[:^upper:]]/8g
- a\x{442}
-
-/[[:^word:]]/8g
- +\x{2442}
-
-/[[:^xdigit:]]/8g
- M\x{442}
-
-/[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d-_^]/8
-
-/^[^d]*?$/
- abc
-
-/^[^d]*?$/8
- abc
-
-/^[^d]*?$/i
- abc
-
-/^[^d]*?$/8i
- abc
-
-/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8
-
-/^[a\x{c0}]b/8
- \x{c0}b
-
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
-
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
- a\x{c0}a\x{c0}aaa/
-
-/^([a\x{c0}]*)aa/8
- a\x{c0}aaaa/
- a\x{c0}a\x{c0}aaa/
-
-/^([a\x{c0}]*)a\x{c0}/8
- a\x{c0}aaaa/
- a\x{c0}a\x{c0}aaa/
-
-/A*/g8
- AAB\x{123}BAA
-
-/(abc)\1/8i
- abc
-
-/(abc)\1/8
- abc
-
-/a(*:a\x{1234}b)/8K
- abc
-
-/a(*:a£b)/8K
- abc
-
-/-- End of testinput4 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput5 b/src/third_party/pcre-8.30/testdata/testinput5
deleted file mode 100644
index 4f7cb32930b..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput5
+++ /dev/null
@@ -1,694 +0,0 @@
-/-- This set of tests checks the API, internals, and non-Perl stuff for UTF
- support, excluding Unicode properties. However, tests that give different
- results in 8-bit and 16-bit modes are excluded (see tests 16 and 17). --/
-
-/\x{110000}/8DZ
-
-/\x{ffffffff}/8
-
-/\x{100000000}/8
-
-/\x{d800}/8
-
-/\x{dfff}/8
-
-/\x{d7ff}/8
-
-/\x{e000}/8
-
-/^\x{100}a\x{1234}/8
- \x{100}a\x{1234}bcd
-
-/\x{0041}\x{2262}\x{0391}\x{002e}/DZ8
- \x{0041}\x{2262}\x{0391}\x{002e}
-
-/.{3,5}X/DZ8
- \x{212ab}\x{212ab}\x{212ab}\x{861}X
-
-/.{3,5}?/DZ8
- \x{212ab}\x{212ab}\x{212ab}\x{861}
-
-/(?<=\C)X/8
- Should produce an error diagnostic
-
-/^[ab]/8DZ
- bar
- *** Failers
- c
- \x{ff}
- \x{100}
-
-/^[^ab]/8DZ
- c
- \x{ff}
- \x{100}
- *** Failers
- aaa
-
-/\x{100}*(\d+|"(?1)")/8
- 1234
- "1234"
- \x{100}1234
- "\x{100}1234"
- \x{100}\x{100}12ab
- \x{100}\x{100}"12"
- *** Failers
- \x{100}\x{100}abcd
-
-/\x{100}*/8DZ
-
-/a\x{100}*/8DZ
-
-/ab\x{100}*/8DZ
-
-/\x{100}*A/8DZ
- A
-
-/\x{100}*\d(?R)/8DZ
-
-/[Z\x{100}]/8DZ
- Z\x{100}
- \x{100}
- \x{100}Z
- *** Failers
-
-/[\x{200}-\x{100}]/8
-
-/[Ā-Ą]/8
- \x{100}
- \x{104}
- *** Failers
- \x{105}
- \x{ff}
-
-/[z-\x{100}]/8DZ
-
-/[z\Qa-d]Ā\E]/8DZ
- \x{100}
- Ā
-
-/[\xFF]/DZ
- >\xff<
-
-/[^\xFF]/DZ
-
-/[Ä-Ü]/8
- Ö # Matches without Study
- \x{d6}
-
-/[Ä-Ü]/8S
- Ö <-- Same with Study
- \x{d6}
-
-/[\x{c4}-\x{dc}]/8
- Ö # Matches without Study
- \x{d6}
-
-/[\x{c4}-\x{dc}]/8S
- Ö <-- Same with Study
- \x{d6}
-
-/[^\x{100}]abc(xyz(?1))/8DZ
-
-/[ab\x{100}]abc(xyz(?1))/8DZ
-
-/(\x{100}(b(?2)c))?/DZ8
-
-/(\x{100}(b(?2)c)){0,2}/DZ8
-
-/(\x{100}(b(?1)c))?/DZ8
-
-/(\x{100}(b(?1)c)){0,2}/DZ8
-
-/\W/8
- A.B
- A\x{100}B
-
-/\w/8
- \x{100}X
-
-/^\ሴ/8DZ
-
-/\x{100}*\d/8DZ
-
-/\x{100}*\s/8DZ
-
-/\x{100}*\w/8DZ
-
-/\x{100}*\D/8DZ
-
-/\x{100}*\S/8DZ
-
-/\x{100}*\W/8DZ
-
-/()()()()()()()()()()
- ()()()()()()()()()()
- ()()()()()()()()()()
- ()()()()()()()()()()
- A (x) (?41) B/8x
- AxxB
-
-/^[\x{100}\E-\Q\E\x{150}]/BZ8
-
-/^[\QĀ\E-\QŐ\E]/BZ8
-
-/^abc./mgx8<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
-
-/abc.$/mgx8<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
-
-/^a\Rb/8<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x{85}b
- a\x{2028}b
- a\x{2029}b
- ** Failers
- a\n\rb
-
-/^a\R*b/8<bsr_unicode>
- ab
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0c\x{2028}\x{2029}b
- a\x{85}b
- a\n\rb
- a\n\r\x{85}\x0cb
-
-/^a\R+b/8<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0c\x{2028}\x{2029}b
- a\x{85}b
- a\n\rb
- a\n\r\x{85}\x0cb
- ** Failers
- ab
-
-/^a\R{1,3}b/8<bsr_unicode>
- a\nb
- a\n\rb
- a\n\r\x{85}b
- a\r\n\r\nb
- a\r\n\r\n\r\nb
- a\n\r\n\rb
- a\n\n\r\nb
- ** Failers
- a\n\n\n\rb
- a\r
-
-/\H\h\V\v/8
- X X\x0a
- X\x09X\x0b
- ** Failers
- \x{a0} X\x0a
-
-/\H*\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
- \x09\x20\x{a0}\x0a\x0b\x0c
- ** Failers
- \x09\x20\x{a0}\x0a\x0b
-
-/\H\h\V\v/8
- \x{3001}\x{3000}\x{2030}\x{2028}
- X\x{180e}X\x{85}
- ** Failers
- \x{2009} X\x0a
-
-/\H*\h+\V?\v{3,4}/8
- \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
- \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
- \x09\x20\x{202f}\x0a\x0b\x0c
- ** Failers
- \x09\x{200a}\x{a0}\x{2028}\x0b
-
-/[\h]/8BZ
- >\x{1680}
-
-/[\h]{3,}/8BZ
- >\x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}<
-
-/[\v]/8BZ
-
-/[\H]/8BZ
-
-/[\V]/8BZ
-
-/.*$/8<any>
- \x{1ec5}
-
-/a\Rb/I8<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
- ** Failers
- a\x{85}b
- a\x0bb
-
-/a\Rb/I8<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x{85}b
- a\x0bb
- ** Failers
- a\x{85}b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
-
-/a\R?b/I8<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
- ** Failers
- a\x{85}b
- a\x0bb
-
-/a\R?b/I8<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x{85}b
- a\x0bb
- ** Failers
- a\x{85}b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
-
-/.*a.*=.b.*/8<ANY>
- QQQ\x{2029}ABCaXYZ=!bPQR
- ** Failers
- a\x{2029}b
- \x61\xe2\x80\xa9\x62
-
-/[[:a\x{100}b:]]/8
-
-/a[^]b/<JS>8
- a\x{1234}b
- a\nb
- ** Failers
- ab
-
-/a[^]+b/<JS>8
- aXb
- a\nX\nX\x{1234}b
- ** Failers
- ab
-
-/(\x{de})\1/
- \x{de}\x{de}
-
-/X/8f<any>
- A\x{1ec5}ABCXYZ
-
-/Xa{2,4}b/8
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/Xa{2,4}?b/8
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/Xa{2,4}+b/8
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X\x{123}{2,4}b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X\x{123}{2,4}?b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X\x{123}{2,4}+b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X\x{123}{2,4}b/8
- Xx\P
- X\x{123}x\P
- X\x{123}\x{123}x\P
- X\x{123}\x{123}\x{123}x\P
- X\x{123}\x{123}\x{123}\x{123}x\P
-
-/X\x{123}{2,4}?b/8
- Xx\P
- X\x{123}x\P
- X\x{123}\x{123}x\P
- X\x{123}\x{123}\x{123}x\P
- X\x{123}\x{123}\x{123}\x{123}x\P
-
-/X\x{123}{2,4}+b/8
- Xx\P
- X\x{123}x\P
- X\x{123}\x{123}x\P
- X\x{123}\x{123}\x{123}x\P
- X\x{123}\x{123}\x{123}\x{123}x\P
-
-/X\d{2,4}b/8
- X\P
- X3\P
- X33\P
- X333\P
- X3333\P
-
-/X\d{2,4}?b/8
- X\P
- X3\P
- X33\P
- X333\P
- X3333\P
-
-/X\d{2,4}+b/8
- X\P
- X3\P
- X33\P
- X333\P
- X3333\P
-
-/X\D{2,4}b/8
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X\D{2,4}?b/8
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X\D{2,4}+b/8
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X\D{2,4}b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X\D{2,4}?b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X\D{2,4}+b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X[abc]{2,4}b/8
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X[abc]{2,4}?b/8
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X[abc]{2,4}+b/8
- X\P
- Xa\P
- Xaa\P
- Xaaa\P
- Xaaaa\P
-
-/X[abc\x{123}]{2,4}b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X[abc\x{123}]{2,4}?b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X[abc\x{123}]{2,4}+b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X[^a]{2,4}b/8
- X\P
- Xz\P
- Xzz\P
- Xzzz\P
- Xzzzz\P
-
-/X[^a]{2,4}?b/8
- X\P
- Xz\P
- Xzz\P
- Xzzz\P
- Xzzzz\P
-
-/X[^a]{2,4}+b/8
- X\P
- Xz\P
- Xzz\P
- Xzzz\P
- Xzzzz\P
-
-/X[^a]{2,4}b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X[^a]{2,4}?b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/X[^a]{2,4}+b/8
- X\P
- X\x{123}\P
- X\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\P
- X\x{123}\x{123}\x{123}\x{123}\P
-
-/(Y)X\1{2,4}b/8
- YX\P
- YXY\P
- YXYY\P
- YXYYY\P
- YXYYYY\P
-
-/(Y)X\1{2,4}?b/8
- YX\P
- YXY\P
- YXYY\P
- YXYYY\P
- YXYYYY\P
-
-/(Y)X\1{2,4}+b/8
- YX\P
- YXY\P
- YXYY\P
- YXYYY\P
- YXYYYY\P
-
-/(\x{123})X\1{2,4}b/8
- \x{123}X\P
- \x{123}X\x{123}\P
- \x{123}X\x{123}\x{123}\P
- \x{123}X\x{123}\x{123}\x{123}\P
- \x{123}X\x{123}\x{123}\x{123}\x{123}\P
-
-/(\x{123})X\1{2,4}?b/8
- \x{123}X\P
- \x{123}X\x{123}\P
- \x{123}X\x{123}\x{123}\P
- \x{123}X\x{123}\x{123}\x{123}\P
- \x{123}X\x{123}\x{123}\x{123}\x{123}\P
-
-/(\x{123})X\1{2,4}+b/8
- \x{123}X\P
- \x{123}X\x{123}\P
- \x{123}X\x{123}\x{123}\P
- \x{123}X\x{123}\x{123}\x{123}\P
- \x{123}X\x{123}\x{123}\x{123}\x{123}\P
-
-/\bthe cat\b/8
- the cat\P
- the cat\P\P
-
-/abcd*/8
- xxxxabcd\P
- xxxxabcd\P\P
-
-/abcd*/i8
- xxxxabcd\P
- xxxxabcd\P\P
- XXXXABCD\P
- XXXXABCD\P\P
-
-/abc\d*/8
- xxxxabc1\P
- xxxxabc1\P\P
-
-/(a)bc\1*/8
- xxxxabca\P
- xxxxabca\P\P
-
-/abc[de]*/8
- xxxxabcde\P
- xxxxabcde\P\P
-
-/X\W{3}X/8
- \PX
-
-/\sxxx\s/8T1
- AB\x{85}xxx\x{a0}XYZ
- AB\x{a0}xxx\x{85}XYZ
-
-/\S \S/8T1
- \x{a2} \x{84}
-
-'A#хц'8x<any>BZ
-
-'A#хц
- PQ'8x<any>BZ
-
-/a+#хaa
- z#XX?/8x<any>BZ
-
-/a+#хaa
- z#х?/8x<any>BZ
-
-/\g{A}xxx#bXX(?'A'123) (?'A'456)/8x<any>BZ
-
-/\g{A}xxx#bх(?'A'123) (?'A'456)/8x<any>BZ
-
-/^\cģ/8
-
-/(\R*)(.)/s8
- \r\n
- \r\r\n\n\r
- \r\r\n\n\r\n
-
-/(\R)*(.)/s8
- \r\n
- \r\r\n\n\r
- \r\r\n\n\r\n
-
-/[^\x{1234}]+/iS8I
-
-/[^\x{1234}]+?/iS8I
-
-/[^\x{1234}]++/iS8I
-
-/[^\x{1234}]{2}/iS8I
-
-//<bsr_anycrlf><bsr_unicode>
-
-/f.*/
- \P\Pfor
-
-/f.*/s
- \P\Pfor
-
-/f.*/8
- \P\Pfor
-
-/f.*/8s
- \P\Pfor
-
-/\x{d7ff}\x{e000}/8
-
-/\x{d800}/8
-
-/\x{dfff}/8
-
-/\h+/8
- \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
- \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
-
-/[\h\x{e000}]+/8BZ
- \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
- \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
-
-/\H+/8
- \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
- \x{2000}\x{200a}\x{1fff}\x{200b}
- \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
- \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
-
-/[\H\x{d7ff}]+/8BZ
- \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
- \x{2000}\x{200a}\x{1fff}\x{200b}
- \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
- \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
-
-/\v+/8
- \x{2027}\x{2030}\x{2028}\x{2029}
- \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
-
-/[\v\x{e000}]+/8BZ
- \x{2027}\x{2030}\x{2028}\x{2029}
- \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
-
-/\V+/8
- \x{2028}\x{2029}\x{2027}\x{2030}
- \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
-
-/[\V\x{d7ff}]+/8BZ
- \x{2028}\x{2029}\x{2027}\x{2030}
- \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
-
-/\R+/8<bsr_unicode>
- \x{2027}\x{2030}\x{2028}\x{2029}
- \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
-
-/-- End of testinput5 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput6 b/src/third_party/pcre-8.30/testdata/testinput6
deleted file mode 100644
index 6b0d2f78083..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput6
+++ /dev/null
@@ -1,819 +0,0 @@
-/-- This set of tests is for Unicode property support. It is compatible with
- Perl >= 5.10, but not 5.8 because it tests some extra properties that are
- not in the earlier release. --/
-
-/^\pC\pL\pM\pN\pP\pS\pZ</8
- \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- \np\x{300}9!\$ <
- ** Failers
- ap\x{300}9!\$ <
-
-/^\PC/8
- X
- ** Failers
- \x7f
-
-/^\PL/8
- 9
- ** Failers
- \x{c0}
-
-/^\PM/8
- X
- ** Failers
- \x{30f}
-
-/^\PN/8
- X
- ** Failers
- \x{660}
-
-/^\PP/8
- X
- ** Failers
- \x{66c}
-
-/^\PS/8
- X
- ** Failers
- \x{f01}
-
-/^\PZ/8
- X
- ** Failers
- \x{1680}
-
-/^\p{Cc}/8
- \x{017}
- \x{09f}
- ** Failers
- \x{0600}
-
-/^\p{Cf}/8
- \x{601}
- ** Failers
- \x{09f}
-
-/^\p{Cn}/8
- \x{e0000}
- ** Failers
- \x{09f}
-
-/^\p{Co}/8
- \x{f8ff}
- ** Failers
- \x{09f}
-
-/^\p{Ll}/8
- a
- ** Failers
- Z
- \x{e000}
-
-/^\p{Lm}/8
- \x{2b0}
- ** Failers
- a
-
-/^\p{Lo}/8
- \x{1bb}
- \x{3400}
- \x{3401}
- \x{4d00}
- \x{4db4}
- \x{4db5}
- ** Failers
- a
- \x{2b0}
- \x{4db6}
-
-/^\p{Lt}/8
- \x{1c5}
- ** Failers
- a
- \x{2b0}
-
-/^\p{Lu}/8
- A
- ** Failers
- \x{2b0}
-
-/^\p{Mc}/8
- \x{903}
- ** Failers
- X
- \x{300}
-
-/^\p{Me}/8
- \x{488}
- ** Failers
- X
- \x{903}
- \x{300}
-
-/^\p{Mn}/8
- \x{300}
- ** Failers
- X
- \x{903}
-
-/^\p{Nd}+/8
- 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
- \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
- \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
- ** Failers
- X
-
-/^\p{Nl}/8
- \x{16ee}
- ** Failers
- X
- \x{966}
-
-/^\p{No}/8
- \x{b2}
- \x{b3}
- ** Failers
- X
- \x{16ee}
-
-/^\p{Pc}/8
- \x5f
- \x{203f}
- ** Failers
- X
- -
- \x{58a}
-
-/^\p{Pd}/8
- -
- \x{58a}
- ** Failers
- X
- \x{203f}
-
-/^\p{Pe}/8
- )
- ]
- }
- \x{f3b}
- ** Failers
- X
- \x{203f}
- (
- [
- {
- \x{f3c}
-
-/^\p{Pf}/8
- \x{bb}
- \x{2019}
- ** Failers
- X
- \x{203f}
-
-/^\p{Pi}/8
- \x{ab}
- \x{2018}
- ** Failers
- X
- \x{203f}
-
-/^\p{Po}/8
- !
- \x{37e}
- ** Failers
- X
- \x{203f}
-
-/^\p{Ps}/8
- (
- [
- {
- \x{f3c}
- ** Failers
- X
- )
- ]
- }
- \x{f3b}
-
-/^\p{Sk}/8
- \x{2c2}
- ** Failers
- X
- \x{9f2}
-
-/^\p{Sm}+/8
- +<|~\x{ac}\x{2044}
- ** Failers
- X
- \x{9f2}
-
-/^\p{So}/8
- \x{a6}
- \x{482}
- ** Failers
- X
- \x{9f2}
-
-/^\p{Zl}/8
- \x{2028}
- ** Failers
- X
- \x{2029}
-
-/^\p{Zp}/8
- \x{2029}
- ** Failers
- X
- \x{2028}
-
-/\p{Nd}+(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}+?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,}(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,}?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2}(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,3}(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,3}?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}??(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(...)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(....)/8
- ** Failers
- \x{660}\x{661}\x{662}ABC
-
-/(?<=A\p{Nd})XYZ/8
- A2XYZ
- 123A5XYZPQR
- ABA\x{660}XYZpqr
- ** Failers
- AXYZ
- XYZ
-
-/(?<!\pL)XYZ/8
- 1XYZ
- AB=XYZ..
- XYZ
- ** Failers
- WXYZ
-
-/[\P{Nd}]+/8
- abcd
- ** Failers
- 1234
-
-/\D+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\P{Nd}+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\pL/8
- a
- A
-
-/\pL/8i
- a
- A
-
-/\p{Lu}/8
- A
- aZ
- ** Failers
- abc
-
-/\p{Lu}/8i
- A
- aZ
- ** Failers
- abc
-
-/\p{Ll}/8
- a
- Az
- ** Failers
- ABC
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- ** Failers
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/\x{391}+/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
-
-/\x{391}{3,5}(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
-
-/\x{391}{3,5}?(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
-
-/[\x{391}\x{ff3a}]/8i
- \x{391}
- \x{ff3a}
- \x{3b1}
- \x{ff5a}
-
-/^[\X]/8
- X123
- *** Failers
- AXYZ
-
-/^(\X*)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-
-/^(\X*?)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-
-/^(\X*)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-
-/^(\X*?)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-
-/^\X(.)/8
- *** Failers
- A\x{300}\x{301}\x{302}
-
-/^\X{2,3}(.)/8
- A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
-
-/^\X{2,3}?(.)/8
- A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
-
-/^\p{Han}+/8
- \x{2e81}\x{3007}\x{2f804}\x{31a0}
- ** Failers
- \x{2e7f}
-
-/^\P{Katakana}+/8
- \x{3105}
- ** Failers
- \x{30ff}
-
-/^[\p{Arabic}]/8
- \x{06e9}
- \x{060b}
- ** Failers
- X\x{06e9}
-
-/^[\P{Yi}]/8
- \x{2f800}
- ** Failers
- \x{a014}
- \x{a4c6}
-
-/^\p{Any}X/8
- AXYZ
- \x{1234}XYZ
- ** Failers
- X
-
-/^\P{Any}X/8
- ** Failers
- AX
-
-/^\p{Any}?X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- ** Failers
- ABXYZ
-
-/^\P{Any}?X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- ABXYZ
-
-/^\p{Any}+X/8
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
- XYZ
-
-/^\P{Any}+X/8
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- XYZ
-
-/^\p{Any}*X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
-
-/^\P{Any}*X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
-
-/^[\p{Any}]X/8
- AXYZ
- \x{1234}XYZ
- ** Failers
- X
-
-/^[\P{Any}]X/8
- ** Failers
- AX
-
-/^[\p{Any}]?X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- ** Failers
- ABXYZ
-
-/^[\P{Any}]?X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- ABXYZ
-
-/^[\p{Any}]+X/8
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
- XYZ
-
-/^[\P{Any}]+X/8
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- XYZ
-
-/^[\p{Any}]*X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
-
-/^[\P{Any}]*X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
-
-/^\p{Any}{3,5}?/8
- abcdefgh
- \x{1234}\n\r\x{3456}xyz
-
-/^\p{Any}{3,5}/8
- abcdefgh
- \x{1234}\n\r\x{3456}xyz
-
-/^\P{Any}{3,5}?/8
- ** Failers
- abcdefgh
- \x{1234}\n\r\x{3456}xyz
-
-/^\p{L&}X/8
- AXY
- aXY
- \x{1c5}XY
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^[\p{L&}]X/8
- AXY
- aXY
- \x{1c5}XY
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^\p{L&}+X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^[\p{L&}]+X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^\p{L&}+?X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^[\p{L&}]+?X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^\P{L&}X/8
- !XY
- \x{1bb}XY
- \x{2b0}XY
- ** Failers
- \x{1c5}XY
- AXY
-
-/^[\P{L&}]X/8
- !XY
- \x{1bb}XY
- \x{2b0}XY
- ** Failers
- \x{1c5}XY
- AXY
-
-/^(\p{Z}[^\p{C}\p{Z}]+)*$/
- \xa0!
-
-/^[\pL](abc)(?1)/
- AabcabcYZ
-
-/([\pL]=(abc))*X/
- L=abcX
-
-/^\p{Balinese}\p{Cuneiform}\p{Nko}\p{Phags_Pa}\p{Phoenician}/8
- \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
-
-/Check property support in non-UTF-8 mode/
-
-/\p{L}{4}/
- 123abcdefg
- 123abc\xc4\xc5zz
-
-/\X{1,3}\d/
- \x8aBCD
-
-/\X?\d/
- \x8aBCD
-
-/\P{L}?\d/
- \x8aBCD
-
-/[\PPP\x8a]{1,}\x80/
- A\x80
-
-/^[\p{Arabic}]/8
- \x{60e}
- \x{656}
- \x{657}
- \x{658}
- \x{659}
- \x{65a}
- \x{65b}
- \x{65c}
- \x{65d}
- \x{65e}
- \x{66a}
- \x{6e9}
- \x{6ef}
- \x{6fa}
- ** Failers
- \x{604}
- \x{650}
- \x{651}
- \x{652}
- \x{653}
- \x{654}
- \x{655}
- \x{65f}
-
-/^\p{Cyrillic}/8
- \x{1d2b}
-
-/^\p{Common}/8
- \x{589}
- \x{60c}
- \x{61f}
- \x{964}
- \x{965}
- \x{970}
-
-/^\p{Inherited}/8
- \x{64b}
- \x{654}
- \x{655}
- \x{200c}
- ** Failers
- \x{64a}
- \x{656}
-
-/^\p{Shavian}/8
- \x{10450}
- \x{1047f}
-
-/^\p{Deseret}/8
- \x{10400}
- \x{1044f}
-
-/^\p{Osmanya}/8
- \x{10480}
- \x{1049d}
- \x{104a0}
- \x{104a9}
- ** Failers
- \x{1049e}
- \x{1049f}
- \x{104aa}
-
-/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8
- \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
-
-/\x{a77d}\x{1d79}/8i
- \x{a77d}\x{1d79}
- \x{1d79}\x{a77d}
-
-/\x{a77d}\x{1d79}/8
- \x{a77d}\x{1d79}
- ** Failers
- \x{1d79}\x{a77d}
-
-/(A)\1/8i
- AA
- Aa
- aa
- aA
-
-/(\x{10a})\1/8i
- \x{10a}\x{10a}
- \x{10a}\x{10b}
- \x{10b}\x{10b}
- \x{10b}\x{10a}
-
-/The next two tests are for property support in non-UTF-8 mode/
-
-/(?:\p{Lu}|\x20)+/
- \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
-
-/[\p{Lu}\x20]+/
- \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
-
-/\p{Avestan}\p{Bamum}\p{Egyptian_Hieroglyphs}\p{Imperial_Aramaic}\p{Inscriptional_Pahlavi}\p{Inscriptional_Parthian}\p{Javanese}\p{Kaithi}\p{Lisu}\p{Meetei_Mayek}\p{Old_South_Arabian}\p{Old_Turkic}\p{Samaritan}\p{Tai_Tham}\p{Tai_Viet}/8
- \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{0800}\x{1aad}\x{aac0}
-
-/^\w+/8W
- Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
-
-/^[[:xdigit:]]*/8W
- 1a\x{660}\x{bef}\x{16ee}
-
-/^\d+/8W
- 1\x{660}\x{bef}\x{16ee}
-
-/^[[:digit:]]+/8W
- 1\x{660}\x{bef}\x{16ee}
-
-/^>\s+/8W
- >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
-
-/^>\pZ+/8W
- >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
-
-/^>[[:space:]]*/8W
- >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
-
-/^>[[:blank:]]*/8W
- >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
-
-/^[[:alpha:]]*/8W
- Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
-
-/^[[:alnum:]]*/8W
- Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
-
-/^[[:cntrl:]]*/8W
- \x{0}\x{09}\x{1f}\x{7f}\x{9f}
-
-/^[[:graph:]]*/8W
- A\x{a1}\x{a0}
-
-/^[[:print:]]*/8W
- A z\x{a0}\x{a1}
-
-/^[[:punct:]]*/8W
- .+\x{a1}\x{a0}
-
-/\p{Zs}*?\R/
- ** Failers
- a\xFCb
-
-/\p{Zs}*\R/
- ** Failers
- a\xFCb
-
-/ⱥ/8i
- ⱥ
- Ⱥx
- Ⱥ
-
-/[ⱥ]/8i
- ⱥ
- Ⱥx
- Ⱥ
-
-/Ⱥ/8i
- Ⱥ
- ⱥ
-
-/-- End of testinput6 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput7 b/src/third_party/pcre-8.30/testdata/testinput7
deleted file mode 100644
index abbfe662942..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput7
+++ /dev/null
@@ -1,561 +0,0 @@
-/-- These tests for Unicode property support test PCRE's API and show some of
- the compiled code. They are not Perl-compatible. --/
-
-/[\p{L}]/DZ
-
-/[\p{^L}]/DZ
-
-/[\P{L}]/DZ
-
-/[\P{^L}]/DZ
-
-/[abc\p{L}\x{0660}]/8DZ
-
-/[\p{Nd}]/8DZ
- 1234
-
-/[\p{Nd}+-]+/8DZ
- 1234
- 12-34
- 12+\x{661}-34
- ** Failers
- abcd
-
-/[\x{105}-\x{109}]/8iDZ
- \x{104}
- \x{105}
- \x{109}
- ** Failers
- \x{100}
- \x{10a}
-
-/[z-\x{100}]/8iDZ
- Z
- z
- \x{39c}
- \x{178}
- |
- \x{80}
- \x{ff}
- \x{100}
- \x{101}
- ** Failers
- \x{102}
- Y
- y
-
-/[z-\x{100}]/8DZi
-
-/(?:[\PPa*]*){8,}/
-
-/[\P{Any}]/BZ
-
-/[\P{Any}\E]/BZ
-
-/(\P{Yi}+\277)/
-
-/(\P{Yi}+\277)?/
-
-/(?<=\P{Yi}{3}A)X/
-
-/\p{Yi}+(\P{Yi}+)(?1)/
-
-/(\P{Yi}{2}\277)?/
-
-/[\P{Yi}A]/
-
-/[\P{Yi}\P{Yi}\P{Yi}A]/
-
-/[^\P{Yi}A]/
-
-/[^\P{Yi}\P{Yi}\P{Yi}A]/
-
-/(\P{Yi}*\277)*/
-
-/(\P{Yi}*?\277)*/
-
-/(\p{Yi}*+\277)*/
-
-/(\P{Yi}?\277)*/
-
-/(\P{Yi}??\277)*/
-
-/(\p{Yi}?+\277)*/
-
-/(\P{Yi}{0,3}\277)*/
-
-/(\P{Yi}{0,3}?\277)*/
-
-/(\p{Yi}{0,3}+\277)*/
-
-/\p{Zl}{2,3}+/8BZ
- \xe2\x80\xa8\xe2\x80\xa8
- \x{2028}\x{2028}\x{2028}
-
-/\p{Zl}/8BZ
-
-/\p{Lu}{3}+/8BZ
-
-/\pL{2}+/8BZ
-
-/\p{Cc}{2}+/8BZ
-
-/^\p{Cs}/8
- \?\x{dfff}
- ** Failers
- \x{09f}
-
-/^\p{Sc}+/8
- $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
- \x{9f2}
- ** Failers
- X
- \x{2c2}
-
-/^\p{Zs}/8
- \ \
- \x{a0}
- \x{1680}
- \x{180e}
- \x{2000}
- \x{2001}
- ** Failers
- \x{2028}
- \x{200d}
-
-/-- These four are here rather than in test 6 because Perl has problems with
- the negative versions of the properties. --/
-
-/\p{^Lu}/8i
- 1234
- ** Failers
- ABC
-
-/\P{Lu}/8i
- 1234
- ** Failers
- ABC
-
-/\p{Ll}/8i
- a
- Az
- ** Failers
- ABC
-
-/\p{Lu}/8i
- A
- a\x{10a0}B
- ** Failers
- a
- \x{1d00}
-
-/[\x{c0}\x{391}]/8i
- \x{c0}
- \x{e0}
-
-/-- The next two are special cases where the lengths of the different cases of
-the same character differ. The first went wrong with heap frame storage; the
-second was broken in all cases. --/
-
-/^\x{023a}+?(\x{0130}+)/8i
- \x{023a}\x{2c65}\x{0130}
-
-/^\x{023a}+([^X])/8i
- \x{023a}\x{2c65}X
-
-/\x{c0}+\x{116}+/8i
- \x{c0}\x{e0}\x{116}\x{117}
-
-/[\x{c0}\x{116}]+/8i
- \x{c0}\x{e0}\x{116}\x{117}
-
-/(\x{de})\1/8i
- \x{de}\x{de}
- \x{de}\x{fe}
- \x{fe}\x{fe}
- \x{fe}\x{de}
-
-/^\x{c0}$/8i
- \x{c0}
- \x{e0}
-
-/^\x{e0}$/8i
- \x{c0}
- \x{e0}
-
-/-- The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE
-will match it only with UCP support, because without that it has no notion
-of case for anything other than the ASCII letters. --/
-
-/((?i)[\x{c0}])/8
- \x{c0}
- \x{e0}
-
-/(?i:[\x{c0}])/8
- \x{c0}
- \x{e0}
-
-/-- This should be Perl-compatible but Perl 5.11 gets \x{300} wrong. --/8
-
-/^\X/8
- A
- A\x{300}BC
- A\x{300}\x{301}\x{302}BC
- *** Failers
- \x{300}
-
-/-- These are PCRE's extra properties to help with Unicodizing \d etc. --/
-
-/^\p{Xan}/8
- ABCD
- 1234
- \x{6ca}
- \x{a6c}
- \x{10a7}
- ** Failers
- _ABC
-
-/^\p{Xan}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- ** Failers
- _ABC
-
-/^\p{Xan}+?/8
- \x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xan}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xan}{2,9}/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xan}{2,9}?/8
- \x{6ca}\x{a6c}\x{10a7}_
-
-/^[\p{Xan}]/8
- ABCD1234_
- 1234abcd_
- \x{6ca}
- \x{a6c}
- \x{10a7}
- ** Failers
- _ABC
-
-/^[\p{Xan}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- ** Failers
- _ABC
-
-/^>\p{Xsp}/8
- >\x{1680}\x{2028}\x{0b}
- >\x{a0}
- ** Failers
- \x{0b}
-
-/^>\p{Xsp}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xsp}+?/8
- >\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xsp}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xsp}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xsp}{2,9}?/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>[\p{Xsp}]/8
- >\x{2028}\x{0b}
-
-/^>[\p{Xsp}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}/8
- >\x{1680}\x{2028}\x{0b}
- >\x{a0}
- ** Failers
- \x{0b}
-
-/^>\p{Xps}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}+?/8
- >\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}{2,9}?/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>[\p{Xps}]/8
- >\x{2028}\x{0b}
-
-/^>[\p{Xps}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^\p{Xwd}/8
- ABCD
- 1234
- \x{6ca}
- \x{a6c}
- \x{10a7}
- _ABC
- ** Failers
- []
-
-/^\p{Xwd}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xwd}+?/8
- \x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xwd}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xwd}{2,9}/8
- A_B12\x{6ca}\x{a6c}\x{10a7}
-
-/^\p{Xwd}{2,9}?/8
- \x{6ca}\x{a6c}\x{10a7}_
-
-/^[\p{Xwd}]/8
- ABCD1234_
- 1234abcd_
- \x{6ca}
- \x{a6c}
- \x{10a7}
- _ABC
- ** Failers
- []
-
-/^[\p{Xwd}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/-- A check not in UTF-8 mode --/
-
-/^[\p{Xwd}]+/
- ABCD1234_
-
-/-- Some negative checks --/
-
-/^[\P{Xwd}]+/8
- !.+\x{019}\x{35a}AB
-
-/^[\p{^Xwd}]+/8
- !.+\x{019}\x{35a}AB
-
-/[\D]/WBZ8
- 1\x{3c8}2
-
-/[\d]/WBZ8
- >\x{6f4}<
-
-/[\S]/WBZ8
- \x{1680}\x{6f4}\x{1680}
-
-/[\s]/WBZ8
- >\x{1680}<
-
-/[\W]/WBZ8
- A\x{1712}B
-
-/[\w]/WBZ8
- >\x{1723}<
-
-/\D/WBZ8
- 1\x{3c8}2
-
-/\d/WBZ8
- >\x{6f4}<
-
-/\S/WBZ8
- \x{1680}\x{6f4}\x{1680}
-
-/\s/WBZ8
- >\x{1680}>
-
-/\W/WBZ8
- A\x{1712}B
-
-/\w/WBZ8
- >\x{1723}<
-
-/[[:alpha:]]/WBZ
-
-/[[:lower:]]/WBZ
-
-/[[:upper:]]/WBZ
-
-/[[:alnum:]]/WBZ
-
-/[[:ascii:]]/WBZ
-
-/[[:cntrl:]]/WBZ
-
-/[[:digit:]]/WBZ
-
-/[[:graph:]]/WBZ
-
-/[[:print:]]/WBZ
-
-/[[:punct:]]/WBZ
-
-/[[:space:]]/WBZ
-
-/[[:word:]]/WBZ
-
-/[[:xdigit:]]/WBZ
-
-/-- Unicode properties for \b abd \B --/
-
-/\b...\B/8W
- abc_
- \x{37e}abc\x{376}
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
-
-/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
-
-/\b...\B/8
- abc_
- ** Failers
- \x{37e}abc\x{376}
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
-
-/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
-
-/\b...\B/W
- abc_
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
-
-/-- Some of these are silly, but they check various combinations --/
-
-/[[:^alpha:][:^cntrl:]]+/8WBZ
- 123
- abc
-
-/[[:^cntrl:][:^alpha:]]+/8WBZ
- 123
- abc
-
-/[[:alpha:]]+/8WBZ
- abc
-
-/[[:^alpha:]\S]+/8WBZ
- 123
- abc
-
-/[^\d]+/8WBZ
- abc123
- abc\x{123}
- \x{660}abc
-
-/\p{Lu}+9\p{Lu}+B\p{Lu}+b/BZ
-
-/\p{^Lu}+9\p{^Lu}+B\p{^Lu}+b/BZ
-
-/\P{Lu}+9\P{Lu}+B\P{Lu}+b/BZ
-
-/\p{Han}+X\p{Greek}+\x{370}/BZ8
-
-/\p{Xan}+!\p{Xan}+A/BZ
-
-/\p{Xsp}+!\p{Xsp}\t/BZ
-
-/\p{Xps}+!\p{Xps}\t/BZ
-
-/\p{Xwd}+!\p{Xwd}_/BZ
-
-/A+\p{N}A+\dB+\p{N}*B+\d*/WBZ
-
-/-- These behaved oddly in Perl, so they are kept in this test --/
-
-/(\x{23a}\x{23a}\x{23a})?\1/8i
- \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
-
-/(ȺȺȺ)?\1/8i
- ȺȺȺⱥⱥ
-
-/(\x{23a}\x{23a}\x{23a})?\1/8i
- \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
-
-/(ȺȺȺ)?\1/8i
- ȺȺȺⱥⱥⱥ
-
-/(\x{23a}\x{23a}\x{23a})\1/8i
- \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
-
-/(ȺȺȺ)\1/8i
- ȺȺȺⱥⱥ
-
-/(\x{23a}\x{23a}\x{23a})\1/8i
- \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
-
-/(ȺȺȺ)\1/8i
- ȺȺȺⱥⱥⱥ
-
-/(\x{2c65}\x{2c65})\1/8i
- \x{2c65}\x{2c65}\x{23a}\x{23a}
-
-/(ⱥⱥ)\1/8i
- ⱥⱥȺȺ
-
-/(\x{23a}\x{23a}\x{23a})\1Y/8i
- X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
-
-/(\x{2c65}\x{2c65})\1Y/8i
- X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
-
-/-- --/
-
-/-- These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE --/
-
-/^[\p{Batak}]/8
- \x{1bc0}
- \x{1bff}
- ** Failers
- \x{1bf4}
-
-/^[\p{Brahmi}]/8
- \x{11000}
- \x{1106f}
- ** Failers
- \x{1104e}
-
-/^[\p{Mandaic}]/8
- \x{840}
- \x{85e}
- ** Failers
- \x{85c}
- \x{85d}
-
-/-- --/
-
-/(\X*)(.)/s8
- A\x{300}
-
-/^S(\X*)e(\X*)$/8
- Stéréo
-
-/^\X/8
- ́réo
-
-/^a\X41z/<JS>
- aX41z
- *** Failers
- aAz
-
-/(?<=ab\Cde)X/8
-
-/-- End of testinput7 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput8 b/src/third_party/pcre-8.30/testdata/testinput8
deleted file mode 100644
index 8859659606a..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput8
+++ /dev/null
@@ -1,4712 +0,0 @@
-/-- This set of tests check the DFA matching functionality of pcre_dfa_exec().
- The -dfa flag must be used with pcretest when running it. --/
-
-/abc/
- abc
-
-/ab*c/
- abc
- abbbbc
- ac
-
-/ab+c/
- abc
- abbbbbbc
- *** Failers
- ac
- ab
-
-/a*/
- a
- aaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
-
-/(a|abcd|african)/
- a
- abcd
- african
-
-/^abc/
- abcdef
- *** Failers
- xyzabc
- xyz\nabc
-
-/^abc/m
- abcdef
- xyz\nabc
- *** Failers
- xyzabc
-
-/\Aabc/
- abcdef
- *** Failers
- xyzabc
- xyz\nabc
-
-/\Aabc/m
- abcdef
- *** Failers
- xyzabc
- xyz\nabc
-
-/\Gabc/
- abcdef
- xyzabc\>3
- *** Failers
- xyzabc
- xyzabc\>2
-
-/x\dy\Dz/
- x9yzz
- x0y+z
- *** Failers
- xyz
- xxy0z
-
-/x\sy\Sz/
- x yzz
- x y+z
- *** Failers
- xyz
- xxyyz
-
-/x\wy\Wz/
- xxy+z
- *** Failers
- xxy0z
- x+y+z
-
-/x.y/
- x+y
- x-y
- *** Failers
- x\ny
-
-/x.y/s
- x+y
- x-y
- x\ny
-
-/(a.b(?s)c.d|x.y)p.q/
- a+bc+dp+q
- a+bc\ndp+q
- x\nyp+q
- *** Failers
- a\nbc\ndp+q
- a+bc\ndp\nq
- x\nyp\nq
-
-/a\d\z/
- ba0
- *** Failers
- ba0\n
- ba0\ncd
-
-/a\d\z/m
- ba0
- *** Failers
- ba0\n
- ba0\ncd
-
-/a\d\Z/
- ba0
- ba0\n
- *** Failers
- ba0\ncd
-
-/a\d\Z/m
- ba0
- ba0\n
- *** Failers
- ba0\ncd
-
-/a\d$/
- ba0
- ba0\n
- *** Failers
- ba0\ncd
-
-/a\d$/m
- ba0
- ba0\n
- ba0\ncd
- *** Failers
-
-/abc/i
- abc
- aBc
- ABC
-
-/[^a]/
- abcd
-
-/ab?\w/
- abz
- abbz
- azz
-
-/x{0,3}yz/
- ayzq
- axyzq
- axxyz
- axxxyzq
- axxxxyzq
- *** Failers
- ax
- axx
-
-/x{3}yz/
- axxxyzq
- axxxxyzq
- *** Failers
- ax
- axx
- ayzq
- axyzq
- axxyz
-
-/x{2,3}yz/
- axxyz
- axxxyzq
- axxxxyzq
- *** Failers
- ax
- axx
- ayzq
- axyzq
-
-/[^a]+/
- bac
- bcdefax
- *** Failers
- aaaaa
-
-/[^a]*/
- bac
- bcdefax
- *** Failers
- aaaaa
-
-/[^a]{3,5}/
- xyz
- awxyza
- abcdefa
- abcdefghijk
- *** Failers
- axya
- axa
- aaaaa
-
-/\d*/
- 1234b567
- xyz
-
-/\D*/
- a1234b567
- xyz
-
-/\d+/
- ab1234c56
- *** Failers
- xyz
-
-/\D+/
- ab123c56
- *** Failers
- 789
-
-/\d?A/
- 045ABC
- ABC
- *** Failers
- XYZ
-
-/\D?A/
- ABC
- BAC
- 9ABC
- *** Failers
-
-/a+/
- aaaa
-
-/^.*xyz/
- xyz
- ggggggggxyz
-
-/^.+xyz/
- abcdxyz
- axyz
- *** Failers
- xyz
-
-/^.?xyz/
- xyz
- cxyz
-
-/^\d{2,3}X/
- 12X
- 123X
- *** Failers
- X
- 1X
- 1234X
-
-/^[abcd]\d/
- a45
- b93
- c99z
- d04
- *** Failers
- e45
- abcd
- abcd1234
- 1234
-
-/^[abcd]*\d/
- a45
- b93
- c99z
- d04
- abcd1234
- 1234
- *** Failers
- e45
- abcd
-
-/^[abcd]+\d/
- a45
- b93
- c99z
- d04
- abcd1234
- *** Failers
- 1234
- e45
- abcd
-
-/^a+X/
- aX
- aaX
-
-/^[abcd]?\d/
- a45
- b93
- c99z
- d04
- 1234
- *** Failers
- abcd1234
- e45
-
-/^[abcd]{2,3}\d/
- ab45
- bcd93
- *** Failers
- 1234
- a36
- abcd1234
- ee45
-
-/^(abc)*\d/
- abc45
- abcabcabc45
- 42xyz
- *** Failers
-
-/^(abc)+\d/
- abc45
- abcabcabc45
- *** Failers
- 42xyz
-
-/^(abc)?\d/
- abc45
- 42xyz
- *** Failers
- abcabcabc45
-
-/^(abc){2,3}\d/
- abcabc45
- abcabcabc45
- *** Failers
- abcabcabcabc45
- abc45
- 42xyz
-
-/1(abc|xyz)2(?1)3/
- 1abc2abc3456
- 1abc2xyz3456
-
-/^(a*\w|ab)=(a*\w|ab)/
- ab=ab
-
-/^(a*\w|ab)=(?1)/
- ab=ab
-
-/^([^()]|\((?1)*\))*$/
- abc
- a(b)c
- a(b(c))d
- *** Failers)
- a(b(c)d
-
-/^>abc>([^()]|\((?1)*\))*<xyz<$/
- >abc>123<xyz<
- >abc>1(2)3<xyz<
- >abc>(1(2)3)<xyz<
-
-/^(?>a*)\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
- *** Failers
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
- <>
- <abcd>
- <abc <123> hij>
- <abc <def> hij>
- <abc<>def>
- <abc<>
- *** Failers
- <abc
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/^(?=abc)\w{5}:$/
- abcde:
- *** Failers
- abc..
- 123
- vwxyz
-
-/^(?!abc)\d\d$/
- 12
- *** Failers
- abcde:
- abc..
- 123
- vwxyz
-
-/(?<=abc|xy)123/
- abc12345
- wxy123z
- *** Failers
- 123abc
-
-/(?<!abc|xy)123/
- 123abc
- mno123456
- *** Failers
- abc12345
- wxy123z
-
-/abc(?C1)xyz/
- abcxyz
- 123abcxyz999
-
-/(ab|cd){3,4}/C
- ababab
- abcdabcd
- abcdcdcdcdcd
-
-/^abc/
- abcdef
- *** Failers
- abcdef\B
-
-/^(a*|xyz)/
- bcd
- aaabcd
- xyz
- xyz\N
- *** Failers
- bcd\N
-
-/xyz$/
- xyz
- xyz\n
- *** Failers
- xyz\Z
- xyz\n\Z
-
-/xyz$/m
- xyz
- xyz\n
- abcxyz\npqr
- abcxyz\npqr\Z
- xyz\n\Z
- *** Failers
- xyz\Z
-
-/\Gabc/
- abcdef
- defabcxyz\>3
- *** Failers
- defabcxyz
-
-/^abcdef/
- ab\P
- abcde\P
- abcdef\P
- *** Failers
- abx\P
-
-/^a{2,4}\d+z/
- a\P
- aa\P
- aa2\P
- aaa\P
- aaa23\P
- aaaa12345\P
- aa0z\P
- aaaa4444444444444z\P
- *** Failers
- az\P
- aaaaa\P
- a56\P
-
-/^abcdef/
- abc\P
- def\R
-
-/(?<=foo)bar/
- xyzfo\P
- foob\P\>2
- foobar...\R\P\>4
- xyzfo\P
- foobar\>2
- *** Failers
- xyzfo\P
- obar\R
-
-/(ab*(cd|ef))+X/
- adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
- lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
- cdabbbbbbbb\P\R\B\Z
- efabbbbbbbbbbbbbbbb\P\R\B\Z
- bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
-
-/(a|b)/SF>testsavedregex
-<testsavedregex
- abc
- ** Failers
- def
-
-/the quick brown fox/
- the quick brown fox
- The quick brown FOX
- What do you know about the quick brown fox?
- What do you know about THE QUICK BROWN FOX?
-
-/The quick brown fox/i
- the quick brown fox
- The quick brown FOX
- What do you know about the quick brown fox?
- What do you know about THE QUICK BROWN FOX?
-
-/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
- abcd\t\n\r\f\a\e9;\$\\?caxyz
-
-/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
- abxyzpqrrrabbxyyyypqAzz
- abxyzpqrrrabbxyyyypqAzz
- aabxyzpqrrrabbxyyyypqAzz
- aaabxyzpqrrrabbxyyyypqAzz
- aaaabxyzpqrrrabbxyyyypqAzz
- abcxyzpqrrrabbxyyyypqAzz
- aabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypAzz
- aaabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqAzz
- aaabcxyzpqrrrabbxyyyypqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- aaaabcxyzpqrrrabbxyyyypqAzz
- abxyzzpqrrrabbxyyyypqAzz
- aabxyzzzpqrrrabbxyyyypqAzz
- aaabxyzzzzpqrrrabbxyyyypqAzz
- aaaabxyzzzzpqrrrabbxyyyypqAzz
- abcxyzzpqrrrabbxyyyypqAzz
- aabcxyzzzpqrrrabbxyyyypqAzz
- aaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- aaabcxyzpqrrrabbxyyyypABzz
- aaabcxyzpqrrrabbxyyyypABBzz
- >>>aaabxyzpqrrrabbxyyyypqAzz
- >aaaabxyzpqrrrabbxyyyypqAzz
- >>>>abcxyzpqrrrabbxyyyypqAzz
- *** Failers
- abxyzpqrrabbxyyyypqAzz
- abxyzpqrrrrabbxyyyypqAzz
- abxyzpqrrrabxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
-
-/^(abc){1,2}zz/
- abczz
- abcabczz
- *** Failers
- zz
- abcabcabczz
- >>abczz
-
-/^(b+?|a){1,2}?c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- *** Failers
- aaac
- abbbbbbbbbbbac
-
-/^(b+|a){1,2}c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- *** Failers
- aaac
- abbbbbbbbbbbac
-
-/^(b+|a){1,2}?bc/
- bbc
-
-/^(b*|ba){1,2}?bc/
- babc
- bbabc
- bababc
- *** Failers
- bababbc
- babababc
-
-/^(ba|b*){1,2}?bc/
- babc
- bbabc
- bababc
- *** Failers
- bababbc
- babababc
-
-/^\ca\cA\c[\c{\c:/
- \x01\x01\e;z
-
-/^[ab\]cde]/
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
- *** Failers
- fthing
- [thing
- \\thing
-
-/^[]cde]/
- ]thing
- cthing
- dthing
- ething
- *** Failers
- athing
- fthing
-
-/^[^ab\]cde]/
- fthing
- [thing
- \\thing
- *** Failers
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
-
-/^[^]cde]/
- athing
- fthing
- *** Failers
- ]thing
- cthing
- dthing
- ething
-
-/^\/
-
-
-/^/
-
-
-/^[0-9]+$/
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 100
- *** Failers
- abc
-
-/^.*nter/
- enter
- inter
- uponter
-
-/^xxx[0-9]+$/
- xxx0
- xxx1234
- *** Failers
- xxx
-
-/^.+[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- *** Failers
- 123
- x1234
-
-/^.+?[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- *** Failers
- 123
- x1234
-
-/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
- abc!pqr=apquxz.ixr.zzz.ac.uk
- *** Failers
- !pqr=apquxz.ixr.zzz.ac.uk
- abc!=apquxz.ixr.zzz.ac.uk
- abc!pqr=apquxz:ixr.zzz.ac.uk
- abc!pqr=apquxz.ixr.zzz.ac.ukk
-
-/:/
- Well, we need a colon: somewhere
- *** Fail if we don't
-
-/([\da-f:]+)$/i
- 0abc
- abc
- fed
- E
- ::
- 5f03:12C0::932e
- fed def
- Any old stuff
- *** Failers
- 0zzz
- gzzz
- fed\x20
- Any old rubbish
-
-/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
- .1.2.3
- A.12.123.0
- *** Failers
- .1.2.3333
- 1.2.3
- 1234.2.3
-
-/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- 1 IN SOA non-sp1 non-sp2 (
- *** Failers
- 1IN SOA non-sp1 non-sp2(
-
-/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
- a.
- Z.
- 2.
- ab-c.pq-r.
- sxk.zzz.ac.uk.
- x-.y-.
- *** Failers
- -abc.peq.
-
-/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
- *.a
- *.b0-a
- *.c3-b.c
- *.c-a.b-c
- *** Failers
- *.0
- *.a-
- *.a-b.c-
- *.c-a.0-c
-
-/^(?=ab(de))(abd)(e)/
- abde
-
-/^(?!(ab)de|x)(abd)(f)/
- abdf
-
-/^(?=(ab(cd)))(ab)/
- abcd
-
-/^[\da-f](\.[\da-f])*$/i
- a.b.c.d
- A.B.C.D
- a.b.c.1.2.3.C
-
-/^\".*\"\s*(;.*)?$/
- \"1234\"
- \"abcd\" ;
- \"\" ; rhubarb
- *** Failers
- \"1234\" : things
-
-/^$/
- \
- *** Failers
-
-/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
- ab c
- *** Failers
- abc
- ab cde
-
-/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
- ab c
- *** Failers
- abc
- ab cde
-
-/^ a\ b[c ]d $/x
- a bcd
- a b d
- *** Failers
- abcd
- ab d
-
-/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
- abcdefhijklm
-
-/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
- abcdefhijklm
-
-/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
- a+ Z0+\x08\n\x1d\x12
-
-/^[.^$|()*+?{,}]+/
- .^\$(*+)|{?,?}
-
-/^a*\w/
- z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
-
-/^a*?\w/
- z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
-
-/^a+\w/
- az
- aaaz
- aa
- aaaa
- aa+
-
-/^a+?\w/
- az
- aaaz
- aa
- aaaa
- aa+
-
-/^\d{8}\w{2,}/
- 1234567890
- 12345678ab
- 12345678__
- *** Failers
- 1234567
-
-/^[aeiou\d]{4,5}$/
- uoie
- 1234
- 12345
- aaaaa
- *** Failers
- 123456
-
-/^[aeiou\d]{4,5}?/
- uoie
- 1234
- 12345
- aaaaa
- 123456
-
-/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
- From abcd Mon Sep 01 12:33:02 1997
-
-/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
- From abcd Mon Sep 01 12:33:02 1997
- From abcd Mon Sep 1 12:33:02 1997
- *** Failers
- From abcd Sep 01 12:33:02 1997
-
-/^12.34/s
- 12\n34
- 12\r34
-
-/\w+(?=\t)/
- the quick brown\t fox
-
-/foo(?!bar)(.*)/
- foobar is foolish see?
-
-/(?:(?!foo)...|^.{0,2})bar(.*)/
- foobar crowbar etc
- barrel
- 2barrel
- A barrel
-
-/^(\D*)(?=\d)(?!123)/
- abc456
- *** Failers
- abc123
-
-/^1234(?# test newlines
- inside)/
- 1234
-
-/^1234 #comment in extended re
- /x
- 1234
-
-/#rhubarb
- abcd/x
- abcd
-
-/^abcd#rhubarb/x
- abcd
-
-/(?!^)abc/
- the abc
- *** Failers
- abc
-
-/(?=^)abc/
- abc
- *** Failers
- the abc
-
-/^[ab]{1,3}(ab*|b)/
- aabbbbb
-
-/^[ab]{1,3}?(ab*|b)/
- aabbbbb
-
-/^[ab]{1,3}?(ab*?|b)/
- aabbbbb
-
-/^[ab]{1,3}(ab*?|b)/
- aabbbbb
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- *** Failers
- The quick brown fox
-
-/[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional leading comment
-(?:
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-# leading word
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
-(?:
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-|
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-) # "special" comment or quoted string
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
-)*
-<
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# <
-(?:
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-(?: ,
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-)* # additional domains
-:
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address spec
-> # >
-# name and address
-)
-/x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- *** Failers
- The quick brown fox
-
-/abc\0def\00pqr\000xyz\0000AB/
- abc\0def\00pqr\000xyz\0000AB
- abc456 abc\0def\00pqr\000xyz\0000ABCDE
-
-/abc\x0def\x00pqr\x000xyz\x0000AB/
- abc\x0def\x00pqr\x000xyz\x0000AB
- abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
-
-/^[\000-\037]/
- \0A
- \01B
- \037C
-
-/\0*/
- \0\0\0\0
-
-/A\x0{2,3}Z/
- The A\x0\x0Z
- An A\0\x0\0Z
- *** Failers
- A\0Z
- A\0\x0\0\x0Z
-
-/^\s/
- \040abc
- \x0cabc
- \nabc
- \rabc
- \tabc
- *** Failers
- abc
-
-/^a b
- c/x
- abc
-
-/ab{1,3}bc/
- abbbbc
- abbbc
- abbc
- *** Failers
- abc
- abbbbbc
-
-/([^.]*)\.([^:]*):[T ]+(.*)/
- track1.title:TBlah blah blah
-
-/([^.]*)\.([^:]*):[T ]+(.*)/i
- track1.title:TBlah blah blah
-
-/([^.]*)\.([^:]*):[t ]+(.*)/i
- track1.title:TBlah blah blah
-
-/^[W-c]+$/
- WXY_^abc
- *** Failers
- wxy
-
-/^[W-c]+$/i
- WXY_^abc
- wxy_^ABC
-
-/^[\x3f-\x5F]+$/i
- WXY_^abc
- wxy_^ABC
-
-/^abc$/m
- abc
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
-/^abc$/
- abc
- *** Failers
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
-/\Aabc\Z/m
- abc
- abc\n
- *** Failers
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
-/\A(.)*\Z/s
- abc\ndef
-
-/\A(.)*\Z/m
- *** Failers
- abc\ndef
-
-/(?:b)|(?::+)/
- b::c
- c::b
-
-/[-az]+/
- az-
- *** Failers
- b
-
-/[az-]+/
- za-
- *** Failers
- b
-
-/[a\-z]+/
- a-z
- *** Failers
- b
-
-/[a-z]+/
- abcdxyz
-
-/[\d-]+/
- 12-34
- *** Failers
- aaa
-
-/[\d-z]+/
- 12-34z
- *** Failers
- aaa
-
-/\x5c/
- \\
-
-/\x20Z/
- the Zoo
- *** Failers
- Zulu
-
-/ab{3cd/
- ab{3cd
-
-/ab{3,cd/
- ab{3,cd
-
-/ab{3,4a}cd/
- ab{3,4a}cd
-
-/{4,5a}bc/
- {4,5a}bc
-
-/^a.b/<lf>
- a\rb
- *** Failers
- a\nb
-
-/abc$/
- abc
- abc\n
- *** Failers
- abc\ndef
-
-/(abc)\123/
- abc\x53
-
-/(abc)\223/
- abc\x93
-
-/(abc)\323/
- abc\xd3
-
-/(abc)\100/
- abc\x40
- abc\100
-
-/(abc)\1000/
- abc\x400
- abc\x40\x30
- abc\1000
- abc\100\x30
- abc\100\060
- abc\100\60
-
-/abc\81/
- abc\081
- abc\0\x38\x31
-
-/abc\91/
- abc\091
- abc\0\x39\x31
-
-/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
- abcdefghijk\12S
-
-/ab\idef/
- abidef
-
-/a{0}bc/
- bc
-
-/(a|(bc)){0,0}?xyz/
- xyz
-
-/abc[\10]de/
- abc\010de
-
-/abc[\1]de/
- abc\1de
-
-/(abc)[\1]de/
- abc\1de
-
-/(?s)a.b/
- a\nb
-
-/^([^a])([^\b])([^c]*)([^d]{3,4})/
- baNOTccccd
- baNOTcccd
- baNOTccd
- bacccd
- *** Failers
- anything
- b\bc
- baccd
-
-/[^a]/
- Abc
-
-/[^a]/i
- Abc
-
-/[^a]+/
- AAAaAbc
-
-/[^a]+/i
- AAAaAbc
-
-/[^a]+/
- bbb\nccc
-
-/[^k]$/
- abc
- *** Failers
- abk
-
-/[^k]{2,3}$/
- abc
- kbc
- kabc
- *** Failers
- abk
- akb
- akk
-
-/^\d{8,}\@.+[^k]$/
- 12345678\@a.b.c.d
- 123456789\@x.y.z
- *** Failers
- 12345678\@x.y.uk
- 1234567\@a.b.c.d
-
-/[^a]/
- aaaabcd
- aaAabcd
-
-/[^a]/i
- aaaabcd
- aaAabcd
-
-/[^az]/
- aaaabcd
- aaAabcd
-
-/[^az]/i
- aaaabcd
- aaAabcd
-
-/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
- \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
-
-/P[^*]TAIRE[^*]{1,6}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
-
-/P[^*]TAIRE[^*]{1,}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
-
-/(\.\d\d[1-9]?)\d+/
- 1.230003938
- 1.875000282
- 1.235
-
-/(\.\d\d((?=0)|\d(?=\d)))/
- 1.230003938
- 1.875000282
- *** Failers
- 1.235
-
-/a(?)b/
- ab
-
-/\b(foo)\s+(\w+)/i
- Food is on the foo table
-
-/foo(.*)bar/
- The food is under the bar in the barn.
-
-/foo(.*?)bar/
- The food is under the bar in the barn.
-
-/(.*)(\d*)/
- I have 2 numbers: 53147
-
-/(.*)(\d+)/
- I have 2 numbers: 53147
-
-/(.*?)(\d*)/
- I have 2 numbers: 53147
-
-/(.*?)(\d+)/
- I have 2 numbers: 53147
-
-/(.*)(\d+)$/
- I have 2 numbers: 53147
-
-/(.*?)(\d+)$/
- I have 2 numbers: 53147
-
-/(.*)\b(\d+)$/
- I have 2 numbers: 53147
-
-/(.*\D)(\d+)$/
- I have 2 numbers: 53147
-
-/^\D*(?!123)/
- ABC123
-
-/^(\D*)(?=\d)(?!123)/
- ABC445
- *** Failers
- ABC123
-
-/^[W-]46]/
- W46]789
- -46]789
- *** Failers
- Wall
- Zebra
- 42
- [abcd]
- ]abcd[
-
-/^[W-\]46]/
- W46]789
- Wall
- Zebra
- Xylophone
- 42
- [abcd]
- ]abcd[
- \\backslash
- *** Failers
- -46]789
- well
-
-/\d\d\/\d\d\/\d\d\d\d/
- 01/01/2000
-
-/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-
-/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-
-/^(a){0,0}/
- bcd
- abc
- aab
-
-/^(a){0,1}/
- bcd
- abc
- aab
-
-/^(a){0,2}/
- bcd
- abc
- aab
-
-/^(a){0,3}/
- bcd
- abc
- aab
- aaa
-
-/^(a){0,}/
- bcd
- abc
- aab
- aaa
- aaaaaaaa
-
-/^(a){1,1}/
- bcd
- abc
- aab
-
-/^(a){1,2}/
- bcd
- abc
- aab
-
-/^(a){1,3}/
- bcd
- abc
- aab
- aaa
-
-/^(a){1,}/
- bcd
- abc
- aab
- aaa
- aaaaaaaa
-
-/.*\.gif/
- borfle\nbib.gif\nno
-
-/.{0,}\.gif/
- borfle\nbib.gif\nno
-
-/.*\.gif/m
- borfle\nbib.gif\nno
-
-/.*\.gif/s
- borfle\nbib.gif\nno
-
-/.*\.gif/ms
- borfle\nbib.gif\nno
-
-/.*$/
- borfle\nbib.gif\nno
-
-/.*$/m
- borfle\nbib.gif\nno
-
-/.*$/s
- borfle\nbib.gif\nno
-
-/.*$/ms
- borfle\nbib.gif\nno
-
-/.*$/
- borfle\nbib.gif\nno\n
-
-/.*$/m
- borfle\nbib.gif\nno\n
-
-/.*$/s
- borfle\nbib.gif\nno\n
-
-/.*$/ms
- borfle\nbib.gif\nno\n
-
-/(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/(.*X|^B)/m
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
-
-/(.*X|^B)/s
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/(.*X|^B)/ms
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
-
-/(?s)(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/(?s:.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/^.*B/
- **** Failers
- abc\nB
-
-/(?s)^.*B/
- abc\nB
-
-/(?m)^.*B/
- abc\nB
-
-/(?ms)^.*B/
- abc\nB
-
-/(?ms)^B/
- abc\nB
-
-/(?s)B$/
- B\n
-
-/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
- 123456654321
-
-/^\d\d\d\d\d\d\d\d\d\d\d\d/
- 123456654321
-
-/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
- 123456654321
-
-/^[abc]{12}/
- abcabcabcabc
-
-/^[a-c]{12}/
- abcabcabcabc
-
-/^(a|b|c){12}/
- abcabcabcabc
-
-/^[abcdefghijklmnopqrstuvwxy0123456789]/
- n
- *** Failers
- z
-
-/abcde{0,0}/
- abcd
- *** Failers
- abce
-
-/ab[cd]{0,0}e/
- abe
- *** Failers
- abcde
-
-/ab(c){0,0}d/
- abd
- *** Failers
- abcd
-
-/a(b*)/
- a
- ab
- abbbb
- *** Failers
- bbbbb
-
-/ab\d{0}e/
- abe
- *** Failers
- ab1e
-
-/"([^\\"]+|\\.)*"/
- the \"quick\" brown fox
- \"the \\\"quick\\\" brown fox\"
-
-/.*?/g+
- abc
-
-/\b/g+
- abc
-
-/\b/+g
- abc
-
-//g
- abc
-
-/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
- <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
-
-/a[^a]b/
- acb
- a\nb
-
-/a.b/
- acb
- *** Failers
- a\nb
-
-/a[^a]b/s
- acb
- a\nb
-
-/a.b/s
- acb
- a\nb
-
-/^(b+?|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
-
-/^(b+|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
-
-/(?!\A)x/m
- x\nb\n
- a\bx\n
-
-/\x0{ab}/
- \0{ab}
-
-/(A|B)*?CD/
- CD
-
-/(A|B)*CD/
- CD
-
-/(?<!bar)foo/
- foo
- catfood
- arfootle
- rfoosh
- *** Failers
- barfoo
- towbarfoo
-
-/\w{3}(?<!bar)foo/
- catfood
- *** Failers
- foo
- barfoo
- towbarfoo
-
-/(?<=(foo)a)bar/
- fooabar
- *** Failers
- bar
- foobbar
-
-/\Aabc\z/m
- abc
- *** Failers
- abc\n
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
-
-/(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 1.875000282
- *** Failers
- 1.235
-
-/^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- *** Failers
- this is not a line with only words and spaces!
-
-/(\d+)(\w)/
- 12345a
- 12345+
-
-/((?>\d+))(\w)/
- 12345a
- *** Failers
- 12345+
-
-/(?>a+)b/
- aaab
-
-/((?>a+)b)/
- aaab
-
-/(?>(a+))b/
- aaab
-
-/(?>b)+/
- aaabbbccc
-
-/(?>a+|b+|c+)*c/
- aaabbbbccccd
-
-/(a+|b+|c+)*c/
- aaabbbbccccd
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
-
-/\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- (abc(def)xyz)
- *** Failers
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/a(?-i)b/i
- ab
- Ab
- *** Failers
- aB
- AB
-
-/(a (?x)b c)d e/
- a bcd e
- *** Failers
- a b cd e
- abcd e
- a bcde
-
-/(a b(?x)c d (?-x)e f)/
- a bcde f
- *** Failers
- abcdef
-
-/(a(?i)b)c/
- abc
- aBc
- *** Failers
- abC
- aBC
- Abc
- ABc
- ABC
- AbC
-
-/a(?i:b)c/
- abc
- aBc
- *** Failers
- ABC
- abC
- aBC
-
-/a(?i:b)*c/
- aBc
- aBBc
- *** Failers
- aBC
- aBBC
-
-/a(?=b(?i)c)\w\wd/
- abcd
- abCd
- *** Failers
- aBCd
- abcD
-
-/(?s-i:more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
-
-/(?:(?s-i)more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
-
-/(?>a(?i)b+)+c/
- abc
- aBbc
- aBBc
- *** Failers
- Abc
- abAb
- abbC
-
-/(?=a(?i)b)\w\wc/
- abc
- aBc
- *** Failers
- Ab
- abC
- aBC
-
-/(?<=a(?i)b)(\w\w)c/
- abxxc
- aBxxc
- *** Failers
- Abxxc
- ABxxc
- abxxC
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/(?(?<=foo)bar|cat)/
- foobar
- cat
- fcat
- focat
- *** Failers
- foocat
-
-/(?(?<!foo)cat|bar)/
- foobar
- cat
- fcat
- focat
- *** Failers
- foocat
-
-/(?>a*)*/
- a
- aa
- aaaa
-
-/(abc|)+/
- abc
- abcabc
- abcabcabc
- xyz
-
-/([a]*)*/
- a
- aaaaa
-
-/([ab]*)*/
- a
- b
- ababab
- aaaabcde
- bbbb
-
-/([^a]*)*/
- b
- bbbb
- aaa
-
-/([^ab]*)*/
- cccc
- abab
-
-/([a]*?)*/
- a
- aaaa
-
-/([ab]*?)*/
- a
- b
- abab
- baba
-
-/([^a]*?)*/
- b
- bbbb
- aaa
-
-/([^ab]*?)*/
- c
- cccc
- baba
-
-/(?>a*)*/
- a
- aaabcde
-
-/((?>a*))*/
- aaaaa
- aabbaa
-
-/((?>a*?))*/
- aaaaa
- aabbaa
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 12-09-98
- *** Failers
- sep-12-98
-
-/(?i:saturday|sunday)/
- saturday
- sunday
- Saturday
- Sunday
- SATURDAY
- SUNDAY
- SunDay
-
-/(a(?i)bc|BB)x/
- abcx
- aBCx
- bbx
- BBx
- *** Failers
- abcX
- aBCX
- bbX
- BBX
-
-/^([ab](?i)[cd]|[ef])/
- ac
- aC
- bD
- elephant
- Europe
- frog
- France
- *** Failers
- Africa
-
-/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- aBd
- xy
- xY
- zebra
- Zambesi
- *** Failers
- aCD
- XY
-
-/(?<=foo\n)^bar/m
- foo\nbar
- *** Failers
- bar
- baz\nbar
-
-/(?<=(?<!foo)bar)baz/
- barbaz
- barbarbaz
- koobarbaz
- *** Failers
- baz
- foobarbaz
-
-/The following tests are taken from the Perl 5.005 test suite; some of them/
-/are compatible with 5.004, but I'd rather not have to sort them out./
-
-/abc/
- abc
- xabcy
- ababc
- *** Failers
- xbc
- axc
- abx
-
-/ab*c/
- abc
-
-/ab*bc/
- abc
- abbc
- abbbbc
-
-/.{1}/
- abbbbc
-
-/.{3,4}/
- abbbbc
-
-/ab{0,}bc/
- abbbbc
-
-/ab+bc/
- abbc
- *** Failers
- abc
- abq
-
-/ab+bc/
- abbbbc
-
-/ab{1,}bc/
- abbbbc
-
-/ab{1,3}bc/
- abbbbc
-
-/ab{3,4}bc/
- abbbbc
-
-/ab{4,5}bc/
- *** Failers
- abq
- abbbbc
-
-/ab?bc/
- abbc
- abc
-
-/ab{0,1}bc/
- abc
-
-/ab?bc/
-
-/ab?c/
- abc
-
-/ab{0,1}c/
- abc
-
-/^abc$/
- abc
- *** Failers
- abbbbc
- abcc
-
-/^abc/
- abcc
-
-/^abc$/
-
-/abc$/
- aabc
- *** Failers
- aabc
- aabcd
-
-/^/
- abc
-
-/$/
- abc
-
-/a.c/
- abc
- axc
-
-/a.*c/
- axyzc
-
-/a[bc]d/
- abd
- *** Failers
- axyzd
- abc
-
-/a[b-d]e/
- ace
-
-/a[b-d]/
- aac
-
-/a[-b]/
- a-
-
-/a[b-]/
- a-
-
-/a]/
- a]
-
-/a[]]b/
- a]b
-
-/a[^bc]d/
- aed
- *** Failers
- abd
- abd
-
-/a[^-b]c/
- adc
-
-/a[^]b]c/
- adc
- *** Failers
- a-c
- a]c
-
-/\ba\b/
- a-
- -a
- -a-
-
-/\by\b/
- *** Failers
- xy
- yz
- xyz
-
-/\Ba\B/
- *** Failers
- a-
- -a
- -a-
-
-/\By\b/
- xy
-
-/\by\B/
- yz
-
-/\By\B/
- xyz
-
-/\w/
- a
-
-/\W/
- -
- *** Failers
- -
- a
-
-/a\sb/
- a b
-
-/a\Sb/
- a-b
- *** Failers
- a-b
- a b
-
-/\d/
- 1
-
-/\D/
- -
- *** Failers
- -
- 1
-
-/[\w]/
- a
-
-/[\W]/
- -
- *** Failers
- -
- a
-
-/a[\s]b/
- a b
-
-/a[\S]b/
- a-b
- *** Failers
- a-b
- a b
-
-/[\d]/
- 1
-
-/[\D]/
- -
- *** Failers
- -
- 1
-
-/ab|cd/
- abc
- abcd
-
-/()ef/
- def
-
-/$b/
-
-/a\(b/
- a(b
-
-/a\(*b/
- ab
- a((b
-
-/a\\b/
- a\b
-
-/((a))/
- abc
-
-/(a)b(c)/
- abc
-
-/a+b+c/
- aabbabc
-
-/a{1,}b{1,}c/
- aabbabc
-
-/a.+?c/
- abcabc
-
-/(a+|b)*/
- ab
-
-/(a+|b){0,}/
- ab
-
-/(a+|b)+/
- ab
-
-/(a+|b){1,}/
- ab
-
-/(a+|b)?/
- ab
-
-/(a+|b){0,1}/
- ab
-
-/[^ab]*/
- cde
-
-/abc/
- *** Failers
- b
-
-
-/a*/
-
-
-/([abc])*d/
- abbbcd
-
-/([abc])*bcd/
- abcd
-
-/a|b|c|d|e/
- e
-
-/(a|b|c|d|e)f/
- ef
-
-/abcd*efg/
- abcdefg
-
-/ab*/
- xabyabbbz
- xayabbbz
-
-/(ab|cd)e/
- abcde
-
-/[abhgefdc]ij/
- hij
-
-/^(ab|cd)e/
-
-/(abc|)ef/
- abcdef
-
-/(a|b)c*d/
- abcd
-
-/(ab|ab*)bc/
- abc
-
-/a([bc]*)c*/
- abc
-
-/a([bc]*)(c*d)/
- abcd
-
-/a([bc]+)(c*d)/
- abcd
-
-/a([bc]*)(c+d)/
- abcd
-
-/a[bcd]*dcdcde/
- adcdcde
-
-/a[bcd]+dcdcde/
- *** Failers
- abcde
- adcdcde
-
-/(ab|a)b*c/
- abc
-
-/((a)(b)c)(d)/
- abcd
-
-/[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
-
-/^a(bc+|b[eh])g|.h$/
- abh
-
-/(bc+d$|ef*g.|h?i(j|k))/
- effgz
- ij
- reffgz
- *** Failers
- effg
- bcdd
-
-/((((((((((a))))))))))/
- a
-
-/(((((((((a)))))))))/
- a
-
-/multiple words of text/
- *** Failers
- aa
- uh-uh
-
-/multiple words/
- multiple words, yeah
-
-/(.*)c(.*)/
- abcde
-
-/\((.*), (.*)\)/
- (a, b)
-
-/[k]/
-
-/abcd/
- abcd
-
-/a(bc)d/
- abcd
-
-/a[-]?c/
- ac
-
-/abc/i
- ABC
- XABCY
- ABABC
- *** Failers
- aaxabxbaxbbx
- XBC
- AXC
- ABX
-
-/ab*c/i
- ABC
-
-/ab*bc/i
- ABC
- ABBC
-
-/ab*?bc/i
- ABBBBC
-
-/ab{0,}?bc/i
- ABBBBC
-
-/ab+?bc/i
- ABBC
-
-/ab+bc/i
- *** Failers
- ABC
- ABQ
-
-/ab{1,}bc/i
-
-/ab+bc/i
- ABBBBC
-
-/ab{1,}?bc/i
- ABBBBC
-
-/ab{1,3}?bc/i
- ABBBBC
-
-/ab{3,4}?bc/i
- ABBBBC
-
-/ab{4,5}?bc/i
- *** Failers
- ABQ
- ABBBBC
-
-/ab??bc/i
- ABBC
- ABC
-
-/ab{0,1}?bc/i
- ABC
-
-/ab??bc/i
-
-/ab??c/i
- ABC
-
-/ab{0,1}?c/i
- ABC
-
-/^abc$/i
- ABC
- *** Failers
- ABBBBC
- ABCC
-
-/^abc/i
- ABCC
-
-/^abc$/i
-
-/abc$/i
- AABC
-
-/^/i
- ABC
-
-/$/i
- ABC
-
-/a.c/i
- ABC
- AXC
-
-/a.*?c/i
- AXYZC
-
-/a.*c/i
- *** Failers
- AABC
- AXYZD
-
-/a[bc]d/i
- ABD
-
-/a[b-d]e/i
- ACE
- *** Failers
- ABC
- ABD
-
-/a[b-d]/i
- AAC
-
-/a[-b]/i
- A-
-
-/a[b-]/i
- A-
-
-/a]/i
- A]
-
-/a[]]b/i
- A]B
-
-/a[^bc]d/i
- AED
-
-/a[^-b]c/i
- ADC
- *** Failers
- ABD
- A-C
-
-/a[^]b]c/i
- ADC
-
-/ab|cd/i
- ABC
- ABCD
-
-/()ef/i
- DEF
-
-/$b/i
- *** Failers
- A]C
- B
-
-/a\(b/i
- A(B
-
-/a\(*b/i
- AB
- A((B
-
-/a\\b/i
- A\B
-
-/((a))/i
- ABC
-
-/(a)b(c)/i
- ABC
-
-/a+b+c/i
- AABBABC
-
-/a{1,}b{1,}c/i
- AABBABC
-
-/a.+?c/i
- ABCABC
-
-/a.*?c/i
- ABCABC
-
-/a.{0,5}?c/i
- ABCABC
-
-/(a+|b)*/i
- AB
-
-/(a+|b){0,}/i
- AB
-
-/(a+|b)+/i
- AB
-
-/(a+|b){1,}/i
- AB
-
-/(a+|b)?/i
- AB
-
-/(a+|b){0,1}/i
- AB
-
-/(a+|b){0,1}?/i
- AB
-
-/[^ab]*/i
- CDE
-
-/abc/i
-
-/a*/i
-
-
-/([abc])*d/i
- ABBBCD
-
-/([abc])*bcd/i
- ABCD
-
-/a|b|c|d|e/i
- E
-
-/(a|b|c|d|e)f/i
- EF
-
-/abcd*efg/i
- ABCDEFG
-
-/ab*/i
- XABYABBBZ
- XAYABBBZ
-
-/(ab|cd)e/i
- ABCDE
-
-/[abhgefdc]ij/i
- HIJ
-
-/^(ab|cd)e/i
- ABCDE
-
-/(abc|)ef/i
- ABCDEF
-
-/(a|b)c*d/i
- ABCD
-
-/(ab|ab*)bc/i
- ABC
-
-/a([bc]*)c*/i
- ABC
-
-/a([bc]*)(c*d)/i
- ABCD
-
-/a([bc]+)(c*d)/i
- ABCD
-
-/a([bc]*)(c+d)/i
- ABCD
-
-/a[bcd]*dcdcde/i
- ADCDCDE
-
-/a[bcd]+dcdcde/i
-
-/(ab|a)b*c/i
- ABC
-
-/((a)(b)c)(d)/i
- ABCD
-
-/[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
-
-/^a(bc+|b[eh])g|.h$/i
- ABH
-
-/(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- IJ
- REFFGZ
- *** Failers
- ADCDCDE
- EFFG
- BCDD
-
-/((((((((((a))))))))))/i
- A
-
-/(((((((((a)))))))))/i
- A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
-
-/multiple words of text/i
- *** Failers
- AA
- UH-UH
-
-/multiple words/i
- MULTIPLE WORDS, YEAH
-
-/(.*)c(.*)/i
- ABCDE
-
-/\((.*), (.*)\)/i
- (A, B)
-
-/[k]/i
-
-/abcd/i
- ABCD
-
-/a(bc)d/i
- ABCD
-
-/a[-]?c/i
- AC
-
-/a(?!b)./
- abad
-
-/a(?=d)./
- abad
-
-/a(?=c|d)./
- abad
-
-/a(?:b|c|d)(.)/
- ace
-
-/a(?:b|c|d)*(.)/
- ace
-
-/a(?:b|c|d)+?(.)/
- ace
- acdbcdbe
-
-/a(?:b|c|d)+(.)/
- acdbcdbe
-
-/a(?:b|c|d){2}(.)/
- acdbcdbe
-
-/a(?:b|c|d){4,5}(.)/
- acdbcdbe
-
-/a(?:b|c|d){4,5}?(.)/
- acdbcdbe
-
-/((foo)|(bar))*/
- foobar
-
-/a(?:b|c|d){6,7}(.)/
- acdbcdbe
-
-/a(?:b|c|d){6,7}?(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,6}(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,6}?(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,7}(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,7}?(.)/
- acdbcdbe
-
-/a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
-
-/^(.+)?B/
- AB
-
-/^([^a-z])|(\^)$/
- .
-
-/^[<>]&/
- <&OUT
-
-/(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
-
-/(?<=a)b/
- ab
- *** Failers
- cb
- b
-
-/(?<!c)b/
- ab
- b
- b
-
-/(?:..)*a/
- aba
-
-/(?:..)*?a/
- aba
-
-/^(){3,5}/
- abc
-
-/^(a+)*ax/
- aax
-
-/^((a|b)+)*ax/
- aax
-
-/^((a|bc)+)*ax/
- aax
-
-/(a|x)*ab/
- cab
-
-/(a)*ab/
- cab
-
-/(?:(?i)a)b/
- ab
-
-/((?i)a)b/
- ab
-
-/(?:(?i)a)b/
- Ab
-
-/((?i)a)b/
- Ab
-
-/(?:(?i)a)b/
- *** Failers
- cb
- aB
-
-/((?i)a)b/
-
-/(?i:a)b/
- ab
-
-/((?i:a))b/
- ab
-
-/(?i:a)b/
- Ab
-
-/((?i:a))b/
- Ab
-
-/(?i:a)b/
- *** Failers
- aB
- aB
-
-/((?i:a))b/
-
-/(?:(?-i)a)b/i
- ab
-
-/((?-i)a)b/i
- ab
-
-/(?:(?-i)a)b/i
- aB
-
-/((?-i)a)b/i
- aB
-
-/(?:(?-i)a)b/i
- *** Failers
- aB
- Ab
-
-/((?-i)a)b/i
-
-/(?:(?-i)a)b/i
- aB
-
-/((?-i)a)b/i
- aB
-
-/(?:(?-i)a)b/i
- *** Failers
- Ab
- AB
-
-/((?-i)a)b/i
-
-/(?-i:a)b/i
- ab
-
-/((?-i:a))b/i
- ab
-
-/(?-i:a)b/i
- aB
-
-/((?-i:a))b/i
- aB
-
-/(?-i:a)b/i
- *** Failers
- AB
- Ab
-
-/((?-i:a))b/i
-
-/(?-i:a)b/i
- aB
-
-/((?-i:a))b/i
- aB
-
-/(?-i:a)b/i
- *** Failers
- Ab
- AB
-
-/((?-i:a))b/i
-
-/((?-i:a.))b/i
- *** Failers
- AB
- a\nB
-
-/((?s-i:a.))b/i
- a\nB
-
-/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-
-/foo\w*\d{4}baz/
- foobar1234baz
-
-/x(~~)*(?:(?:F)?)?/
- x~~
-
-/^a(?#xxx){3}c/
- aaac
-
-/^a (?#xxx) (?#yyy) {3}c/x
- aaac
-
-/(?<![cd])b/
- *** Failers
- B\nB
- dbcb
-
-/(?<![cd])[ab]/
- dbaacb
-
-/(?<!(c|d))b/
-
-/(?<!(c|d))[ab]/
- dbaacb
-
-/(?<!cd)[ab]/
- cdaccb
-
-/^(?:a?b?)*$/
- *** Failers
- dbcb
- a--
-
-/((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
-
-/((?m)^b$)/
- a\nb\nc\n
-
-/(?m)^b/
- a\nb\n
-
-/(?m)^(b)/
- a\nb\n
-
-/((?m)^b)/
- a\nb\n
-
-/\n((?m)^b)/
- a\nb\n
-
-/((?s).)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
-
-/((?s)b.)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
-
-/^b/
-
-/()^b/
- *** Failers
- a\nb\nc\n
- a\nb\nc\n
-
-/((?m)^b)/
- a\nb\nc\n
-
-/(?(?!a)a|b)/
-
-/(?(?!a)b|a)/
- a
-
-/(?(?=a)b|a)/
- *** Failers
- a
- a
-
-/(?(?=a)a|b)/
- a
-
-/(\w+:)+/
- one:
-
-/$(?<=^(a))/
- a
-
-/([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
-
-/^[^bcd]*(c+)/
- aexycd
-
-/(a*)b+/
- caab
-
-/([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
- *** Failers
- abcd:
- abcd:
-
-/^[^bcd]*(c+)/
- aexycd
-
-/(>a+)ab/
-
-/(?>a+)b/
- aaab
-
-/([[:]+)/
- a:[b]:
-
-/([[=]+)/
- a=[b]=
-
-/([[.]+)/
- a.[b].
-
-/((?>a+)b)/
- aaab
-
-/(?>(a+))b/
- aaab
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
-
-/a\Z/
- *** Failers
- aaab
- a\nb\n
-
-/b\Z/
- a\nb\n
-
-/b\z/
-
-/b\Z/
- a\nb
-
-/b\z/
- a\nb
- *** Failers
-
-/(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- endingwxyz
- *** Failers
- a rather long string that doesn't end with one of them
-
-/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-
-/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-
-/(?<=\d{3}(?!999))foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
-
-/(?<=(?!...999)\d{3})foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
-
-/(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
-
-/(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
-
-/((Z)+|A)*/
- ZABCDEFG
-
-/(Z()|A)*/
- ZABCDEFG
-
-/(Z(())|A)*/
- ZABCDEFG
-
-/((?>Z)+|A)*/
- ZABCDEFG
-
-/((?>)+|A)*/
- ZABCDEFG
-
-/a*/g
- abbab
-
-/^[a-\d]/
- abcde
- -things
- 0digit
- *** Failers
- bcdef
-
-/^[\d-a]/
- abcde
- -things
- 0digit
- *** Failers
- bcdef
-
-/[[:space:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/[[:blank:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/[\s]+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/\s+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/a b/x
- ab
-
-/(?!\A)x/m
- a\nxb\n
-
-/(?!^)x/m
- a\nxb\n
-
-/abc\Qabc\Eabc/
- abcabcabc
-
-/abc\Q(*+|\Eabc/
- abc(*+|abc
-
-/ abc\Q abc\Eabc/x
- abc abcabc
- *** Failers
- abcabcabc
-
-/abc#comment
- \Q#not comment
- literal\E/x
- abc#not comment\n literal
-
-/abc#comment
- \Q#not comment
- literal/x
- abc#not comment\n literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment
- /x
- abc#not comment\n literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment/x
- abc#not comment\n literal
-
-/\Qabc\$xyz\E/
- abc\\\$xyz
-
-/\Qabc\E\$\Qxyz\E/
- abc\$xyz
-
-/\Gabc/
- abc
- *** Failers
- xyzabc
-
-/\Gabc./g
- abc1abc2xyzabc3
-
-/abc./g
- abc1abc2xyzabc3
-
-/a(?x: b c )d/
- XabcdY
- *** Failers
- Xa b c d Y
-
-/((?x)x y z | a b c)/
- XabcY
- AxyzB
-
-/(?i)AB(?-i)C/
- XabCY
- *** Failers
- XabcY
-
-/((?i)AB(?-i)C|D)E/
- abCE
- DE
- *** Failers
- abcE
- abCe
- dE
- De
-
-/[z\Qa-d]\E]/
- z
- a
- -
- d
- ]
- *** Failers
- b
-
-/[\z\C]/
- z
- C
-
-/\M/
- M
-
-/(a+)*b/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/(?i)reg(?:ul(?:[a]|ae)r|ex)/
- REGular
- regulaer
- Regex
- regulr
-
-/[--]+/
-
-
-
-
-
-/(?<=Z)X./
- \x84XAZXB
-
-/^(?(2)a|(1)(2))+$/
- 123a
-
-/(?<=a|bbbb)c/
- ac
- bbbbc
-
-/abc/SS>testsavedregex
-<testsavedregex
- abc
- *** Failers
- bca
-
-/abc/FSS>testsavedregex
-<testsavedregex
- abc
- *** Failers
- bca
-
-/(a|b)/S>testsavedregex
-<testsavedregex
- abc
- *** Failers
- def
-
-/(a|b)/SF>testsavedregex
-<testsavedregex
- abc
- *** Failers
- def
-
-/line\nbreak/
- this is a line\nbreak
- line one\nthis is a line\nbreak in the second line
-
-/line\nbreak/f
- this is a line\nbreak
- ** Failers
- line one\nthis is a line\nbreak in the second line
-
-/line\nbreak/mf
- this is a line\nbreak
- ** Failers
- line one\nthis is a line\nbreak in the second line
-
-/1234/
- 123\P
- a4\P\R
-
-/1234/
- 123\P
- 4\P\R
-
-/^/mg
- a\nb\nc\n
- \
-
-/(?<=C\n)^/mg
- A\nC\nC\n
-
-/(?s)A?B/
- AB
- aB
-
-/(?s)A*B/
- AB
- aB
-
-/(?m)A?B/
- AB
- aB
-
-/(?m)A*B/
- AB
- aB
-
-/Content-Type\x3A[^\r\n]{6,}/
- Content-Type:xxxxxyyy
-
-/Content-Type\x3A[^\r\n]{6,}z/
- Content-Type:xxxxxyyyz
-
-/Content-Type\x3A[^a]{6,}/
- Content-Type:xxxyyy
-
-/Content-Type\x3A[^a]{6,}z/
- Content-Type:xxxyyyz
-
-/^abc/m
- xyz\nabc
- xyz\nabc\<lf>
- xyz\r\nabc\<lf>
- xyz\rabc\<cr>
- xyz\r\nabc\<crlf>
- ** Failers
- xyz\nabc\<cr>
- xyz\r\nabc\<cr>
- xyz\nabc\<crlf>
- xyz\rabc\<crlf>
- xyz\rabc\<lf>
-
-/abc$/m<lf>
- xyzabc
- xyzabc\n
- xyzabc\npqr
- xyzabc\r\<cr>
- xyzabc\rpqr\<cr>
- xyzabc\r\n\<crlf>
- xyzabc\r\npqr\<crlf>
- ** Failers
- xyzabc\r
- xyzabc\rpqr
- xyzabc\r\n
- xyzabc\r\npqr
-
-/^abc/m<cr>
- xyz\rabcdef
- xyz\nabcdef\<lf>
- ** Failers
- xyz\nabcdef
-
-/^abc/m<lf>
- xyz\nabcdef
- xyz\rabcdef\<cr>
- ** Failers
- xyz\rabcdef
-
-/^abc/m<crlf>
- xyz\r\nabcdef
- xyz\rabcdef\<cr>
- ** Failers
- xyz\rabcdef
-
-/.*/<lf>
- abc\ndef
- abc\rdef
- abc\r\ndef
- \<cr>abc\ndef
- \<cr>abc\rdef
- \<cr>abc\r\ndef
- \<crlf>abc\ndef
- \<crlf>abc\rdef
- \<crlf>abc\r\ndef
-
-/\w+(.)(.)?def/s
- abc\ndef
- abc\rdef
- abc\r\ndef
-
-/^\w+=.*(\\\n.*)*/
- abc=xyz\\\npqr
-
-/^(a()*)*/
- aaaa
-
-/^(?:a(?:(?:))*)*/
- aaaa
-
-/^(a()+)+/
- aaaa
-
-/^(?:a(?:(?:))+)+/
- aaaa
-
-/(a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?>a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?:a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/^a.b/<lf>
- a\rb
- a\nb\<cr>
- ** Failers
- a\nb
- a\nb\<any>
- a\rb\<cr>
- a\rb\<any>
-
-/^abc./mgx<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
-
-/abc.$/mgx<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
-
-/^a\Rb/<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- ** Failers
- a\n\rb
-
-/^a\R*b/<bsr_unicode>
- ab
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- a\n\rb
- a\n\r\x85\x0cb
-
-/^a\R+b/<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- a\n\rb
- a\n\r\x85\x0cb
- ** Failers
- ab
-
-/^a\R{1,3}b/<bsr_unicode>
- a\nb
- a\n\rb
- a\n\r\x85b
- a\r\n\r\nb
- a\r\n\r\n\r\nb
- a\n\r\n\rb
- a\n\n\r\nb
- ** Failers
- a\n\n\n\rb
- a\r
-
-/^a[\R]b/<bsr_unicode>
- aRb
- ** Failers
- a\nb
-
-/.+foo/
- afoo
- ** Failers
- \r\nfoo
- \nfoo
-
-/.+foo/<crlf>
- afoo
- \nfoo
- ** Failers
- \r\nfoo
-
-/.+foo/<any>
- afoo
- ** Failers
- \nfoo
- \r\nfoo
-
-/.+foo/s
- afoo
- \r\nfoo
- \nfoo
-
-/^$/mg<any>
- abc\r\rxyz
- abc\n\rxyz
- ** Failers
- abc\r\nxyz
-
-/^X/m
- XABC
- ** Failers
- XABC\B
-
-/(?m)^$/<any>g+
- abc\r\n\r\n
-
-/(?m)^$|^\r\n/<any>g+
- abc\r\n\r\n
-
-/(?m)$/<any>g+
- abc\r\n\r\n
-
-/(?|(abc)|(xyz))/
- >abc<
- >xyz<
-
-/(x)(?|(abc)|(xyz))(x)/
- xabcx
- xxyzx
-
-/(x)(?|(abc)(pqr)|(xyz))(x)/
- xabcpqrx
- xxyzx
-
-/(?|(abc)|(xyz))(?1)/
- abcabc
- xyzabc
- ** Failers
- xyzxyz
-
-/\H\h\V\v/
- X X\x0a
- X\x09X\x0b
- ** Failers
- \xa0 X\x0a
-
-/\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c
- ** Failers
- \x09\x20\xa0\x0a\x0b
-
-/\H{3,4}/
- XY ABCDE
- XY PQR ST
-
-/.\h{3,4}./
- XY AB PQRS
-
-/\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- > X NYQZ
- ** Failers
- >XYZ
- > X NY Z
-
-/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
-
-/.+A/<crlf>
- \r\nA
-
-/\nA/<crlf>
- \r\nA
-
-/[\r\n]A/<crlf>
- \r\nA
-
-/(\r|\n)A/<crlf>
- \r\nA
-
-/a\Rb/I<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
- ** Failers
- a\x85b
- a\x0bb
-
-/a\Rb/I<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x85b
- a\x0bb
- ** Failers
- a\x85b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
-
-/a\R?b/I<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
- ** Failers
- a\x85b
- a\x0bb
-
-/a\R?b/I<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x85b
- a\x0bb
- ** Failers
- a\x85b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
-
-/a\R{2,4}b/I<bsr_anycrlf>
- a\r\n\nb
- a\n\r\rb
- a\r\n\r\n\r\n\r\nb
- ** Failers
- a\x85\85b
- a\x0b\0bb
-
-/a\R{2,4}b/I<bsr_unicode>
- a\r\rb
- a\n\n\nb
- a\r\n\n\r\rb
- a\x85\85b
- a\x0b\0bb
- ** Failers
- a\r\r\r\r\rb
- a\x85\85b\<bsr_anycrlf>
- a\x0b\0bb\<bsr_anycrlf>
-
-/a(?!)|\wbc/
- abc
-
-/a[]b/<JS>
- ** Failers
- ab
-
-/a[]+b/<JS>
- ** Failers
- ab
-
-/a[]*+b/<JS>
- ** Failers
- ab
-
-/a[^]b/<JS>
- aXb
- a\nb
- ** Failers
- ab
-
-/a[^]+b/<JS>
- aXb
- a\nX\nXb
- ** Failers
- ab
-
-/X$/E
- X
- ** Failers
- X\n
-
-/X$/
- X
- X\n
-
-/xyz/C
- xyz
- abcxyz
- abcxyz\Y
- ** Failers
- abc
- abc\Y
- abcxypqr
- abcxypqr\Y
-
-/(*NO_START_OPT)xyz/C
- abcxyz
-
-/(?C)ab/
- ab
- \C-ab
-
-/ab/C
- ab
- \C-ab
-
-/^"((?(?=[a])[^"])|b)*"$/C
- "ab"
- \C-"ab"
-
-/\d+X|9+Y/
- ++++123999\P
- ++++123999Y\P
-
-/Z(*F)/
- Z\P
- ZA\P
-
-/Z(?!)/
- Z\P
- ZA\P
-
-/dog(sbody)?/
- dogs\P
- dogs\P\P
-
-/dog(sbody)??/
- dogs\P
- dogs\P\P
-
-/dog|dogsbody/
- dogs\P
- dogs\P\P
-
-/dogsbody|dog/
- dogs\P
- dogs\P\P
-
-/Z(*F)Q|ZXY/
- Z\P
- ZA\P
- X\P
-
-/\bthe cat\b/
- the cat\P
- the cat\P\P
-
-/dog(sbody)?/
- dogs\D\P
- body\D\R
-
-/dog(sbody)?/
- dogs\D\P\P
- body\D\R
-
-/abc/
- abc\P
- abc\P\P
-
-/abc\K123/
- xyzabc123pqr
-
-/(?<=abc)123/
- xyzabc123pqr
- xyzabc12\P
- xyzabc12\P\P
-
-/\babc\b/
- +++abc+++
- +++ab\P
- +++ab\P\P
-
-/(?=C)/g+
- ABCDECBA
-
-/(abc|def|xyz)/I
- terhjk;abcdaadsfe
- the quick xyz brown fox
- \Yterhjk;abcdaadsfe
- \Ythe quick xyz brown fox
- ** Failers
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
- \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-
-/(abc|def|xyz)/SI
- terhjk;abcdaadsfe
- the quick xyz brown fox
- \Yterhjk;abcdaadsfe
- \Ythe quick xyz brown fox
- ** Failers
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
- \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-
-/abcd*/+
- xxxxabcd\P
- xxxxabcd\P\P
- dddxxx\R
- xxxxabcd\P\P
- xxx\R
-
-/abcd*/i
- xxxxabcd\P
- xxxxabcd\P\P
- XXXXABCD\P
- XXXXABCD\P\P
-
-/abc\d*/
- xxxxabc1\P
- xxxxabc1\P\P
-
-/abc[de]*/
- xxxxabcde\P
- xxxxabcde\P\P
-
-/(?:(?1)|B)(A(*F)|C)/
- ABCD
- CCD
- ** Failers
- CAD
-
-/^(?:(?1)|B)(A(*F)|C)/
- CCD
- BCD
- ** Failers
- ABCD
- CAD
- BAD
-
-/^(?!a(*SKIP)b)/
- ac
-
-/^(?=a(*SKIP)b|ac)/
- ** Failers
- ac
-
-/^(?=a(*THEN)b|ac)/
- ac
-
-/^(?=a(*PRUNE)b)/
- ab
- ** Failers
- ac
-
-/^(?(?!a(*SKIP)b))/
- ac
-
-/(?<=abc)def/
- abc\P\P
-
-/abc$/
- abc
- abc\P
- abc\P\P
-
-/abc$/m
- abc
- abc\n
- abc\P\P
- abc\n\P\P
- abc\P
- abc\n\P
-
-/abc\z/
- abc
- abc\P
- abc\P\P
-
-/abc\Z/
- abc
- abc\P
- abc\P\P
-
-/abc\b/
- abc
- abc\P
- abc\P\P
-
-/abc\B/
- abc
- abc\P
- abc\P\P
-
-/.+/
- abc\>0
- abc\>1
- abc\>2
- abc\>3
- abc\>4
- abc\>-4
-
-/^(?:a)++\w/
- aaaab
- ** Failers
- aaaa
- bbb
-
-/^(?:aa|(?:a)++\w)/
- aaaab
- aaaa
- ** Failers
- bbb
-
-/^(?:a)*+\w/
- aaaab
- bbb
- ** Failers
- aaaa
-
-/^(a)++\w/
- aaaab
- ** Failers
- aaaa
- bbb
-
-/^(a|)++\w/
- aaaab
- ** Failers
- aaaa
- bbb
-
-/(?=abc){3}abc/+
- abcabcabc
- ** Failers
- xyz
-
-/(?=abc)+abc/+
- abcabcabc
- ** Failers
- xyz
-
-/(?=abc)++abc/+
- abcabcabc
- ** Failers
- xyz
-
-/(?=abc){0}xyz/
- xyz
-
-/(?=abc){1}xyz/
- ** Failers
- xyz
-
-/(?=(a))?./
- ab
- bc
-
-/(?=(a))??./
- ab
- bc
-
-/^(?=(a)){0}b(?1)/
- backgammon
-
-/^(?=(?1))?[az]([abc])d/
- abd
- zcdxx
-
-/^(?!a){0}\w+/
- aaaaa
-
-/(?<=(abc))?xyz/
- abcxyz
- pqrxyz
-
-/((?2))((?1))/
- abc
-
-/(?(R)a+|(?R)b)/
- aaaabcde
-
-/(?(R)a+|((?R))b)/
- aaaabcde
-
-/((?(R)a+|(?1)b))/
- aaaabcde
-
-/((?(R2)a+|(?1)b))/
- aaaabcde
-
-/(?(R)a*(?1)|((?R))b)/
- aaaabcde
-
-/(a+)/
- \O6aaaa
- \O8aaaa
-
-/ab\Cde/
- abXde
-
-/(?<=ab\Cde)X/
- abZdeX
-
-/-- End of testinput8 --/
diff --git a/src/third_party/pcre-8.30/testdata/testinput9 b/src/third_party/pcre-8.30/testdata/testinput9
deleted file mode 100644
index 8476e2e5404..00000000000
--- a/src/third_party/pcre-8.30/testdata/testinput9
+++ /dev/null
@@ -1,691 +0,0 @@
-/-- This set of tests checks UTF-8 support with the DFA matching functionality
- of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running
- it. --/
-
-/\x{100}ab/8
- \x{100}ab
-
-/a\x{100}*b/8
- ab
- a\x{100}b
- a\x{100}\x{100}b
-
-/a\x{100}+b/8
- a\x{100}b
- a\x{100}\x{100}b
- *** Failers
- ab
-
-/\bX/8
- Xoanon
- +Xoanon
- \x{300}Xoanon
- *** Failers
- YXoanon
-
-/\BX/8
- YXoanon
- *** Failers
- Xoanon
- +Xoanon
- \x{300}Xoanon
-
-/X\b/8
- X+oanon
- ZX\x{300}oanon
- FAX
- *** Failers
- Xoanon
-
-/X\B/8
- Xoanon
- *** Failers
- X+oanon
- ZX\x{300}oanon
- FAX
-
-/[^a]/8
- abcd
- a\x{100}
-
-/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
- ab99
- \x{123}\x{123}45
- \x{400}\x{401}\x{402}6
- *** Failers
- d99
- \x{123}\x{122}4
- \x{400}\x{403}6
- \x{400}\x{401}\x{402}\x{402}6
-
-/a.b/8
- acb
- a\x7fb
- a\x{100}b
- *** Failers
- a\nb
-
-/a(.{3})b/8
- a\x{4000}xyb
- a\x{4000}\x7fyb
- a\x{4000}\x{100}yb
- *** Failers
- a\x{4000}b
- ac\ncb
-
-/a(.*?)(.)/
- a\xc0\x88b
-
-/a(.*?)(.)/8
- a\x{100}b
-
-/a(.*)(.)/
- a\xc0\x88b
-
-/a(.*)(.)/8
- a\x{100}b
-
-/a(.)(.)/
- a\xc0\x92bcd
-
-/a(.)(.)/8
- a\x{240}bcd
-
-/a(.?)(.)/
- a\xc0\x92bcd
-
-/a(.?)(.)/8
- a\x{240}bcd
-
-/a(.??)(.)/
- a\xc0\x92bcd
-
-/a(.??)(.)/8
- a\x{240}bcd
-
-/a(.{3})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- *** Failers
- a\x{1234}b
- ac\ncb
-
-/a(.{3,})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- *** Failers
- a\x{1234}b
-
-/a(.{3,}?)b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- *** Failers
- a\x{1234}b
-
-/a(.{3,5})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- axxxxxbcdefghijb
- *** Failers
- a\x{1234}b
- axxxxxxbcdefghijb
-
-/a(.{3,5}?)b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- axxxxxbcdefghijb
- *** Failers
- a\x{1234}b
- axxxxxxbcdefghijb
-
-/^[a\x{c0}]/8
- *** Failers
- \x{100}
-
-/(?<=aXb)cd/8
- aXbcd
-
-/(?<=a\x{100}b)cd/8
- a\x{100}bcd
-
-/(?<=a\x{100000}b)cd/8
- a\x{100000}bcd
-
-/(?:\x{100}){3}b/8
- \x{100}\x{100}\x{100}b
- *** Failers
- \x{100}\x{100}b
-
-/\x{ab}/8
- \x{ab}
- \xc2\xab
- *** Failers
- \x00{ab}
-
-/(?<=(.))X/8
- WXYZ
- \x{256}XYZ
- *** Failers
- XYZ
-
-/[^a]+/8g
- bcd
- \x{100}aY\x{256}Z
-
-/^[^a]{2}/8
- \x{100}bc
-
-/^[^a]{2,}/8
- \x{100}bcAa
-
-/^[^a]{2,}?/8
- \x{100}bca
-
-/[^a]+/8ig
- bcd
- \x{100}aY\x{256}Z
-
-/^[^a]{2}/8i
- \x{100}bc
-
-/^[^a]{2,}/8i
- \x{100}bcAa
-
-/^[^a]{2,}?/8i
- \x{100}bca
-
-/\x{100}{0,0}/8
- abcd
-
-/\x{100}?/8
- abcd
- \x{100}\x{100}
-
-/\x{100}{0,3}/8
- \x{100}\x{100}
- \x{100}\x{100}\x{100}\x{100}
-
-/\x{100}*/8
- abce
- \x{100}\x{100}\x{100}\x{100}
-
-/\x{100}{1,1}/8
- abcd\x{100}\x{100}\x{100}\x{100}
-
-/\x{100}{1,3}/8
- abcd\x{100}\x{100}\x{100}\x{100}
-
-/\x{100}+/8
- abcd\x{100}\x{100}\x{100}\x{100}
-
-/\x{100}{3}/8
- abcd\x{100}\x{100}\x{100}XX
-
-/\x{100}{3,5}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
-
-/\x{100}{3,}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
-
-/(?<=a\x{100}{2}b)X/8
- Xyyya\x{100}\x{100}bXzzz
-
-/\D*/8
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\D*/8
- \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-
-/\D/8
- 1X2
- 1\x{100}2
-
-/>\S/8
- > >X Y
- > >\x{100} Y
-
-/\d/8
- \x{100}3
-
-/\s/8
- \x{100} X
-
-/\D+/8
- 12abcd34
- *** Failers
- 1234
-
-/\D{2,3}/8
- 12abcd34
- 12ab34
- *** Failers
- 1234
- 12a34
-
-/\D{2,3}?/8
- 12abcd34
- 12ab34
- *** Failers
- 1234
- 12a34
-
-/\d+/8
- 12abcd34
- *** Failers
-
-/\d{2,3}/8
- 12abcd34
- 1234abcd
- *** Failers
- 1.4
-
-/\d{2,3}?/8
- 12abcd34
- 1234abcd
- *** Failers
- 1.4
-
-/\S+/8
- 12abcd34
- *** Failers
- \ \
-
-/\S{2,3}/8
- 12abcd34
- 1234abcd
- *** Failers
- \ \
-
-/\S{2,3}?/8
- 12abcd34
- 1234abcd
- *** Failers
- \ \
-
-/>\s+</8
- 12> <34
- *** Failers
-
-/>\s{2,3}</8
- ab> <cd
- ab> <ce
- *** Failers
- ab> <cd
-
-/>\s{2,3}?</8
- ab> <cd
- ab> <ce
- *** Failers
- ab> <cd
-
-/\w+/8
- 12 34
- *** Failers
- +++=*!
-
-/\w{2,3}/8
- ab cd
- abcd ce
- *** Failers
- a.b.c
-
-/\w{2,3}?/8
- ab cd
- abcd ce
- *** Failers
- a.b.c
-
-/\W+/8
- 12====34
- *** Failers
- abcd
-
-/\W{2,3}/8
- ab====cd
- ab==cd
- *** Failers
- a.b.c
-
-/\W{2,3}?/8
- ab====cd
- ab==cd
- *** Failers
- a.b.c
-
-/[\x{100}]/8
- \x{100}
- Z\x{100}
- \x{100}Z
- *** Failers
-
-/[Z\x{100}]/8
- Z\x{100}
- \x{100}
- \x{100}Z
- *** Failers
-
-/[\x{100}\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- *** Failers
-
-/[\x{100}-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- *** Failers
-
-/[z-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- abzcd
- ab|cd
- *** Failers
-
-/[Q\x{100}\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- Q?
- *** Failers
-
-/[Q\x{100}-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- Q?
- *** Failers
-
-/[Qz-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- abzcd
- ab|cd
- Q?
- *** Failers
-
-/[\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/[\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/[Q\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/[Q\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/(?<=[\x{100}\x{200}])X/8
- abc\x{200}X
- abc\x{100}X
- *** Failers
- X
-
-/(?<=[Q\x{100}\x{200}])X/8
- abc\x{200}X
- abc\x{100}X
- abQX
- *** Failers
- X
-
-/(?<=[\x{100}\x{200}]{3})X/8
- abc\x{100}\x{200}\x{100}X
- *** Failers
- abc\x{200}X
- X
-
-/[^\x{100}\x{200}]X/8
- AX
- \x{150}X
- \x{500}X
- *** Failers
- \x{100}X
- \x{200}X
-
-/[^Q\x{100}\x{200}]X/8
- AX
- \x{150}X
- \x{500}X
- *** Failers
- \x{100}X
- \x{200}X
- QX
-
-/[^\x{100}-\x{200}]X/8
- AX
- \x{500}X
- *** Failers
- \x{100}X
- \x{150}X
- \x{200}X
-
-/[z-\x{100}]/8i
- z
- Z
- \x{100}
- *** Failers
- \x{102}
- y
-
-/[\xFF]/
- >\xff<
-
-/[\xff]/8
- >\x{ff}<
-
-/[^\xFF]/
- XYZ
-
-/[^\xff]/8
- XYZ
- \x{123}
-
-/^[ac]*b/8
- xb
-
-/^[ac\x{100}]*b/8
- xb
-
-/^[^x]*b/8i
- xb
-
-/^[^x]*b/8
- xb
-
-/^\d*b/8
- xb
-
-/(|a)/g8
- catac
- a\x{256}a
-
-/^\x{85}$/8i
- \x{85}
-
-/^abc./mgx8<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
-
-/abc.$/mgx8<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
-
-/^a\Rb/8<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x{85}b
- a\x{2028}b
- a\x{2029}b
- ** Failers
- a\n\rb
-
-/^a\R*b/8<bsr_unicode>
- ab
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0c\x{2028}\x{2029}b
- a\x{85}b
- a\n\rb
- a\n\r\x{85}\x0cb
-
-/^a\R+b/8<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0c\x{2028}\x{2029}b
- a\x{85}b
- a\n\rb
- a\n\r\x{85}\x0cb
- ** Failers
- ab
-
-/^a\R{1,3}b/8<bsr_unicode>
- a\nb
- a\n\rb
- a\n\r\x{85}b
- a\r\n\r\nb
- a\r\n\r\n\r\nb
- a\n\r\n\rb
- a\n\n\r\nb
- ** Failers
- a\n\n\n\rb
- a\r
-
-/\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
-
-/\V?\v{3,4}/8
- \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
-
-/\h+\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
-
-/\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
-
-/\H\h\V\v/8
- X X\x0a
- X\x09X\x0b
- ** Failers
- \x{a0} X\x0a
-
-/\H*\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
- \x09\x20\x{a0}\x0a\x0b\x0c
- ** Failers
- \x09\x20\x{a0}\x0a\x0b
-
-/\H\h\V\v/8
- \x{3001}\x{3000}\x{2030}\x{2028}
- X\x{180e}X\x{85}
- ** Failers
- \x{2009} X\x0a
-
-/\H*\h+\V?\v{3,4}/8
- \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
- \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
- \x09\x20\x{202f}\x0a\x0b\x0c
- ** Failers
- \x09\x{200a}\x{a0}\x{2028}\x0b
-
-/a\Rb/I8<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
- ** Failers
- a\x{85}b
- a\x0bb
-
-/a\Rb/I8<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x{85}b
- a\x0bb
- ** Failers
- a\x{85}b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
-
-/a\R?b/I8<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
- ** Failers
- a\x{85}b
- a\x0bb
-
-/a\R?b/I8<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x{85}b
- a\x0bb
- ** Failers
- a\x{85}b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
-
-/X/8f<any>
- A\x{1ec5}ABCXYZ
-
-/abcd*/8
- xxxxabcd\P
- xxxxabcd\P\P
-
-/abcd*/i8
- xxxxabcd\P
- xxxxabcd\P\P
- XXXXABCD\P
- XXXXABCD\P\P
-
-/abc\d*/8
- xxxxabc1\P
- xxxxabc1\P\P
-
-/abc[de]*/8
- xxxxabcde\P
- xxxxabcde\P\P
-
-/\bthe cat\b/8
- the cat\P
- the cat\P\P
-
-/ab\Cde/8
- abXde
-
-/(?<=ab\Cde)X/8
-
-/-- End of testinput9 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput1 b/src/third_party/pcre-8.30/testdata/testoutput1
deleted file mode 100644
index 4893e698793..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput1
+++ /dev/null
@@ -1,8718 +0,0 @@
-/-- This set of tests is for features that are compatible with all versions of
- Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and
- 16-bit PCRE libraries. --/
-
-/the quick brown fox/
- the quick brown fox
- 0: the quick brown fox
- The quick brown FOX
-No match
- What do you know about the quick brown fox?
- 0: the quick brown fox
- What do you know about THE QUICK BROWN FOX?
-No match
-
-/The quick brown fox/i
- the quick brown fox
- 0: the quick brown fox
- The quick brown FOX
- 0: The quick brown FOX
- What do you know about the quick brown fox?
- 0: the quick brown fox
- What do you know about THE QUICK BROWN FOX?
- 0: THE QUICK BROWN FOX
-
-/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
- abcd\t\n\r\f\a\e9;\$\\?caxyz
- 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
-
-/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
- abxyzpqrrrabbxyyyypqAzz
- 0: abxyzpqrrrabbxyyyypqAzz
- abxyzpqrrrabbxyyyypqAzz
- 0: abxyzpqrrrabbxyyyypqAzz
- aabxyzpqrrrabbxyyyypqAzz
- 0: aabxyzpqrrrabbxyyyypqAzz
- aaabxyzpqrrrabbxyyyypqAzz
- 0: aaabxyzpqrrrabbxyyyypqAzz
- aaaabxyzpqrrrabbxyyyypqAzz
- 0: aaaabxyzpqrrrabbxyyyypqAzz
- abcxyzpqrrrabbxyyyypqAzz
- 0: abcxyzpqrrrabbxyyyypqAzz
- aabcxyzpqrrrabbxyyyypqAzz
- 0: aabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypAzz
- 0: aaabcxyzpqrrrabbxyyyypAzz
- aaabcxyzpqrrrabbxyyyypqAzz
- 0: aaabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqAzz
- aaabcxyzpqrrrabbxyyyypqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- aaaabcxyzpqrrrabbxyyyypqAzz
- 0: aaaabcxyzpqrrrabbxyyyypqAzz
- abxyzzpqrrrabbxyyyypqAzz
- 0: abxyzzpqrrrabbxyyyypqAzz
- aabxyzzzpqrrrabbxyyyypqAzz
- 0: aabxyzzzpqrrrabbxyyyypqAzz
- aaabxyzzzzpqrrrabbxyyyypqAzz
- 0: aaabxyzzzzpqrrrabbxyyyypqAzz
- aaaabxyzzzzpqrrrabbxyyyypqAzz
- 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
- abcxyzzpqrrrabbxyyyypqAzz
- 0: abcxyzzpqrrrabbxyyyypqAzz
- aabcxyzzzpqrrrabbxyyyypqAzz
- 0: aabcxyzzzpqrrrabbxyyyypqAzz
- aaabcxyzzzzpqrrrabbxyyyypqAzz
- 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbxyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- aaabcxyzpqrrrabbxyyyypABzz
- 0: aaabcxyzpqrrrabbxyyyypABzz
- aaabcxyzpqrrrabbxyyyypABBzz
- 0: aaabcxyzpqrrrabbxyyyypABBzz
- >>>aaabxyzpqrrrabbxyyyypqAzz
- 0: aaabxyzpqrrrabbxyyyypqAzz
- >aaaabxyzpqrrrabbxyyyypqAzz
- 0: aaaabxyzpqrrrabbxyyyypqAzz
- >>>>abcxyzpqrrrabbxyyyypqAzz
- 0: abcxyzpqrrrabbxyyyypqAzz
- *** Failers
-No match
- abxyzpqrrabbxyyyypqAzz
-No match
- abxyzpqrrrrabbxyyyypqAzz
-No match
- abxyzpqrrrabxyyyypqAzz
-No match
- aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
-No match
- aaaabcxyzzzzpqrrrabbbxyyypqAzz
-No match
- aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
-No match
-
-/^(abc){1,2}zz/
- abczz
- 0: abczz
- 1: abc
- abcabczz
- 0: abcabczz
- 1: abc
- *** Failers
-No match
- zz
-No match
- abcabcabczz
-No match
- >>abczz
-No match
-
-/^(b+?|a){1,2}?c/
- bc
- 0: bc
- 1: b
- bbc
- 0: bbc
- 1: b
- bbbc
- 0: bbbc
- 1: bb
- bac
- 0: bac
- 1: a
- bbac
- 0: bbac
- 1: a
- aac
- 0: aac
- 1: a
- abbbbbbbbbbbc
- 0: abbbbbbbbbbbc
- 1: bbbbbbbbbbb
- bbbbbbbbbbbac
- 0: bbbbbbbbbbbac
- 1: a
- *** Failers
-No match
- aaac
-No match
- abbbbbbbbbbbac
-No match
-
-/^(b+|a){1,2}c/
- bc
- 0: bc
- 1: b
- bbc
- 0: bbc
- 1: bb
- bbbc
- 0: bbbc
- 1: bbb
- bac
- 0: bac
- 1: a
- bbac
- 0: bbac
- 1: a
- aac
- 0: aac
- 1: a
- abbbbbbbbbbbc
- 0: abbbbbbbbbbbc
- 1: bbbbbbbbbbb
- bbbbbbbbbbbac
- 0: bbbbbbbbbbbac
- 1: a
- *** Failers
-No match
- aaac
-No match
- abbbbbbbbbbbac
-No match
-
-/^(b+|a){1,2}?bc/
- bbc
- 0: bbc
- 1: b
-
-/^(b*|ba){1,2}?bc/
- babc
- 0: babc
- 1: ba
- bbabc
- 0: bbabc
- 1: ba
- bababc
- 0: bababc
- 1: ba
- *** Failers
-No match
- bababbc
-No match
- babababc
-No match
-
-/^(ba|b*){1,2}?bc/
- babc
- 0: babc
- 1: ba
- bbabc
- 0: bbabc
- 1: ba
- bababc
- 0: bababc
- 1: ba
- *** Failers
-No match
- bababbc
-No match
- babababc
-No match
-
-/^\ca\cA\c[\c{\c:/
- \x01\x01\e;z
- 0: \x01\x01\x1b;z
-
-/^[ab\]cde]/
- athing
- 0: a
- bthing
- 0: b
- ]thing
- 0: ]
- cthing
- 0: c
- dthing
- 0: d
- ething
- 0: e
- *** Failers
-No match
- fthing
-No match
- [thing
-No match
- \\thing
-No match
-
-/^[]cde]/
- ]thing
- 0: ]
- cthing
- 0: c
- dthing
- 0: d
- ething
- 0: e
- *** Failers
-No match
- athing
-No match
- fthing
-No match
-
-/^[^ab\]cde]/
- fthing
- 0: f
- [thing
- 0: [
- \\thing
- 0: \
- *** Failers
- 0: *
- athing
-No match
- bthing
-No match
- ]thing
-No match
- cthing
-No match
- dthing
-No match
- ething
-No match
-
-/^[^]cde]/
- athing
- 0: a
- fthing
- 0: f
- *** Failers
- 0: *
- ]thing
-No match
- cthing
-No match
- dthing
-No match
- ething
-No match
-
-/^\/
-
- 0: \x81
-
-/^/
-
- 0: \xff
-
-/^[0-9]+$/
- 0
- 0: 0
- 1
- 0: 1
- 2
- 0: 2
- 3
- 0: 3
- 4
- 0: 4
- 5
- 0: 5
- 6
- 0: 6
- 7
- 0: 7
- 8
- 0: 8
- 9
- 0: 9
- 10
- 0: 10
- 100
- 0: 100
- *** Failers
-No match
- abc
-No match
-
-/^.*nter/
- enter
- 0: enter
- inter
- 0: inter
- uponter
- 0: uponter
-
-/^xxx[0-9]+$/
- xxx0
- 0: xxx0
- xxx1234
- 0: xxx1234
- *** Failers
-No match
- xxx
-No match
-
-/^.+[0-9][0-9][0-9]$/
- x123
- 0: x123
- xx123
- 0: xx123
- 123456
- 0: 123456
- *** Failers
-No match
- 123
-No match
- x1234
- 0: x1234
-
-/^.+?[0-9][0-9][0-9]$/
- x123
- 0: x123
- xx123
- 0: xx123
- 123456
- 0: 123456
- *** Failers
-No match
- 123
-No match
- x1234
- 0: x1234
-
-/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
- abc!pqr=apquxz.ixr.zzz.ac.uk
- 0: abc!pqr=apquxz.ixr.zzz.ac.uk
- 1: abc
- 2: pqr
- *** Failers
-No match
- !pqr=apquxz.ixr.zzz.ac.uk
-No match
- abc!=apquxz.ixr.zzz.ac.uk
-No match
- abc!pqr=apquxz:ixr.zzz.ac.uk
-No match
- abc!pqr=apquxz.ixr.zzz.ac.ukk
-No match
-
-/:/
- Well, we need a colon: somewhere
- 0: :
- *** Fail if we don't
-No match
-
-/([\da-f:]+)$/i
- 0abc
- 0: 0abc
- 1: 0abc
- abc
- 0: abc
- 1: abc
- fed
- 0: fed
- 1: fed
- E
- 0: E
- 1: E
- ::
- 0: ::
- 1: ::
- 5f03:12C0::932e
- 0: 5f03:12C0::932e
- 1: 5f03:12C0::932e
- fed def
- 0: def
- 1: def
- Any old stuff
- 0: ff
- 1: ff
- *** Failers
-No match
- 0zzz
-No match
- gzzz
-No match
- fed\x20
-No match
- Any old rubbish
-No match
-
-/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
- .1.2.3
- 0: .1.2.3
- 1: 1
- 2: 2
- 3: 3
- A.12.123.0
- 0: A.12.123.0
- 1: 12
- 2: 123
- 3: 0
- *** Failers
-No match
- .1.2.3333
-No match
- 1.2.3
-No match
- 1234.2.3
-No match
-
-/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- 0: 1 IN SOA non-sp1 non-sp2(
- 1: 1
- 2: non-sp1
- 3: non-sp2
- 1 IN SOA non-sp1 non-sp2 (
- 0: 1 IN SOA non-sp1 non-sp2 (
- 1: 1
- 2: non-sp1
- 3: non-sp2
- *** Failers
-No match
- 1IN SOA non-sp1 non-sp2(
-No match
-
-/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
- a.
- 0: a.
- Z.
- 0: Z.
- 2.
- 0: 2.
- ab-c.pq-r.
- 0: ab-c.pq-r.
- 1: .pq-r
- sxk.zzz.ac.uk.
- 0: sxk.zzz.ac.uk.
- 1: .uk
- x-.y-.
- 0: x-.y-.
- 1: .y-
- *** Failers
-No match
- -abc.peq.
-No match
-
-/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
- *.a
- 0: *.a
- *.b0-a
- 0: *.b0-a
- 1: 0-a
- *.c3-b.c
- 0: *.c3-b.c
- 1: 3-b
- 2: .c
- *.c-a.b-c
- 0: *.c-a.b-c
- 1: -a
- 2: .b-c
- 3: -c
- *** Failers
-No match
- *.0
-No match
- *.a-
-No match
- *.a-b.c-
-No match
- *.c-a.0-c
-No match
-
-/^(?=ab(de))(abd)(e)/
- abde
- 0: abde
- 1: de
- 2: abd
- 3: e
-
-/^(?!(ab)de|x)(abd)(f)/
- abdf
- 0: abdf
- 1: <unset>
- 2: abd
- 3: f
-
-/^(?=(ab(cd)))(ab)/
- abcd
- 0: ab
- 1: abcd
- 2: cd
- 3: ab
-
-/^[\da-f](\.[\da-f])*$/i
- a.b.c.d
- 0: a.b.c.d
- 1: .d
- A.B.C.D
- 0: A.B.C.D
- 1: .D
- a.b.c.1.2.3.C
- 0: a.b.c.1.2.3.C
- 1: .C
-
-/^\".*\"\s*(;.*)?$/
- \"1234\"
- 0: "1234"
- \"abcd\" ;
- 0: "abcd" ;
- 1: ;
- \"\" ; rhubarb
- 0: "" ; rhubarb
- 1: ; rhubarb
- *** Failers
-No match
- \"1234\" : things
-No match
-
-/^$/
- \
- 0:
- *** Failers
-No match
-
-/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
- ab c
- 0: ab c
- *** Failers
-No match
- abc
-No match
- ab cde
-No match
-
-/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
- ab c
- 0: ab c
- *** Failers
-No match
- abc
-No match
- ab cde
-No match
-
-/^ a\ b[c ]d $/x
- a bcd
- 0: a bcd
- a b d
- 0: a b d
- *** Failers
-No match
- abcd
-No match
- ab d
-No match
-
-/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
- abcdefhijklm
- 0: abcdefhijklm
- 1: abc
- 2: bc
- 3: c
- 4: def
- 5: ef
- 6: f
- 7: hij
- 8: ij
- 9: j
-10: klm
-11: lm
-12: m
-
-/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
- abcdefhijklm
- 0: abcdefhijklm
- 1: bc
- 2: c
- 3: ef
- 4: f
- 5: ij
- 6: j
- 7: lm
- 8: m
-
-/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
- a+ Z0+\x08\n\x1d\x12
- 0: a+ Z0+\x08\x0a\x1d\x12
-
-/^[.^$|()*+?{,}]+/
- .^\$(*+)|{?,?}
- 0: .^$(*+)|{?,?}
-
-/^a*\w/
- z
- 0: z
- az
- 0: az
- aaaz
- 0: aaaz
- a
- 0: a
- aa
- 0: aa
- aaaa
- 0: aaaa
- a+
- 0: a
- aa+
- 0: aa
-
-/^a*?\w/
- z
- 0: z
- az
- 0: a
- aaaz
- 0: a
- a
- 0: a
- aa
- 0: a
- aaaa
- 0: a
- a+
- 0: a
- aa+
- 0: a
-
-/^a+\w/
- az
- 0: az
- aaaz
- 0: aaaz
- aa
- 0: aa
- aaaa
- 0: aaaa
- aa+
- 0: aa
-
-/^a+?\w/
- az
- 0: az
- aaaz
- 0: aa
- aa
- 0: aa
- aaaa
- 0: aa
- aa+
- 0: aa
-
-/^\d{8}\w{2,}/
- 1234567890
- 0: 1234567890
- 12345678ab
- 0: 12345678ab
- 12345678__
- 0: 12345678__
- *** Failers
-No match
- 1234567
-No match
-
-/^[aeiou\d]{4,5}$/
- uoie
- 0: uoie
- 1234
- 0: 1234
- 12345
- 0: 12345
- aaaaa
- 0: aaaaa
- *** Failers
-No match
- 123456
-No match
-
-/^[aeiou\d]{4,5}?/
- uoie
- 0: uoie
- 1234
- 0: 1234
- 12345
- 0: 1234
- aaaaa
- 0: aaaa
- 123456
- 0: 1234
-
-/\A(abc|def)=(\1){2,3}\Z/
- abc=abcabc
- 0: abc=abcabc
- 1: abc
- 2: abc
- def=defdefdef
- 0: def=defdefdef
- 1: def
- 2: def
- *** Failers
-No match
- abc=defdef
-No match
-
-/^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/
- abcdefghijkcda2
- 0: abcdefghijkcda2
- 1: a
- 2: b
- 3: c
- 4: d
- 5: e
- 6: f
- 7: g
- 8: h
- 9: i
-10: j
-11: k
-12: cd
- abcdefghijkkkkcda2
- 0: abcdefghijkkkkcda2
- 1: a
- 2: b
- 3: c
- 4: d
- 5: e
- 6: f
- 7: g
- 8: h
- 9: i
-10: j
-11: k
-12: cd
-
-/(cat(a(ract|tonic)|erpillar)) \1()2(3)/
- cataract cataract23
- 0: cataract cataract23
- 1: cataract
- 2: aract
- 3: ract
- 4:
- 5: 3
- catatonic catatonic23
- 0: catatonic catatonic23
- 1: catatonic
- 2: atonic
- 3: tonic
- 4:
- 5: 3
- caterpillar caterpillar23
- 0: caterpillar caterpillar23
- 1: caterpillar
- 2: erpillar
- 3: <unset>
- 4:
- 5: 3
-
-
-/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
- From abcd Mon Sep 01 12:33:02 1997
- 0: From abcd Mon Sep 01 12:33
- 1: abcd
-
-/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
- From abcd Mon Sep 01 12:33:02 1997
- 0: From abcd Mon Sep 01 12:33
- 1: Sep
- From abcd Mon Sep 1 12:33:02 1997
- 0: From abcd Mon Sep 1 12:33
- 1: Sep
- *** Failers
-No match
- From abcd Sep 01 12:33:02 1997
-No match
-
-/^12.34/s
- 12\n34
- 0: 12\x0a34
- 12\r34
- 0: 12\x0d34
-
-/\w+(?=\t)/
- the quick brown\t fox
- 0: brown
-
-/foo(?!bar)(.*)/
- foobar is foolish see?
- 0: foolish see?
- 1: lish see?
-
-/(?:(?!foo)...|^.{0,2})bar(.*)/
- foobar crowbar etc
- 0: rowbar etc
- 1: etc
- barrel
- 0: barrel
- 1: rel
- 2barrel
- 0: 2barrel
- 1: rel
- A barrel
- 0: A barrel
- 1: rel
-
-/^(\D*)(?=\d)(?!123)/
- abc456
- 0: abc
- 1: abc
- *** Failers
-No match
- abc123
-No match
-
-/^1234(?# test newlines
- inside)/
- 1234
- 0: 1234
-
-/^1234 #comment in extended re
- /x
- 1234
- 0: 1234
-
-/#rhubarb
- abcd/x
- abcd
- 0: abcd
-
-/^abcd#rhubarb/x
- abcd
- 0: abcd
-
-/^(a)\1{2,3}(.)/
- aaab
- 0: aaab
- 1: a
- 2: b
- aaaab
- 0: aaaab
- 1: a
- 2: b
- aaaaab
- 0: aaaaa
- 1: a
- 2: a
- aaaaaab
- 0: aaaaa
- 1: a
- 2: a
-
-/(?!^)abc/
- the abc
- 0: abc
- *** Failers
-No match
- abc
-No match
-
-/(?=^)abc/
- abc
- 0: abc
- *** Failers
-No match
- the abc
-No match
-
-/^[ab]{1,3}(ab*|b)/
- aabbbbb
- 0: aabb
- 1: b
-
-/^[ab]{1,3}?(ab*|b)/
- aabbbbb
- 0: aabbbbb
- 1: abbbbb
-
-/^[ab]{1,3}?(ab*?|b)/
- aabbbbb
- 0: aa
- 1: a
-
-/^[ab]{1,3}(ab*?|b)/
- aabbbbb
- 0: aabb
- 1: b
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/x
- Alan Other <user\@dom.ain>
- 0: Alan Other <user@dom.ain>
- <user\@dom.ain>
- 0: user@dom.ain
- user\@dom.ain
- 0: user@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- 0: "A. Other" <user.1234@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- 0: Other <user.1234@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
- A missing angle <user\@some.where
- 0: user@some.where
- *** Failers
-No match
- The quick brown fox
-No match
-
-/[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional leading comment
-(?:
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-# leading word
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
-(?:
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-|
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-) # "special" comment or quoted string
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
-)*
-<
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# <
-(?:
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-(?: ,
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-)* # additional domains
-:
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address spec
-> # >
-# name and address
-)
-/x
- Alan Other <user\@dom.ain>
- 0: Alan Other <user@dom.ain>
- <user\@dom.ain>
- 0: user@dom.ain
- user\@dom.ain
- 0: user@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- 0: "A. Other" <user.1234@dom.ain>
- A. Other <user.1234\@dom.ain> (a comment)
- 0: Other <user.1234@dom.ain>
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
- A missing angle <user\@some.where
- 0: user@some.where
- *** Failers
-No match
- The quick brown fox
-No match
-
-/abc\0def\00pqr\000xyz\0000AB/
- abc\0def\00pqr\000xyz\0000AB
- 0: abc\x00def\x00pqr\x00xyz\x000AB
- abc456 abc\0def\00pqr\000xyz\0000ABCDE
- 0: abc\x00def\x00pqr\x00xyz\x000AB
-
-/abc\x0def\x00pqr\x000xyz\x0000AB/
- abc\x0def\x00pqr\x000xyz\x0000AB
- 0: abc\x0def\x00pqr\x000xyz\x0000AB
- abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
- 0: abc\x0def\x00pqr\x000xyz\x0000AB
-
-/^[\000-\037]/
- \0A
- 0: \x00
- \01B
- 0: \x01
- \037C
- 0: \x1f
-
-/\0*/
- \0\0\0\0
- 0: \x00\x00\x00\x00
-
-/A\x0{2,3}Z/
- The A\x0\x0Z
- 0: A\x00\x00Z
- An A\0\x0\0Z
- 0: A\x00\x00\x00Z
- *** Failers
-No match
- A\0Z
-No match
- A\0\x0\0\x0Z
-No match
-
-/^(cow|)\1(bell)/
- cowcowbell
- 0: cowcowbell
- 1: cow
- 2: bell
- bell
- 0: bell
- 1:
- 2: bell
- *** Failers
-No match
- cowbell
-No match
-
-/^\s/
- \040abc
- 0:
- \x0cabc
- 0: \x0c
- \nabc
- 0: \x0a
- \rabc
- 0: \x0d
- \tabc
- 0: \x09
- *** Failers
-No match
- abc
-No match
-
-/^a b
- c/x
- abc
- 0: abc
-
-/^(a|)\1*b/
- ab
- 0: ab
- 1: a
- aaaab
- 0: aaaab
- 1: a
- b
- 0: b
- 1:
- *** Failers
-No match
- acb
-No match
-
-/^(a|)\1+b/
- aab
- 0: aab
- 1: a
- aaaab
- 0: aaaab
- 1: a
- b
- 0: b
- 1:
- *** Failers
-No match
- ab
-No match
-
-/^(a|)\1?b/
- ab
- 0: ab
- 1: a
- aab
- 0: aab
- 1: a
- b
- 0: b
- 1:
- *** Failers
-No match
- acb
-No match
-
-/^(a|)\1{2}b/
- aaab
- 0: aaab
- 1: a
- b
- 0: b
- 1:
- *** Failers
-No match
- ab
-No match
- aab
-No match
- aaaab
-No match
-
-/^(a|)\1{2,3}b/
- aaab
- 0: aaab
- 1: a
- aaaab
- 0: aaaab
- 1: a
- b
- 0: b
- 1:
- *** Failers
-No match
- ab
-No match
- aab
-No match
- aaaaab
-No match
-
-/ab{1,3}bc/
- abbbbc
- 0: abbbbc
- abbbc
- 0: abbbc
- abbc
- 0: abbc
- *** Failers
-No match
- abc
-No match
- abbbbbc
-No match
-
-/([^.]*)\.([^:]*):[T ]+(.*)/
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1
- 2: title
- 3: Blah blah blah
-
-/([^.]*)\.([^:]*):[T ]+(.*)/i
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1
- 2: title
- 3: Blah blah blah
-
-/([^.]*)\.([^:]*):[t ]+(.*)/i
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1
- 2: title
- 3: Blah blah blah
-
-/^[W-c]+$/
- WXY_^abc
- 0: WXY_^abc
- *** Failers
-No match
- wxy
-No match
-
-/^[W-c]+$/i
- WXY_^abc
- 0: WXY_^abc
- wxy_^ABC
- 0: wxy_^ABC
-
-/^[\x3f-\x5F]+$/i
- WXY_^abc
- 0: WXY_^abc
- wxy_^ABC
- 0: wxy_^ABC
-
-/^abc$/m
- abc
- 0: abc
- qqq\nabc
- 0: abc
- abc\nzzz
- 0: abc
- qqq\nabc\nzzz
- 0: abc
-
-/^abc$/
- abc
- 0: abc
- *** Failers
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-/\Aabc\Z/m
- abc
- 0: abc
- abc\n
- 0: abc
- *** Failers
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-/\A(.)*\Z/s
- abc\ndef
- 0: abc\x0adef
- 1: f
-
-/\A(.)*\Z/m
- *** Failers
- 0: *** Failers
- 1: s
- abc\ndef
-No match
-
-/(?:b)|(?::+)/
- b::c
- 0: b
- c::b
- 0: ::
-
-/[-az]+/
- az-
- 0: az-
- *** Failers
- 0: a
- b
-No match
-
-/[az-]+/
- za-
- 0: za-
- *** Failers
- 0: a
- b
-No match
-
-/[a\-z]+/
- a-z
- 0: a-z
- *** Failers
- 0: a
- b
-No match
-
-/[a-z]+/
- abcdxyz
- 0: abcdxyz
-
-/[\d-]+/
- 12-34
- 0: 12-34
- *** Failers
-No match
- aaa
-No match
-
-/[\d-z]+/
- 12-34z
- 0: 12-34z
- *** Failers
-No match
- aaa
-No match
-
-/\x5c/
- \\
- 0: \
-
-/\x20Z/
- the Zoo
- 0: Z
- *** Failers
-No match
- Zulu
-No match
-
-/(abc)\1/i
- abcabc
- 0: abcabc
- 1: abc
- ABCabc
- 0: ABCabc
- 1: ABC
- abcABC
- 0: abcABC
- 1: abc
-
-/ab{3cd/
- ab{3cd
- 0: ab{3cd
-
-/ab{3,cd/
- ab{3,cd
- 0: ab{3,cd
-
-/ab{3,4a}cd/
- ab{3,4a}cd
- 0: ab{3,4a}cd
-
-/{4,5a}bc/
- {4,5a}bc
- 0: {4,5a}bc
-
-/abc$/
- abc
- 0: abc
- abc\n
- 0: abc
- *** Failers
-No match
- abc\ndef
-No match
-
-/(abc)\123/
- abc\x53
- 0: abcS
- 1: abc
-
-/(abc)\223/
- abc\x93
- 0: abc\x93
- 1: abc
-
-/(abc)\323/
- abc\xd3
- 0: abc\xd3
- 1: abc
-
-/(abc)\100/
- abc\x40
- 0: abc@
- 1: abc
- abc\100
- 0: abc@
- 1: abc
-
-/(abc)\1000/
- abc\x400
- 0: abc@0
- 1: abc
- abc\x40\x30
- 0: abc@0
- 1: abc
- abc\1000
- 0: abc@0
- 1: abc
- abc\100\x30
- 0: abc@0
- 1: abc
- abc\100\060
- 0: abc@0
- 1: abc
- abc\100\60
- 0: abc@0
- 1: abc
-
-/abc\81/
- abc\081
- 0: abc\x0081
- abc\0\x38\x31
- 0: abc\x0081
-
-/abc\91/
- abc\091
- 0: abc\x0091
- abc\0\x39\x31
- 0: abc\x0091
-
-/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/
- abcdefghijkllS
- 0: abcdefghijkllS
- 1: a
- 2: b
- 3: c
- 4: d
- 5: e
- 6: f
- 7: g
- 8: h
- 9: i
-10: j
-11: k
-12: l
-
-/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
- abcdefghijk\12S
- 0: abcdefghijk\x0aS
- 1: a
- 2: b
- 3: c
- 4: d
- 5: e
- 6: f
- 7: g
- 8: h
- 9: i
-10: j
-11: k
-
-/ab\idef/
- abidef
- 0: abidef
-
-/a{0}bc/
- bc
- 0: bc
-
-/(a|(bc)){0,0}?xyz/
- xyz
- 0: xyz
-
-/abc[\10]de/
- abc\010de
- 0: abc\x08de
-
-/abc[\1]de/
- abc\1de
- 0: abc\x01de
-
-/(abc)[\1]de/
- abc\1de
- 0: abc\x01de
- 1: abc
-
-/(?s)a.b/
- a\nb
- 0: a\x0ab
-
-/^([^a])([^\b])([^c]*)([^d]{3,4})/
- baNOTccccd
- 0: baNOTcccc
- 1: b
- 2: a
- 3: NOT
- 4: cccc
- baNOTcccd
- 0: baNOTccc
- 1: b
- 2: a
- 3: NOT
- 4: ccc
- baNOTccd
- 0: baNOTcc
- 1: b
- 2: a
- 3: NO
- 4: Tcc
- bacccd
- 0: baccc
- 1: b
- 2: a
- 3:
- 4: ccc
- *** Failers
- 0: *** Failers
- 1: *
- 2: *
- 3: * Fail
- 4: ers
- anything
-No match
- b\bc
-No match
- baccd
-No match
-
-/[^a]/
- Abc
- 0: A
-
-/[^a]/i
- Abc
- 0: b
-
-/[^a]+/
- AAAaAbc
- 0: AAA
-
-/[^a]+/i
- AAAaAbc
- 0: bc
-
-/[^a]+/
- bbb\nccc
- 0: bbb\x0accc
-
-/[^k]$/
- abc
- 0: c
- *** Failers
- 0: s
- abk
-No match
-
-/[^k]{2,3}$/
- abc
- 0: abc
- kbc
- 0: bc
- kabc
- 0: abc
- *** Failers
- 0: ers
- abk
-No match
- akb
-No match
- akk
-No match
-
-/^\d{8,}\@.+[^k]$/
- 12345678\@a.b.c.d
- 0: 12345678@a.b.c.d
- 123456789\@x.y.z
- 0: 123456789@x.y.z
- *** Failers
-No match
- 12345678\@x.y.uk
-No match
- 1234567\@a.b.c.d
-No match
-
-/(a)\1{8,}/
- aaaaaaaaa
- 0: aaaaaaaaa
- 1: a
- aaaaaaaaaa
- 0: aaaaaaaaaa
- 1: a
- *** Failers
-No match
- aaaaaaa
-No match
-
-/[^a]/
- aaaabcd
- 0: b
- aaAabcd
- 0: A
-
-/[^a]/i
- aaaabcd
- 0: b
- aaAabcd
- 0: b
-
-/[^az]/
- aaaabcd
- 0: b
- aaAabcd
- 0: A
-
-/[^az]/i
- aaaabcd
- 0: b
- aaAabcd
- 0: b
-
-/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
- \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
- 0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff
-
-/P[^*]TAIRE[^*]{1,6}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- 0: PSTAIREISLL
-
-/P[^*]TAIRE[^*]{1,}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- 0: PSTAIREISLL
-
-/(\.\d\d[1-9]?)\d+/
- 1.230003938
- 0: .230003938
- 1: .23
- 1.875000282
- 0: .875000282
- 1: .875
- 1.235
- 0: .235
- 1: .23
-
-/(\.\d\d((?=0)|\d(?=\d)))/
- 1.230003938
- 0: .23
- 1: .23
- 2:
- 1.875000282
- 0: .875
- 1: .875
- 2: 5
- *** Failers
-No match
- 1.235
-No match
-
-/a(?)b/
- ab
- 0: ab
-
-/\b(foo)\s+(\w+)/i
- Food is on the foo table
- 0: foo table
- 1: foo
- 2: table
-
-/foo(.*)bar/
- The food is under the bar in the barn.
- 0: food is under the bar in the bar
- 1: d is under the bar in the
-
-/foo(.*?)bar/
- The food is under the bar in the barn.
- 0: food is under the bar
- 1: d is under the
-
-/(.*)(\d*)/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 53147
- 2:
-
-/(.*)(\d+)/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: 7
-
-/(.*?)(\d*)/
- I have 2 numbers: 53147
- 0:
- 1:
- 2:
-
-/(.*?)(\d+)/
- I have 2 numbers: 53147
- 0: I have 2
- 1: I have
- 2: 2
-
-/(.*)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: 7
-
-/(.*?)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers:
- 2: 53147
-
-/(.*)\b(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers:
- 2: 53147
-
-/(.*\D)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers:
- 2: 53147
-
-/^\D*(?!123)/
- ABC123
- 0: AB
-
-/^(\D*)(?=\d)(?!123)/
- ABC445
- 0: ABC
- 1: ABC
- *** Failers
-No match
- ABC123
-No match
-
-/^[W-]46]/
- W46]789
- 0: W46]
- -46]789
- 0: -46]
- *** Failers
-No match
- Wall
-No match
- Zebra
-No match
- 42
-No match
- [abcd]
-No match
- ]abcd[
-No match
-
-/^[W-\]46]/
- W46]789
- 0: W
- Wall
- 0: W
- Zebra
- 0: Z
- Xylophone
- 0: X
- 42
- 0: 4
- [abcd]
- 0: [
- ]abcd[
- 0: ]
- \\backslash
- 0: \
- *** Failers
-No match
- -46]789
-No match
- well
-No match
-
-/\d\d\/\d\d\/\d\d\d\d/
- 01/01/2000
- 0: 01/01/2000
-
-/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-No match
-
-/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-No match
-
-/^(a){0,0}/
- bcd
- 0:
- abc
- 0:
- aab
- 0:
-
-/^(a){0,1}/
- bcd
- 0:
- abc
- 0: a
- 1: a
- aab
- 0: a
- 1: a
-
-/^(a){0,2}/
- bcd
- 0:
- abc
- 0: a
- 1: a
- aab
- 0: aa
- 1: a
-
-/^(a){0,3}/
- bcd
- 0:
- abc
- 0: a
- 1: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: a
-
-/^(a){0,}/
- bcd
- 0:
- abc
- 0: a
- 1: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: a
- aaaaaaaa
- 0: aaaaaaaa
- 1: a
-
-/^(a){1,1}/
- bcd
-No match
- abc
- 0: a
- 1: a
- aab
- 0: a
- 1: a
-
-/^(a){1,2}/
- bcd
-No match
- abc
- 0: a
- 1: a
- aab
- 0: aa
- 1: a
-
-/^(a){1,3}/
- bcd
-No match
- abc
- 0: a
- 1: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: a
-
-/^(a){1,}/
- bcd
-No match
- abc
- 0: a
- 1: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: a
- aaaaaaaa
- 0: aaaaaaaa
- 1: a
-
-/.*\.gif/
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.{0,}\.gif/
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.*\.gif/m
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.*\.gif/s
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif
-
-/.*\.gif/ms
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif
-
-/.*$/
- borfle\nbib.gif\nno
- 0: no
-
-/.*$/m
- borfle\nbib.gif\nno
- 0: borfle
-
-/.*$/s
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif\x0ano
-
-/.*$/ms
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif\x0ano
-
-/.*$/
- borfle\nbib.gif\nno\n
- 0: no
-
-/.*$/m
- borfle\nbib.gif\nno\n
- 0: borfle
-
-/.*$/s
- borfle\nbib.gif\nno\n
- 0: borfle\x0abib.gif\x0ano\x0a
-
-/.*$/ms
- borfle\nbib.gif\nno\n
- 0: borfle\x0abib.gif\x0ano\x0a
-
-/(.*X|^B)/
- abcde\n1234Xyz
- 0: 1234X
- 1: 1234X
- BarFoo
- 0: B
- 1: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(.*X|^B)/m
- abcde\n1234Xyz
- 0: 1234X
- 1: 1234X
- BarFoo
- 0: B
- 1: B
- abcde\nBar
- 0: B
- 1: B
-
-/(.*X|^B)/s
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- 1: abcde\x0a1234X
- BarFoo
- 0: B
- 1: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(.*X|^B)/ms
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- 1: abcde\x0a1234X
- BarFoo
- 0: B
- 1: B
- abcde\nBar
- 0: B
- 1: B
-
-/(?s)(.*X|^B)/
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- 1: abcde\x0a1234X
- BarFoo
- 0: B
- 1: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(?s:.*X|^B)/
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/^.*B/
- **** Failers
-No match
- abc\nB
-No match
-
-/(?s)^.*B/
- abc\nB
- 0: abc\x0aB
-
-/(?m)^.*B/
- abc\nB
- 0: B
-
-/(?ms)^.*B/
- abc\nB
- 0: abc\x0aB
-
-/(?ms)^B/
- abc\nB
- 0: B
-
-/(?s)B$/
- B\n
- 0: B
-
-/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
- 123456654321
- 0: 123456654321
-
-/^\d\d\d\d\d\d\d\d\d\d\d\d/
- 123456654321
- 0: 123456654321
-
-/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
- 123456654321
- 0: 123456654321
-
-/^[abc]{12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^[a-c]{12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^(a|b|c){12}/
- abcabcabcabc
- 0: abcabcabcabc
- 1: c
-
-/^[abcdefghijklmnopqrstuvwxy0123456789]/
- n
- 0: n
- *** Failers
-No match
- z
-No match
-
-/abcde{0,0}/
- abcd
- 0: abcd
- *** Failers
-No match
- abce
-No match
-
-/ab[cd]{0,0}e/
- abe
- 0: abe
- *** Failers
-No match
- abcde
-No match
-
-/ab(c){0,0}d/
- abd
- 0: abd
- *** Failers
-No match
- abcd
-No match
-
-/a(b*)/
- a
- 0: a
- 1:
- ab
- 0: ab
- 1: b
- abbbb
- 0: abbbb
- 1: bbbb
- *** Failers
- 0: a
- 1:
- bbbbb
-No match
-
-/ab\d{0}e/
- abe
- 0: abe
- *** Failers
-No match
- ab1e
-No match
-
-/"([^\\"]+|\\.)*"/
- the \"quick\" brown fox
- 0: "quick"
- 1: quick
- \"the \\\"quick\\\" brown fox\"
- 0: "the \"quick\" brown fox"
- 1: brown fox
-
-/.*?/g+
- abc
- 0:
- 0+ abc
- 0: a
- 0+ bc
- 0:
- 0+ bc
- 0: b
- 0+ c
- 0:
- 0+ c
- 0: c
- 0+
- 0:
- 0+
-
-/\b/g+
- abc
- 0:
- 0+ abc
- 0:
- 0+
-
-/\b/+g
- abc
- 0:
- 0+ abc
- 0:
- 0+
-
-//g
- abc
- 0:
- 0:
- 0:
- 0:
-
-/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
- <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
- 0: <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
- 1: BGCOLOR='#DBE9E9'
- 2: align=left valign=top
- 3: 43.
- 4: <a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)
- 5:
- 6:
- 7: <unset>
- 8: align=left valign=top
- 9: Lega lstaff.com
-10: align=left valign=top
-11: CA - Statewide
-
-/a[^a]b/
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/a.b/
- acb
- 0: acb
- *** Failers
-No match
- a\nb
-No match
-
-/a[^a]b/s
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/a.b/s
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/^(b+?|a){1,2}?c/
- bac
- 0: bac
- 1: a
- bbac
- 0: bbac
- 1: a
- bbbac
- 0: bbbac
- 1: a
- bbbbac
- 0: bbbbac
- 1: a
- bbbbbac
- 0: bbbbbac
- 1: a
-
-/^(b+|a){1,2}?c/
- bac
- 0: bac
- 1: a
- bbac
- 0: bbac
- 1: a
- bbbac
- 0: bbbac
- 1: a
- bbbbac
- 0: bbbbac
- 1: a
- bbbbbac
- 0: bbbbbac
- 1: a
-
-/(?!\A)x/m
- x\nb\n
-No match
- a\bx\n
- 0: x
-
-/\x0{ab}/
- \0{ab}
- 0: \x00{ab}
-
-/(A|B)*?CD/
- CD
- 0: CD
-
-/(A|B)*CD/
- CD
- 0: CD
-
-/(AB)*?\1/
- ABABAB
- 0: ABAB
- 1: AB
-
-/(AB)*\1/
- ABABAB
- 0: ABABAB
- 1: AB
-
-/(?<!bar)foo/
- foo
- 0: foo
- catfood
- 0: foo
- arfootle
- 0: foo
- rfoosh
- 0: foo
- *** Failers
-No match
- barfoo
-No match
- towbarfoo
-No match
-
-/\w{3}(?<!bar)foo/
- catfood
- 0: catfoo
- *** Failers
-No match
- foo
-No match
- barfoo
-No match
- towbarfoo
-No match
-
-/(?<=(foo)a)bar/
- fooabar
- 0: bar
- 1: foo
- *** Failers
-No match
- bar
-No match
- foobbar
-No match
-
-/\Aabc\z/m
- abc
- 0: abc
- *** Failers
-No match
- abc\n
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
-No match
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
- 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
-
-/(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 0: .230003938
- 1: .23
- 1.875000282
- 0: .875000282
- 1: .875
- *** Failers
-No match
- 1.235
-No match
-
-/^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- 0: now is the time for all good men to come to the aid of the party
- 1: party
- *** Failers
-No match
- this is not a line with only words and spaces!
-No match
-
-/(\d+)(\w)/
- 12345a
- 0: 12345a
- 1: 12345
- 2: a
- 12345+
- 0: 12345
- 1: 1234
- 2: 5
-
-/((?>\d+))(\w)/
- 12345a
- 0: 12345a
- 1: 12345
- 2: a
- *** Failers
-No match
- 12345+
-No match
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/((?>a+)b)/
- aaab
- 0: aaab
- 1: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
- 1: aaa
-
-/(?>b)+/
- aaabbbccc
- 0: bbb
-
-/(?>a+|b+|c+)*c/
- aaabbbbccccd
- 0: aaabbbbc
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: x
-
-/\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- 0: (abc)
- 1: abc
- (abc(def)xyz)
- 0: (abc(def)xyz)
- 1: xyz
- *** Failers
-No match
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/a(?-i)b/i
- ab
- 0: ab
- Ab
- 0: Ab
- *** Failers
-No match
- aB
-No match
- AB
-No match
-
-/(a (?x)b c)d e/
- a bcd e
- 0: a bcd e
- 1: a bc
- *** Failers
-No match
- a b cd e
-No match
- abcd e
-No match
- a bcde
-No match
-
-/(a b(?x)c d (?-x)e f)/
- a bcde f
- 0: a bcde f
- 1: a bcde f
- *** Failers
-No match
- abcdef
-No match
-
-/(a(?i)b)c/
- abc
- 0: abc
- 1: ab
- aBc
- 0: aBc
- 1: aB
- *** Failers
-No match
- abC
-No match
- aBC
-No match
- Abc
-No match
- ABc
-No match
- ABC
-No match
- AbC
-No match
-
-/a(?i:b)c/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- ABC
-No match
- abC
-No match
- aBC
-No match
-
-/a(?i:b)*c/
- aBc
- 0: aBc
- aBBc
- 0: aBBc
- *** Failers
-No match
- aBC
-No match
- aBBC
-No match
-
-/a(?=b(?i)c)\w\wd/
- abcd
- 0: abcd
- abCd
- 0: abCd
- *** Failers
-No match
- aBCd
-No match
- abcD
-No match
-
-/(?s-i:more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
-No match
- more \n than \n million
-No match
-
-/(?:(?s-i)more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
-No match
- more \n than \n million
-No match
-
-/(?>a(?i)b+)+c/
- abc
- 0: abc
- aBbc
- 0: aBbc
- aBBc
- 0: aBBc
- *** Failers
-No match
- Abc
-No match
- abAb
-No match
- abbC
-No match
-
-/(?=a(?i)b)\w\wc/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- Ab
-No match
- abC
-No match
- aBC
-No match
-
-/(?<=a(?i)b)(\w\w)c/
- abxxc
- 0: xxc
- 1: xx
- aBxxc
- 0: xxc
- 1: xx
- *** Failers
-No match
- Abxxc
-No match
- ABxxc
-No match
- abxxC
-No match
-
-/(?:(a)|b)(?(1)A|B)/
- aA
- 0: aA
- 1: a
- bB
- 0: bB
- *** Failers
-No match
- aB
-No match
- bA
-No match
-
-/^(a)?(?(1)a|b)+$/
- aa
- 0: aa
- 1: a
- b
- 0: b
- bb
- 0: bb
- *** Failers
-No match
- ab
-No match
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/(?(?<=foo)bar|cat)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/(?(?<!foo)cat|bar)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/( \( )? [^()]+ (?(1) \) |) /x
- abcd
- 0: abcd
- (abcd)
- 0: (abcd)
- 1: (
- the quick (abcd) fox
- 0: the quick
- (abcd
- 0: abcd
-
-/( \( )? [^()]+ (?(1) \) ) /x
- abcd
- 0: abcd
- (abcd)
- 0: (abcd)
- 1: (
- the quick (abcd) fox
- 0: the quick
- (abcd
- 0: abcd
-
-/^(?(2)a|(1)(2))+$/
- 12
- 0: 12
- 1: 1
- 2: 2
- 12a
- 0: 12a
- 1: 1
- 2: 2
- 12aa
- 0: 12aa
- 1: 1
- 2: 2
- *** Failers
-No match
- 1234
-No match
-
-/((?i)blah)\s+\1/
- blah blah
- 0: blah blah
- 1: blah
- BLAH BLAH
- 0: BLAH BLAH
- 1: BLAH
- Blah Blah
- 0: Blah Blah
- 1: Blah
- blaH blaH
- 0: blaH blaH
- 1: blaH
- *** Failers
-No match
- blah BLAH
-No match
- Blah blah
-No match
- blaH blah
-No match
-
-/((?i)blah)\s+(?i:\1)/
- blah blah
- 0: blah blah
- 1: blah
- BLAH BLAH
- 0: BLAH BLAH
- 1: BLAH
- Blah Blah
- 0: Blah Blah
- 1: Blah
- blaH blaH
- 0: blaH blaH
- 1: blaH
- blah BLAH
- 0: blah BLAH
- 1: blah
- Blah blah
- 0: Blah blah
- 1: Blah
- blaH blah
- 0: blaH blah
- 1: blaH
-
-/(?>a*)*/
- a
- 0: a
- aa
- 0: aa
- aaaa
- 0: aaaa
-
-/(abc|)+/
- abc
- 0: abc
- 1:
- abcabc
- 0: abcabc
- 1:
- abcabcabc
- 0: abcabcabc
- 1:
- xyz
- 0:
- 1:
-
-/([a]*)*/
- a
- 0: a
- 1:
- aaaaa
- 0: aaaaa
- 1:
-
-/([ab]*)*/
- a
- 0: a
- 1:
- b
- 0: b
- 1:
- ababab
- 0: ababab
- 1:
- aaaabcde
- 0: aaaab
- 1:
- bbbb
- 0: bbbb
- 1:
-
-/([^a]*)*/
- b
- 0: b
- 1:
- bbbb
- 0: bbbb
- 1:
- aaa
- 0:
- 1:
-
-/([^ab]*)*/
- cccc
- 0: cccc
- 1:
- abab
- 0:
- 1:
-
-/([a]*?)*/
- a
- 0:
- 1:
- aaaa
- 0:
- 1:
-
-/([ab]*?)*/
- a
- 0:
- 1:
- b
- 0:
- 1:
- abab
- 0:
- 1:
- baba
- 0:
- 1:
-
-/([^a]*?)*/
- b
- 0:
- 1:
- bbbb
- 0:
- 1:
- aaa
- 0:
- 1:
-
-/([^ab]*?)*/
- c
- 0:
- 1:
- cccc
- 0:
- 1:
- baba
- 0:
- 1:
-
-/(?>a*)*/
- a
- 0: a
- aaabcde
- 0: aaa
-
-/((?>a*))*/
- aaaaa
- 0: aaaaa
- 1:
- aabbaa
- 0: aa
- 1:
-
-/((?>a*?))*/
- aaaaa
- 0:
- 1:
- aabbaa
- 0:
- 1:
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 0: 12-sep-98
- 12-09-98
- 0: 12-09-98
- *** Failers
-No match
- sep-12-98
-No match
-
-/(?<=(foo))bar\1/
- foobarfoo
- 0: barfoo
- 1: foo
- foobarfootling
- 0: barfoo
- 1: foo
- *** Failers
-No match
- foobar
-No match
- barfoo
-No match
-
-/(?i:saturday|sunday)/
- saturday
- 0: saturday
- sunday
- 0: sunday
- Saturday
- 0: Saturday
- Sunday
- 0: Sunday
- SATURDAY
- 0: SATURDAY
- SUNDAY
- 0: SUNDAY
- SunDay
- 0: SunDay
-
-/(a(?i)bc|BB)x/
- abcx
- 0: abcx
- 1: abc
- aBCx
- 0: aBCx
- 1: aBC
- bbx
- 0: bbx
- 1: bb
- BBx
- 0: BBx
- 1: BB
- *** Failers
-No match
- abcX
-No match
- aBCX
-No match
- bbX
-No match
- BBX
-No match
-
-/^([ab](?i)[cd]|[ef])/
- ac
- 0: ac
- 1: ac
- aC
- 0: aC
- 1: aC
- bD
- 0: bD
- 1: bD
- elephant
- 0: e
- 1: e
- Europe
- 0: E
- 1: E
- frog
- 0: f
- 1: f
- France
- 0: F
- 1: F
- *** Failers
-No match
- Africa
-No match
-
-/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- 0: ab
- 1: ab
- aBd
- 0: aBd
- 1: aBd
- xy
- 0: xy
- 1: xy
- xY
- 0: xY
- 1: xY
- zebra
- 0: z
- 1: z
- Zambesi
- 0: Z
- 1: Z
- *** Failers
-No match
- aCD
-No match
- XY
-No match
-
-/(?<=foo\n)^bar/m
- foo\nbar
- 0: bar
- *** Failers
-No match
- bar
-No match
- baz\nbar
-No match
-
-/(?<=(?<!foo)bar)baz/
- barbaz
- 0: baz
- barbarbaz
- 0: baz
- koobarbaz
- 0: baz
- *** Failers
-No match
- baz
-No match
- foobarbaz
-No match
-
-/The cases of aaaa and aaaaaa are missed out below because Perl does things/
-/differently. We know that odd, and maybe incorrect, things happen with/
-No match
-/recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./
-No match
-
-/^(a\1?){4}$/
- a
-No match
- aa
-No match
- aaa
-No match
- aaaaa
- 0: aaaaa
- 1: a
- aaaaaaa
- 0: aaaaaaa
- 1: a
- aaaaaaaa
-No match
- aaaaaaaaa
-No match
- aaaaaaaaaa
- 0: aaaaaaaaaa
- 1: aaaa
- aaaaaaaaaaa
-No match
- aaaaaaaaaaaa
-No match
- aaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaa
-No match
-
-/^(a\1?)(a\1?)(a\2?)(a\3?)$/
- a
-No match
- aa
-No match
- aaa
-No match
- aaaa
- 0: aaaa
- 1: a
- 2: a
- 3: a
- 4: a
- aaaaa
- 0: aaaaa
- 1: a
- 2: aa
- 3: a
- 4: a
- aaaaaa
- 0: aaaaaa
- 1: a
- 2: aa
- 3: a
- 4: aa
- aaaaaaa
- 0: aaaaaaa
- 1: a
- 2: aa
- 3: aaa
- 4: a
- aaaaaaaa
-No match
- aaaaaaaaa
-No match
- aaaaaaaaaa
- 0: aaaaaaaaaa
- 1: a
- 2: aa
- 3: aaa
- 4: aaaa
- aaaaaaaaaaa
-No match
- aaaaaaaaaaaa
-No match
- aaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaa
-No match
-
-/The following tests are taken from the Perl 5.005 test suite; some of them/
-/are compatible with 5.004, but I'd rather not have to sort them out./
-No match
-
-/abc/
- abc
- 0: abc
- xabcy
- 0: abc
- ababc
- 0: abc
- *** Failers
-No match
- xbc
-No match
- axc
-No match
- abx
-No match
-
-/ab*c/
- abc
- 0: abc
-
-/ab*bc/
- abc
- 0: abc
- abbc
- 0: abbc
- abbbbc
- 0: abbbbc
-
-/.{1}/
- abbbbc
- 0: a
-
-/.{3,4}/
- abbbbc
- 0: abbb
-
-/ab{0,}bc/
- abbbbc
- 0: abbbbc
-
-/ab+bc/
- abbc
- 0: abbc
- *** Failers
-No match
- abc
-No match
- abq
-No match
-
-/ab{1,}bc/
-
-/ab+bc/
- abbbbc
- 0: abbbbc
-
-/ab{1,}bc/
- abbbbc
- 0: abbbbc
-
-/ab{1,3}bc/
- abbbbc
- 0: abbbbc
-
-/ab{3,4}bc/
- abbbbc
- 0: abbbbc
-
-/ab{4,5}bc/
- *** Failers
-No match
- abq
-No match
- abbbbc
-No match
-
-/ab?bc/
- abbc
- 0: abbc
- abc
- 0: abc
-
-/ab{0,1}bc/
- abc
- 0: abc
-
-/ab?bc/
-
-/ab?c/
- abc
- 0: abc
-
-/ab{0,1}c/
- abc
- 0: abc
-
-/^abc$/
- abc
- 0: abc
- *** Failers
-No match
- abbbbc
-No match
- abcc
-No match
-
-/^abc/
- abcc
- 0: abc
-
-/^abc$/
-
-/abc$/
- aabc
- 0: abc
- *** Failers
-No match
- aabc
- 0: abc
- aabcd
-No match
-
-/^/
- abc
- 0:
-
-/$/
- abc
- 0:
-
-/a.c/
- abc
- 0: abc
- axc
- 0: axc
-
-/a.*c/
- axyzc
- 0: axyzc
-
-/a[bc]d/
- abd
- 0: abd
- *** Failers
-No match
- axyzd
-No match
- abc
-No match
-
-/a[b-d]e/
- ace
- 0: ace
-
-/a[b-d]/
- aac
- 0: ac
-
-/a[-b]/
- a-
- 0: a-
-
-/a[b-]/
- a-
- 0: a-
-
-/a]/
- a]
- 0: a]
-
-/a[]]b/
- a]b
- 0: a]b
-
-/a[^bc]d/
- aed
- 0: aed
- *** Failers
-No match
- abd
-No match
- abd
-No match
-
-/a[^-b]c/
- adc
- 0: adc
-
-/a[^]b]c/
- adc
- 0: adc
- *** Failers
-No match
- a-c
- 0: a-c
- a]c
-No match
-
-/\ba\b/
- a-
- 0: a
- -a
- 0: a
- -a-
- 0: a
-
-/\by\b/
- *** Failers
-No match
- xy
-No match
- yz
-No match
- xyz
-No match
-
-/\Ba\B/
- *** Failers
- 0: a
- a-
-No match
- -a
-No match
- -a-
-No match
-
-/\By\b/
- xy
- 0: y
-
-/\by\B/
- yz
- 0: y
-
-/\By\B/
- xyz
- 0: y
-
-/\w/
- a
- 0: a
-
-/\W/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- a
-No match
-
-/a\sb/
- a b
- 0: a b
-
-/a\Sb/
- a-b
- 0: a-b
- *** Failers
-No match
- a-b
- 0: a-b
- a b
-No match
-
-/\d/
- 1
- 0: 1
-
-/\D/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- 1
-No match
-
-/[\w]/
- a
- 0: a
-
-/[\W]/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- a
-No match
-
-/a[\s]b/
- a b
- 0: a b
-
-/a[\S]b/
- a-b
- 0: a-b
- *** Failers
-No match
- a-b
- 0: a-b
- a b
-No match
-
-/[\d]/
- 1
- 0: 1
-
-/[\D]/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- 1
-No match
-
-/ab|cd/
- abc
- 0: ab
- abcd
- 0: ab
-
-/()ef/
- def
- 0: ef
- 1:
-
-/$b/
-
-/a\(b/
- a(b
- 0: a(b
-
-/a\(*b/
- ab
- 0: ab
- a((b
- 0: a((b
-
-/a\\b/
- a\b
-No match
-
-/((a))/
- abc
- 0: a
- 1: a
- 2: a
-
-/(a)b(c)/
- abc
- 0: abc
- 1: a
- 2: c
-
-/a+b+c/
- aabbabc
- 0: abc
-
-/a{1,}b{1,}c/
- aabbabc
- 0: abc
-
-/a.+?c/
- abcabc
- 0: abc
-
-/(a+|b)*/
- ab
- 0: ab
- 1: b
-
-/(a+|b){0,}/
- ab
- 0: ab
- 1: b
-
-/(a+|b)+/
- ab
- 0: ab
- 1: b
-
-/(a+|b){1,}/
- ab
- 0: ab
- 1: b
-
-/(a+|b)?/
- ab
- 0: a
- 1: a
-
-/(a+|b){0,1}/
- ab
- 0: a
- 1: a
-
-/[^ab]*/
- cde
- 0: cde
-
-/abc/
- *** Failers
-No match
- b
-No match
-
-
-/a*/
-
-
-/([abc])*d/
- abbbcd
- 0: abbbcd
- 1: c
-
-/([abc])*bcd/
- abcd
- 0: abcd
- 1: a
-
-/a|b|c|d|e/
- e
- 0: e
-
-/(a|b|c|d|e)f/
- ef
- 0: ef
- 1: e
-
-/abcd*efg/
- abcdefg
- 0: abcdefg
-
-/ab*/
- xabyabbbz
- 0: ab
- xayabbbz
- 0: a
-
-/(ab|cd)e/
- abcde
- 0: cde
- 1: cd
-
-/[abhgefdc]ij/
- hij
- 0: hij
-
-/^(ab|cd)e/
-
-/(abc|)ef/
- abcdef
- 0: ef
- 1:
-
-/(a|b)c*d/
- abcd
- 0: bcd
- 1: b
-
-/(ab|ab*)bc/
- abc
- 0: abc
- 1: a
-
-/a([bc]*)c*/
- abc
- 0: abc
- 1: bc
-
-/a([bc]*)(c*d)/
- abcd
- 0: abcd
- 1: bc
- 2: d
-
-/a([bc]+)(c*d)/
- abcd
- 0: abcd
- 1: bc
- 2: d
-
-/a([bc]*)(c+d)/
- abcd
- 0: abcd
- 1: b
- 2: cd
-
-/a[bcd]*dcdcde/
- adcdcde
- 0: adcdcde
-
-/a[bcd]+dcdcde/
- *** Failers
-No match
- abcde
-No match
- adcdcde
-No match
-
-/(ab|a)b*c/
- abc
- 0: abc
- 1: ab
-
-/((a)(b)c)(d)/
- abcd
- 0: abcd
- 1: abc
- 2: a
- 3: b
- 4: d
-
-/[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
- 0: alpha
-
-/^a(bc+|b[eh])g|.h$/
- abh
- 0: bh
-
-/(bc+d$|ef*g.|h?i(j|k))/
- effgz
- 0: effgz
- 1: effgz
- ij
- 0: ij
- 1: ij
- 2: j
- reffgz
- 0: effgz
- 1: effgz
- *** Failers
-No match
- effg
-No match
- bcdd
-No match
-
-/((((((((((a))))))))))/
- a
- 0: a
- 1: a
- 2: a
- 3: a
- 4: a
- 5: a
- 6: a
- 7: a
- 8: a
- 9: a
-10: a
-
-/((((((((((a))))))))))\10/
- aa
- 0: aa
- 1: a
- 2: a
- 3: a
- 4: a
- 5: a
- 6: a
- 7: a
- 8: a
- 9: a
-10: a
-
-/(((((((((a)))))))))/
- a
- 0: a
- 1: a
- 2: a
- 3: a
- 4: a
- 5: a
- 6: a
- 7: a
- 8: a
- 9: a
-
-/multiple words of text/
- *** Failers
-No match
- aa
-No match
- uh-uh
-No match
-
-/multiple words/
- multiple words, yeah
- 0: multiple words
-
-/(.*)c(.*)/
- abcde
- 0: abcde
- 1: ab
- 2: de
-
-/\((.*), (.*)\)/
- (a, b)
- 0: (a, b)
- 1: a
- 2: b
-
-/[k]/
-
-/abcd/
- abcd
- 0: abcd
-
-/a(bc)d/
- abcd
- 0: abcd
- 1: bc
-
-/a[-]?c/
- ac
- 0: ac
-
-/(abc)\1/
- abcabc
- 0: abcabc
- 1: abc
-
-/([a-c]*)\1/
- abcabc
- 0: abcabc
- 1: abc
-
-/(a)|\1/
- a
- 0: a
- 1: a
- *** Failers
- 0: a
- 1: a
- ab
- 0: a
- 1: a
- x
-No match
-
-/(([a-c])b*?\2)*/
- ababbbcbc
- 0: ababb
- 1: bb
- 2: b
-
-/(([a-c])b*?\2){3}/
- ababbbcbc
- 0: ababbbcbc
- 1: cbc
- 2: c
-
-/((\3|b)\2(a)x)+/
- aaaxabaxbaaxbbax
- 0: bbax
- 1: bbax
- 2: b
- 3: a
-
-/((\3|b)\2(a)){2,}/
- bbaababbabaaaaabbaaaabba
- 0: bbaaaabba
- 1: bba
- 2: b
- 3: a
-
-/abc/i
- ABC
- 0: ABC
- XABCY
- 0: ABC
- ABABC
- 0: ABC
- *** Failers
-No match
- aaxabxbaxbbx
-No match
- XBC
-No match
- AXC
-No match
- ABX
-No match
-
-/ab*c/i
- ABC
- 0: ABC
-
-/ab*bc/i
- ABC
- 0: ABC
- ABBC
- 0: ABBC
-
-/ab*?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{0,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab+?bc/i
- ABBC
- 0: ABBC
-
-/ab+bc/i
- *** Failers
-No match
- ABC
-No match
- ABQ
-No match
-
-/ab{1,}bc/i
-
-/ab+bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,3}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{3,4}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{4,5}?bc/i
- *** Failers
-No match
- ABQ
-No match
- ABBBBC
-No match
-
-/ab??bc/i
- ABBC
- 0: ABBC
- ABC
- 0: ABC
-
-/ab{0,1}?bc/i
- ABC
- 0: ABC
-
-/ab??bc/i
-
-/ab??c/i
- ABC
- 0: ABC
-
-/ab{0,1}?c/i
- ABC
- 0: ABC
-
-/^abc$/i
- ABC
- 0: ABC
- *** Failers
-No match
- ABBBBC
-No match
- ABCC
-No match
-
-/^abc/i
- ABCC
- 0: ABC
-
-/^abc$/i
-
-/abc$/i
- AABC
- 0: ABC
-
-/^/i
- ABC
- 0:
-
-/$/i
- ABC
- 0:
-
-/a.c/i
- ABC
- 0: ABC
- AXC
- 0: AXC
-
-/a.*?c/i
- AXYZC
- 0: AXYZC
-
-/a.*c/i
- *** Failers
-No match
- AABC
- 0: AABC
- AXYZD
-No match
-
-/a[bc]d/i
- ABD
- 0: ABD
-
-/a[b-d]e/i
- ACE
- 0: ACE
- *** Failers
-No match
- ABC
-No match
- ABD
-No match
-
-/a[b-d]/i
- AAC
- 0: AC
-
-/a[-b]/i
- A-
- 0: A-
-
-/a[b-]/i
- A-
- 0: A-
-
-/a]/i
- A]
- 0: A]
-
-/a[]]b/i
- A]B
- 0: A]B
-
-/a[^bc]d/i
- AED
- 0: AED
-
-/a[^-b]c/i
- ADC
- 0: ADC
- *** Failers
-No match
- ABD
-No match
- A-C
-No match
-
-/a[^]b]c/i
- ADC
- 0: ADC
-
-/ab|cd/i
- ABC
- 0: AB
- ABCD
- 0: AB
-
-/()ef/i
- DEF
- 0: EF
- 1:
-
-/$b/i
- *** Failers
-No match
- A]C
-No match
- B
-No match
-
-/a\(b/i
- A(B
- 0: A(B
-
-/a\(*b/i
- AB
- 0: AB
- A((B
- 0: A((B
-
-/a\\b/i
- A\B
-No match
-
-/((a))/i
- ABC
- 0: A
- 1: A
- 2: A
-
-/(a)b(c)/i
- ABC
- 0: ABC
- 1: A
- 2: C
-
-/a+b+c/i
- AABBABC
- 0: ABC
-
-/a{1,}b{1,}c/i
- AABBABC
- 0: ABC
-
-/a.+?c/i
- ABCABC
- 0: ABC
-
-/a.*?c/i
- ABCABC
- 0: ABC
-
-/a.{0,5}?c/i
- ABCABC
- 0: ABC
-
-/(a+|b)*/i
- AB
- 0: AB
- 1: B
-
-/(a+|b){0,}/i
- AB
- 0: AB
- 1: B
-
-/(a+|b)+/i
- AB
- 0: AB
- 1: B
-
-/(a+|b){1,}/i
- AB
- 0: AB
- 1: B
-
-/(a+|b)?/i
- AB
- 0: A
- 1: A
-
-/(a+|b){0,1}/i
- AB
- 0: A
- 1: A
-
-/(a+|b){0,1}?/i
- AB
- 0:
-
-/[^ab]*/i
- CDE
- 0: CDE
-
-/abc/i
-
-/a*/i
-
-
-/([abc])*d/i
- ABBBCD
- 0: ABBBCD
- 1: C
-
-/([abc])*bcd/i
- ABCD
- 0: ABCD
- 1: A
-
-/a|b|c|d|e/i
- E
- 0: E
-
-/(a|b|c|d|e)f/i
- EF
- 0: EF
- 1: E
-
-/abcd*efg/i
- ABCDEFG
- 0: ABCDEFG
-
-/ab*/i
- XABYABBBZ
- 0: AB
- XAYABBBZ
- 0: A
-
-/(ab|cd)e/i
- ABCDE
- 0: CDE
- 1: CD
-
-/[abhgefdc]ij/i
- HIJ
- 0: HIJ
-
-/^(ab|cd)e/i
- ABCDE
-No match
-
-/(abc|)ef/i
- ABCDEF
- 0: EF
- 1:
-
-/(a|b)c*d/i
- ABCD
- 0: BCD
- 1: B
-
-/(ab|ab*)bc/i
- ABC
- 0: ABC
- 1: A
-
-/a([bc]*)c*/i
- ABC
- 0: ABC
- 1: BC
-
-/a([bc]*)(c*d)/i
- ABCD
- 0: ABCD
- 1: BC
- 2: D
-
-/a([bc]+)(c*d)/i
- ABCD
- 0: ABCD
- 1: BC
- 2: D
-
-/a([bc]*)(c+d)/i
- ABCD
- 0: ABCD
- 1: B
- 2: CD
-
-/a[bcd]*dcdcde/i
- ADCDCDE
- 0: ADCDCDE
-
-/a[bcd]+dcdcde/i
-
-/(ab|a)b*c/i
- ABC
- 0: ABC
- 1: AB
-
-/((a)(b)c)(d)/i
- ABCD
- 0: ABCD
- 1: ABC
- 2: A
- 3: B
- 4: D
-
-/[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
- 0: ALPHA
-
-/^a(bc+|b[eh])g|.h$/i
- ABH
- 0: BH
-
-/(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- 0: EFFGZ
- 1: EFFGZ
- IJ
- 0: IJ
- 1: IJ
- 2: J
- REFFGZ
- 0: EFFGZ
- 1: EFFGZ
- *** Failers
-No match
- ADCDCDE
-No match
- EFFG
-No match
- BCDD
-No match
-
-/((((((((((a))))))))))/i
- A
- 0: A
- 1: A
- 2: A
- 3: A
- 4: A
- 5: A
- 6: A
- 7: A
- 8: A
- 9: A
-10: A
-
-/((((((((((a))))))))))\10/i
- AA
- 0: AA
- 1: A
- 2: A
- 3: A
- 4: A
- 5: A
- 6: A
- 7: A
- 8: A
- 9: A
-10: A
-
-/(((((((((a)))))))))/i
- A
- 0: A
- 1: A
- 2: A
- 3: A
- 4: A
- 5: A
- 6: A
- 7: A
- 8: A
- 9: A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
- 0: A
- 1: A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
- 0: C
- 1: C
-
-/multiple words of text/i
- *** Failers
-No match
- AA
-No match
- UH-UH
-No match
-
-/multiple words/i
- MULTIPLE WORDS, YEAH
- 0: MULTIPLE WORDS
-
-/(.*)c(.*)/i
- ABCDE
- 0: ABCDE
- 1: AB
- 2: DE
-
-/\((.*), (.*)\)/i
- (A, B)
- 0: (A, B)
- 1: A
- 2: B
-
-/[k]/i
-
-/abcd/i
- ABCD
- 0: ABCD
-
-/a(bc)d/i
- ABCD
- 0: ABCD
- 1: BC
-
-/a[-]?c/i
- AC
- 0: AC
-
-/(abc)\1/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/([a-c]*)\1/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/a(?!b)./
- abad
- 0: ad
-
-/a(?=d)./
- abad
- 0: ad
-
-/a(?=c|d)./
- abad
- 0: ad
-
-/a(?:b|c|d)(.)/
- ace
- 0: ace
- 1: e
-
-/a(?:b|c|d)*(.)/
- ace
- 0: ace
- 1: e
-
-/a(?:b|c|d)+?(.)/
- ace
- 0: ace
- 1: e
- acdbcdbe
- 0: acd
- 1: d
-
-/a(?:b|c|d)+(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){2}(.)/
- acdbcdbe
- 0: acdb
- 1: b
-
-/a(?:b|c|d){4,5}(.)/
- acdbcdbe
- 0: acdbcdb
- 1: b
-
-/a(?:b|c|d){4,5}?(.)/
- acdbcdbe
- 0: acdbcd
- 1: d
-
-/((foo)|(bar))*/
- foobar
- 0: foobar
- 1: bar
- 2: foo
- 3: bar
-
-/a(?:b|c|d){6,7}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){6,7}?(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){5,6}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){5,6}?(.)/
- acdbcdbe
- 0: acdbcdb
- 1: b
-
-/a(?:b|c|d){5,7}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){5,7}?(.)/
- acdbcdbe
- 0: acdbcdb
- 1: b
-
-/a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
- 0: ace
- 1: c
- 2: e
-
-/^(.+)?B/
- AB
- 0: AB
- 1: A
-
-/^([^a-z])|(\^)$/
- .
- 0: .
- 1: .
-
-/^[<>]&/
- <&OUT
- 0: <&
-
-/^(a\1?){4}$/
- aaaaaaaaaa
- 0: aaaaaaaaaa
- 1: aaaa
- *** Failers
-No match
- AB
-No match
- aaaaaaaaa
-No match
- aaaaaaaaaaa
-No match
-
-/^(a(?(1)\1)){4}$/
- aaaaaaaaaa
- 0: aaaaaaaaaa
- 1: aaaa
- *** Failers
-No match
- aaaaaaaaa
-No match
- aaaaaaaaaaa
-No match
-
-/(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
- 0: foobar
- 1: f
- 2: o
- 3: o
- 4: b
- 5: a
- 6: r
-
-/(?<=a)b/
- ab
- 0: b
- *** Failers
-No match
- cb
-No match
- b
-No match
-
-/(?<!c)b/
- ab
- 0: b
- b
- 0: b
- b
- 0: b
-
-/(?:..)*a/
- aba
- 0: aba
-
-/(?:..)*?a/
- aba
- 0: a
-
-/^(?:b|a(?=(.)))*\1/
- abc
- 0: ab
- 1: b
-
-/^(){3,5}/
- abc
- 0:
- 1:
-
-/^(a+)*ax/
- aax
- 0: aax
- 1: a
-
-/^((a|b)+)*ax/
- aax
- 0: aax
- 1: a
- 2: a
-
-/^((a|bc)+)*ax/
- aax
- 0: aax
- 1: a
- 2: a
-
-/(a|x)*ab/
- cab
- 0: ab
-
-/(a)*ab/
- cab
- 0: ab
-
-/(?:(?i)a)b/
- ab
- 0: ab
-
-/((?i)a)b/
- ab
- 0: ab
- 1: a
-
-/(?:(?i)a)b/
- Ab
- 0: Ab
-
-/((?i)a)b/
- Ab
- 0: Ab
- 1: A
-
-/(?:(?i)a)b/
- *** Failers
-No match
- cb
-No match
- aB
-No match
-
-/((?i)a)b/
-
-/(?i:a)b/
- ab
- 0: ab
-
-/((?i:a))b/
- ab
- 0: ab
- 1: a
-
-/(?i:a)b/
- Ab
- 0: Ab
-
-/((?i:a))b/
- Ab
- 0: Ab
- 1: A
-
-/(?i:a)b/
- *** Failers
-No match
- aB
-No match
- aB
-No match
-
-/((?i:a))b/
-
-/(?:(?-i)a)b/i
- ab
- 0: ab
-
-/((?-i)a)b/i
- ab
- 0: ab
- 1: a
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
- 1: a
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- aB
- 0: aB
- Ab
-No match
-
-/((?-i)a)b/i
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
- 1: a
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i)a)b/i
-
-/(?-i:a)b/i
- ab
- 0: ab
-
-/((?-i:a))b/i
- ab
- 0: ab
- 1: a
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
- 1: a
-
-/(?-i:a)b/i
- *** Failers
-No match
- AB
-No match
- Ab
-No match
-
-/((?-i:a))b/i
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
- 1: a
-
-/(?-i:a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i:a))b/i
-
-/((?-i:a.))b/i
- *** Failers
-No match
- AB
-No match
- a\nB
-No match
-
-/((?s-i:a.))b/i
- a\nB
- 0: a\x0aB
- 1: a\x0a
-
-/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
- 0: cabbbb
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
- 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-
-/(ab)\d\1/i
- Ab4ab
- 0: Ab4ab
- 1: Ab
- ab4Ab
- 0: ab4Ab
- 1: ab
-
-/foo\w*\d{4}baz/
- foobar1234baz
- 0: foobar1234baz
-
-/x(~~)*(?:(?:F)?)?/
- x~~
- 0: x~~
- 1: ~~
-
-/^a(?#xxx){3}c/
- aaac
- 0: aaac
-
-/^a (?#xxx) (?#yyy) {3}c/x
- aaac
- 0: aaac
-
-/(?<![cd])b/
- *** Failers
-No match
- B\nB
-No match
- dbcb
-No match
-
-/(?<![cd])[ab]/
- dbaacb
- 0: a
-
-/(?<!(c|d))b/
-
-/(?<!(c|d))[ab]/
- dbaacb
- 0: a
-
-/(?<!cd)[ab]/
- cdaccb
- 0: b
-
-/^(?:a?b?)*$/
- \
- 0:
- a
- 0: a
- ab
- 0: ab
- aaa
- 0: aaa
- *** Failers
-No match
- dbcb
-No match
- a--
-No match
- aa--
-No match
-
-/((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
- 0: a\x0ab
- 1: a\x0a
- 2: \x0a
- 3: b
-
-/((?m)^b$)/
- a\nb\nc\n
- 0: b
- 1: b
-
-/(?m)^b/
- a\nb\n
- 0: b
-
-/(?m)^(b)/
- a\nb\n
- 0: b
- 1: b
-
-/((?m)^b)/
- a\nb\n
- 0: b
- 1: b
-
-/\n((?m)^b)/
- a\nb\n
- 0: \x0ab
- 1: b
-
-/((?s).)c(?!.)/
- a\nb\nc\n
- 0: \x0ac
- 1: \x0a
- a\nb\nc\n
- 0: \x0ac
- 1: \x0a
-
-/((?s)b.)c(?!.)/
- a\nb\nc\n
- 0: b\x0ac
- 1: b\x0a
- a\nb\nc\n
- 0: b\x0ac
- 1: b\x0a
-
-/^b/
-
-/()^b/
- *** Failers
-No match
- a\nb\nc\n
-No match
- a\nb\nc\n
-No match
-
-/((?m)^b)/
- a\nb\nc\n
- 0: b
- 1: b
-
-/(x)?(?(1)a|b)/
- *** Failers
-No match
- a
-No match
- a
-No match
-
-/(x)?(?(1)b|a)/
- a
- 0: a
-
-/()?(?(1)b|a)/
- a
- 0: a
-
-/()(?(1)b|a)/
-
-/()?(?(1)a|b)/
- a
- 0: a
- 1:
-
-/^(\()?blah(?(1)(\)))$/
- (blah)
- 0: (blah)
- 1: (
- 2: )
- blah
- 0: blah
- *** Failers
-No match
- a
-No match
- blah)
-No match
- (blah
-No match
-
-/^(\(+)?blah(?(1)(\)))$/
- (blah)
- 0: (blah)
- 1: (
- 2: )
- blah
- 0: blah
- *** Failers
-No match
- blah)
-No match
- (blah
-No match
-
-/(?(?!a)a|b)/
-
-/(?(?!a)b|a)/
- a
- 0: a
-
-/(?(?=a)b|a)/
- *** Failers
-No match
- a
-No match
- a
-No match
-
-/(?(?=a)a|b)/
- a
- 0: a
-
-/(?=(a+?))(\1ab)/
- aaab
- 0: aab
- 1: a
- 2: aab
-
-/^(?=(a+?))\1ab/
-
-/(\w+:)+/
- one:
- 0: one:
- 1: one:
-
-/$(?<=^(a))/
- a
- 0:
- 1: a
-
-/(?=(a+?))(\1ab)/
- aaab
- 0: aab
- 1: a
- 2: aab
-
-/^(?=(a+?))\1ab/
- *** Failers
-No match
- aaab
-No match
- aaab
-No match
-
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- 1: <unset>
- 2: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
- 1: xy:z:::
- 2: abcd
-
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
- 1: c
-
-/(a*)b+/
- caab
- 0: aab
- 1: aa
-
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- 1: <unset>
- 2: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
- 1: xy:z:::
- 2: abcd
- *** Failers
- 0: Failers
- 1: <unset>
- 2: Failers
- abcd:
-No match
- abcd:
-No match
-
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
- 1: c
-
-/(>a+)ab/
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/([[:]+)/
- a:[b]:
- 0: :[
- 1: :[
-
-/([[=]+)/
- a=[b]=
- 0: =[
- 1: =[
-
-/([[.]+)/
- a.[b].
- 0: .[
- 1: .[
-
-/((?>a+)b)/
- aaab
- 0: aaab
- 1: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
- 1: aaa
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: x
-
-/a\Z/
- *** Failers
-No match
- aaab
-No match
- a\nb\n
-No match
-
-/b\Z/
- a\nb\n
- 0: b
-
-/b\z/
-
-/b\Z/
- a\nb
- 0: b
-
-/b\z/
- a\nb
- 0: b
- *** Failers
-No match
-
-/^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
- a
- 0: a
- 1:
- abc
- 0: abc
- 1:
- a-b
- 0: a-b
- 1:
- 0-9
- 0: 0-9
- 1:
- a.b
- 0: a.b
- 1:
- 5.6.7
- 0: 5.6.7
- 1:
- the.quick.brown.fox
- 0: the.quick.brown.fox
- 1:
- a100.b200.300c
- 0: a100.b200.300c
- 1:
- 12-ab.1245
- 0: 12-ab.1245
- 1:
- *** Failers
-No match
- \
-No match
- .a
-No match
- -a
-No match
- a-
-No match
- a.
-No match
- a_b
-No match
- a.-
-No match
- a..
-No match
- ab..bc
-No match
- the.quick.brown.fox-
-No match
- the.quick.brown.fox.
-No match
- the.quick.brown.fox_
-No match
- the.quick.brown.fox+
-No match
-
-/(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- 0: alphabetabcd
- 1: abcd
- endingwxyz
- 0: endingwxyz
- 1: wxyz
- *** Failers
-No match
- a rather long string that doesn't end with one of them
-No match
-
-/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-No match
-
-/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-No match
-
-/(?<=\d{3}(?!999))foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
-
-/(?<=(?!...999)\d{3})foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
-
-/(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
- *** Failers
-No match
- 123999foo
-No match
-
-/(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
- *** Failers
-No match
- 123999foo
-No match
-
-/<a[\s]+href[\s]*=[\s]* # find <a href=
- ([\"\'])? # find single or double quote
- (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- 0: <a href=abcd
- 1: <unset>
- 2: <unset>
- 3: abcd
- <a href=\"abcd xyz pqr\" cats
- 0: <a href="abcd xyz pqr"
- 1: "
- 2: abcd xyz pqr
- <a href=\'abcd xyz pqr\' cats
- 0: <a href='abcd xyz pqr'
- 1: '
- 2: abcd xyz pqr
-
-/<a\s+href\s*=\s* # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- 0: <a href=abcd
- 1: <unset>
- 2: <unset>
- 3: abcd
- <a href=\"abcd xyz pqr\" cats
- 0: <a href="abcd xyz pqr"
- 1: "
- 2: abcd xyz pqr
- <a href = \'abcd xyz pqr\' cats
- 0: <a href = 'abcd xyz pqr'
- 1: '
- 2: abcd xyz pqr
-
-/<a\s+href(?>\s*)=(?>\s*) # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- 0: <a href=abcd
- 1: <unset>
- 2: <unset>
- 3: abcd
- <a href=\"abcd xyz pqr\" cats
- 0: <a href="abcd xyz pqr"
- 1: "
- 2: abcd xyz pqr
- <a href = \'abcd xyz pqr\' cats
- 0: <a href = 'abcd xyz pqr'
- 1: '
- 2: abcd xyz pqr
-
-/((Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: A
- 2: Z
-
-/(Z()|A)*/
- ZABCDEFG
- 0: ZA
- 1: A
- 2:
-
-/(Z(())|A)*/
- ZABCDEFG
- 0: ZA
- 1: A
- 2:
- 3:
-
-/((?>Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: A
-
-/((?>)+|A)*/
- ZABCDEFG
- 0:
- 1:
-
-/a*/g
- abbab
- 0: a
- 0:
- 0:
- 0: a
- 0:
- 0:
-
-/^[a-\d]/
- abcde
- 0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
-No match
- bcdef
-No match
-
-/^[\d-a]/
- abcde
- 0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
-No match
- bcdef
-No match
-
-/[[:space:]]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d\x0b
-
-/[[:blank:]]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09
-
-/[\s]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d
-
-/\s+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d
-
-/a b/x
- ab
-No match
-
-/(?!\A)x/m
- a\nxb\n
- 0: x
-
-/(?!^)x/m
- a\nxb\n
-No match
-
-/abc\Qabc\Eabc/
- abcabcabc
- 0: abcabcabc
-
-/abc\Q(*+|\Eabc/
- abc(*+|abc
- 0: abc(*+|abc
-
-/ abc\Q abc\Eabc/x
- abc abcabc
- 0: abc abcabc
- *** Failers
-No match
- abcabcabc
-No match
-
-/abc#comment
- \Q#not comment
- literal\E/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment
- /x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/\Qabc\$xyz\E/
- abc\\\$xyz
- 0: abc\$xyz
-
-/\Qabc\E\$\Qxyz\E/
- abc\$xyz
- 0: abc$xyz
-
-/\Gabc/
- abc
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
-
-/\Gabc./g
- abc1abc2xyzabc3
- 0: abc1
- 0: abc2
-
-/abc./g
- abc1abc2xyzabc3
- 0: abc1
- 0: abc2
- 0: abc3
-
-/a(?x: b c )d/
- XabcdY
- 0: abcd
- *** Failers
-No match
- Xa b c d Y
-No match
-
-/((?x)x y z | a b c)/
- XabcY
- 0: abc
- 1: abc
- AxyzB
- 0: xyz
- 1: xyz
-
-/(?i)AB(?-i)C/
- XabCY
- 0: abC
- *** Failers
-No match
- XabcY
-No match
-
-/((?i)AB(?-i)C|D)E/
- abCE
- 0: abCE
- 1: abC
- DE
- 0: DE
- 1: D
- *** Failers
-No match
- abcE
-No match
- abCe
-No match
- dE
-No match
- De
-No match
-
-/(.*)\d+\1/
- abc123abc
- 0: abc123abc
- 1: abc
- abc123bc
- 0: bc123bc
- 1: bc
-
-/(.*)\d+\1/s
- abc123abc
- 0: abc123abc
- 1: abc
- abc123bc
- 0: bc123bc
- 1: bc
-
-/((.*))\d+\1/
- abc123abc
- 0: abc123abc
- 1: abc
- 2: abc
- abc123bc
- 0: bc123bc
- 1: bc
- 2: bc
-
-/-- This tests for an IPv6 address in the form where it can have up to --/
-/-- eight components, one and only one of which is empty. This must be --/
-No match
-/-- an internal component. --/
-No match
-
-/^(?!:) # colon disallowed at start
- (?: # start of item
- (?: [0-9a-f]{1,4} | # 1-4 hex digits or
- (?(1)0 | () ) ) # if null previously matched, fail; else null
- : # followed by colon
- ){1,7} # end item; 1-7 of them required
- [0-9a-f]{1,4} $ # final hex number at end of string
- (?(1)|.) # check that there was an empty component
- /xi
- a123::a123
- 0: a123::a123
- 1:
- a123:b342::abcd
- 0: a123:b342::abcd
- 1:
- a123:b342::324e:abcd
- 0: a123:b342::324e:abcd
- 1:
- a123:ddde:b342::324e:abcd
- 0: a123:ddde:b342::324e:abcd
- 1:
- a123:ddde:b342::324e:dcba:abcd
- 0: a123:ddde:b342::324e:dcba:abcd
- 1:
- a123:ddde:9999:b342::324e:dcba:abcd
- 0: a123:ddde:9999:b342::324e:dcba:abcd
- 1:
- *** Failers
-No match
- 1:2:3:4:5:6:7:8
-No match
- a123:bce:ddde:9999:b342::324e:dcba:abcd
-No match
- a123::9999:b342::324e:dcba:abcd
-No match
- abcde:2:3:4:5:6:7:8
-No match
- ::1
-No match
- abcd:fee0:123::
-No match
- :1
-No match
- 1:
-No match
-
-/[z\Qa-d]\E]/
- z
- 0: z
- a
- 0: a
- -
- 0: -
- d
- 0: d
- ]
- 0: ]
- *** Failers
- 0: a
- b
-No match
-
-/[\z\C]/
- z
- 0: z
- C
- 0: C
-
-/\M/
- M
- 0: M
-
-/(a+)*b/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/(?i)reg(?:ul(?:[a]|ae)r|ex)/
- REGular
- 0: REGular
- regulaer
- 0: regulaer
- Regex
- 0: Regex
- regulr
- 0: regul\xe4r
-
-/[--]+/
-
- 0: \xc5\xe6\xe5\xe4\xe0
-
- 0: \xc5\xe6\xe5\xe4\xff
-
- 0: \xc5\xe6\xe5\xe4\xc0
-
- 0: \xc5\xe6\xe5\xe4\xdf
-
-/(?<=Z)X./
- \x84XAZXB
- 0: XB
-
-/ab cd (?x) de fg/
- ab cd defg
- 0: ab cd defg
-
-/ab cd(?x) de fg/
- ab cddefg
- 0: ab cddefg
- ** Failers
-No match
- abcddefg
-No match
-
-/(?<![^f]oo)(bar)/
- foobarX
- 0: bar
- 1: bar
- ** Failers
-No match
- boobarX
-No match
-
-/(?<![^f])X/
- offX
- 0: X
- ** Failers
-No match
- onyX
-No match
-
-/(?<=[^f])X/
- onyX
- 0: X
- ** Failers
-No match
- offX
-No match
-
-/^/mg
- a\nb\nc\n
- 0:
- 0:
- 0:
- \
- 0:
-
-/(?<=C\n)^/mg
- A\nC\nC\n
- 0:
-
-/(?:(?(1)a|b)(X))+/
- bXaX
- 0: bXaX
- 1: X
-
-/(?:(?(1)\1a|b)(X|Y))+/
- bXXaYYaY
- 0: bXXaYYaY
- 1: Y
- bXYaXXaX
- 0: bX
- 1: X
-
-/()()()()()()()()()(?:(?(10)\10a|b)(X|Y))+/
- bXXaYYaY
- 0: bX
- 1:
- 2:
- 3:
- 4:
- 5:
- 6:
- 7:
- 8:
- 9:
-10: X
-
-/[[,abc,]+]/
- abc]
- 0: abc]
- a,b]
- 0: a,b]
- [a,b,c]
- 0: [a,b,c]
-
-/(?-x: )/x
- A\x20B
- 0:
-
-"(?x)(?-x: \s*#\s*)"
- A # B
- 0: #
- ** Failers
-No match
- #
-No match
-
-"(?x-is)(?:(?-ixs) \s*#\s*) include"
- A #include
- 0: #include
- ** Failers
-No match
- A#include
-No match
- A #Include
-No match
-
-/a*b*\w/
- aaabbbb
- 0: aaabbbb
- aaaa
- 0: aaaa
- a
- 0: a
-
-/a*b?\w/
- aaabbbb
- 0: aaabb
- aaaa
- 0: aaaa
- a
- 0: a
-
-/a*b{0,4}\w/
- aaabbbb
- 0: aaabbbb
- aaaa
- 0: aaaa
- a
- 0: a
-
-/a*b{0,}\w/
- aaabbbb
- 0: aaabbbb
- aaaa
- 0: aaaa
- a
- 0: a
-
-/a*\d*\w/
- 0a
- 0: 0a
- a
- 0: a
-
-/a*b *\w/x
- a
- 0: a
-
-/a*b#comment
- *\w/x
- a
- 0: a
-
-/a* b *\w/x
- a
- 0: a
-
-/^\w+=.*(\\\n.*)*/
- abc=xyz\\\npqr
- 0: abc=xyz\
-
-/(?=(\w+))\1:/
- abcd:
- 0: abcd:
- 1: abcd
-
-/^(?=(\w+))\1:/
- abcd:
- 0: abcd:
- 1: abcd
-
-/^\Eabc/
- abc
- 0: abc
-
-/^[\Eabc]/
- a
- 0: a
- ** Failers
-No match
- E
-No match
-
-/^[a-\Ec]/
- b
- 0: b
- ** Failers
-No match
- -
-No match
- E
-No match
-
-/^[a\E\E-\Ec]/
- b
- 0: b
- ** Failers
-No match
- -
-No match
- E
-No match
-
-/^[\E\Qa\E-\Qz\E]+/
- b
- 0: b
- ** Failers
-No match
- -
-No match
-
-/^[a\Q]bc\E]/
- a
- 0: a
- ]
- 0: ]
- c
- 0: c
-
-/^[a-\Q\E]/
- a
- 0: a
- -
- 0: -
-
-/^(a()*)*/
- aaaa
- 0: aaaa
- 1: a
- 2:
-
-/^(?:a(?:(?:))*)*/
- aaaa
- 0: aaaa
-
-/^(a()+)+/
- aaaa
- 0: aaaa
- 1: a
- 2:
-
-/^(?:a(?:(?:))+)+/
- aaaa
- 0: aaaa
-
-/(a){0,3}(?(1)b|(c|))*D/
- abbD
- 0: abbD
- 1: a
- ccccD
- 0: ccccD
- 1: <unset>
- 2:
- D
- 0: D
- 1: <unset>
- 2:
-
-/(a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 1:
-
-/(?>a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?:a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/\Z/g
- abc\n
- 0:
- 0:
-
-/^(?s)(?>.*)(?<!\n)/
- abc
- 0: abc
- abc\n
-No match
-
-/^(?![^\n]*\n\z)/
- abc
- 0:
- abc\n
-No match
-
-/\z(?<!\n)/
- abc
- 0:
- abc\n
-No match
-
-/(.*(.)?)*/
- abcd
- 0: abcd
- 1:
-
-/( (A | (?(1)0|) )* )/x
- abcd
- 0:
- 1:
- 2:
-
-/( ( (?(1)0|) )* )/x
- abcd
- 0:
- 1:
- 2:
-
-/( (?(1)0|)* )/x
- abcd
- 0:
- 1:
-
-/[[:abcd:xyz]]/
- a]
- 0: a]
- :]
- 0: :]
-
-/[abc[:x\]pqr]/
- a
- 0: a
- [
- 0: [
- :
- 0: :
- ]
- 0: ]
- p
- 0: p
-
-/.*[op][xyz]/
- fooabcfoo
-No match
-
-/(?(?=.*b)b|^)/
- adc
- 0:
- abc
- 0: b
-
-/(?(?=^.*b)b|^)/
- adc
- 0:
- abc
-No match
-
-/(?(?=.*b)b|^)*/
- adc
- 0:
- abc
- 0:
-
-/(?(?=.*b)b|^)+/
- adc
- 0:
- abc
- 0: b
-
-/(?(?=b).*b|^d)/
- abc
- 0: b
-
-/(?(?=.*b).*b|^d)/
- abc
- 0: ab
-
-/^%((?(?=[a])[^%])|b)*%$/
- %ab%
- 0: %ab%
- 1:
-
-/(?i)a(?-i)b|c/
- XabX
- 0: ab
- XAbX
- 0: Ab
- CcC
- 0: c
- ** Failers
-No match
- XABX
-No match
-
-/[\x00-\xff\s]+/
- \x0a\x0b\x0c\x0d
- 0: \x0a\x0b\x0c\x0d
-
-/^\c/
- ?
- 0: ?
-
-/(abc)\1/i
- abc
-No match
-
-/(abc)\1/
- abc
-No match
-
-/[^a]*/i
- 12abc
- 0: 12
- 12ABC
- 0: 12
-
-/[^a]*+/i
- 12abc
- 0: 12
- 12ABC
- 0: 12
-
-/[^a]*?X/i
- ** Failers
-No match
- 12abc
-No match
- 12ABC
-No match
-
-/[^a]+?X/i
- ** Failers
-No match
- 12abc
-No match
- 12ABC
-No match
-
-/[^a]?X/i
- 12aXbcX
- 0: X
- 12AXBCX
- 0: X
- BCX
- 0: CX
-
-/[^a]??X/i
- 12aXbcX
- 0: X
- 12AXBCX
- 0: X
- BCX
- 0: CX
-
-/[^a]?+X/i
- 12aXbcX
- 0: cX
- 12AXBCX
- 0: CX
- BCX
- 0: CX
-
-/[^a]{2,3}/i
- abcdef
- 0: bcd
- ABCDEF
- 0: BCD
-
-/[^a]{2,3}?/i
- abcdef
- 0: bc
- ABCDEF
- 0: BC
-
-/[^a]{2,3}+/i
- abcdef
- 0: bcd
- ABCDEF
- 0: BCD
-
-/((a|)+)+Z/
- Z
- 0: Z
- 1:
- 2:
-
-/(a)b|(a)c/
- ac
- 0: ac
- 1: <unset>
- 2: a
-
-/(?>(a))b|(a)c/
- ac
- 0: ac
- 1: <unset>
- 2: a
-
-/(?=(a))ab|(a)c/
- ac
- 0: ac
- 1: <unset>
- 2: a
-
-/((?>(a))b|(a)c)/
- ac
- 0: ac
- 1: ac
- 2: <unset>
- 3: a
-
-/((?>(a))b|(a)c)++/
- ac
- 0: ac
- 1: ac
- 2: <unset>
- 3: a
-
-/(?:(?>(a))b|(a)c)++/
- ac
- 0: ac
- 1: <unset>
- 2: a
-
-/(?=(?>(a))b|(a)c)(..)/
- ac
- 0: ac
- 1: <unset>
- 2: a
- 3: ac
-
-/(?>(?>(a))b|(a)c)/
- ac
- 0: ac
- 1: <unset>
- 2: a
-
-/(?:(?>([ab])))+a=/+
- =ba=
- 0: ba=
- 0+
- 1: b
-
-/(?>([ab]))+a=/+
- =ba=
- 0: ba=
- 0+
- 1: b
-
-/((?>(a+)b)+(aabab))/
- aaaabaaabaabab
- 0: aaaabaaabaabab
- 1: aaaabaaabaabab
- 2: aaa
- 3: aabab
-
-/(?>a+|ab)+?c/
- aabc
-No match
-
-/(?>a+|ab)+c/
- aabc
-No match
-
-/(?:a+|ab)+c/
- aabc
- 0: aabc
-
-/(?(?=(a))a)/
- a
- 0: a
- 1: a
-
-/(?(?=(a))a)(b)/
- ab
- 0: ab
- 1: a
- 2: b
-
-/^(?:a|ab)++c/
- aaaabc
-No match
-
-/^(?>a|ab)++c/
- aaaabc
-No match
-
-/^(?:a|ab)+c/
- aaaabc
- 0: aaaabc
-
-/(?=abc){3}abc/+
- abcabcabc
- 0: abc
- 0+ abcabc
- ** Failers
-No match
- xyz
-No match
-
-/(?=abc)+abc/+
- abcabcabc
- 0: abc
- 0+ abcabc
- ** Failers
-No match
- xyz
-No match
-
-/(?=abc)++abc/+
- abcabcabc
- 0: abc
- 0+ abcabc
- ** Failers
-No match
- xyz
-No match
-
-/(?=abc){0}xyz/
- xyz
- 0: xyz
-
-/(?=abc){1}xyz/
- ** Failers
-No match
- xyz
-No match
-
-/(?=(a))?./
- ab
- 0: a
- 1: a
- bc
- 0: b
-
-/(?=(a))??./
- ab
- 0: a
- bc
- 0: b
-
-/^(?=(a)){0}b(?1)/
- backgammon
- 0: ba
-
-/^(?=(?1))?[az]([abc])d/
- abd
- 0: abd
- 1: b
- zcdxx
- 0: zcd
- 1: c
-
-/^(?!a){0}\w+/
- aaaaa
- 0: aaaaa
-
-/(?<=(abc))?xyz/
- abcxyz
- 0: xyz
- 1: abc
- pqrxyz
- 0: xyz
-
-/^[\g<a>]+/
- ggg<<<aaa>>>
- 0: ggg<<<aaa>>>
- ** Failers
-No match
- \\ga
-No match
-
-/^[\ga]+/
- gggagagaxyz
- 0: gggagaga
-
-/^[:a[:digit:]]+/
- aaaa444:::Z
- 0: aaaa444:::
-
-/^[:a[:digit:]:b]+/
- aaaa444:::bbbZ
- 0: aaaa444:::bbb
-
-/[:a]xxx[b:]/
- :xxx:
- 0: :xxx:
-
-/(?<=a{2})b/i
- xaabc
- 0: b
- ** Failers
-No match
- xabc
-No match
-
-/(?<!a{2})b/i
- xabc
- 0: b
- ** Failers
-No match
- xaabc
-No match
-
-/(?<=a\h)c/
- xa c
- 0: c
-
-/(?<=[^a]{2})b/
- axxbc
- 0: b
- aAAbc
- 0: b
- ** Failers
-No match
- xaabc
-No match
-
-/(?<=[^a]{2})b/i
- axxbc
- 0: b
- ** Failers
-No match
- aAAbc
-No match
- xaabc
-No match
-
-/(?<=a\H)c/
- abc
- 0: c
-
-/(?<=a\V)c/
- abc
- 0: c
-
-/(?<=a\v)c/
- a\nc
- 0: c
-
-/(?(?=c)c|d)++Y/
- XcccddYX
- 0: cccddY
-
-/(?(?=c)c|d)*+Y/
- XcccddYX
- 0: cccddY
-
-/^(a{2,3}){2,}+a/
- aaaaaaa
- 0: aaaaaaa
- 1: aaa
- ** Failers
-No match
- aaaaaa
-No match
- aaaaaaaaa
-No match
-
-/^(a{2,3})++a/
- ** Failers
-No match
- aaaaaa
-No match
-
-/^(a{2,3})*+a/
- ** Failers
-No match
- aaaaaa
-No match
-
-/ab\Cde/
- abXde
- 0: abXde
-
-/(?<=ab\Cde)X/
- abZdeX
- 0: X
-
-/a[\CD]b/
- aCb
- 0: aCb
- aDb
- 0: aDb
-
-/a[\C-X]b/
- aJb
- 0: aJb
-
-/\H\h\V\v/
- X X\x0a
- 0: X X\x0a
- X\x09X\x0b
- 0: X\x09X\x0b
- ** Failers
-No match
- \xa0 X\x0a
-No match
-
-/\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0X\x0a\x0b\x0c\x0d
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0\x0a\x0b\x0c\x0d
- \x09\x20\xa0\x0a\x0b\x0c
- 0: \x09 \xa0\x0a\x0b\x0c
- ** Failers
-No match
- \x09\x20\xa0\x0a\x0b
-No match
-
-/\H{3,4}/
- XY ABCDE
- 0: ABCD
- XY PQR ST
- 0: PQR
-
-/.\h{3,4}./
- XY AB PQRS
- 0: B P
-
-/\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- 0: XNNNYZ
- > X NYQZ
- 0: X NYQZ
- ** Failers
-No match
- >XYZ
-No match
- > X NY Z
-No match
-
-/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- 0: XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
- 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
-
-/(foo)\Kbar/
- foobar
- 0: bar
- 1: foo
-
-/(foo)(\Kbar|baz)/
- foobar
- 0: bar
- 1: foo
- 2: bar
- foobaz
- 0: foobaz
- 1: foo
- 2: baz
-
-/(foo\Kbar)baz/
- foobarbaz
- 0: barbaz
- 1: foobar
-
-/abc\K|def\K/g+
- Xabcdefghi
- 0:
- 0+ defghi
- 0:
- 0+ ghi
-
-/ab\Kc|de\Kf/g+
- Xabcdefghi
- 0: c
- 0+ defghi
- 0: f
- 0+ ghi
-
-/(?=C)/g+
- ABCDECBA
- 0:
- 0+ CDECBA
- 0:
- 0+ CBA
-
-/^abc\K/+
- abcdef
- 0:
- 0+ def
- ** Failers
-No match
- defabcxyz
-No match
-
-/^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
- ababababbbabZXXXX
- 0: ababababbbabZ
- 1: ab
- 2: b
-
-/(?<A>tom|bon)-\g{A}/
- tom-tom
- 0: tom-tom
- 1: tom
- bon-bon
- 0: bon-bon
- 1: bon
-
-/(^(a|b\g{-1}))/
- bacxxx
-No match
-
-/(?|(abc)|(xyz))\1/
- abcabc
- 0: abcabc
- 1: abc
- xyzxyz
- 0: xyzxyz
- 1: xyz
- ** Failers
-No match
- abcxyz
-No match
- xyzabc
-No match
-
-/(?|(abc)|(xyz))(?1)/
- abcabc
- 0: abcabc
- 1: abc
- xyzabc
- 0: xyzabc
- 1: xyz
- ** Failers
-No match
- xyzxyz
-No match
-
-/^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/
- XYabcdY
- 0: XYabcdY
- 1: a
- 2: b
- 3: c
- 4: d
- 5: Y
-
-/^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/
- XYabcdY
- 0: XYabcdY
- 1: a
- 2: b
- 3: <unset>
- 4: <unset>
- 5: c
- 6: d
- 7: Y
-
-/^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/
- XYabcdY
- 0: XYabcdY
- 1: a
- 2: b
- 3: <unset>
- 4: <unset>
- 5: c
- 6: d
- 7: Y
-
-/(?'abc'\w+):\k<abc>{2}/
- a:aaxyz
- 0: a:aa
- 1: a
- ab:ababxyz
- 0: ab:abab
- 1: ab
- ** Failers
-No match
- a:axyz
-No match
- ab:abxyz
-No match
-
-/(?'abc'\w+):\g{abc}{2}/
- a:aaxyz
- 0: a:aa
- 1: a
- ab:ababxyz
- 0: ab:abab
- 1: ab
- ** Failers
-No match
- a:axyz
-No match
- ab:abxyz
-No match
-
-/^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
- abd
- 0: abd
- 1: a
- ce
- 0: ce
-
-/^(a.)\g-1Z/
- aXaXZ
- 0: aXaXZ
- 1: aX
-
-/^(a.)\g{-1}Z/
- aXaXZ
- 0: aXaXZ
- 1: aX
-
-/^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
- abcd
- 0: ab
-
-/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
- (?(DEFINE)
- (?<NAME_PAT>[a-z]+)
- (?<ADDRESS_PAT>\d+)
- )/x
- metcalfe 33
- 0: metcalfe 33
- 1: metcalfe
- 2: 33
-
-/(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
- 1.2.3.4
- 0: 1.2.3.4
- 1: <unset>
- 2: .4
- 131.111.10.206
- 0: 131.111.10.206
- 1: <unset>
- 2: .206
- 10.0.0.0
- 0: 10.0.0.0
- 1: <unset>
- 2: .0
- ** Failers
-No match
- 10.6
-No match
- 455.3.4.5
-No match
-
-/\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
- 1.2.3.4
- 0: 1.2.3.4
- 1: .4
- 131.111.10.206
- 0: 131.111.10.206
- 1: .206
- 10.0.0.0
- 0: 10.0.0.0
- 1: .0
- ** Failers
-No match
- 10.6
-No match
- 455.3.4.5
-No match
-
-/^(\w++|\s++)*$/
- now is the time for all good men to come to the aid of the party
- 0: now is the time for all good men to come to the aid of the party
- 1: party
- *** Failers
-No match
- this is not a line with only words and spaces!
-No match
-
-/(\d++)(\w)/
- 12345a
- 0: 12345a
- 1: 12345
- 2: a
- *** Failers
-No match
- 12345+
-No match
-
-/a++b/
- aaab
- 0: aaab
-
-/(a++b)/
- aaab
- 0: aaab
- 1: aaab
-
-/(a++)b/
- aaab
- 0: aaab
- 1: aaa
-
-/([^()]++|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: x
-
-/\(([^()]++|\([^()]+\))+\)/
- (abc)
- 0: (abc)
- 1: abc
- (abc(def)xyz)
- 0: (abc(def)xyz)
- 1: xyz
- *** Failers
-No match
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/^([^()]|\((?1)*\))*$/
- abc
- 0: abc
- 1: c
- a(b)c
- 0: a(b)c
- 1: c
- a(b(c))d
- 0: a(b(c))d
- 1: d
- *** Failers)
-No match
- a(b(c)d
-No match
-
-/^>abc>([^()]|\((?1)*\))*<xyz<$/
- >abc>123<xyz<
- 0: >abc>123<xyz<
- 1: 3
- >abc>1(2)3<xyz<
- 0: >abc>1(2)3<xyz<
- 1: 3
- >abc>(1(2)3)<xyz<
- 0: >abc>(1(2)3)<xyz<
- 1: (1(2)3)
-
-/^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
- 1221
- 0: 1221
- 1: 1221
- 2: 1
- Satanoscillatemymetallicsonatas
- 0: Satanoscillatemymetallicsonatas
- 1: <unset>
- 2: <unset>
- 3: Satanoscillatemymetallicsonatas
- 4: S
- AmanaplanacanalPanama
- 0: AmanaplanacanalPanama
- 1: <unset>
- 2: <unset>
- 3: AmanaplanacanalPanama
- 4: A
- AblewasIereIsawElba
- 0: AblewasIereIsawElba
- 1: <unset>
- 2: <unset>
- 3: AblewasIereIsawElba
- 4: A
- *** Failers
-No match
- Thequickbrownfox
-No match
-
-/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
- 12
- 0: 12
- 1: 12
- (((2+2)*-3)-7)
- 0: (((2+2)*-3)-7)
- 1: (((2+2)*-3)-7)
- 2: -
- -12
- 0: -12
- 1: -12
- *** Failers
-No match
- ((2+2)*-3)-7)
-No match
-
-/^(x(y|(?1){2})z)/
- xyz
- 0: xyz
- 1: xyz
- 2: y
- xxyzxyzz
- 0: xxyzxyzz
- 1: xxyzxyzz
- 2: xyzxyz
- *** Failers
-No match
- xxyzz
-No match
- xxyzxyzxyzz
-No match
-
-/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
- <>
- 0: <>
- 1: <>
- 2: <>
- <abcd>
- 0: <abcd>
- 1: <abcd>
- 2: <abcd>
- <abc <123> hij>
- 0: <abc <123> hij>
- 1: <abc <123> hij>
- 2: <abc <123> hij>
- <abc <def> hij>
- 0: <def>
- 1: <def>
- 2: <def>
- <abc<>def>
- 0: <abc<>def>
- 1: <abc<>def>
- 2: <abc<>def>
- <abc<>
- 0: <>
- 1: <>
- 2: <>
- *** Failers
-No match
- <abc
-No match
-
-/^a+(*FAIL)/
- aaaaaa
-No match
-
-/a+b?c+(*FAIL)/
- aaabccc
-No match
-
-/a+b?(*PRUNE)c+(*FAIL)/
- aaabccc
-No match
-
-/a+b?(*COMMIT)c+(*FAIL)/
- aaabccc
-No match
-
-/a+b?(*SKIP)c+(*FAIL)/
- aaabcccaaabccc
-No match
-
-/^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
- aaaxxxxxx
- 0: aaaxxxxxx
- aaa++++++
- 0: aaa
- bbbxxxxx
- 0: bbbxxxxx
- bbb+++++
- 0: bbb
- cccxxxx
- 0: cccxxxx
- ccc++++
- 0: ccc
- dddddddd
- 0: ddd
-
-/^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
- aaaxxxxxx
- 0: aaaxxxxxx
- 1: aaaxxxxxx
- aaa++++++
- 0: aaa
- 1: aaa
- bbbxxxxx
- 0: bbbxxxxx
- 1: bbbxxxxx
- bbb+++++
- 0: bbb
- 1: bbb
- cccxxxx
- 0: cccxxxx
- 1: cccxxxx
- ccc++++
- 0: ccc
- 1: ccc
- dddddddd
- 0: ddd
- 1: ddd
-
-/a+b?(*THEN)c+(*FAIL)/
- aaabccc
-No match
-
-/(A (A|B(*ACCEPT)|C) D)(E)/x
- AB
- 0: AB
- 1: AB
- 2: B
- ABX
- 0: AB
- 1: AB
- 2: B
- AADE
- 0: AADE
- 1: AAD
- 2: A
- 3: E
- ACDE
- 0: ACDE
- 1: ACD
- 2: C
- 3: E
- ** Failers
-No match
- AD
-No match
-
-/^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$/i
- 1221
- 0: 1221
- 1: 1221
- 2: 1
- Satan, oscillate my metallic sonatas!
- 0: Satan, oscillate my metallic sonatas!
- 1: <unset>
- 2: <unset>
- 3: Satan, oscillate my metallic sonatas
- 4: S
- A man, a plan, a canal: Panama!
- 0: A man, a plan, a canal: Panama!
- 1: <unset>
- 2: <unset>
- 3: A man, a plan, a canal: Panama
- 4: A
- Able was I ere I saw Elba.
- 0: Able was I ere I saw Elba.
- 1: <unset>
- 2: <unset>
- 3: Able was I ere I saw Elba
- 4: A
- *** Failers
-No match
- The quick brown fox
-No match
-
-/^((.)(?1)\2|.)$/
- a
- 0: a
- 1: a
- aba
- 0: aba
- 1: aba
- 2: a
- aabaa
- 0: aabaa
- 1: aabaa
- 2: a
- abcdcba
- 0: abcdcba
- 1: abcdcba
- 2: a
- pqaabaaqp
- 0: pqaabaaqp
- 1: pqaabaaqp
- 2: p
- ablewasiereisawelba
- 0: ablewasiereisawelba
- 1: ablewasiereisawelba
- 2: a
- rhubarb
-No match
- the quick brown fox
-No match
-
-/(a)(?<=b(?1))/
- baz
- 0: a
- 1: a
- ** Failers
-No match
- caz
-No match
-
-/(?<=b(?1))(a)/
- zbaaz
- 0: a
- 1: a
- ** Failers
-No match
- aaa
-No match
-
-/(?<X>a)(?<=b(?&X))/
- baz
- 0: a
- 1: a
-
-/^(?|(abc)|(def))\1/
- abcabc
- 0: abcabc
- 1: abc
- defdef
- 0: defdef
- 1: def
- ** Failers
-No match
- abcdef
-No match
- defabc
-No match
-
-/^(?|(abc)|(def))(?1)/
- abcabc
- 0: abcabc
- 1: abc
- defabc
- 0: defabc
- 1: def
- ** Failers
-No match
- defdef
-No match
- abcdef
-No match
-
-/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
- a\"aaaaa
- 0: a"aaaaa
- 1: "
- 2: <unset>
- 3: "
- b\"aaaaa
- 0: b"aaaaa
- 1: <unset>
- 2: <unset>
- 3: <unset>
- 4: "
- 5: <unset>
- 6: "
- ** Failers
-No match
- b\"11111
-No match
-
-/(?:(?1)|B)(A(*F)|C)/
- ABCD
- 0: BC
- 1: C
- CCD
- 0: CC
- 1: C
- ** Failers
-No match
- CAD
-No match
-
-/^(?:(?1)|B)(A(*F)|C)/
- CCD
- 0: CC
- 1: C
- BCD
- 0: BC
- 1: C
- ** Failers
-No match
- ABCD
-No match
- CAD
-No match
- BAD
-No match
-
-/(?:(?1)|B)(A(*ACCEPT)XX|C)D/
- AAD
- 0: AA
- 1: A
- ACD
- 0: ACD
- 1: C
- BAD
- 0: BA
- 1: A
- BCD
- 0: BCD
- 1: C
- BAX
- 0: BA
- 1: A
- ** Failers
-No match
- ACX
-No match
- ABC
-No match
-
-/(?(DEFINE)(A))B(?1)C/
- BAC
- 0: BAC
-
-/(?(DEFINE)((A)\2))B(?1)C/
- BAAC
- 0: BAAC
-
-/(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
- (ab(cd)ef)
- 0: (ab(cd)ef)
- 1: (ab(cd)ef)
- 2: ef
-
-/^(?!a(*SKIP)b)/
- ac
- 0:
-
-/^(?=a(*SKIP)b|ac)/
- ** Failers
-No match
- ac
-No match
-
-/^(?=a(*THEN)b|ac)/
- ac
- 0:
-
-/^(?=a(*PRUNE)b)/
- ab
- 0:
- ** Failers
-No match
- ac
-No match
-
-/^(?=a(*ACCEPT)b)/
- ac
- 0:
-
-/^(?(?!a(*SKIP)b))/
- ac
- 0:
-
-/(?>a\Kb)/
- ab
- 0: b
-
-/((?>a\Kb))/
- ab
- 0: b
- 1: ab
-
-/(a\Kb)/
- ab
- 0: b
- 1: ab
-
-/^a\Kcz|ac/
- ac
- 0: ac
-
-/(?>a\Kbz|ab)/
- ab
- 0: ab
-
-/^(?&t)(?(DEFINE)(?<t>a\Kb))$/
- ab
- 0: b
-
-/^([^()]|\((?1)*\))*$/
- a(b)c
- 0: a(b)c
- 1: c
- a(b(c)d)e
- 0: a(b(c)d)e
- 1: e
-
-/(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
- 0
- 0: 0
- 1: 0
- 00
- 0: 00
- 1: 00
- 2: 0
- 0000
- 0: 0000
- 1: 0000
- 2: 0
-
-/(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
- 0
- 0: 0
- 1: 0
- 2: 0
- 00
- 0: 0
- 1: 0
- 2: 0
- 0000
- 0: 0
- 1: 0
- 2: 0
-
-/--- This one does fail, as expected, in Perl. It needs the complex item at the
- end of the pattern. A single letter instead of (B|D) makes it not fail,
- which I think is a Perl bug. --- /
-
-/A(*COMMIT)(B|D)/
- ACABX
-No match
-
-/--- Check the use of names for failure ---/
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
- ** Failers
-No match
- AC
-No match, mark = A
- CB
-No match, mark = B
-
-/--- Force no study, otherwise mark is not seen. The studied version is in
- test 2 because it isn't Perl-compatible. ---/
-
-/(*MARK:A)(*SKIP:B)(C|X)/KSS
- C
- 0: C
- 1: C
-MK: A
- D
-No match, mark = A
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/K
- ** Failers
-No match
- CB
-No match, mark = B
-
-/^(?:A(*THEN:A)B|C(*THEN:B)D)/K
- CB
-No match, mark = B
-
-/^(?>A(*THEN:A)B|C(*THEN:B)D)/K
- CB
-No match, mark = B
-
-/--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
-that we have to have something complicated such as (B|Z) at the end because,
-for Perl, a simple character somehow causes an unwanted optimization to mess
-with the handling of backtracking verbs. ---/
-
-/A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
- AAAC
- 0: AC
-
-/--- Test skipping over a non-matching mark. ---/
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
- AAAC
- 0: AC
-
-/--- Check shorthand for MARK ---/
-
-/A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
- AAAC
- 0: AC
-
-/--- Don't loop! Force no study, otherwise mark is not seen. ---/
-
-/(*:A)A+(*SKIP:A)(B|Z)/KSS
- AAAC
-No match, mark = A
-
-/--- This should succeed, as a non-existent skip name disables the skip ---/
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
- AAAC
- 0: AC
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
- AAAC
- 0: AC
-MK: B
-
-/--- COMMIT at the start of a pattern should act like an anchor. Again,
-however, we need the complication for Perl. ---/
-
-/(*COMMIT)(A|P)(B|P)(C|P)/
- ABCDEFG
- 0: ABC
- 1: A
- 2: B
- 3: C
- ** Failers
-No match
- DEFGABC
-No match
-
-/--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
-
-/(\w+)(?>b(*COMMIT))\w{2}/
- abbb
- 0: abbb
- 1: a
-
-/(\w+)b(*COMMIT)\w{2}/
- abbb
-No match
-
-/--- Check opening parens in comment when seeking forward reference. ---/
-
-/(?&t)(?#()(?(DEFINE)(?<t>a))/
- bac
- 0: a
-
-/--- COMMIT should override THEN ---/
-
-/(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/
- yes
-No match
-
-/(?>(*COMMIT)(yes|no)(*THEN)(*F))?/
- yes
-No match
-
-/b?(*SKIP)c/
- bc
- 0: bc
- abc
- 0: bc
-
-/(*SKIP)bc/
- a
-No match
-
-/(*SKIP)b/
- a
-No match
-
-/(?P<abn>(?P=abn)xxx|)+/
- xxx
- 0:
- 1:
-
-/(?i:([^b]))(?1)/
- aa
- 0: aa
- 1: a
- aA
- 0: aA
- 1: a
- ** Failers
- 0: **
- 1: *
- ab
-No match
- aB
-No match
- Ba
-No match
- ba
-No match
-
-/^(?&t)*+(?(DEFINE)(?<t>a))\w$/
- aaaaaaX
- 0: aaaaaaX
- ** Failers
-No match
- aaaaaa
-No match
-
-/^(?&t)*(?(DEFINE)(?<t>a))\w$/
- aaaaaaX
- 0: aaaaaaX
- aaaaaa
- 0: aaaaaa
-
-/^(a)*+(\w)/
- aaaaX
- 0: aaaaX
- 1: a
- 2: X
- YZ
- 0: Y
- 1: <unset>
- 2: Y
- ** Failers
-No match
- aaaa
-No match
-
-/^(?:a)*+(\w)/
- aaaaX
- 0: aaaaX
- 1: X
- YZ
- 0: Y
- 1: Y
- ** Failers
-No match
- aaaa
-No match
-
-/^(a)++(\w)/
- aaaaX
- 0: aaaaX
- 1: a
- 2: X
- ** Failers
-No match
- aaaa
-No match
- YZ
-No match
-
-/^(?:a)++(\w)/
- aaaaX
- 0: aaaaX
- 1: X
- ** Failers
-No match
- aaaa
-No match
- YZ
-No match
-
-/^(a)?+(\w)/
- aaaaX
- 0: aa
- 1: a
- 2: a
- YZ
- 0: Y
- 1: <unset>
- 2: Y
-
-/^(?:a)?+(\w)/
- aaaaX
- 0: aa
- 1: a
- YZ
- 0: Y
- 1: Y
-
-/^(a){2,}+(\w)/
- aaaaX
- 0: aaaaX
- 1: a
- 2: X
- ** Failers
-No match
- aaa
-No match
- YZ
-No match
-
-/^(?:a){2,}+(\w)/
- aaaaX
- 0: aaaaX
- 1: X
- ** Failers
-No match
- aaa
-No match
- YZ
-No match
-
-/(a|)*(?1)b/
- b
- 0: b
- 1:
- ab
- 0: ab
- 1:
- aab
- 0: aab
- 1:
-
-/(a)++(?1)b/
- ** Failers
-No match
- ab
-No match
- aab
-No match
-
-/(a)*+(?1)b/
- ** Failers
-No match
- ab
-No match
- aab
-No match
-
-/(?1)(?:(b)){0}/
- b
- 0: b
-
-/(foo ( \( ((?:(?> [^()]+ )|(?2))*) \) ) )/x
- foo(bar(baz)+baz(bop))
- 0: foo(bar(baz)+baz(bop))
- 1: foo(bar(baz)+baz(bop))
- 2: (bar(baz)+baz(bop))
- 3: bar(baz)+baz(bop)
-
-/(A (A|B(*ACCEPT)|C) D)(E)/x
- AB
- 0: AB
- 1: AB
- 2: B
-
-/\A.*?(?:a|b(*THEN)c)/
- ba
- 0: ba
-
-/\A.*?(?:a|bc)/
- ba
- 0: ba
-
-/\A.*?(a|b(*THEN)c)/
- ba
- 0: ba
- 1: a
-
-/\A.*?(a|bc)/
- ba
- 0: ba
- 1: a
-
-/\A.*?(?:a|b(*THEN)c)++/
- ba
- 0: ba
-
-/\A.*?(?:a|bc)++/
- ba
- 0: ba
-
-/\A.*?(a|b(*THEN)c)++/
- ba
- 0: ba
- 1: a
-
-/\A.*?(a|bc)++/
- ba
- 0: ba
- 1: a
-
-/\A.*?(?:a|b(*THEN)c|d)/
- ba
- 0: ba
-
-/\A.*?(?:a|bc|d)/
- ba
- 0: ba
-
-/(?:(b))++/
- beetle
- 0: b
- 1: b
-
-/(?(?=(a(*ACCEPT)z))a)/
- a
- 0: a
- 1: a
-
-/^(a)(?1)+ab/
- aaaab
- 0: aaaab
- 1: a
-
-/^(a)(?1)++ab/
- aaaab
-No match
-
-/^(?=a(*:M))aZ/K
- aZbc
- 0: aZ
-MK: M
-
-/^(?!(*:M)b)aZ/K
- aZbc
- 0: aZ
-
-/(?(DEFINE)(a))?b(?1)/
- backgammon
- 0: ba
-
-/^\N+/
- abc\ndef
- 0: abc
-
-/^\N{1,}/
- abc\ndef
- 0: abc
-
-/(?(R)a+|(?R)b)/
- aaaabcde
- 0: aaaab
-
-/(?(R)a+|((?R))b)/
- aaaabcde
- 0: aaaab
- 1: aaaa
-
-/((?(R)a+|(?1)b))/
- aaaabcde
- 0: aaaab
- 1: aaaab
-
-/((?(R1)a+|(?1)b))/
- aaaabcde
- 0: aaaab
- 1: aaaab
-
-/a(*:any
-name)/K
- abc
- 0: a
-MK: any \x0aname
-
-/(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
- a
- 0: a
- ba
- 0: a
- bba
- 0: a
-
-/--- Checking revised (*THEN) handling ---/
-
-/--- Capture ---/
-
-/^.*? (a(*THEN)b) c/x
- aabc
-No match
-
-/^.*? (a(*THEN)b|(*F)) c/x
- aabc
- 0: aabc
- 1: ab
-
-/^.*? ( (a(*THEN)b) | (*F) ) c/x
- aabc
- 0: aabc
- 1: ab
- 2: ab
-
-/^.*? ( (a(*THEN)b) ) c/x
- aabc
-No match
-
-/--- Non-capture ---/
-
-/^.*? (?:a(*THEN)b) c/x
- aabc
-No match
-
-/^.*? (?:a(*THEN)b|(*F)) c/x
- aabc
- 0: aabc
-
-/^.*? (?: (?:a(*THEN)b) | (*F) ) c/x
- aabc
- 0: aabc
-
-/^.*? (?: (?:a(*THEN)b) ) c/x
- aabc
-No match
-
-/--- Atomic ---/
-
-/^.*? (?>a(*THEN)b) c/x
- aabc
-No match
-
-/^.*? (?>a(*THEN)b|(*F)) c/x
- aabc
- 0: aabc
-
-/^.*? (?> (?>a(*THEN)b) | (*F) ) c/x
- aabc
- 0: aabc
-
-/^.*? (?> (?>a(*THEN)b) ) c/x
- aabc
-No match
-
-/--- Possessive capture ---/
-
-/^.*? (a(*THEN)b)++ c/x
- aabc
-No match
-
-/^.*? (a(*THEN)b|(*F))++ c/x
- aabc
- 0: aabc
- 1: ab
-
-/^.*? ( (a(*THEN)b)++ | (*F) )++ c/x
- aabc
- 0: aabc
- 1: ab
- 2: ab
-
-/^.*? ( (a(*THEN)b)++ )++ c/x
- aabc
-No match
-
-/--- Possessive non-capture ---/
-
-/^.*? (?:a(*THEN)b)++ c/x
- aabc
-No match
-
-/^.*? (?:a(*THEN)b|(*F))++ c/x
- aabc
- 0: aabc
-
-/^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c/x
- aabc
- 0: aabc
-
-/^.*? (?: (?:a(*THEN)b)++ )++ c/x
- aabc
-No match
-
-/--- Condition assertion ---/
-
-/^(?(?=a(*THEN)b)ab|ac)/
- ac
- 0: ac
-
-/--- Condition ---/
-
-/^.*?(?(?=a)a|b(*THEN)c)/
- ba
-No match
-
-/^.*?(?:(?(?=a)a|b(*THEN)c)|d)/
- ba
- 0: ba
-
-/^.*?(?(?=a)a(*THEN)b|c)/
- ac
-No match
-
-/--- Assertion ---/
-
-/^.*(?=a(*THEN)b)/
- aabc
- 0: a
-
-/------------------------------/
-
-/(?>a(*:m))/imsxSK
- a
- 0: a
-MK: m
-
-/(?>(a)(*:m))/imsxSK
- a
- 0: a
- 1: a
-MK: m
-
-/(?<=a(*ACCEPT)b)c/
- xacd
- 0: c
-
-/(?<=(a(*ACCEPT)b))c/
- xacd
- 0: c
- 1: a
-
-/(?<=(a(*COMMIT)b))c/
- xabcd
- 0: c
- 1: ab
- ** Failers
-No match
- xacd
-No match
-
-/(?<!a(*FAIL)b)c/
- xcd
- 0: c
- acd
- 0: c
-
-/(?<=a(*:N)b)c/K
- xabcd
- 0: c
-MK: N
-
-/(?<=a(*PRUNE)b)c/
- xabcd
- 0: c
-
-/(?<=a(*SKIP)b)c/
- xabcd
- 0: c
-
-/(?<=a(*THEN)b)c/
- xabcd
- 0: c
-
-/(a)(?2){2}(.)/
- abcd
- 0: abcd
- 1: a
- 2: d
-
-/(*MARK:A)(*PRUNE:B)(C|X)/KS
- C
- 0: C
- 1: C
-MK: B
- D
-No match, mark = B
-
-/(*MARK:A)(*PRUNE:B)(C|X)/KSS
- C
- 0: C
- 1: C
-MK: B
- D
-No match, mark = B
-
-/(*MARK:A)(*THEN:B)(C|X)/KS
- C
- 0: C
- 1: C
-MK: B
- D
-No match, mark = B
-
-/(*MARK:A)(*THEN:B)(C|X)/KSY
- C
- 0: C
- 1: C
-MK: B
- D
-No match, mark = B
-
-/(*MARK:A)(*THEN:B)(C|X)/KSS
- C
- 0: C
- 1: C
-MK: B
- D
-No match, mark = B
-
-/--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
-
-/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-No match, mark = A
-
-/--- Same --/
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
- AAAC
-No match, mark = B
-
-/A(*:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-No match, mark = A
-
-/--- This should fail, as a null name is the same as no name ---/
-
-/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
- AAAC
-No match, mark = A
-
-/--- A check on what happens after hitting a mark and them bumping along to
-something that does not even start. Perl reports tags after the failures here,
-though it does not when the individual letters are made into something
-more complicated. ---/
-
-/A(*:A)B|XX(*:B)Y/K
- AABC
- 0: AB
-MK: A
- XXYZ
- 0: XXY
-MK: B
- ** Failers
-No match
- XAQQ
-No match, mark = A
- XAQQXZZ
-No match, mark = A
- AXQQQ
-No match, mark = A
- AXXQQQ
-No match, mark = B
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/K
- AB
- 0: AB
- 1: AB
-MK: A
- CD
- 0: CD
- 1: CD
-MK: B
- ** Failers
-No match
- AC
-No match, mark = A
- CB
-No match, mark = B
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
- AB
- 0: AB
- 1: AB
-MK: A
- CD
- 0: CD
- 1: CD
-MK: B
- ** Failers
-No match
- AC
-No match, mark = A
- CB
-No match, mark = B
-
-/--- An empty name does not pass back an empty string. It is the same as if no
-name were given. ---/
-
-/^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
- AB
- 0: AB
- 1: AB
- CD
- 0: CD
- 1: CD
-MK: B
-
-/--- PRUNE goes to next bumpalong; COMMIT does not. ---/
-
-/A(*PRUNE:A)B/K
- ACAB
- 0: AB
-MK: A
-
-/--- Mark names can be duplicated ---/
-
-/A(*:A)B|X(*:A)Y/K
- AABC
- 0: AB
-MK: A
- XXYZ
- 0: XY
-MK: A
-
-/b(*:m)f|a(*:n)w/K
- aw
- 0: aw
-MK: n
- ** Failers
-No match, mark = n
- abc
-No match, mark = m
-
-/b(*:m)f|aw/K
- abaw
- 0: aw
- ** Failers
-No match
- abc
-No match, mark = m
- abax
-No match, mark = m
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
- AAAC
- 0: AAC
-
-/a(*PRUNE:X)bc|qq/KY
- ** Failers
-No match, mark = X
- axy
-No match, mark = X
-
-/a(*THEN:X)bc|qq/KY
- ** Failers
-No match, mark = X
- axy
-No match, mark = X
-
-/(?=a(*MARK:A)b)..x/K
- abxy
- 0: abx
-MK: A
- ** Failers
-No match
- abpq
-No match
-
-/(?=a(*MARK:A)b)..(*:Y)x/K
- abxy
- 0: abx
-MK: Y
- ** Failers
-No match
- abpq
-No match
-
-/(?=a(*PRUNE:A)b)..x/K
- abxy
- 0: abx
-MK: A
- ** Failers
-No match
- abpq
-No match
-
-/(?=a(*PRUNE:A)b)..(*:Y)x/K
- abxy
- 0: abx
-MK: Y
- ** Failers
-No match
- abpq
-No match
-
-/(?=a(*THEN:A)b)..x/K
- abxy
- 0: abx
-MK: A
- ** Failers
-No match
- abpq
-No match
-
-/(?=a(*THEN:A)b)..(*:Y)x/K
- abxy
- 0: abx
-MK: Y
- ** Failers
-No match
- abpq
-No match
-
-/(another)?(\1?)test/
- hello world test
- 0: test
- 1: <unset>
- 2:
-
-/(another)?(\1+)test/
- hello world test
-No match
-
-/-- End of testinput1 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput10 b/src/third_party/pcre-8.30/testdata/testoutput10
deleted file mode 100644
index ca181db1a77..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput10
+++ /dev/null
@@ -1,2037 +0,0 @@
-/-- This set of tests check Unicode property support with the DFA matching
- functionality of pcre_dfa_exec(). The -dfa flag must be used with pcretest
- when running it. --/
-
-/\pL\P{Nd}/8
- AB
- 0: AB
- *** Failers
- 0: Fa
- A0
-No match
- 00
-No match
-
-/\X./8
- AB
- 0: AB
- A\x{300}BC
- 0: A\x{300}B
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}B
- *** Failers
- 0: **
- \x{300}
-No match
-
-/\X\X/8
- ABC
- 0: AB
- A\x{300}B\x{300}\x{301}C
- 0: A\x{300}B\x{300}\x{301}
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}B
- *** Failers
- 0: **
- \x{300}
-No match
-
-/^\pL+/8
- abcd
- 0: abcd
- 1: abc
- 2: ab
- 3: a
- a
- 0: a
- *** Failers
-No match
-
-/^\PL+/8
- 1234
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- =
- 0: =
- *** Failers
- 0: ***
- 1: ***
- 2: **
- 3: *
- abcd
-No match
-
-/^\X+/8
- abcdA\x{300}\x{301}\x{302}
- 0: abcdA\x{300}\x{301}\x{302}
- 1: abcd
- 2: abc
- 3: ab
- 4: a
- A\x{300}\x{301}\x{302}
- 0: A\x{300}\x{301}\x{302}
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
- 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
- 1: A\x{300}\x{301}\x{302}
- a
- 0: a
- *** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- 7: ***
- 8: ***
- 9: **
-10: *
- \x{300}\x{301}\x{302}
-No match
-
-/\X?abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- 0: A\x{300}abc
- \x{300}abc
- 0: abc
- *** Failers
-No match
-
-/^\X?abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- *** Failers
-No match
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
-No match
- \x{300}abc
-No match
-
-/\X*abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- 0: A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abc
- \x{300}abc
- 0: abc
- *** Failers
-No match
-
-/^\X*abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- 0: A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abc
- *** Failers
-No match
- \x{300}abc
-No match
-
-/^\pL?=./8
- A=b
- 0: A=b
- =c
- 0: =c
- *** Failers
-No match
- 1=2
-No match
- AAAA=b
-No match
-
-/^\pL*=./8
- AAAA=b
- 0: AAAA=b
- =c
- 0: =c
- *** Failers
-No match
- 1=2
-No match
-
-/^\X{2,3}X/8
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- *** Failers
-No match
- X
-No match
- A\x{300}\x{301}\x{302}X
-No match
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
-No match
-
-/^\pC\pL\pM\pN\pP\pS\pZ</8
- \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- 0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- \np\x{300}9!\$ <
- 0: \x{0a}p\x{300}9!$ <
- ** Failers
-No match
- ap\x{300}9!\$ <
-No match
-
-/^\PC/8
- X
- 0: X
- ** Failers
- 0: *
- \x7f
-No match
-
-/^\PL/8
- 9
- 0: 9
- ** Failers
- 0: *
- \x{c0}
-No match
-
-/^\PM/8
- X
- 0: X
- ** Failers
- 0: *
- \x{30f}
-No match
-
-/^\PN/8
- X
- 0: X
- ** Failers
- 0: *
- \x{660}
-No match
-
-/^\PP/8
- X
- 0: X
- ** Failers
-No match
- \x{66c}
-No match
-
-/^\PS/8
- X
- 0: X
- ** Failers
- 0: *
- \x{f01}
-No match
-
-/^\PZ/8
- X
- 0: X
- ** Failers
- 0: *
- \x{1680}
-No match
-
-/^\p{Cc}/8
- \x{017}
- 0: \x{17}
- \x{09f}
- 0: \x{9f}
- ** Failers
-No match
- \x{0600}
-No match
-
-/^\p{Cf}/8
- \x{601}
- 0: \x{601}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Cn}/8
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Co}/8
- \x{f8ff}
- 0: \x{f8ff}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Cs}/8
- \?\x{dfff}
- 0: \x{dfff}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Ll}/8
- a
- 0: a
- ** Failers
-No match
- Z
-No match
- \x{e000}
-No match
-
-/^\p{Lm}/8
- \x{2b0}
- 0: \x{2b0}
- ** Failers
-No match
- a
-No match
-
-/^\p{Lo}/8
- \x{1bb}
- 0: \x{1bb}
- ** Failers
-No match
- a
-No match
- \x{2b0}
-No match
-
-/^\p{Lt}/8
- \x{1c5}
- 0: \x{1c5}
- ** Failers
-No match
- a
-No match
- \x{2b0}
-No match
-
-/^\p{Lu}/8
- A
- 0: A
- ** Failers
-No match
- \x{2b0}
-No match
-
-/^\p{Mc}/8
- \x{903}
- 0: \x{903}
- ** Failers
-No match
- X
-No match
- \x{300}
-No match
-
-/^\p{Me}/8
- \x{488}
- 0: \x{488}
- ** Failers
-No match
- X
-No match
- \x{903}
-No match
- \x{300}
-No match
-
-/^\p{Mn}/8
- \x{300}
- 0: \x{300}
- ** Failers
-No match
- X
-No match
- \x{903}
-No match
-
-/^\p{Nd}+/8
- 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
- 0: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}
- 1: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}
- 2: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}
- 3: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}
- 4: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}
- 5: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}
- 6: 0123456789\x{660}\x{661}\x{662}\x{663}
- 7: 0123456789\x{660}\x{661}\x{662}
- 8: 0123456789\x{660}\x{661}
- 9: 0123456789\x{660}
-10: 0123456789
-11: 012345678
-12: 01234567
-13: 0123456
-14: 012345
-15: 01234
-16: 0123
-17: 012
-18: 01
-19: 0
- \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
- 0: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}
- 1: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}
- 2: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}
- 3: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}
- 4: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}
- 5: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}
- 6: \x{6f0}\x{6f1}\x{6f2}\x{6f3}
- 7: \x{6f0}\x{6f1}\x{6f2}
- 8: \x{6f0}\x{6f1}
- 9: \x{6f0}
- \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
- 0: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}
- 1: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}
- 2: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}
- 3: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}
- 4: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}
- 5: \x{966}\x{967}\x{968}\x{969}\x{96a}
- 6: \x{966}\x{967}\x{968}\x{969}
- 7: \x{966}\x{967}\x{968}
- 8: \x{966}\x{967}
- 9: \x{966}
- ** Failers
-No match
- X
-No match
-
-/^\p{Nl}/8
- \x{16ee}
- 0: \x{16ee}
- ** Failers
-No match
- X
-No match
- \x{966}
-No match
-
-/^\p{No}/8
- \x{b2}
- 0: \x{b2}
- \x{b3}
- 0: \x{b3}
- ** Failers
-No match
- X
-No match
- \x{16ee}
-No match
-
-/^\p{Pc}/8
- \x5f
- 0: _
- \x{203f}
- 0: \x{203f}
- ** Failers
-No match
- X
-No match
- -
-No match
- \x{58a}
-No match
-
-/^\p{Pd}/8
- -
- 0: -
- \x{58a}
- 0: \x{58a}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Pe}/8
- )
- 0: )
- ]
- 0: ]
- }
- 0: }
- \x{f3b}
- 0: \x{f3b}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
- (
-No match
- [
-No match
- {
-No match
- \x{f3c}
-No match
-
-/^\p{Pf}/8
- \x{bb}
- 0: \x{bb}
- \x{2019}
- 0: \x{2019}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Pi}/8
- \x{ab}
- 0: \x{ab}
- \x{2018}
- 0: \x{2018}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Po}/8
- !
- 0: !
- \x{37e}
- 0: \x{37e}
- ** Failers
- 0: *
- X
-No match
- \x{203f}
-No match
-
-/^\p{Ps}/8
- (
- 0: (
- [
- 0: [
- {
- 0: {
- \x{f3c}
- 0: \x{f3c}
- ** Failers
-No match
- X
-No match
- )
-No match
- ]
-No match
- }
-No match
- \x{f3b}
-No match
-
-/^\p{Sc}+/8
- $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
- 0: $\x{a2}\x{a3}\x{a4}\x{a5}
- 1: $\x{a2}\x{a3}\x{a4}
- 2: $\x{a2}\x{a3}
- 3: $\x{a2}
- 4: $
- \x{9f2}
- 0: \x{9f2}
- ** Failers
-No match
- X
-No match
- \x{2c2}
-No match
-
-/^\p{Sk}/8
- \x{2c2}
- 0: \x{2c2}
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{Sm}+/8
- +<|~\x{ac}\x{2044}
- 0: +<|~\x{ac}\x{2044}
- 1: +<|~\x{ac}
- 2: +<|~
- 3: +<|
- 4: +<
- 5: +
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{So}/8
- \x{a6}
- 0: \x{a6}
- \x{482}
- 0: \x{482}
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{Zl}/8
- \x{2028}
- 0: \x{2028}
- ** Failers
-No match
- X
-No match
- \x{2029}
-No match
-
-/^\p{Zp}/8
- \x{2029}
- 0: \x{2029}
- ** Failers
-No match
- X
-No match
- \x{2028}
-No match
-
-/^\p{Zs}/8
- \ \
- 0:
- \x{a0}
- 0: \x{a0}
- \x{1680}
- 0: \x{1680}
- \x{180e}
- 0: \x{180e}
- \x{2000}
- 0: \x{2000}
- \x{2001}
- 0: \x{2001}
- ** Failers
-No match
- \x{2028}
-No match
- \x{200d}
-No match
-
-/\p{Nd}+(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
-
-/\p{Nd}+?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
-
-/\p{Nd}{2,}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}{2,}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}*(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
- 3: \x{660}\x{661}
-
-/\p{Nd}*?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
- 3: \x{660}\x{661}
-
-/\p{Nd}{2}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}A
-
-/\p{Nd}{2,3}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}{2,3}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}
- 1: \x{660}\x{661}
-
-/\p{Nd}??(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}
- 1: \x{660}\x{661}
-
-/\p{Nd}*+(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
-
-/\p{Nd}*+(...)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(....)/8
- ** Failers
- 0: ** F
- \x{660}\x{661}\x{662}ABC
-No match
-
-/\p{Lu}/8i
- A
- 0: A
- a\x{10a0}B
- 0: \x{10a0}
- ** Failers
- 0: F
- a
-No match
- \x{1d00}
-No match
-
-/\p{^Lu}/8i
- 1234
- 0: 1
- ** Failers
- 0: *
- ABC
-No match
-
-/\P{Lu}/8i
- 1234
- 0: 1
- ** Failers
- 0: *
- ABC
-No match
-
-/(?<=A\p{Nd})XYZ/8
- A2XYZ
- 0: XYZ
- 123A5XYZPQR
- 0: XYZ
- ABA\x{660}XYZpqr
- 0: XYZ
- ** Failers
-No match
- AXYZ
-No match
- XYZ
-No match
-
-/(?<!\pL)XYZ/8
- 1XYZ
- 0: XYZ
- AB=XYZ..
- 0: XYZ
- XYZ
- 0: XYZ
- ** Failers
-No match
- WXYZ
-No match
-
-/[\p{Nd}]/8
- 1234
- 0: 1
-
-/[\p{Nd}+-]+/8
- 1234
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- 12-34
- 0: 12-34
- 1: 12-3
- 2: 12-
- 3: 12
- 4: 1
- 12+\x{661}-34
- 0: 12+\x{661}-34
- 1: 12+\x{661}-3
- 2: 12+\x{661}-
- 3: 12+\x{661}
- 4: 12+
- 5: 12
- 6: 1
- ** Failers
-No match
- abcd
-No match
-
-/[\P{Nd}]+/8
- abcd
- 0: abcd
- 1: abc
- 2: ab
- 3: a
- ** Failers
- 0: ** Failers
- 1: ** Failer
- 2: ** Faile
- 3: ** Fail
- 4: ** Fai
- 5: ** Fa
- 6: ** F
- 7: **
- 8: **
- 9: *
- 1234
-No match
-
-/\D+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\P{Nd}+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\pL/8
- a
- 0: a
- A
- 0: A
-
-/\pL/8i
- a
- 0: a
- A
- 0: A
-
-/\p{Lu}/8
- A
- 0: A
- aZ
- 0: Z
- ** Failers
- 0: F
- abc
-No match
-
-/\p{Lu}/8i
- A
- 0: A
- aZ
- 0: Z
- ** Failers
- 0: F
- abc
-No match
-
-/\p{Ll}/8
- a
- 0: a
- Az
- 0: z
- ** Failers
- 0: a
- ABC
-No match
-
-/\p{Ll}/8i
- a
- 0: a
- Az
- 0: z
- ** Failers
- 0: a
- ABC
-No match
-
-/^\x{c0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/^\x{e0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- ** Failers
-No match
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
-No match
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
-No match
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
-No match
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
-No match
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-No match
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{1044f}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/\x{391}+/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 1: \x{391}\x{3b1}\x{3b1}\x{3b1}
- 2: \x{391}\x{3b1}\x{3b1}
- 3: \x{391}\x{3b1}
- 4: \x{391}
-
-/\x{391}{3,5}(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 1: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 2: \x{391}\x{3b1}\x{3b1}\x{3b1}
-
-/\x{391}{3,5}?(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 1: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 2: \x{391}\x{3b1}\x{3b1}\x{3b1}
-
-/[\x{391}\x{ff3a}]/8i
- \x{391}
- 0: \x{391}
- \x{ff3a}
- 0: \x{ff3a}
- \x{3b1}
- 0: \x{3b1}
- \x{ff5a}
- 0: \x{ff5a}
-
-/[\x{c0}\x{391}]/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/[\x{105}-\x{109}]/8i
- \x{104}
- 0: \x{104}
- \x{105}
- 0: \x{105}
- \x{109}
- 0: \x{109}
- ** Failers
-No match
- \x{100}
-No match
- \x{10a}
-No match
-
-/[z-\x{100}]/8i
- Z
- 0: Z
- z
- 0: z
- \x{39c}
- 0: \x{39c}
- \x{178}
- 0: \x{178}
- |
- 0: |
- \x{80}
- 0: \x{80}
- \x{ff}
- 0: \x{ff}
- \x{100}
- 0: \x{100}
- \x{101}
- 0: \x{101}
- ** Failers
-No match
- \x{102}
-No match
- Y
-No match
- y
-No match
-
-/[z-\x{100}]/8i
-
-/^\X/8
- A
- 0: A
- A\x{300}BC
- 0: A\x{300}
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}
- *** Failers
- 0: *
- \x{300}
-No match
-
-/^[\X]/8
- X123
- 0: X
- *** Failers
-No match
- AXYZ
-No match
-
-/^(\X*)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BC
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BC
-
-/^(\X*?)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BC
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BC
-
-/^(\X*)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BCA
- 1: A\x{300}\x{301}\x{302}BC
- 2: A\x{300}\x{301}\x{302}B
- 3: A
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BCA
- 2: A\x{300}\x{301}\x{302}BC
- 3: A\x{300}\x{301}\x{302}B
- 4: A
-
-/^(\X*?)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BCA
- 1: A\x{300}\x{301}\x{302}BC
- 2: A\x{300}\x{301}\x{302}B
- 3: A
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BCA
- 2: A\x{300}\x{301}\x{302}BC
- 3: A\x{300}\x{301}\x{302}B
- 4: A
-
-/^\X(.)/8
- *** Failers
- 0: **
- A\x{300}\x{301}\x{302}
-No match
-
-/^\X{2,3}(.)/8
- A\x{300}\x{301}B\x{300}X
- 0: A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- 0: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 1: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
- 1: A\x{300}\x{301}B\x{300}C
-
-/^\X{2,3}?(.)/8
- A\x{300}\x{301}B\x{300}X
- 0: A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- 0: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 1: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
- 1: A\x{300}\x{301}B\x{300}C
-
-/^\pN{2,3}X/
- 12X
- 0: 12X
- 123X
- 0: 123X
- *** Failers
-No match
- X
-No match
- 1X
-No match
- 1234X
-No match
-
-/\x{100}/i8
- \x{100}
- 0: \x{100}
- \x{101}
- 0: \x{101}
-
-/^\p{Han}+/8
- \x{2e81}\x{3007}\x{2f804}\x{31a0}
- 0: \x{2e81}\x{3007}\x{2f804}
- 1: \x{2e81}\x{3007}
- 2: \x{2e81}
- ** Failers
-No match
- \x{2e7f}
-No match
-
-/^\P{Katakana}+/8
- \x{3105}
- 0: \x{3105}
- ** Failers
- 0: ** Failers
- 1: ** Failer
- 2: ** Faile
- 3: ** Fail
- 4: ** Fai
- 5: ** Fa
- 6: ** F
- 7: **
- 8: **
- 9: *
- \x{30ff}
-No match
-
-/^[\p{Arabic}]/8
- \x{06e9}
- 0: \x{6e9}
- \x{060b}
- 0: \x{60b}
- ** Failers
-No match
- X\x{06e9}
-No match
-
-/^[\P{Yi}]/8
- \x{2f800}
- 0: \x{2f800}
- ** Failers
- 0: *
- \x{a014}
-No match
- \x{a4c6}
-No match
-
-/^\p{Any}X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- X
-No match
-
-/^\P{Any}X/8
- ** Failers
-No match
- AX
-No match
-
-/^\p{Any}?X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- ABXYZ
-No match
-
-/^\P{Any}?X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- ABXYZ
-No match
-
-/^\p{Any}+X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
- XYZ
-No match
-
-/^\P{Any}+X/8
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
-No match
- XYZ
-No match
-
-/^\p{Any}*X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
-
-/^\P{Any}*X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
-No match
-
-/^[\p{Any}]X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- X
-No match
-
-/^[\P{Any}]X/8
- ** Failers
-No match
- AX
-No match
-
-/^[\p{Any}]?X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- ABXYZ
-No match
-
-/^[\P{Any}]?X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- ABXYZ
-No match
-
-/^[\p{Any}]+X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
- XYZ
-No match
-
-/^[\P{Any}]+X/8
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
-No match
- XYZ
-No match
-
-/^[\p{Any}]*X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
-
-/^[\P{Any}]*X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
-No match
-
-/^\p{Any}{3,5}?/8
- abcdefgh
- 0: abcde
- 1: abcd
- 2: abc
- \x{1234}\n\r\x{3456}xyz
- 0: \x{1234}\x{0a}\x{0d}\x{3456}x
- 1: \x{1234}\x{0a}\x{0d}\x{3456}
- 2: \x{1234}\x{0a}\x{0d}
-
-/^\p{Any}{3,5}/8
- abcdefgh
- 0: abcde
- 1: abcd
- 2: abc
- \x{1234}\n\r\x{3456}xyz
- 0: \x{1234}\x{0a}\x{0d}\x{3456}x
- 1: \x{1234}\x{0a}\x{0d}\x{3456}
- 2: \x{1234}\x{0a}\x{0d}
-
-/^\P{Any}{3,5}?/8
- ** Failers
-No match
- abcdefgh
-No match
- \x{1234}\n\r\x{3456}xyz
-No match
-
-/^\p{L&}X/8
- AXY
- 0: AX
- aXY
- 0: aX
- \x{1c5}XY
- 0: \x{1c5}X
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^[\p{L&}]X/8
- AXY
- 0: AX
- aXY
- 0: aX
- \x{1c5}XY
- 0: \x{1c5}X
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^\p{L&}+X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^[\p{L&}]+X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^\p{L&}+?X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^[\p{L&}]+?X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^\P{L&}X/8
- !XY
- 0: !X
- \x{1bb}XY
- 0: \x{1bb}X
- \x{2b0}XY
- 0: \x{2b0}X
- ** Failers
-No match
- \x{1c5}XY
-No match
- AXY
-No match
-
-/^[\P{L&}]X/8
- !XY
- 0: !X
- \x{1bb}XY
- 0: \x{1bb}X
- \x{2b0}XY
- 0: \x{2b0}X
- ** Failers
-No match
- \x{1c5}XY
-No match
- AXY
-No match
-
-/^\x{023a}+?(\x{0130}+)/8i
- \x{023a}\x{2c65}\x{0130}
- 0: \x{23a}\x{2c65}\x{130}
-
-/^\x{023a}+([^X])/8i
- \x{023a}\x{2c65}X
- 0: \x{23a}\x{2c65}
-
-/\x{c0}+\x{116}+/8i
- \x{c0}\x{e0}\x{116}\x{117}
- 0: \x{c0}\x{e0}\x{116}\x{117}
- 1: \x{c0}\x{e0}\x{116}
-
-/[\x{c0}\x{116}]+/8i
- \x{c0}\x{e0}\x{116}\x{117}
- 0: \x{c0}\x{e0}\x{116}\x{117}
- 1: \x{c0}\x{e0}\x{116}
- 2: \x{c0}\x{e0}
- 3: \x{c0}
-
-/Check property support in non-UTF-8 mode/
-
-/\p{L}{4}/
- 123abcdefg
- 0: abcd
- 123abc\xc4\xc5zz
- 0: abc\xc4
-
-/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8
- \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
- 0: \x{102a4}\x{aa52}\x{a91d}\x{1c46}\x{10283}\x{1092e}\x{1c6b}\x{a93b}\x{a8bf}\x{1ba0}\x{a50a}
-
-/\x{a77d}\x{1d79}/8i
- \x{a77d}\x{1d79}
- 0: \x{a77d}\x{1d79}
- \x{1d79}\x{a77d}
- 0: \x{1d79}\x{a77d}
-
-/\x{a77d}\x{1d79}/8
- \x{a77d}\x{1d79}
- 0: \x{a77d}\x{1d79}
- ** Failers
-No match
- \x{1d79}\x{a77d}
-No match
-
-/^\p{Xan}/8
- ABCD
- 0: A
- 1234
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- ** Failers
-No match
- _ABC
-No match
-
-/^\p{Xan}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 1: ABCD1234\x{6ca}\x{a6c}
- 2: ABCD1234\x{6ca}
- 3: ABCD1234
- 4: ABCD123
- 5: ABCD12
- 6: ABCD1
- 7: ABCD
- 8: ABC
- 9: AB
-10: A
- ** Failers
-No match
- _ABC
-No match
-
-/^\p{Xan}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 1: ABCD1234\x{6ca}\x{a6c}
- 2: ABCD1234\x{6ca}
- 3: ABCD1234
- 4: ABCD123
- 5: ABCD12
- 6: ABCD1
- 7: ABCD
- 8: ABC
- 9: AB
-10: A
-11:
-
-/^\p{Xan}{2,9}/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}
- 1: ABCD1234
- 2: ABCD123
- 3: ABCD12
- 4: ABCD1
- 5: ABCD
- 6: ABC
- 7: AB
-
-/^[\p{Xan}]/8
- ABCD1234_
- 0: A
- 1234abcd_
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- ** Failers
-No match
- _ABC
-No match
-
-/^[\p{Xan}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 1: ABCD1234\x{6ca}\x{a6c}
- 2: ABCD1234\x{6ca}
- 3: ABCD1234
- 4: ABCD123
- 5: ABCD12
- 6: ABCD1
- 7: ABCD
- 8: ABC
- 9: AB
-10: A
- ** Failers
-No match
- _ABC
-No match
-
-/^>\p{Xsp}/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}
- ** Failers
-No match
- \x{0b}
-No match
-
-/^>\p{Xsp}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}
- 4: > \x{09}\x{0a}\x{0c}
- 5: > \x{09}\x{0a}
- 6: > \x{09}
- 7: >
-
-/^>\p{Xsp}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}
- 4: > \x{09}\x{0a}\x{0c}
- 5: > \x{09}\x{0a}
- 6: > \x{09}
- 7: >
- 8: >
-
-/^>\p{Xsp}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}
- 4: > \x{09}\x{0a}\x{0c}
- 5: > \x{09}\x{0a}
- 6: > \x{09}
-
-/^>[\p{Xsp}]/8
- >\x{2028}\x{0b}
- 0: >\x{2028}
-
-/^>[\p{Xsp}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}
- 4: > \x{09}\x{0a}\x{0c}
- 5: > \x{09}\x{0a}
- 6: > \x{09}
- 7: >
-
-/^>\p{Xps}/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}
- >\x{a0}
- 0: >\x{a0}
- ** Failers
-No match
- \x{0b}
-No match
-
-/^>\p{Xps}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
- 8: >
-
-/^>\p{Xps}+?/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}\x{2028}\x{0b}
- 1: >\x{1680}\x{2028}
- 2: >\x{1680}
-
-/^>\p{Xps}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
- 8: >
- 9: >
-
-/^>\p{Xps}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
-
-/^>\p{Xps}{2,9}?/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
-
-/^>[\p{Xps}]/8
- >\x{2028}\x{0b}
- 0: >\x{2028}
-
-/^>[\p{Xps}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
- 8: >
-
-/^\p{Xwd}/8
- ABCD
- 0: A
- 1234
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- _ABC
- 0: _
- ** Failers
-No match
- []
-No match
-
-/^\p{Xwd}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 1: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 2: ABCD1234\x{6ca}\x{a6c}
- 3: ABCD1234\x{6ca}
- 4: ABCD1234
- 5: ABCD123
- 6: ABCD12
- 7: ABCD1
- 8: ABCD
- 9: ABC
-10: AB
-11: A
-
-/^\p{Xwd}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 1: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 2: ABCD1234\x{6ca}\x{a6c}
- 3: ABCD1234\x{6ca}
- 4: ABCD1234
- 5: ABCD123
- 6: ABCD12
- 7: ABCD1
- 8: ABCD
- 9: ABC
-10: AB
-11: A
-12:
-
-/^\p{Xwd}{2,9}/8
- A_12\x{6ca}\x{a6c}\x{10a7}
- 0: A_12\x{6ca}\x{a6c}\x{10a7}
- 1: A_12\x{6ca}\x{a6c}
- 2: A_12\x{6ca}
- 3: A_12
- 4: A_1
- 5: A_
-
-/^[\p{Xwd}]/8
- ABCD1234_
- 0: A
- 1234abcd_
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- _ABC
- 0: _
- ** Failers
-No match
- []
-No match
-
-/^[\p{Xwd}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 1: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 2: ABCD1234\x{6ca}\x{a6c}
- 3: ABCD1234\x{6ca}
- 4: ABCD1234
- 5: ABCD123
- 6: ABCD12
- 7: ABCD1
- 8: ABCD
- 9: ABC
-10: AB
-11: A
-
-/-- Unicode properties for \b abd \B --/
-
-/\b...\B/8W
- abc_
- 0: abc
- \x{37e}abc\x{376}
- 0: abc
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- 0: \x{376}\x{371}\x{393}
- !\x{c0}++\x{c1}\x{c2}
- 0: ++\x{c1}
- !\x{c0}+++++
- 0: \x{c0}++
-
-/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
-
-/\b...\B/8
- abc_
- 0: abc
- ** Failers
- 0: Fai
- \x{37e}abc\x{376}
-No match
- \x{37e}\x{376}\x{371}\x{393}\x{394}
-No match
- !\x{c0}++\x{c1}\x{c2}
-No match
- !\x{c0}+++++
-No match
-
-/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
-
-/\b...\B/W
- abc_
- 0: abc
- !\x{c0}++\x{c1}\x{c2}
- 0: ++\xc1
- !\x{c0}+++++
- 0: \xc0++
-
-/-- End of testinput10 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput11-16 b/src/third_party/pcre-8.30/testdata/testoutput11-16
deleted file mode 100644
index e9bbb1de31c..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput11-16
+++ /dev/null
@@ -1,713 +0,0 @@
-/-- These are a few representative patterns whose lengths and offsets are to be
-shown when the link size is 2. This is just a doublecheck test to ensure the
-sizes don't go horribly wrong when something is changed. The pattern contents
-are all themselves checked in other tests. Unicode, including property support,
-is required for these tests. --/
-
-/((?i)b)/BM
-Memory allocation (code space): 24
-------------------------------------------------------------------
- 0 9 Bra
- 2 5 CBra 1
- 5 /i b
- 7 5 Ket
- 9 9 Ket
- 11 End
-------------------------------------------------------------------
-
-/(?s)(.*X|^B)/BM
-Memory allocation (code space): 38
-------------------------------------------------------------------
- 0 16 Bra
- 2 7 CBra 1
- 5 AllAny*
- 7 X
- 9 5 Alt
- 11 ^
- 12 B
- 14 12 Ket
- 16 16 Ket
- 18 End
-------------------------------------------------------------------
-
-/(?s:.*X|^B)/BM
-Memory allocation (code space): 36
-------------------------------------------------------------------
- 0 15 Bra
- 2 6 Bra
- 4 AllAny*
- 6 X
- 8 5 Alt
- 10 ^
- 11 B
- 13 11 Ket
- 15 15 Ket
- 17 End
-------------------------------------------------------------------
-
-/^[[:alnum:]]/BM
-Memory allocation (code space): 46
-------------------------------------------------------------------
- 0 20 Bra
- 2 ^
- 3 [0-9A-Za-z]
- 20 20 Ket
- 22 End
-------------------------------------------------------------------
-
-/#/IxMD
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 2 Bra
- 2 2 Ket
- 4 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: extended
-No first char
-No need char
-
-/a#/IxMD
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 a
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: extended
-First char = 'a'
-No need char
-
-/x?+/BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 x?+
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/x++/BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 x++
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/x{1,3}+/BM
-Memory allocation (code space): 28
-------------------------------------------------------------------
- 0 11 Bra
- 2 7 Once
- 4 x
- 6 x{0,2}
- 9 7 Ket
- 11 11 Ket
- 13 End
-------------------------------------------------------------------
-
-/(x)*+/BM
-Memory allocation (code space): 26
-------------------------------------------------------------------
- 0 10 Bra
- 2 Braposzero
- 3 5 CBraPos 1
- 6 x
- 8 5 KetRpos
- 10 10 Ket
- 12 End
-------------------------------------------------------------------
-
-/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/BM
-Memory allocation (code space): 142
-------------------------------------------------------------------
- 0 68 Bra
- 2 ^
- 3 63 CBra 1
- 6 5 CBra 2
- 9 a+
- 11 5 Ket
- 13 21 CBra 3
- 16 [ab]+?
- 34 21 Ket
- 36 21 CBra 4
- 39 [bc]+
- 57 21 Ket
- 59 5 CBra 5
- 62 \w*
- 64 5 Ket
- 66 63 Ket
- 68 68 Ket
- 70 End
-------------------------------------------------------------------
-
-|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-Memory allocation (code space): 1648
-------------------------------------------------------------------
- 0 821 Bra
- 2 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
-820 \b
-821 821 Ket
-823 End
-------------------------------------------------------------------
-
-|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-Memory allocation (code space): 1628
-------------------------------------------------------------------
- 0 811 Bra
- 2 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
-810 \b
-811 811 Ket
-813 End
-------------------------------------------------------------------
-
-/(a(?1)b)/BM
-Memory allocation (code space): 32
-------------------------------------------------------------------
- 0 13 Bra
- 2 9 CBra 1
- 5 a
- 7 2 Recurse
- 9 b
- 11 9 Ket
- 13 13 Ket
- 15 End
-------------------------------------------------------------------
-
-/(a(?1)+b)/BM
-Memory allocation (code space): 40
-------------------------------------------------------------------
- 0 17 Bra
- 2 13 CBra 1
- 5 a
- 7 4 Once
- 9 2 Recurse
- 11 4 KetRmax
- 13 b
- 15 13 Ket
- 17 17 Ket
- 19 End
-------------------------------------------------------------------
-
-/a(?P<name1>b|c)d(?P<longername2>e)/BM
-Memory allocation (code space): 80
-------------------------------------------------------------------
- 0 24 Bra
- 2 a
- 4 5 CBra 1
- 7 b
- 9 4 Alt
- 11 c
- 13 9 Ket
- 15 d
- 17 5 CBra 2
- 20 e
- 22 5 Ket
- 24 24 Ket
- 26 End
-------------------------------------------------------------------
-
-/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/BM
-Memory allocation (code space): 73
-------------------------------------------------------------------
- 0 29 Bra
- 2 18 Bra
- 4 a
- 6 12 CBra 1
- 9 c
- 11 5 CBra 2
- 14 d
- 16 5 Ket
- 18 12 Ket
- 20 18 Ket
- 22 5 CBra 3
- 25 a
- 27 5 Ket
- 29 29 Ket
- 31 End
-------------------------------------------------------------------
-
-/(?P<a>a)...(?P=a)bbb(?P>a)d/BM
-Memory allocation (code space): 57
-------------------------------------------------------------------
- 0 24 Bra
- 2 5 CBra 1
- 5 a
- 7 5 Ket
- 9 Any
- 10 Any
- 11 Any
- 12 \1
- 14 bbb
- 20 2 Recurse
- 22 d
- 24 24 Ket
- 26 End
-------------------------------------------------------------------
-
-/abc(?C255)de(?C)f/BM
-Memory allocation (code space): 50
-------------------------------------------------------------------
- 0 22 Bra
- 2 abc
- 8 Callout 255 10 1
- 12 de
- 16 Callout 0 16 1
- 20 f
- 22 22 Ket
- 24 End
-------------------------------------------------------------------
-
-/abcde/CBM
-Memory allocation (code space): 78
-------------------------------------------------------------------
- 0 36 Bra
- 2 Callout 255 0 1
- 6 a
- 8 Callout 255 1 1
- 12 b
- 14 Callout 255 2 1
- 18 c
- 20 Callout 255 3 1
- 24 d
- 26 Callout 255 4 1
- 30 e
- 32 Callout 255 5 0
- 36 36 Ket
- 38 End
-------------------------------------------------------------------
-
-/\x{100}/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 \x{100}
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/\x{1000}/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 \x{1000}
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/\x{10000}/8BM
-Memory allocation (code space): 16
-------------------------------------------------------------------
- 0 5 Bra
- 2 \x{10000}
- 5 5 Ket
- 7 End
-------------------------------------------------------------------
-
-/\x{100000}/8BM
-Memory allocation (code space): 16
-------------------------------------------------------------------
- 0 5 Bra
- 2 \x{100000}
- 5 5 Ket
- 7 End
-------------------------------------------------------------------
-
-/\x{10ffff}/8BM
-Memory allocation (code space): 16
-------------------------------------------------------------------
- 0 5 Bra
- 2 \x{10ffff}
- 5 5 Ket
- 7 End
-------------------------------------------------------------------
-
-/\x{110000}/8BM
-Failed: character value in \x{...} sequence is too large at offset 9
-
-/[\x{ff}]/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 \xff
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[\x{100}]/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 \x{100}
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/\x80/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 \x80
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/\xff/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 \xff
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/\x{0041}\x{2262}\x{0391}\x{002e}/D8M
-Memory allocation (code space): 26
-------------------------------------------------------------------
- 0 10 Bra
- 2 A\x{2262}\x{391}.
- 10 10 Ket
- 12 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'A'
-Need char = '.'
-
-/\x{D55c}\x{ad6d}\x{C5B4}/D8M
-Memory allocation (code space): 22
-------------------------------------------------------------------
- 0 8 Bra
- 2 \x{d55c}\x{ad6d}\x{c5b4}
- 8 8 Ket
- 10 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{d55c}
-Need char = \x{c5b4}
-
-/\x{65e5}\x{672c}\x{8a9e}/D8M
-Memory allocation (code space): 22
-------------------------------------------------------------------
- 0 8 Bra
- 2 \x{65e5}\x{672c}\x{8a9e}
- 8 8 Ket
- 10 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{65e5}
-Need char = \x{8a9e}
-
-/[\x{100}]/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 \x{100}
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[Z\x{100}]/8BM
-Memory allocation (code space): 54
-------------------------------------------------------------------
- 0 24 Bra
- 2 [Z\x{100}]
- 24 24 Ket
- 26 End
-------------------------------------------------------------------
-
-/^[\x{100}\E-\Q\E\x{150}]/B8M
-Memory allocation (code space): 26
-------------------------------------------------------------------
- 0 10 Bra
- 2 ^
- 3 [\x{100}-\x{150}]
- 10 10 Ket
- 12 End
-------------------------------------------------------------------
-
-/^[\QĀ\E-\QŐ\E]/B8M
-Memory allocation (code space): 26
-------------------------------------------------------------------
- 0 10 Bra
- 2 ^
- 3 [\x{100}-\x{150}]
- 10 10 Ket
- 12 End
-------------------------------------------------------------------
-
-/^[\QĀ\E-\QŐ\E/B8M
-Failed: missing terminating ] for character class at offset 13
-
-/[\p{L}]/BM
-Memory allocation (code space): 24
-------------------------------------------------------------------
- 0 9 Bra
- 2 [\p{L}]
- 9 9 Ket
- 11 End
-------------------------------------------------------------------
-
-/[\p{^L}]/BM
-Memory allocation (code space): 24
-------------------------------------------------------------------
- 0 9 Bra
- 2 [\P{L}]
- 9 9 Ket
- 11 End
-------------------------------------------------------------------
-
-/[\P{L}]/BM
-Memory allocation (code space): 24
-------------------------------------------------------------------
- 0 9 Bra
- 2 [\P{L}]
- 9 9 Ket
- 11 End
-------------------------------------------------------------------
-
-/[\P{^L}]/BM
-Memory allocation (code space): 24
-------------------------------------------------------------------
- 0 9 Bra
- 2 [\p{L}]
- 9 9 Ket
- 11 End
-------------------------------------------------------------------
-
-/[abc\p{L}\x{0660}]/8BM
-Memory allocation (code space): 60
-------------------------------------------------------------------
- 0 27 Bra
- 2 [a-c\p{L}\x{660}]
- 27 27 Ket
- 29 End
-------------------------------------------------------------------
-
-/[\p{Nd}]/8BM
-Memory allocation (code space): 24
-------------------------------------------------------------------
- 0 9 Bra
- 2 [\p{Nd}]
- 9 9 Ket
- 11 End
-------------------------------------------------------------------
-
-/[\p{Nd}+-]+/8BM
-Memory allocation (code space): 58
-------------------------------------------------------------------
- 0 26 Bra
- 2 [+\-\p{Nd}]+
- 26 26 Ket
- 28 End
-------------------------------------------------------------------
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iBM
-Memory allocation (code space): 32
-------------------------------------------------------------------
- 0 13 Bra
- 2 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 13 13 Ket
- 15 End
-------------------------------------------------------------------
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8BM
-Memory allocation (code space): 32
-------------------------------------------------------------------
- 0 13 Bra
- 2 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 13 13 Ket
- 15 End
-------------------------------------------------------------------
-
-/[\x{105}-\x{109}]/8iBM
-Memory allocation (code space): 24
-------------------------------------------------------------------
- 0 9 Bra
- 2 [\x{104}-\x{109}]
- 9 9 Ket
- 11 End
-------------------------------------------------------------------
-
-/( ( (?(1)0|) )* )/xBM
-Memory allocation (code space): 52
-------------------------------------------------------------------
- 0 23 Bra
- 2 19 CBra 1
- 5 Brazero
- 6 13 SCBra 2
- 9 6 Cond
- 11 1 Cond ref
- 13 0
- 15 2 Alt
- 17 8 Ket
- 19 13 KetRmax
- 21 19 Ket
- 23 23 Ket
- 25 End
-------------------------------------------------------------------
-
-/( (?(1)0|)* )/xBM
-Memory allocation (code space): 42
-------------------------------------------------------------------
- 0 18 Bra
- 2 14 CBra 1
- 5 Brazero
- 6 6 SCond
- 8 1 Cond ref
- 10 0
- 12 2 Alt
- 14 8 KetRmax
- 16 14 Ket
- 18 18 Ket
- 20 End
-------------------------------------------------------------------
-
-/[a]/BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 a
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[a]/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 a
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[\xaa]/BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 \xaa
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[\xaa]/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 \xaa
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[^a]/BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 [^a]
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[^a]/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 [^a]
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[^\xaa]/BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 [^\xaa]
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[^\xaa]/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 4 Bra
- 2 [^\x{aa}]
- 4 4 Ket
- 6 End
-------------------------------------------------------------------
-
-/[^\d]/8WB
-------------------------------------------------------------------
- 0 9 Bra
- 2 [^\p{Nd}]
- 9 9 Ket
- 11 End
-------------------------------------------------------------------
-
-/[[:^alpha:][:^cntrl:]]+/8WB
-------------------------------------------------------------------
- 0 26 Bra
- 2 [ -~\x80-\xff\P{L}]+
- 26 26 Ket
- 28 End
-------------------------------------------------------------------
-
-/[[:^cntrl:][:^alpha:]]+/8WB
-------------------------------------------------------------------
- 0 26 Bra
- 2 [ -~\x80-\xff\P{L}]+
- 26 26 Ket
- 28 End
-------------------------------------------------------------------
-
-/[[:alpha:]]+/8WB
-------------------------------------------------------------------
- 0 10 Bra
- 2 [\p{L}]+
- 10 10 Ket
- 12 End
-------------------------------------------------------------------
-
-/[[:^alpha:]\S]+/8WB
-------------------------------------------------------------------
- 0 13 Bra
- 2 [\P{L}\P{Xsp}]+
- 13 13 Ket
- 15 End
-------------------------------------------------------------------
-
-/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
-------------------------------------------------------------------
- 0 60 Bra
- 2 abc
- 8 5 CBra 1
- 11 d
- 13 4 Alt
- 15 e
- 17 9 Ket
- 19 *THEN
- 20 x
- 22 12 CBra 2
- 25 123
- 31 *THEN
- 32 4
- 34 24 Alt
- 36 567
- 42 5 CBra 3
- 45 b
- 47 4 Alt
- 49 q
- 51 9 Ket
- 53 *THEN
- 54 xx
- 58 36 Ket
- 60 60 Ket
- 62 End
-------------------------------------------------------------------
-
-/-- End of testinput11 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput11-8 b/src/third_party/pcre-8.30/testdata/testoutput11-8
deleted file mode 100644
index 3cb40e45536..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput11-8
+++ /dev/null
@@ -1,713 +0,0 @@
-/-- These are a few representative patterns whose lengths and offsets are to be
-shown when the link size is 2. This is just a doublecheck test to ensure the
-sizes don't go horribly wrong when something is changed. The pattern contents
-are all themselves checked in other tests. Unicode, including property support,
-is required for these tests. --/
-
-/((?i)b)/BM
-Memory allocation (code space): 17
-------------------------------------------------------------------
- 0 13 Bra
- 3 7 CBra 1
- 8 /i b
- 10 7 Ket
- 13 13 Ket
- 16 End
-------------------------------------------------------------------
-
-/(?s)(.*X|^B)/BM
-Memory allocation (code space): 25
-------------------------------------------------------------------
- 0 21 Bra
- 3 9 CBra 1
- 8 AllAny*
- 10 X
- 12 6 Alt
- 15 ^
- 16 B
- 18 15 Ket
- 21 21 Ket
- 24 End
-------------------------------------------------------------------
-
-/(?s:.*X|^B)/BM
-Memory allocation (code space): 23
-------------------------------------------------------------------
- 0 19 Bra
- 3 7 Bra
- 6 AllAny*
- 8 X
- 10 6 Alt
- 13 ^
- 14 B
- 16 13 Ket
- 19 19 Ket
- 22 End
-------------------------------------------------------------------
-
-/^[[:alnum:]]/BM
-Memory allocation (code space): 41
-------------------------------------------------------------------
- 0 37 Bra
- 3 ^
- 4 [0-9A-Za-z]
- 37 37 Ket
- 40 End
-------------------------------------------------------------------
-
-/#/IxMD
-Memory allocation (code space): 7
-------------------------------------------------------------------
- 0 3 Bra
- 3 3 Ket
- 6 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: extended
-No first char
-No need char
-
-/a#/IxMD
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 a
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: extended
-First char = 'a'
-No need char
-
-/x?+/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 x?+
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/x++/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 x++
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/x{1,3}+/BM
-Memory allocation (code space): 19
-------------------------------------------------------------------
- 0 15 Bra
- 3 9 Once
- 6 x
- 8 x{0,2}
- 12 9 Ket
- 15 15 Ket
- 18 End
-------------------------------------------------------------------
-
-/(x)*+/BM
-Memory allocation (code space): 18
-------------------------------------------------------------------
- 0 14 Bra
- 3 Braposzero
- 4 7 CBraPos 1
- 9 x
- 11 7 KetRpos
- 14 14 Ket
- 17 End
-------------------------------------------------------------------
-
-/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/BM
-Memory allocation (code space): 120
-------------------------------------------------------------------
- 0 116 Bra
- 3 ^
- 4 109 CBra 1
- 9 7 CBra 2
- 14 a+
- 16 7 Ket
- 19 39 CBra 3
- 24 [ab]+?
- 58 39 Ket
- 61 39 CBra 4
- 66 [bc]+
-100 39 Ket
-103 7 CBra 5
-108 \w*
-110 7 Ket
-113 109 Ket
-116 116 Ket
-119 End
-------------------------------------------------------------------
-
-|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-Memory allocation (code space): 826
-------------------------------------------------------------------
- 0 822 Bra
- 3 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
-821 \b
-822 822 Ket
-825 End
-------------------------------------------------------------------
-
-|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-Memory allocation (code space): 816
-------------------------------------------------------------------
- 0 812 Bra
- 3 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
-811 \b
-812 812 Ket
-815 End
-------------------------------------------------------------------
-
-/(a(?1)b)/BM
-Memory allocation (code space): 22
-------------------------------------------------------------------
- 0 18 Bra
- 3 12 CBra 1
- 8 a
- 10 3 Recurse
- 13 b
- 15 12 Ket
- 18 18 Ket
- 21 End
-------------------------------------------------------------------
-
-/(a(?1)+b)/BM
-Memory allocation (code space): 28
-------------------------------------------------------------------
- 0 24 Bra
- 3 18 CBra 1
- 8 a
- 10 6 Once
- 13 3 Recurse
- 16 6 KetRmax
- 19 b
- 21 18 Ket
- 24 24 Ket
- 27 End
-------------------------------------------------------------------
-
-/a(?P<name1>b|c)d(?P<longername2>e)/BM
-Memory allocation (code space): 36
-------------------------------------------------------------------
- 0 32 Bra
- 3 a
- 5 7 CBra 1
- 10 b
- 12 5 Alt
- 15 c
- 17 12 Ket
- 20 d
- 22 7 CBra 2
- 27 e
- 29 7 Ket
- 32 32 Ket
- 35 End
-------------------------------------------------------------------
-
-/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/BM
-Memory allocation (code space): 45
-------------------------------------------------------------------
- 0 41 Bra
- 3 25 Bra
- 6 a
- 8 17 CBra 1
- 13 c
- 15 7 CBra 2
- 20 d
- 22 7 Ket
- 25 17 Ket
- 28 25 Ket
- 31 7 CBra 3
- 36 a
- 38 7 Ket
- 41 41 Ket
- 44 End
-------------------------------------------------------------------
-
-/(?P<a>a)...(?P=a)bbb(?P>a)d/BM
-Memory allocation (code space): 34
-------------------------------------------------------------------
- 0 30 Bra
- 3 7 CBra 1
- 8 a
- 10 7 Ket
- 13 Any
- 14 Any
- 15 Any
- 16 \1
- 19 bbb
- 25 3 Recurse
- 28 d
- 30 30 Ket
- 33 End
-------------------------------------------------------------------
-
-/abc(?C255)de(?C)f/BM
-Memory allocation (code space): 31
-------------------------------------------------------------------
- 0 27 Bra
- 3 abc
- 9 Callout 255 10 1
- 15 de
- 19 Callout 0 16 1
- 25 f
- 27 27 Ket
- 30 End
-------------------------------------------------------------------
-
-/abcde/CBM
-Memory allocation (code space): 53
-------------------------------------------------------------------
- 0 49 Bra
- 3 Callout 255 0 1
- 9 a
- 11 Callout 255 1 1
- 17 b
- 19 Callout 255 2 1
- 25 c
- 27 Callout 255 3 1
- 33 d
- 35 Callout 255 4 1
- 41 e
- 43 Callout 255 5 0
- 49 49 Ket
- 52 End
-------------------------------------------------------------------
-
-/\x{100}/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{100}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/\x{1000}/8BM
-Memory allocation (code space): 11
-------------------------------------------------------------------
- 0 7 Bra
- 3 \x{1000}
- 7 7 Ket
- 10 End
-------------------------------------------------------------------
-
-/\x{10000}/8BM
-Memory allocation (code space): 12
-------------------------------------------------------------------
- 0 8 Bra
- 3 \x{10000}
- 8 8 Ket
- 11 End
-------------------------------------------------------------------
-
-/\x{100000}/8BM
-Memory allocation (code space): 12
-------------------------------------------------------------------
- 0 8 Bra
- 3 \x{100000}
- 8 8 Ket
- 11 End
-------------------------------------------------------------------
-
-/\x{10ffff}/8BM
-Memory allocation (code space): 12
-------------------------------------------------------------------
- 0 8 Bra
- 3 \x{10ffff}
- 8 8 Ket
- 11 End
-------------------------------------------------------------------
-
-/\x{110000}/8BM
-Failed: character value in \x{...} sequence is too large at offset 9
-
-/[\x{ff}]/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{ff}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/[\x{100}]/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{100}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/\x80/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{80}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/\xff/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{ff}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/\x{0041}\x{2262}\x{0391}\x{002e}/D8M
-Memory allocation (code space): 18
-------------------------------------------------------------------
- 0 14 Bra
- 3 A\x{2262}\x{391}.
- 14 14 Ket
- 17 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'A'
-Need char = '.'
-
-/\x{D55c}\x{ad6d}\x{C5B4}/D8M
-Memory allocation (code space): 19
-------------------------------------------------------------------
- 0 15 Bra
- 3 \x{d55c}\x{ad6d}\x{c5b4}
- 15 15 Ket
- 18 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{ed}
-Need char = \x{b4}
-
-/\x{65e5}\x{672c}\x{8a9e}/D8M
-Memory allocation (code space): 19
-------------------------------------------------------------------
- 0 15 Bra
- 3 \x{65e5}\x{672c}\x{8a9e}
- 15 15 Ket
- 18 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{e6}
-Need char = \x{9e}
-
-/[\x{100}]/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{100}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/[Z\x{100}]/8BM
-Memory allocation (code space): 47
-------------------------------------------------------------------
- 0 43 Bra
- 3 [Z\x{100}]
- 43 43 Ket
- 46 End
-------------------------------------------------------------------
-
-/^[\x{100}\E-\Q\E\x{150}]/B8M
-Memory allocation (code space): 18
-------------------------------------------------------------------
- 0 14 Bra
- 3 ^
- 4 [\x{100}-\x{150}]
- 14 14 Ket
- 17 End
-------------------------------------------------------------------
-
-/^[\QĀ\E-\QŐ\E]/B8M
-Memory allocation (code space): 18
-------------------------------------------------------------------
- 0 14 Bra
- 3 ^
- 4 [\x{100}-\x{150}]
- 14 14 Ket
- 17 End
-------------------------------------------------------------------
-
-/^[\QĀ\E-\QŐ\E/B8M
-Failed: missing terminating ] for character class at offset 15
-
-/[\p{L}]/BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\p{L}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[\p{^L}]/BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\P{L}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[\P{L}]/BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\P{L}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[\P{^L}]/BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\p{L}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[abc\p{L}\x{0660}]/8BM
-Memory allocation (code space): 50
-------------------------------------------------------------------
- 0 46 Bra
- 3 [a-c\p{L}\x{660}]
- 46 46 Ket
- 49 End
-------------------------------------------------------------------
-
-/[\p{Nd}]/8BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\p{Nd}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[\p{Nd}+-]+/8BM
-Memory allocation (code space): 48
-------------------------------------------------------------------
- 0 44 Bra
- 3 [+\-\p{Nd}]+
- 44 44 Ket
- 47 End
-------------------------------------------------------------------
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iBM
-Memory allocation (code space): 25
-------------------------------------------------------------------
- 0 21 Bra
- 3 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 21 21 Ket
- 24 End
-------------------------------------------------------------------
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8BM
-Memory allocation (code space): 25
-------------------------------------------------------------------
- 0 21 Bra
- 3 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 21 21 Ket
- 24 End
-------------------------------------------------------------------
-
-/[\x{105}-\x{109}]/8iBM
-Memory allocation (code space): 17
-------------------------------------------------------------------
- 0 13 Bra
- 3 [\x{104}-\x{109}]
- 13 13 Ket
- 16 End
-------------------------------------------------------------------
-
-/( ( (?(1)0|) )* )/xBM
-Memory allocation (code space): 38
-------------------------------------------------------------------
- 0 34 Bra
- 3 28 CBra 1
- 8 Brazero
- 9 19 SCBra 2
- 14 8 Cond
- 17 1 Cond ref
- 20 0
- 22 3 Alt
- 25 11 Ket
- 28 19 KetRmax
- 31 28 Ket
- 34 34 Ket
- 37 End
-------------------------------------------------------------------
-
-/( (?(1)0|)* )/xBM
-Memory allocation (code space): 30
-------------------------------------------------------------------
- 0 26 Bra
- 3 20 CBra 1
- 8 Brazero
- 9 8 SCond
- 12 1 Cond ref
- 15 0
- 17 3 Alt
- 20 11 KetRmax
- 23 20 Ket
- 26 26 Ket
- 29 End
-------------------------------------------------------------------
-
-/[a]/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 a
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[a]/8BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 a
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[\xaa]/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 \xaa
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[\xaa]/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{aa}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/[^a]/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 [^a]
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[^a]/8BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 [^a]
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[^\xaa]/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 [^\xaa]
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[^\xaa]/8BM
-Memory allocation (code space): 40
-------------------------------------------------------------------
- 0 36 Bra
- 3 [\x00-\xa9\xab-\xff] (neg)
- 36 36 Ket
- 39 End
-------------------------------------------------------------------
-
-/[^\d]/8WB
-------------------------------------------------------------------
- 0 11 Bra
- 3 [^\p{Nd}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[[:^alpha:][:^cntrl:]]+/8WB
-------------------------------------------------------------------
- 0 44 Bra
- 3 [ -~\x80-\xff\P{L}]+
- 44 44 Ket
- 47 End
-------------------------------------------------------------------
-
-/[[:^cntrl:][:^alpha:]]+/8WB
-------------------------------------------------------------------
- 0 44 Bra
- 3 [ -~\x80-\xff\P{L}]+
- 44 44 Ket
- 47 End
-------------------------------------------------------------------
-
-/[[:alpha:]]+/8WB
-------------------------------------------------------------------
- 0 12 Bra
- 3 [\p{L}]+
- 12 12 Ket
- 15 End
-------------------------------------------------------------------
-
-/[[:^alpha:]\S]+/8WB
-------------------------------------------------------------------
- 0 15 Bra
- 3 [\P{L}\P{Xsp}]+
- 15 15 Ket
- 18 End
-------------------------------------------------------------------
-
-/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
-------------------------------------------------------------------
- 0 73 Bra
- 3 abc
- 9 7 CBra 1
- 14 d
- 16 5 Alt
- 19 e
- 21 12 Ket
- 24 *THEN
- 25 x
- 27 14 CBra 2
- 32 123
- 38 *THEN
- 39 4
- 41 29 Alt
- 44 567
- 50 7 CBra 3
- 55 b
- 57 5 Alt
- 60 q
- 62 12 Ket
- 65 *THEN
- 66 xx
- 70 43 Ket
- 73 73 Ket
- 76 End
-------------------------------------------------------------------
-
-/-- End of testinput11 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput12 b/src/third_party/pcre-8.30/testdata/testoutput12
deleted file mode 100644
index f10c11ec636..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput12
+++ /dev/null
@@ -1,51 +0,0 @@
-/-- This test is run only when JIT support is available. It checks for a
-successful and an unsuccessful JIT compile and save and restore behaviour,
-and a couple of things that are different with JIT. --/
-
-/abc/S+I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-Subject length lower bound = 3
-No set of starting bytes
-JIT study was successful
-
-/ab(*COMMIT)/S+I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-Subject length lower bound = 2
-No set of starting bytes
-JIT study was not successful
-
-/abc/S+I>testsavedregex
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-Subject length lower bound = 3
-No set of starting bytes
-JIT study was successful
-Compiled pattern written to testsavedregex
-Study data written to testsavedregex
-
-<testsavedregex
-Compiled pattern loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: abc
-
-/a*/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Study returned NULL
-
-/(?(R)a*(?1)|((?R))b)/S+
- aaaabcde
-Error -27 (JIT stack limit reached)
-
-/-- End of testinput12 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput13 b/src/third_party/pcre-8.30/testdata/testoutput13
deleted file mode 100644
index e9cbbcf0a2b..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput13
+++ /dev/null
@@ -1,21 +0,0 @@
-/-- This test is run only when JIT support is not available. It checks that an
-attempt to use it has the expected behaviour. It also tests things that
-are different without JIT. --/
-
-/abc/S+I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-Subject length lower bound = 3
-No set of starting bytes
-JIT support is not available in this version of PCRE
-
-/a*/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Study returned NULL
-
-/-- End of testinput13 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput14 b/src/third_party/pcre-8.30/testdata/testoutput14
deleted file mode 100644
index 7c889d04968..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput14
+++ /dev/null
@@ -1,456 +0,0 @@
-/-- This set of tests is run only with the 8-bit library. It starts with all
- the tests of the POSIX interface, because that is supported only with the
- 8-bit library. --/
-
-/abc/P
- abc
- 0: abc
- *** Failers
-No match: POSIX code 17: match failed
-
-/^abc|def/P
- abcdef
- 0: abc
- abcdef\B
- 0: def
-
-/.*((abc)$|(def))/P
- defabc
- 0: defabc
- 1: abc
- 2: abc
- \Zdefabc
- 0: def
- 1: def
- 3: def
-
-/the quick brown fox/P
- the quick brown fox
- 0: the quick brown fox
- *** Failers
-No match: POSIX code 17: match failed
- The Quick Brown Fox
-No match: POSIX code 17: match failed
-
-/the quick brown fox/Pi
- the quick brown fox
- 0: the quick brown fox
- The Quick Brown Fox
- 0: The Quick Brown Fox
-
-/abc.def/P
- *** Failers
-No match: POSIX code 17: match failed
- abc\ndef
-No match: POSIX code 17: match failed
-
-/abc$/P
- abc
- 0: abc
- abc\n
- 0: abc
-
-/(abc)\2/P
-Failed: POSIX code 15: bad back reference at offset 7
-
-/(abc\1)/P
- abc
-No match: POSIX code 17: match failed
-
-/a*(b+)(z)(z)/P
- aaaabbbbzzzz
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- 3: z
- aaaabbbbzzzz\O0
- aaaabbbbzzzz\O1
- 0: aaaabbbbzz
- aaaabbbbzzzz\O2
- 0: aaaabbbbzz
- 1: bbbb
- aaaabbbbzzzz\O3
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- aaaabbbbzzzz\O4
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- 3: z
- aaaabbbbzzzz\O5
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- 3: z
-
-/ab.cd/P
- ab-cd
- 0: ab-cd
- ab=cd
- 0: ab=cd
- ** Failers
-No match: POSIX code 17: match failed
- ab\ncd
-No match: POSIX code 17: match failed
-
-/ab.cd/Ps
- ab-cd
- 0: ab-cd
- ab=cd
- 0: ab=cd
- ab\ncd
- 0: ab\x0acd
-
-/a(b)c/PN
- abc
-Matched with REG_NOSUB
-
-/a(?P<name>b)c/PN
- abc
-Matched with REG_NOSUB
-
-/a?|b?/P
- abc
- 0: a
- ** Failers
- 0:
- ddd\N
-No match: POSIX code 17: match failed
-
-/\w+A/P
- CDAAAAB
- 0: CDAAAA
-
-/\w+A/PU
- CDAAAAB
- 0: CDA
-
-/\Biss\B/I+P
- Mississippi
- 0: iss
- 0+ issippi
-
-/abc/\P
-Failed: POSIX code 9: bad escape sequence at offset 4
-
-/-- End of POSIX tests --/
-
-/a\Cb/
- aXb
- 0: aXb
- a\nb
- 0: a\x0ab
- ** Failers (too big char)
-No match
- A\x{123}B
-** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
-** Truncation will probably give the wrong result.
-No match
-
-/\x{100}/I
-Failed: character value in \x{...} sequence is too large at offset 6
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/xSI
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-Options: extended
-No first char
-No need char
-Subject length lower bound = 3
-Starting byte set: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8
- 9 = ? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ^ _ ` a b c d e
- f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
-
-/-- Although this saved pattern was compiled with link-size=2, it does no harm
-to run this test with other link sizes because it is going to generated a
-"compiled in wrong mode" error as soon as it is loaded, so the link size does
-not matter. --/
-
-<!testsaved16
-Compiled pattern loaded from testsaved16
-No study data
-Error -28 from pcre_fullinfo(0)
-Running in 8-bit mode but pattern was compiled in 16-bit mode
-
-/\h/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x09 \x20 \xa0
-
-/\v/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \x85
-
-/\R/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \x85
-
-/[\h]/BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0]
- Ket
- End
-------------------------------------------------------------------
- >\x09<
- 0: \x09
-
-/[\h]+/BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0]+
- Ket
- End
-------------------------------------------------------------------
- >\x09\x20\xa0<
- 0: \x09 \xa0
-
-/[\v]/BZ
-------------------------------------------------------------------
- Bra
- [\x0a-\x0d\x85]
- Ket
- End
-------------------------------------------------------------------
-
-/[\H]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff]
- Ket
- End
-------------------------------------------------------------------
-
-/[^\h]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-
-/[\V]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x09\x0e-\x84\x86-\xff]
- Ket
- End
-------------------------------------------------------------------
-
-/[\x0a\V]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x0a\x0e-\x84\x86-\xff]
- Ket
- End
-------------------------------------------------------------------
-
-/\777/I
-Failed: octal value is greater than \377 in 8-bit non-UTF-8 mode at offset 3
-
-/-- End of testinput14 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput15 b/src/third_party/pcre-8.30/testdata/testoutput15
deleted file mode 100644
index b0981605562..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput15
+++ /dev/null
@@ -1,913 +0,0 @@
-/-- This set of tests is for UTF-8 support, and is relevant only to the 8-bit
- library. --/
-
-/X(\C{3})/8
- X\x{1234}
- 0: X\x{1234}
- 1: \x{1234}
-
-/X(\C{4})/8
- X\x{1234}YZ
- 0: X\x{1234}Y
- 1: \x{1234}Y
-
-/X\C*/8
- XYZabcdce
- 0: XYZabcdce
-
-/X\C*?/8
- XYZabcde
- 0: X
-
-/X\C{3,5}/8
- Xabcdefg
- 0: Xabcde
- X\x{1234}
- 0: X\x{1234}
- X\x{1234}YZ
- 0: X\x{1234}YZ
- X\x{1234}\x{512}
- 0: X\x{1234}\x{512}
- X\x{1234}\x{512}YZ
- 0: X\x{1234}\x{512}
-
-/X\C{3,5}?/8
- Xabcdefg
- 0: Xabc
- X\x{1234}
- 0: X\x{1234}
- X\x{1234}YZ
- 0: X\x{1234}
- X\x{1234}\x{512}
- 0: X\x{1234}
-
-/a\Cb/8
- aXb
- 0: aXb
- a\nb
- 0: a\x{0a}b
-
-/a\C\Cb/8
- a\x{100}b
- 0: a\x{100}b
-
-/ab\Cde/8
- abXde
- 0: abXde
-
-/a\C\Cb/8
- a\x{100}b
- 0: a\x{100}b
- ** Failers
-No match
- a\x{12257}b
-No match
-
-/[]/8
-Failed: invalid UTF-8 string at offset 1
-
-//8
-Failed: invalid UTF-8 string at offset 0
-
-/xxx/8
-Failed: invalid UTF-8 string at offset 0
-
-/xxx/8?DZSS
-------------------------------------------------------------------
- Bra
- \X{c0}\X{c0}\X{c0}xxx
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf no_utf_check
-First char = \x{c3}
-Need char = 'x'
-
-/abc/8
- ]
-Error -10 (bad UTF-8 string) offset=0 reason=6
-
-Error -10 (bad UTF-8 string) offset=0 reason=1
-
-Error -10 (bad UTF-8 string) offset=0 reason=6
- \?
-No match
- \xe1\x88
-Error -10 (bad UTF-8 string) offset=0 reason=1
- \P\xe1\x88
-Error -10 (bad UTF-8 string) offset=0 reason=1
- \P\P\xe1\x88
-Error -25 (short UTF-8 string) offset=0 reason=1
- XX\xea
-Error -10 (bad UTF-8 string) offset=2 reason=2
- \O0XX\xea
-Error -10 (bad UTF-8 string)
- \O1XX\xea
-Error -10 (bad UTF-8 string)
- \O2XX\xea
-Error -10 (bad UTF-8 string) offset=2 reason=2
- XX\xf1
-Error -10 (bad UTF-8 string) offset=2 reason=3
- XX\xf8
-Error -10 (bad UTF-8 string) offset=2 reason=4
- XX\xfc
-Error -10 (bad UTF-8 string) offset=2 reason=5
- ZZ\xea\xaf\x20YY
-Error -10 (bad UTF-8 string) offset=2 reason=7
- ZZ\xfd\xbf\xbf\x2f\xbf\xbfYY
-Error -10 (bad UTF-8 string) offset=2 reason=8
- ZZ\xfd\xbf\xbf\xbf\x2f\xbfYY
-Error -10 (bad UTF-8 string) offset=2 reason=9
- ZZ\xfd\xbf\xbf\xbf\xbf\x2fYY
-Error -10 (bad UTF-8 string) offset=2 reason=10
- ZZ\xffYY
-Error -10 (bad UTF-8 string) offset=2 reason=21
- ZZ\xfeYY
-Error -10 (bad UTF-8 string) offset=2 reason=21
-
-/anything/8
- \xc0\x80
-Error -10 (bad UTF-8 string) offset=0 reason=15
- \xc1\x8f
-Error -10 (bad UTF-8 string) offset=0 reason=15
- \xe0\x9f\x80
-Error -10 (bad UTF-8 string) offset=0 reason=16
- \xf0\x8f\x80\x80
-Error -10 (bad UTF-8 string) offset=0 reason=17
- \xf8\x87\x80\x80\x80
-Error -10 (bad UTF-8 string) offset=0 reason=18
- \xfc\x83\x80\x80\x80\x80
-Error -10 (bad UTF-8 string) offset=0 reason=19
- \xfe\x80\x80\x80\x80\x80
-Error -10 (bad UTF-8 string) offset=0 reason=21
- \xff\x80\x80\x80\x80\x80
-Error -10 (bad UTF-8 string) offset=0 reason=21
- \xc3\x8f
-No match
- \xe0\xaf\x80
-No match
- \xe1\x80\x80
-No match
- \xf0\x9f\x80\x80
-No match
- \xf1\x8f\x80\x80
-No match
- \xf8\x88\x80\x80\x80
-Error -10 (bad UTF-8 string) offset=0 reason=11
- \xf9\x87\x80\x80\x80
-Error -10 (bad UTF-8 string) offset=0 reason=11
- \xfc\x84\x80\x80\x80\x80
-Error -10 (bad UTF-8 string) offset=0 reason=12
- \xfd\x83\x80\x80\x80\x80
-Error -10 (bad UTF-8 string) offset=0 reason=12
- \?\xf8\x88\x80\x80\x80
-No match
- \?\xf9\x87\x80\x80\x80
-No match
- \?\xfc\x84\x80\x80\x80\x80
-No match
- \?\xfd\x83\x80\x80\x80\x80
-No match
-
-/\x{100}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c4}
-Need char = \x{80}
-
-/\x{1000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{1000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{e1}
-Need char = \x{80}
-
-/\x{10000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{10000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{f0}
-Need char = \x{80}
-
-/\x{100000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{f4}
-Need char = \x{80}
-
-/\x{10ffff}/8DZ
-------------------------------------------------------------------
- Bra
- \x{10ffff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{f4}
-Need char = \x{bf}
-
-/[\x{ff}]/8DZ
-------------------------------------------------------------------
- Bra
- \x{ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c3}
-Need char = \x{bf}
-
-/[\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c4}
-Need char = \x{80}
-
-/\x80/8DZ
-------------------------------------------------------------------
- Bra
- \x{80}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c2}
-Need char = \x{80}
-
-/\xff/8DZ
-------------------------------------------------------------------
- Bra
- \x{ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c3}
-Need char = \x{bf}
-
-/\x{D55c}\x{ad6d}\x{C5B4}/DZ8
-------------------------------------------------------------------
- Bra
- \x{d55c}\x{ad6d}\x{c5b4}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{ed}
-Need char = \x{b4}
- \x{D55c}\x{ad6d}\x{C5B4}
- 0: \x{d55c}\x{ad6d}\x{c5b4}
-
-/\x{65e5}\x{672c}\x{8a9e}/DZ8
-------------------------------------------------------------------
- Bra
- \x{65e5}\x{672c}\x{8a9e}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{e6}
-Need char = \x{9e}
- \x{65e5}\x{672c}\x{8a9e}
- 0: \x{65e5}\x{672c}\x{8a9e}
-
-/\x{80}/DZ8
-------------------------------------------------------------------
- Bra
- \x{80}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c2}
-Need char = \x{80}
-
-/\x{084}/DZ8
-------------------------------------------------------------------
- Bra
- \x{84}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c2}
-Need char = \x{84}
-
-/\x{104}/DZ8
-------------------------------------------------------------------
- Bra
- \x{104}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c4}
-Need char = \x{84}
-
-/\x{861}/DZ8
-------------------------------------------------------------------
- Bra
- \x{861}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{e0}
-Need char = \x{a1}
-
-/\x{212ab}/DZ8
-------------------------------------------------------------------
- Bra
- \x{212ab}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{f0}
-Need char = \x{ab}
-
-/-- This one is here not because it's different to Perl, but because the way
-the captured single-byte is displayed. (In Perl it becomes a character, and you
-can't tell the difference.) --/
-
-/X(\C)(.*)/8
- X\x{1234}
- 0: X\x{1234}
- 1: \x{e1}
- 2: \x{88}\x{b4}
- X\nabc
- 0: X\x{0a}abc
- 1: \x{0a}
- 2: abc
-
-/-- This one is here because Perl gives out a grumbly error message (quite
-correctly, but that messes up comparisons). --/
-
-/a\Cb/8
- *** Failers
-No match
- a\x{100}b
-No match
-
-/[^ab\xC0-\xF0]/8SDZ
-------------------------------------------------------------------
- Bra
- [\x00-`c-\xbf\xf1-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
- \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
- \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4
- 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y
- Z [ \ ] ^ _ ` c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
- \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0
- \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf
- \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee
- \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd
- \xfe \xff
- \x{f1}
- 0: \x{f1}
- \x{bf}
- 0: \x{bf}
- \x{100}
- 0: \x{100}
- \x{1000}
- 0: \x{1000}
- *** Failers
- 0: *
- \x{c0}
-No match
- \x{f0}
-No match
-
-/Ā{3,4}/8SDZ
-------------------------------------------------------------------
- Bra
- \x{100}{3}
- \x{100}?
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c4}
-Need char = \x{80}
-Subject length lower bound = 3
-No set of starting bytes
- \x{100}\x{100}\x{100}\x{100\x{100}
- 0: \x{100}\x{100}\x{100}
-
-/(\x{100}+|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}+
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: x \xc4
-
-/(\x{100}*a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}*+
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a x \xc4
-
-/(\x{100}{0,2}a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}{0,2}
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a x \xc4
-
-/(\x{100}{1,2}a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}
- \x{100}{0,1}
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: x \xc4
-
-/\x{100}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c4}
-Need char = \x{80}
-
-/a\x{100}\x{101}*/8DZ
-------------------------------------------------------------------
- Bra
- a\x{100}
- \x{101}*
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'a'
-Need char = \x{80}
-
-/a\x{100}\x{101}+/8DZ
-------------------------------------------------------------------
- Bra
- a\x{100}
- \x{101}+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'a'
-Need char = \x{81}
-
-/[^\x{c4}]/DZ
-------------------------------------------------------------------
- Bra
- [^\xc4]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c4}
-Need char = \x{80}
- \x{100}
- 0: \x{100}
- Z\x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
-No match
-
-/[\xff]/DZ8
-------------------------------------------------------------------
- Bra
- \x{ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c3}
-Need char = \x{bf}
- >\x{ff}<
- 0: \x{ff}
-
-/[^\xff]/8DZ
-------------------------------------------------------------------
- Bra
- [\x00-\xfe] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/\x{100}abc(xyz(?1))/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}abc
- CBra 1
- xyz
- Recurse
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-First char = \x{c4}
-Need char = 'z'
-
-/a\x{1234}b/P8
- a\x{1234}b
- 0: a\x{1234}b
-
-/\777/8I
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c7}
-Need char = \x{bf}
- \x{1ff}
- 0: \x{1ff}
- \777
- 0: \x{1ff}
-
-/\x{100}+\x{200}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}++
- \x{200}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c4}
-Need char = \x{80}
-
-/\x{100}+X/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}++
- X
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c4}
-Need char = 'X'
-
-/^[\QĀ\E-\QŐ\E/BZ8
-Failed: missing terminating ] for character class at offset 15
-
-/-- This tests the stricter UTF-8 check according to RFC 3629. --/
-
-/X/8
- \x{0}\x{d7ff}\x{e000}\x{10ffff}
-No match
- \x{d800}
-Error -10 (bad UTF-8 string) offset=0 reason=14
- \x{d800}\?
-No match
- \x{da00}
-Error -10 (bad UTF-8 string) offset=0 reason=14
- \x{da00}\?
-No match
- \x{dfff}
-Error -10 (bad UTF-8 string) offset=0 reason=14
- \x{dfff}\?
-No match
- \x{110000}
-Error -10 (bad UTF-8 string) offset=0 reason=13
- \x{110000}\?
-No match
- \x{2000000}
-Error -10 (bad UTF-8 string) offset=0 reason=11
- \x{2000000}\?
-No match
- \x{7fffffff}
-Error -10 (bad UTF-8 string) offset=0 reason=12
- \x{7fffffff}\?
-No match
-
-/(*UTF8)\x{1234}/
- abcd\x{1234}pqr
- 0: \x{1234}
-
-/(*CRLF)(*UTF8)(*BSR_UNICODE)a\Rb/I
-Capturing subpattern count = 0
-Options: bsr_unicode utf
-Forced newline sequence: CRLF
-First char = 'a'
-Need char = 'b'
-
-/\h/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x09 \x20 \xc2 \xe1 \xe2 \xe3
- ABC\x{09}
- 0: \x{09}
- ABC\x{20}
- 0:
- ABC\x{a0}
- 0: \x{a0}
- ABC\x{1680}
- 0: \x{1680}
- ABC\x{180e}
- 0: \x{180e}
- ABC\x{2000}
- 0: \x{2000}
- ABC\x{202f}
- 0: \x{202f}
- ABC\x{205f}
- 0: \x{205f}
- ABC\x{3000}
- 0: \x{3000}
-
-/\v/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
- ABC\x{0a}
- 0: \x{0a}
- ABC\x{0b}
- 0: \x{0b}
- ABC\x{0c}
- 0: \x{0c}
- ABC\x{0d}
- 0: \x{0d}
- ABC\x{85}
- 0: \x{85}
- ABC\x{2028}
- 0: \x{2028}
-
-/\h*A/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'A'
-Subject length lower bound = 1
-Starting byte set: \x09 \x20 A \xc2 \xe1 \xe2 \xe3
- CDBABC
- 0: A
-
-/\v+A/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'A'
-Subject length lower bound = 2
-Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
-
-/\s?xxx\s/8SI
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'x'
-Subject length lower bound = 4
-Starting byte set: \x09 \x0a \x0c \x0d \x20 x
-
-/\sxxx\s/I8ST1
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'x'
-Subject length lower bound = 5
-Starting byte set: \x09 \x0a \x0c \x0d \x20 \xc2
- AB\x{85}xxx\x{a0}XYZ
- 0: \x{85}xxx\x{a0}
- AB\x{a0}xxx\x{85}XYZ
- 0: \x{a0}xxx\x{85}
-
-/\S \S/I8ST1
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = ' '
-Subject length lower bound = 3
-Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0b \x0e
- \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \x1b \x1c \x1d
- \x1e \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @
- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e
- f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \xc0 \xc1 \xc2 \xc3
- \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0 \xd1 \xd2
- \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \xe0 \xe1
- \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \xf0
- \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd \xfe \xff
- \x{a2} \x{84}
- 0: \x{a2} \x{84}
- A Z
- 0: A Z
-
-/a+/8
- a\x{123}aa\>1
- 0: aa
- a\x{123}aa\>2
-Error -11 (bad UTF-8 offset)
- a\x{123}aa\>3
- 0: aa
- a\x{123}aa\>4
- 0: a
- a\x{123}aa\>5
-No match
- a\x{123}aa\>6
-Error -24 (bad offset value)
-
-/\x{1234}+/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \xe1
-
-/\x{1234}+?/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \xe1
-
-/\x{1234}++/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \xe1
-
-/\x{1234}{2}/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: \xe1
-
-/[^\x{c4}]/8DZ
-------------------------------------------------------------------
- Bra
- [\x00-\xc3\xc5-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/X+\x{200}/8DZ
-------------------------------------------------------------------
- Bra
- X++
- \x{200}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'X'
-Need char = \x{80}
-
-/\R/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
-
-/\777/8DZ
-------------------------------------------------------------------
- Bra
- \x{1ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{c7}
-Need char = \x{bf}
-
-/-- End of testinput15 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput16 b/src/third_party/pcre-8.30/testdata/testoutput16
deleted file mode 100644
index 921df786f0a..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput16
+++ /dev/null
@@ -1,121 +0,0 @@
-/-- This set of tests is run only with the 8-bit library when Unicode property
- support is available. It starts with tests of the POSIX interface, because
- that is supported only with the 8-bit library. --/
-
-/\w/P
- +++\x{c2}
-No match: POSIX code 17: match failed
-
-/\w/WP
- +++\x{c2}
- 0: \xc2
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iDZ
-------------------------------------------------------------------
- Bra
- /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf
-First char = 'A' (caseless)
-No need char
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8DZ
-------------------------------------------------------------------
- Bra
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'A'
-Need char = \x{b0}
-
-/AB\x{1fb0}/8DZ
-------------------------------------------------------------------
- Bra
- AB\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'A'
-Need char = \x{b0}
-
-/AB\x{1fb0}/8DZi
-------------------------------------------------------------------
- Bra
- /i AB\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf
-First char = 'A' (caseless)
-Need char = 'B' (caseless)
-
-/\x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}/8iSI
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-Subject length lower bound = 17
-Starting byte set: \xd0 \xd1
- \x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}
- 0: \x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}
- \x{451}\x{440}\x{441}\x{442}\x{443}\x{444}\x{445}\x{446}\x{447}\x{448}\x{449}\x{44a}\x{44b}\x{44c}\x{44d}\x{44e}\x{44f}
- 0: \x{451}\x{440}\x{441}\x{442}\x{443}\x{444}\x{445}\x{446}\x{447}\x{448}\x{449}\x{44a}\x{44b}\x{44c}\x{44d}\x{44e}\x{44f}
-
-/[ⱥ]/8iBZ
-------------------------------------------------------------------
- Bra
- /i \x{2c65}
- Ket
- End
-------------------------------------------------------------------
-
-/[^ⱥ]/8iBZ
-------------------------------------------------------------------
- Bra
- [^\x{2c65}\x{23a}]
- Ket
- End
-------------------------------------------------------------------
-
-/\h/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x09 \x20 \xa0
-
-/\v/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \x85
-
-/\R/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \x85
-
-/[[:blank:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0]
- Ket
- End
-------------------------------------------------------------------
-
-/-- End of testinput16 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput17 b/src/third_party/pcre-8.30/testdata/testoutput17
deleted file mode 100644
index 06c6132fb62..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput17
+++ /dev/null
@@ -1,451 +0,0 @@
-/-- This set of tests is for the 16-bit library's basic (non-UTF-16) features
- that are not compatible with the 8-bit library, or which give different
- output in 16-bit mode. --/
-
-/a\Cb/
- aXb
- 0: aXb
- a\nb
- 0: a\x0ab
-
-/-- Check maximum non-UTF character size --/
-
-/\x{ffff}/
- A\x{ffff}B
- 0: \x{ffff}
-
-/\x{10000}/
-Failed: character value in \x{...} sequence is too large at offset 8
-
-/[^\x{c4}]/DZ
-------------------------------------------------------------------
- Bra
- [^\xc4]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-
-/\x{100}/I
-Capturing subpattern count = 0
-No options
-First char = \x{100}
-No need char
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/xSI
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-Options: extended
-No first char
-No need char
-Subject length lower bound = 3
-Starting byte set: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8
- 9 = ? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ^ _ ` a b c d e
- f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \xff
-
-/[\h]/BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]
- Ket
- End
-------------------------------------------------------------------
- >\x09<
- 0: \x09
-
-/[\h]+/BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]+
- Ket
- End
-------------------------------------------------------------------
- >\x09\x20\xa0<
- 0: \x09 \xa0
-
-/[\v]/BZ
-------------------------------------------------------------------
- Bra
- [\x0a-\x0d\x85\x{2028}-\x{2029}]
- Ket
- End
-------------------------------------------------------------------
-
-/[\H]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{ffff}]
- Ket
- End
-------------------------------------------------------------------
-
-/[^\h]/BZ
-------------------------------------------------------------------
- Bra
- [^\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]
- Ket
- End
-------------------------------------------------------------------
-
-/[\V]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{ffff}]
- Ket
- End
-------------------------------------------------------------------
-
-/[\x0a\V]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x0a\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{ffff}]
- Ket
- End
-------------------------------------------------------------------
-
-/\h+/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x09 \x20 \xa0 \xff
- \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
- 0: \x{1680}\x{2000}\x{202f}\x{3000}
- \x{3001}\x{2fff}\x{200a}\xa0\x{2000}
- 0: \x{200a}\xa0\x{2000}
-
-/[\h\x{dc00}]+/BZSI
-------------------------------------------------------------------
- Bra
- [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{dc00}]+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
- \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
- 0: \x{1680}\x{2000}\x{202f}\x{3000}
- \x{3001}\x{2fff}\x{200a}\xa0\x{2000}
- 0: \x{200a}\xa0\x{2000}
-
-/\H+/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
- \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
- 0: \x{167f}\x{1681}\x{180d}\x{180f}
- \x{2000}\x{200a}\x{1fff}\x{200b}
- 0: \x{1fff}\x{200b}
- \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
- 0: \x{202e}\x{2030}\x{205e}\x{2060}
- \xa0\x{3000}\x9f\xa1\x{2fff}\x{3001}
- 0: \x9f\xa1\x{2fff}\x{3001}
-
-/[\H\x{d800}]+/BZSI
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{ffff}\x{d800}]+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
- \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
- 0: \x{167f}\x{1681}\x{180d}\x{180f}
- \x{2000}\x{200a}\x{1fff}\x{200b}
- 0: \x{1fff}\x{200b}
- \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
- 0: \x{202e}\x{2030}\x{205e}\x{2060}
- \xa0\x{3000}\x9f\xa1\x{2fff}\x{3001}
- 0: \x9f\xa1\x{2fff}\x{3001}
-
-/\v+/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \x85 \xff
- \x{2027}\x{2030}\x{2028}\x{2029}
- 0: \x{2028}\x{2029}
- \x09\x0e\x84\x86\x85\x0a\x0b\x0c\x0d
- 0: \x85\x0a\x0b\x0c\x0d
-
-/[\v\x{dc00}]+/BZSI
-------------------------------------------------------------------
- Bra
- [\x0a-\x0d\x85\x{2028}-\x{2029}\x{dc00}]+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
- \x{2027}\x{2030}\x{2028}\x{2029}
- 0: \x{2028}\x{2029}
- \x09\x0e\x84\x86\x85\x0a\x0b\x0c\x0d
- 0: \x85\x0a\x0b\x0c\x0d
-
-/\V+/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
- \x{2028}\x{2029}\x{2027}\x{2030}
- 0: \x{2027}\x{2030}
- \x85\x0a\x0b\x0c\x0d\x09\x0e\x84\x86
- 0: \x09\x0e\x84\x86
-
-/[\V\x{d800}]+/BZSI
-------------------------------------------------------------------
- Bra
- [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{ffff}\x{d800}]+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
- \x{2028}\x{2029}\x{2027}\x{2030}
- 0: \x{2027}\x{2030}
- \x85\x0a\x0b\x0c\x0d\x09\x0e\x84\x86
- 0: \x09\x0e\x84\x86
-
-/\R+/SI<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \x85 \xff
- \x{2027}\x{2030}\x{2028}\x{2029}
- 0: \x{2028}\x{2029}
- \x09\x0e\x84\x86\x85\x0a\x0b\x0c\x0d
- 0: \x85\x0a\x0b\x0c\x0d
-
-/\x{d800}\x{d7ff}\x{dc00}\x{dc00}\x{dcff}\x{dd00}/I
-Capturing subpattern count = 0
-No options
-First char = \x{d800}
-Need char = \x{dd00}
- \x{d800}\x{d7ff}\x{dc00}\x{dc00}\x{dcff}\x{dd00}
- 0: \x{d800}\x{d7ff}\x{dc00}\x{dc00}\x{dcff}\x{dd00}
-
-/-- End of testinput17 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput18 b/src/third_party/pcre-8.30/testdata/testoutput18
deleted file mode 100644
index 4f72de484ad..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput18
+++ /dev/null
@@ -1,848 +0,0 @@
-/-- This set of tests is for UTF-16 support, and is relevant only to the 16-bit
- library. --/
-
-/xxx/8?DZSS
-**Failed: invalid UTF-8 string cannot be converted to UTF-16
-
-/abc/8
- ]
-**Failed: invalid UTF-8 string cannot be converted to UTF-16
-
-/X(\C{3})/8
- X\x{11234}Y
- 0: X\x{11234}Y
- 1: \x{11234}Y
-
-/X(\C{4})/8
- X\x{11234}YZ
- 0: X\x{11234}YZ
- 1: \x{11234}YZ
-
-/X\C*/8
- XYZabcdce
- 0: XYZabcdce
-
-/X\C*?/8
- XYZabcde
- 0: X
-
-/X\C{3,5}/8
- Xabcdefg
- 0: Xabcde
- X\x{11234}Y
- 0: X\x{11234}Y
- X\x{11234}YZ
- 0: X\x{11234}YZ
- X\x{11234}\x{512}
- 0: X\x{11234}\x{512}
- X\x{11234}\x{512}YZ
- 0: X\x{11234}\x{512}YZ
- X\x{11234}\x{512}\x{11234}Z
- 0: X\x{11234}\x{512}\x{11234}
-
-/X\C{3,5}?/8
- Xabcdefg
- 0: Xabc
- X\x{11234}Y
- 0: X\x{11234}Y
- X\x{11234}YZ
- 0: X\x{11234}Y
- X\x{11234}\x{512}YZ
- 0: X\x{11234}\x{512}
- *** Failers
-No match
- X\x{11234}
-No match
-
-/a\Cb/8
- aXb
- 0: aXb
- a\nb
- 0: a\x{0a}b
-
-/a\C\Cb/8
- a\x{12257}b
- 0: a\x{12257}b
- ** Failers
-No match
- a\x{100}b
-No match
-
-/ab\Cde/8
- abXde
- 0: abXde
-
-/-- Check maximum character size --/
-
-/\x{ffff}/8DZ
-------------------------------------------------------------------
- Bra
- \x{ffff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{ffff}
-No need char
-
-/\x{10000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{10000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{d800}
-Need char = \x{dc00}
-
-/\x{100}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{100}
-No need char
-
-/\x{1000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{1000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{1000}
-No need char
-
-/\x{10000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{10000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{d800}
-Need char = \x{dc00}
-
-/\x{100000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{dbc0}
-Need char = \x{dc00}
-
-/\x{10ffff}/8DZ
-------------------------------------------------------------------
- Bra
- \x{10ffff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{dbff}
-Need char = \x{dfff}
-
-/[\x{ff}]/8DZ
-------------------------------------------------------------------
- Bra
- \xff
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{ff}
-No need char
-
-/[\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{100}
-No need char
-
-/\x80/8DZ
-------------------------------------------------------------------
- Bra
- \x80
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{80}
-No need char
-
-/\xff/8DZ
-------------------------------------------------------------------
- Bra
- \xff
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{ff}
-No need char
-
-/\x{D55c}\x{ad6d}\x{C5B4}/DZ8
-------------------------------------------------------------------
- Bra
- \x{d55c}\x{ad6d}\x{c5b4}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{d55c}
-Need char = \x{c5b4}
- \x{D55c}\x{ad6d}\x{C5B4}
- 0: \x{d55c}\x{ad6d}\x{c5b4}
-
-/\x{65e5}\x{672c}\x{8a9e}/DZ8
-------------------------------------------------------------------
- Bra
- \x{65e5}\x{672c}\x{8a9e}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{65e5}
-Need char = \x{8a9e}
- \x{65e5}\x{672c}\x{8a9e}
- 0: \x{65e5}\x{672c}\x{8a9e}
-
-/\x{80}/DZ8
-------------------------------------------------------------------
- Bra
- \x80
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{80}
-No need char
-
-/\x{084}/DZ8
-------------------------------------------------------------------
- Bra
- \x84
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{84}
-No need char
-
-/\x{104}/DZ8
-------------------------------------------------------------------
- Bra
- \x{104}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{104}
-No need char
-
-/\x{861}/DZ8
-------------------------------------------------------------------
- Bra
- \x{861}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{861}
-No need char
-
-/\x{212ab}/DZ8
-------------------------------------------------------------------
- Bra
- \x{212ab}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{d844}
-Need char = \x{deab}
-
-/-- This one is here not because it's different to Perl, but because the way
-the captured single-byte is displayed. (In Perl it becomes a character, and you
-can't tell the difference.) --/
-
-/X(\C)(.*)/8
- X\x{1234}
- 0: X\x{1234}
- 1: \x{1234}
- 2:
- X\nabc
- 0: X\x{0a}abc
- 1: \x{0a}
- 2: abc
-
-/-- This one is here because Perl gives out a grumbly error message (quite
-correctly, but that messes up comparisons). --/
-
-/a\Cb/8
- *** Failers
-No match
- a\x{100}b
- 0: a\x{100}b
-
-/[^ab\xC0-\xF0]/8SDZ
-------------------------------------------------------------------
- Bra
- [\x00-`c-\xbf\xf1-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
- \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
- \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4
- 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y
- Z [ \ ] ^ _ ` c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
- \x80 \x81 \x82 \x83 \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e
- \x8f \x90 \x91 \x92 \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d
- \x9e \x9f \xa0 \xa1 \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac
- \xad \xae \xaf \xb0 \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb
- \xbc \xbd \xbe \xbf \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb
- \xfc \xfd \xfe \xff
- \x{f1}
- 0: \x{f1}
- \x{bf}
- 0: \x{bf}
- \x{100}
- 0: \x{100}
- \x{1000}
- 0: \x{1000}
- *** Failers
- 0: *
- \x{c0}
-No match
- \x{f0}
-No match
-
-/Ā{3,4}/8SDZ
-------------------------------------------------------------------
- Bra
- \x{100}{3}
- \x{100}?
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{100}
-Need char = \x{100}
-Subject length lower bound = 3
-No set of starting bytes
- \x{100}\x{100}\x{100}\x{100\x{100}
- 0: \x{100}\x{100}\x{100}
-
-/(\x{100}+|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}+
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: x \xff
-
-/(\x{100}*a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}*+
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a x \xff
-
-/(\x{100}{0,2}a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}{0,2}
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a x \xff
-
-/(\x{100}{1,2}a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}
- \x{100}{0,1}
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: x \xff
-
-/\x{100}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{100}
-No need char
-
-/a\x{100}\x{101}*/8DZ
-------------------------------------------------------------------
- Bra
- a\x{100}
- \x{101}*
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'a'
-Need char = \x{100}
-
-/a\x{100}\x{101}+/8DZ
-------------------------------------------------------------------
- Bra
- a\x{100}
- \x{101}+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'a'
-Need char = \x{101}
-
-/[^\x{c4}]/DZ
-------------------------------------------------------------------
- Bra
- [^\xc4]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{100}
-No need char
- \x{100}
- 0: \x{100}
- Z\x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
-No match
-
-/[\xff]/DZ8
-------------------------------------------------------------------
- Bra
- \xff
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{ff}
-No need char
- >\x{ff}<
- 0: \x{ff}
-
-/[^\xff]/8DZ
-------------------------------------------------------------------
- Bra
- [^\x{ff}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/\x{100}abc(xyz(?1))/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}abc
- CBra 1
- xyz
- Recurse
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-First char = \x{100}
-Need char = 'z'
-
-/\777/8I
-Capturing subpattern count = 0
-Options: utf
-First char = \x{1ff}
-No need char
- \x{1ff}
- 0: \x{1ff}
- \777
- 0: \x{1ff}
-
-/\x{100}+\x{200}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}++
- \x{200}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{100}
-Need char = \x{200}
-
-/\x{100}+X/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}++
- X
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = \x{100}
-Need char = 'X'
-
-/^[\QĀ\E-\QŐ\E/BZ8
-Failed: missing terminating ] for character class at offset 13
-
-/X/8
- \x{0}\x{d7ff}\x{e000}\x{10ffff}
-No match
- \x{d800}
-Error -10 (bad UTF-16 string) offset=0 reason=1
- \x{d800}\?
-No match
- \x{da00}
-Error -10 (bad UTF-16 string) offset=0 reason=1
- \x{da00}\?
-No match
- \x{dc00}
-Error -10 (bad UTF-16 string) offset=0 reason=3
- \x{dc00}\?
-No match
- \x{de00}
-Error -10 (bad UTF-16 string) offset=0 reason=3
- \x{de00}\?
-No match
- \x{dfff}
-Error -10 (bad UTF-16 string) offset=0 reason=3
- \x{dfff}\?
-No match
- \x{110000}
-**Failed: character value greater than 0x10ffff cannot be converted to UTF-16
- \x{d800}\x{1234}
-Error -10 (bad UTF-16 string) offset=1 reason=2
- \x{fffe}
-Error -10 (bad UTF-16 string) offset=0 reason=4
-
-/(*UTF16)\x{11234}/
- abcd\x{11234}pqr
- 0: \x{11234}
-
-/(*CRLF)(*UTF16)(*BSR_UNICODE)a\Rb/I
-Capturing subpattern count = 0
-Options: bsr_unicode utf
-Forced newline sequence: CRLF
-First char = 'a'
-Need char = 'b'
-
-/\h/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x09 \x20 \xa0 \xff
- ABC\x{09}
- 0: \x{09}
- ABC\x{20}
- 0:
- ABC\x{a0}
- 0: \x{a0}
- ABC\x{1680}
- 0: \x{1680}
- ABC\x{180e}
- 0: \x{180e}
- ABC\x{2000}
- 0: \x{2000}
- ABC\x{202f}
- 0: \x{202f}
- ABC\x{205f}
- 0: \x{205f}
- ABC\x{3000}
- 0: \x{3000}
-
-/\v/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \x85 \xff
- ABC\x{0a}
- 0: \x{0a}
- ABC\x{0b}
- 0: \x{0b}
- ABC\x{0c}
- 0: \x{0c}
- ABC\x{0d}
- 0: \x{0d}
- ABC\x{85}
- 0: \x{85}
- ABC\x{2028}
- 0: \x{2028}
-
-/\h*A/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'A'
-Subject length lower bound = 1
-Starting byte set: \x09 \x20 A \xa0
- CDBABC
- 0: A
-
-/\v+A/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'A'
-Subject length lower bound = 2
-Starting byte set: \x0a \x0b \x0c \x0d \x85 \xff
-
-/\s?xxx\s/8SI
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'x'
-Subject length lower bound = 4
-Starting byte set: \x09 \x0a \x0c \x0d \x20 x
-
-/\sxxx\s/I8ST1
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'x'
-Subject length lower bound = 5
-Starting byte set: \x09 \x0a \x0c \x0d \x20 \x85 \xa0
- AB\x{85}xxx\x{a0}XYZ
- 0: \x{85}xxx\x{a0}
- AB\x{a0}xxx\x{85}XYZ
- 0: \x{a0}xxx\x{85}
-
-/\S \S/I8ST1
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = ' '
-Subject length lower bound = 3
-Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0b \x0e
- \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \x1b \x1c \x1d
- \x1e \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @
- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e
- f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \x80 \x81 \x82 \x83
- \x84 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92 \x93
- \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa1 \xa2 \xa3
- \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0 \xb1 \xb2
- \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf \xc0 \xc1
- \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0
- \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf
- \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee
- \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd
- \xfe \xff
- \x{a2} \x{84}
- 0: \x{a2} \x{84}
- A Z
- 0: A Z
-
-/a+/8
- a\x{123}aa\>1
- 0: aa
- a\x{123}aa\>2
- 0: aa
- a\x{123}aa\>3
- 0: a
- a\x{123}aa\>4
-No match
- a\x{123}aa\>5
-Error -24 (bad offset value)
- a\x{123}aa\>6
-Error -24 (bad offset value)
-
-/\x{1234}+/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-First char = \x{1234}
-No need char
-Subject length lower bound = 1
-No set of starting bytes
-
-/\x{1234}+?/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-First char = \x{1234}
-No need char
-Subject length lower bound = 1
-No set of starting bytes
-
-/\x{1234}++/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-First char = \x{1234}
-No need char
-Subject length lower bound = 1
-No set of starting bytes
-
-/\x{1234}{2}/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-First char = \x{1234}
-Need char = \x{1234}
-Subject length lower bound = 2
-No set of starting bytes
-
-/[^\x{c4}]/8DZ
-------------------------------------------------------------------
- Bra
- [^\x{c4}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/X+\x{200}/8DZ
-------------------------------------------------------------------
- Bra
- X++
- \x{200}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'X'
-Need char = \x{200}
-
-/\R/SI8
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \x85 \xff
-
-/-- Check bad offset --/
-
-/a/8
- \x{10000}\>1
-Error -11 (bad UTF-16 offset)
- \x{10000}ab\>2
- 0: a
- \x{10000}ab\>3
-No match
- \x{10000}ab\>4
-No match
- \x{10000}ab\>5
-Error -24 (bad offset value)
-
-//8
-Failed: invalid UTF-16 string at offset 0
-
-/-- End of testinput18 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput19 b/src/third_party/pcre-8.30/testdata/testoutput19
deleted file mode 100644
index b3cfb9bd907..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput19
+++ /dev/null
@@ -1,88 +0,0 @@
-/-- This set of tests is for Unicode property support, relevant only to the
- 16-bit library. --/
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iDZ
-------------------------------------------------------------------
- Bra
- /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf
-First char = 'A' (caseless)
-Need char = \x{1fb0} (caseless)
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8DZ
-------------------------------------------------------------------
- Bra
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'A'
-Need char = \x{1fb0}
-
-/AB\x{1fb0}/8DZ
-------------------------------------------------------------------
- Bra
- AB\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'A'
-Need char = \x{1fb0}
-
-/AB\x{1fb0}/8DZi
-------------------------------------------------------------------
- Bra
- /i AB\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf
-First char = 'A' (caseless)
-Need char = \x{1fb0} (caseless)
-
-/\x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}/8iSI
-Capturing subpattern count = 0
-Options: caseless utf
-First char = \x{401} (caseless)
-Need char = \x{42f} (caseless)
-Subject length lower bound = 17
-No set of starting bytes
- \x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}
- 0: \x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}
- \x{451}\x{440}\x{441}\x{442}\x{443}\x{444}\x{445}\x{446}\x{447}\x{448}\x{449}\x{44a}\x{44b}\x{44c}\x{44d}\x{44e}\x{44f}
- 0: \x{451}\x{440}\x{441}\x{442}\x{443}\x{444}\x{445}\x{446}\x{447}\x{448}\x{449}\x{44a}\x{44b}\x{44c}\x{44d}\x{44e}\x{44f}
-
-/[ⱥ]/8iBZ
-------------------------------------------------------------------
- Bra
- /i \x{2c65}
- Ket
- End
-------------------------------------------------------------------
-
-/[^ⱥ]/8iBZ
-------------------------------------------------------------------
- Bra
- /i [^\x{2c65}]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:blank:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]
- Ket
- End
-------------------------------------------------------------------
-
-/-- End of testinput19 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput2 b/src/third_party/pcre-8.30/testdata/testoutput2
deleted file mode 100644
index 6d94c095038..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput2
+++ /dev/null
@@ -1,12014 +0,0 @@
-/-- This set of tests is not Perl-compatible. It checks on special features
- of PCRE's API, error diagnostics, and the compiled code of some patterns.
- It also checks the non-Perl syntax the PCRE supports (Python, .NET,
- Oniguruma). Finally, there are some tests where PCRE and Perl differ,
- either because PCRE can't be compatible, or there is a possible Perl
- bug.
-
- NOTE: This is a non-UTF set of tests. When UTF support is needed, use
- test 5, and if Unicode Property Support is needed, use test 7. --/
-
-/(a)b|/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-
-/abc/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
- abc
- 0: abc
- defabc
- 0: abc
- \Aabc
- 0: abc
- *** Failers
-No match
- \Adefabc
-No match
- ABC
-No match
-
-/^abc/I
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
- abc
- 0: abc
- \Aabc
- 0: abc
- *** Failers
-No match
- defabc
-No match
- \Adefabc
-No match
-
-/a+bc/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-
-/a*bc/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'c'
-
-/a{3}bc/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-
-/(abc|a+z)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/^abc$/I
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
- abc
- 0: abc
- *** Failers
-No match
- def\nabc
-No match
-
-/ab\idef/X
-Failed: unrecognized character follows \ at offset 3
-
-/(?X)ab\idef/X
-Failed: unrecognized character follows \ at offset 7
-
-/x{5,4}/
-Failed: numbers out of order in {} quantifier at offset 5
-
-/z{65536}/
-Failed: number too big in {} quantifier at offset 7
-
-/[abcd/
-Failed: missing terminating ] for character class at offset 5
-
-/(?X)[\B]/
-Failed: invalid escape sequence in character class at offset 6
-
-/(?X)[\R]/
-Failed: invalid escape sequence in character class at offset 6
-
-/(?X)[\X]/
-Failed: invalid escape sequence in character class at offset 6
-
-/[\B]/BZ
-------------------------------------------------------------------
- Bra
- B
- Ket
- End
-------------------------------------------------------------------
-
-/[\R]/BZ
-------------------------------------------------------------------
- Bra
- R
- Ket
- End
-------------------------------------------------------------------
-
-/[\X]/BZ
-------------------------------------------------------------------
- Bra
- X
- Ket
- End
-------------------------------------------------------------------
-
-/[z-a]/
-Failed: range out of order in character class at offset 3
-
-/^*/
-Failed: nothing to repeat at offset 1
-
-/(abc/
-Failed: missing ) at offset 4
-
-/(?# abc/
-Failed: missing ) after comment at offset 7
-
-/(?z)abc/
-Failed: unrecognized character after (? or (?- at offset 2
-
-/.*b/I
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-Need char = 'b'
-
-/.*?b/I
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-Need char = 'b'
-
-/cat|dog|elephant/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- this sentence eventually mentions a cat
- 0: cat
- this sentences rambles on and on for a while and then reaches elephant
- 0: elephant
-
-/cat|dog|elephant/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 3
-Starting byte set: c d e
- this sentence eventually mentions a cat
- 0: cat
- this sentences rambles on and on for a while and then reaches elephant
- 0: elephant
-
-/cat|dog|elephant/IiS
-Capturing subpattern count = 0
-Options: caseless
-No first char
-No need char
-Subject length lower bound = 3
-Starting byte set: C D E c d e
- this sentence eventually mentions a CAT cat
- 0: CAT
- this sentences rambles on and on for a while to elephant ElePhant
- 0: elephant
-
-/a|[bcd]/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b c d
-
-/(a|[^\dZ])/IS
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
- \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
- \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
- ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y [ \ ] ^ _ ` a b c d
- e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \x80 \x81 \x82 \x83
- \x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92
- \x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1
- \xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0
- \xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf
- \xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce
- \xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd
- \xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec
- \xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb
- \xfc \xfd \xfe \xff
-
-/(a|b)*[\s]/IS
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x09 \x0a \x0c \x0d \x20 a b
-
-/(ab\2)/
-Failed: reference to non-existent subpattern at offset 6
-
-/{4,5}abc/
-Failed: nothing to repeat at offset 4
-
-/(a)(b)(c)\2/I
-Capturing subpattern count = 3
-Max back reference = 2
-No options
-First char = 'a'
-Need char = 'c'
- abcb
- 0: abcb
- 1: a
- 2: b
- 3: c
- \O0abcb
-Matched, but too many substrings
- \O3abcb
-Matched, but too many substrings
- 0: abcb
- \O6abcb
-Matched, but too many substrings
- 0: abcb
- 1: a
- \O9abcb
-Matched, but too many substrings
- 0: abcb
- 1: a
- 2: b
- \O12abcb
- 0: abcb
- 1: a
- 2: b
- 3: c
-
-/(a)bc|(a)(b)\2/I
-Capturing subpattern count = 3
-Max back reference = 2
-No options
-First char = 'a'
-No need char
- abc
- 0: abc
- 1: a
- \O0abc
-Matched, but too many substrings
- \O3abc
-Matched, but too many substrings
- 0: abc
- \O6abc
- 0: abc
- 1: a
- aba
- 0: aba
- 1: <unset>
- 2: a
- 3: b
- \O0aba
-Matched, but too many substrings
- \O3aba
-Matched, but too many substrings
- 0: aba
- \O6aba
-Matched, but too many substrings
- 0: aba
- 1: <unset>
- \O9aba
-Matched, but too many substrings
- 0: aba
- 1: <unset>
- 2: a
- \O12aba
- 0: aba
- 1: <unset>
- 2: a
- 3: b
-
-/abc$/IE
-Capturing subpattern count = 0
-Options: dollar_endonly
-First char = 'a'
-Need char = 'c'
- abc
- 0: abc
- *** Failers
-No match
- abc\n
-No match
- abc\ndef
-No match
-
-/(a)(b)(c)(d)(e)\6/
-Failed: reference to non-existent subpattern at offset 17
-
-/the quick brown fox/I
-Capturing subpattern count = 0
-No options
-First char = 't'
-Need char = 'x'
- the quick brown fox
- 0: the quick brown fox
- this is a line with the quick brown fox
- 0: the quick brown fox
-
-/the quick brown fox/IA
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
- the quick brown fox
- 0: the quick brown fox
- *** Failers
-No match
- this is a line with the quick brown fox
-No match
-
-/ab(?z)cd/
-Failed: unrecognized character after (? or (?- at offset 4
-
-/^abc|def/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- abcdef
- 0: abc
- abcdef\B
- 0: def
-
-/.*((abc)$|(def))/I
-Capturing subpattern count = 3
-No options
-First char at start or follows newline
-No need char
- defabc
- 0: defabc
- 1: abc
- 2: abc
- \Zdefabc
- 0: def
- 1: def
- 2: <unset>
- 3: def
-
-/)/
-Failed: unmatched parentheses at offset 0
-
-/a[]b/
-Failed: missing terminating ] for character class at offset 4
-
-/[^aeiou ]{3,}/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- co-processors, and for
- 0: -pr
-
-/<.*>/I
-Capturing subpattern count = 0
-No options
-First char = '<'
-Need char = '>'
- abc<def>ghi<klm>nop
- 0: <def>ghi<klm>
-
-/<.*?>/I
-Capturing subpattern count = 0
-No options
-First char = '<'
-Need char = '>'
- abc<def>ghi<klm>nop
- 0: <def>
-
-/<.*>/IU
-Capturing subpattern count = 0
-Options: ungreedy
-First char = '<'
-Need char = '>'
- abc<def>ghi<klm>nop
- 0: <def>
-
-/(?U)<.*>/I
-Capturing subpattern count = 0
-Options: ungreedy
-First char = '<'
-Need char = '>'
- abc<def>ghi<klm>nop
- 0: <def>
-
-/<.*?>/IU
-Capturing subpattern count = 0
-Options: ungreedy
-First char = '<'
-Need char = '>'
- abc<def>ghi<klm>nop
- 0: <def>ghi<klm>
-
-/={3,}/IU
-Capturing subpattern count = 0
-Options: ungreedy
-First char = '='
-Need char = '='
- abc========def
- 0: ===
-
-/(?U)={3,}?/I
-Capturing subpattern count = 0
-Options: ungreedy
-First char = '='
-Need char = '='
- abc========def
- 0: ========
-
-/(?<!bar|cattle)foo/I
-Capturing subpattern count = 0
-No options
-First char = 'f'
-Need char = 'o'
- foo
- 0: foo
- catfoo
- 0: foo
- *** Failers
-No match
- the barfoo
-No match
- and cattlefoo
-No match
-
-/(?<=a+)b/
-Failed: lookbehind assertion is not fixed length at offset 6
-
-/(?<=aaa|b{0,3})b/
-Failed: lookbehind assertion is not fixed length at offset 14
-
-/(?<!(foo)a\1)bar/
-Failed: lookbehind assertion is not fixed length at offset 12
-
-/(?i)abc/I
-Capturing subpattern count = 0
-Options: caseless
-First char = 'a' (caseless)
-Need char = 'c' (caseless)
-
-/(a|(?m)a)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/(?i)^1234/I
-Capturing subpattern count = 0
-Options: anchored caseless
-No first char
-No need char
-
-/(^b|(?i)^d)/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
-
-/(?s).*/I
-Capturing subpattern count = 0
-Options: anchored dotall
-No first char
-No need char
-
-/[abcd]/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b c d
-
-/(?i)[abcd]/IS
-Capturing subpattern count = 0
-Options: caseless
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: A B C D a b c d
-
-/(?m)[xy]|(b|c)/IS
-Capturing subpattern count = 1
-Options: multiline
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: b c x y
-
-/(^a|^b)/Im
-Capturing subpattern count = 1
-Options: multiline
-First char at start or follows newline
-No need char
-
-/(?i)(^a|^b)/Im
-Capturing subpattern count = 1
-Options: caseless multiline
-First char at start or follows newline
-No need char
-
-/(a)(?(1)a|b|c)/
-Failed: conditional group contains more than two branches at offset 13
-
-/(?(?=a)a|b|c)/
-Failed: conditional group contains more than two branches at offset 12
-
-/(?(1a)/
-Failed: missing ) at offset 6
-
-/(?(1a))/
-Failed: reference to non-existent subpattern at offset 6
-
-/(?(?i))/
-Failed: assertion expected after (?( at offset 3
-
-/(?(abc))/
-Failed: reference to non-existent subpattern at offset 7
-
-/(?(?<ab))/
-Failed: syntax error in subpattern name (missing terminator) at offset 7
-
-/((?s)blah)\s+\1/I
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-First char = 'b'
-Need char = 'h'
-
-/((?i)blah)\s+\1/I
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-First char = 'b' (caseless)
-Need char = 'h' (caseless)
-
-/((?i)b)/IDZS
-------------------------------------------------------------------
- Bra
- CBra 1
- /i b
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-No options
-First char = 'b' (caseless)
-No need char
-Subject length lower bound = 1
-No set of starting bytes
-
-/(a*b|(?i:c*(?-i)d))/IS
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: C a b c d
-
-/a$/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
- a
- 0: a
- a\n
- 0: a
- *** Failers
-No match
- \Za
-No match
- \Za\n
-No match
-
-/a$/Im
-Capturing subpattern count = 0
-Options: multiline
-First char = 'a'
-No need char
- a
- 0: a
- a\n
- 0: a
- \Za\n
- 0: a
- *** Failers
-No match
- \Za
-No match
-
-/\Aabc/Im
-Capturing subpattern count = 0
-Options: anchored multiline
-No first char
-No need char
-
-/^abc/Im
-Capturing subpattern count = 0
-Options: multiline
-First char at start or follows newline
-Need char = 'c'
-
-/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
-Capturing subpattern count = 5
-Options: anchored
-No first char
-No need char
- aaaaabbbbbcccccdef
- 0: aaaaabbbbbcccccdef
- 1: aaaaabbbbbcccccdef
- 2: aaaaa
- 3: b
- 4: bbbbccccc
- 5: def
-
-/(?<=foo)[ab]/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b
-
-/(?<!foo)(alpha|omega)/IS
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'a'
-Subject length lower bound = 5
-Starting byte set: a o
-
-/(?!alphabet)[ab]/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b
-
-/(?<=foo\n)^bar/Im
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-Options: multiline
-No first char
-Need char = 'r'
- foo\nbarbar
- 0: bar
- ***Failers
-No match
- rhubarb
-No match
- barbell
-No match
- abc\nbarton
-No match
-
-/^(?<=foo\n)bar/Im
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-Options: multiline
-First char at start or follows newline
-Need char = 'r'
- foo\nbarbar
- 0: bar
- ***Failers
-No match
- rhubarb
-No match
- barbell
-No match
- abc\nbarton
-No match
-
-/(?>^abc)/Im
-Capturing subpattern count = 0
-Options: multiline
-First char at start or follows newline
-Need char = 'c'
- abc
- 0: abc
- def\nabc
- 0: abc
- *** Failers
-No match
- defabc
-No match
-
-/(?<=ab(c+)d)ef/
-Failed: lookbehind assertion is not fixed length at offset 11
-
-/(?<=ab(?<=c+)d)ef/
-Failed: lookbehind assertion is not fixed length at offset 12
-
-/(?<=ab(c|de)f)g/
-Failed: lookbehind assertion is not fixed length at offset 13
-
-/The next three are in testinput2 because they have variable length branches/
-
-/(?<=bullock|donkey)-cart/I
-Capturing subpattern count = 0
-No options
-First char = '-'
-Need char = 't'
- the bullock-cart
- 0: -cart
- a donkey-cart race
- 0: -cart
- *** Failers
-No match
- cart
-No match
- horse-and-cart
-No match
-
-/(?<=ab(?i)x|y|z)/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/(?>.*)(?<=(abcd)|(xyz))/I
-Capturing subpattern count = 2
-No options
-First char at start or follows newline
-No need char
- alphabetabcd
- 0: alphabetabcd
- 1: abcd
- endingxyz
- 0: endingxyz
- 1: <unset>
- 2: xyz
-
-/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
-Capturing subpattern count = 0
-No options
-First char = 'Z'
-Need char = 'Z'
- abxyZZ
- 0: ZZ
- abXyZZ
- 0: ZZ
- ZZZ
- 0: ZZ
- zZZ
- 0: ZZ
- bZZ
- 0: ZZ
- BZZ
- 0: ZZ
- *** Failers
-No match
- ZZ
-No match
- abXYZZ
-No match
- zzz
-No match
- bzz
-No match
-
-/(?<!(foo)a)bar/I
-Capturing subpattern count = 1
-No options
-First char = 'b'
-Need char = 'r'
- bar
- 0: bar
- foobbar
- 0: bar
- *** Failers
-No match
- fooabar
-No match
-
-/This one is here because Perl 5.005_02 doesn't fail it/I
-Capturing subpattern count = 0
-No options
-First char = 'T'
-Need char = 't'
-
-/^(a)?(?(1)a|b)+$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- *** Failers
-No match
- a
-No match
-
-/This one is here because Perl behaves differently; see also the following/I
-Capturing subpattern count = 0
-No options
-First char = 'T'
-Need char = 'g'
-
-/^(a\1?){4}$/I
-Capturing subpattern count = 1
-Max back reference = 1
-Options: anchored
-No first char
-No need char
- aaaa
-No match
- aaaaaa
-No match
-
-/Perl does not fail these two for the final subjects. Neither did PCRE until/
-/release 8.01. The problem is in backtracking into a subpattern that contains/
-No match
-/a recursive reference to itself. PCRE has now made these into atomic patterns./
-No match
-
-/^(xa|=?\1a){2}$/
- xa=xaa
- 0: xa=xaa
- 1: =xaa
- ** Failers
-No match
- xa=xaaa
-No match
-
-/^(xa|=?\1a)+$/
- xa=xaa
- 0: xa=xaa
- 1: =xaa
- ** Failers
-No match
- xa=xaaa
-No match
-
-/These are syntax tests from Perl 5.005/I
-Capturing subpattern count = 0
-No options
-First char = 'T'
-Need char = '5'
-
-/a[b-a]/
-Failed: range out of order in character class at offset 4
-
-/a[]b/
-Failed: missing terminating ] for character class at offset 4
-
-/a[/
-Failed: missing terminating ] for character class at offset 2
-
-/*a/
-Failed: nothing to repeat at offset 0
-
-/(*)b/
-Failed: nothing to repeat at offset 1
-
-/abc)/
-Failed: unmatched parentheses at offset 3
-
-/(abc/
-Failed: missing ) at offset 4
-
-/a**/
-Failed: nothing to repeat at offset 2
-
-/)(/
-Failed: unmatched parentheses at offset 0
-
-/\1/
-Failed: reference to non-existent subpattern at offset 2
-
-/\2/
-Failed: reference to non-existent subpattern at offset 2
-
-/(a)|\2/
-Failed: reference to non-existent subpattern at offset 6
-
-/a[b-a]/Ii
-Failed: range out of order in character class at offset 4
-
-/a[]b/Ii
-Failed: missing terminating ] for character class at offset 4
-
-/a[/Ii
-Failed: missing terminating ] for character class at offset 2
-
-/*a/Ii
-Failed: nothing to repeat at offset 0
-
-/(*)b/Ii
-Failed: nothing to repeat at offset 1
-
-/abc)/Ii
-Failed: unmatched parentheses at offset 3
-
-/(abc/Ii
-Failed: missing ) at offset 4
-
-/a**/Ii
-Failed: nothing to repeat at offset 2
-
-/)(/Ii
-Failed: unmatched parentheses at offset 0
-
-/:(?:/
-Failed: missing ) at offset 4
-
-/(?<%)b/
-Failed: unrecognized character after (?< at offset 3
-
-/a(?{)b/
-Failed: unrecognized character after (? or (?- at offset 3
-
-/a(?{{})b/
-Failed: unrecognized character after (? or (?- at offset 3
-
-/a(?{}})b/
-Failed: unrecognized character after (? or (?- at offset 3
-
-/a(?{"{"})b/
-Failed: unrecognized character after (? or (?- at offset 3
-
-/a(?{"{"}})b/
-Failed: unrecognized character after (? or (?- at offset 3
-
-/(?(1?)a|b)/
-Failed: malformed number or name after (?( at offset 4
-
-/[a[:xyz:/
-Failed: missing terminating ] for character class at offset 8
-
-/(?<=x+)y/
-Failed: lookbehind assertion is not fixed length at offset 6
-
-/a{37,17}/
-Failed: numbers out of order in {} quantifier at offset 7
-
-/abc/\
-Failed: \ at end of pattern at offset 4
-
-/abc/\i
-Failed: \ at end of pattern at offset 4
-
-/(a)bc(d)/I
-Capturing subpattern count = 2
-No options
-First char = 'a'
-Need char = 'd'
- abcd
- 0: abcd
- 1: a
- 2: d
- abcd\C2
- 0: abcd
- 1: a
- 2: d
- 2C d (1)
- abcd\C5
- 0: abcd
- 1: a
- 2: d
-copy substring 5 failed -7
-
-/(.{20})/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
- abcdefghijklmnopqrstuvwxyz
- 0: abcdefghijklmnopqrst
- 1: abcdefghijklmnopqrst
- abcdefghijklmnopqrstuvwxyz\C1
- 0: abcdefghijklmnopqrst
- 1: abcdefghijklmnopqrst
- 1C abcdefghijklmnopqrst (20)
- abcdefghijklmnopqrstuvwxyz\G1
- 0: abcdefghijklmnopqrst
- 1: abcdefghijklmnopqrst
- 1G abcdefghijklmnopqrst (20)
-
-/(.{15})/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
- abcdefghijklmnopqrstuvwxyz
- 0: abcdefghijklmno
- 1: abcdefghijklmno
- abcdefghijklmnopqrstuvwxyz\C1\G1
- 0: abcdefghijklmno
- 1: abcdefghijklmno
- 1C abcdefghijklmno (15)
- 1G abcdefghijklmno (15)
-
-/(.{16})/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
- abcdefghijklmnopqrstuvwxyz
- 0: abcdefghijklmnop
- 1: abcdefghijklmnop
- abcdefghijklmnopqrstuvwxyz\C1\G1\L
- 0: abcdefghijklmnop
- 1: abcdefghijklmnop
- 1C abcdefghijklmnop (16)
- 1G abcdefghijklmnop (16)
- 0L abcdefghijklmnop
- 1L abcdefghijklmnop
-
-/^(a|(bc))de(f)/I
-Capturing subpattern count = 3
-Options: anchored
-No first char
-No need char
- adef\G1\G2\G3\G4\L
- 0: adef
- 1: a
- 2: <unset>
- 3: f
- 1G a (1)
- 2G (0)
- 3G f (1)
-get substring 4 failed -7
- 0L adef
- 1L a
- 2L
- 3L f
- bcdef\G1\G2\G3\G4\L
- 0: bcdef
- 1: bc
- 2: bc
- 3: f
- 1G bc (2)
- 2G bc (2)
- 3G f (1)
-get substring 4 failed -7
- 0L bcdef
- 1L bc
- 2L bc
- 3L f
- adefghijk\C0
- 0: adef
- 1: a
- 2: <unset>
- 3: f
- 0C adef (4)
-
-/^abc\00def/I
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
- abc\00def\L\C0
- 0: abc\x00def
- 0C abc\x00def (7)
- 0L abc
-
-/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
-)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
-)?)?)?)?)?)?)?)?)?otherword/I
-Capturing subpattern count = 8
-Contains explicit CR or LF match
-No options
-First char = 'w'
-Need char = 'd'
-
-/.*X/IDZ
-------------------------------------------------------------------
- Bra
- Any*
- X
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-Need char = 'X'
-
-/.*X/IDZs
-------------------------------------------------------------------
- Bra
- AllAny*
- X
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored dotall
-No first char
-Need char = 'X'
-
-/(.*X|^B)/IDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- Any*
- X
- Alt
- ^
- B
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-No options
-First char at start or follows newline
-No need char
-
-/(.*X|^B)/IDZs
-------------------------------------------------------------------
- Bra
- CBra 1
- AllAny*
- X
- Alt
- ^
- B
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: anchored dotall
-No first char
-No need char
-
-/(?s)(.*X|^B)/IDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- AllAny*
- X
- Alt
- ^
- B
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: anchored dotall
-No first char
-No need char
-
-/(?s:.*X|^B)/IDZ
-------------------------------------------------------------------
- Bra
- Bra
- AllAny*
- X
- Alt
- ^
- B
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/\Biss\B/I+
-Capturing subpattern count = 0
-No options
-First char = 'i'
-Need char = 's'
- Mississippi
- 0: iss
- 0+ issippi
-
-/iss/IG+
-Capturing subpattern count = 0
-No options
-First char = 'i'
-Need char = 's'
- Mississippi
- 0: iss
- 0+ issippi
- 0: iss
- 0+ ippi
-
-/\Biss\B/IG+
-Capturing subpattern count = 0
-No options
-First char = 'i'
-Need char = 's'
- Mississippi
- 0: iss
- 0+ issippi
-
-/\Biss\B/Ig+
-Capturing subpattern count = 0
-No options
-First char = 'i'
-Need char = 's'
- Mississippi
- 0: iss
- 0+ issippi
- 0: iss
- 0+ ippi
- *** Failers
-No match
- Mississippi\A
-No match
-
-/(?<=[Ms])iss/Ig+
-Capturing subpattern count = 0
-No options
-First char = 'i'
-Need char = 's'
- Mississippi
- 0: iss
- 0+ issippi
- 0: iss
- 0+ ippi
-
-/(?<=[Ms])iss/IG+
-Capturing subpattern count = 0
-No options
-First char = 'i'
-Need char = 's'
- Mississippi
- 0: iss
- 0+ issippi
-
-/^iss/Ig+
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
- ississippi
- 0: iss
- 0+ issippi
-
-/.*iss/Ig+
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-Need char = 's'
- abciss\nxyzisspqr
- 0: abciss
- 0+ \x0axyzisspqr
- 0: xyziss
- 0+ pqr
-
-/.i./I+g
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'i'
- Mississippi
- 0: Mis
- 0+ sissippi
- 0: sis
- 0+ sippi
- 0: sip
- 0+ pi
- Mississippi\A
- 0: Mis
- 0+ sissippi
- 0: sis
- 0+ sippi
- 0: sip
- 0+ pi
- Missouri river
- 0: Mis
- 0+ souri river
- 0: ri
- 0+ river
- 0: riv
- 0+ er
- Missouri river\A
- 0: Mis
- 0+ souri river
-
-/^.is/I+g
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
- Mississippi
- 0: Mis
- 0+ sissippi
-
-/^ab\n/Ig+
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-Options: anchored
-No first char
-No need char
- ab\nab\ncd
- 0: ab\x0a
- 0+ ab\x0acd
-
-/^ab\n/Img+
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-Options: multiline
-First char at start or follows newline
-Need char = \x0a
- ab\nab\ncd
- 0: ab\x0a
- 0+ ab\x0acd
- 0: ab\x0a
- 0+ cd
-
-/abc/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-
-/abc|bac/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'c'
-
-/(abc|bac)/I
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'c'
-
-/(abc|(c|dc))/I
-Capturing subpattern count = 2
-No options
-No first char
-Need char = 'c'
-
-/(abc|(d|de)c)/I
-Capturing subpattern count = 2
-No options
-No first char
-Need char = 'c'
-
-/a*/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/a+/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/(baa|a+)/I
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'a'
-
-/a{0,3}/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/baa{3,}/I
-Capturing subpattern count = 0
-No options
-First char = 'b'
-Need char = 'a'
-
-/"([^\\"]+|\\.)*"/I
-Capturing subpattern count = 1
-No options
-First char = '"'
-Need char = '"'
-
-/(abc|ab[cd])/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/(a|.)/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-
-/a|ba|\w/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/abc(?=pqr)/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'r'
-
-/...(?<=abc)/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/abc(?!pqr)/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-
-/ab./I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-
-/ab[xyz]/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-
-/abc*/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-
-/ab.c*/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-
-/a.c*/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/.c*/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/ac*/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/(a.c*|b.c*)/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-
-/a.c*|aba/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/.+a/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'a'
-
-/(?=abcda)a.*/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'a'
-
-/(?=a)a.*/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/a(b)*/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/a\d*/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/ab\d*/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-
-/a(\d)*/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/abcde{0,0}/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'd'
-
-/ab\d+/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-
-/a(?(1)b)(.)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/a(?(1)bag|big)(.)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'g'
-
-/a(?(1)bag|big)*(.)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/a(?(1)bag|big)+(.)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'g'
-
-/a(?(1)b..|b..)(.)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'b'
-
-/ab\d{0}e/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'e'
-
-/a?b?/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- a
- 0: a
- b
- 0: b
- ab
- 0: ab
- \
- 0:
- *** Failers
- 0:
- \N
-No match
-
-/|-/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- abcd
- 0:
- -abc
- 0:
- \Nab-c
- 0: -
- *** Failers
- 0:
- \Nabc
-No match
-
-/^.?abcd/IS
-Capturing subpattern count = 0
-Options: anchored
-No first char
-Need char = 'd'
-Subject length lower bound = 4
-No set of starting bytes
-
-/\( # ( at start
- (?: # Non-capturing bracket
- (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
- | # Or
- (?R) # Recurse - i.e. nested bracketed string
- )* # Zero or more contents
- \) # Closing )
- /Ix
-Capturing subpattern count = 0
-Options: extended
-First char = '('
-Need char = ')'
- (abcd)
- 0: (abcd)
- (abcd)xyz
- 0: (abcd)
- xyz(abcd)
- 0: (abcd)
- (ab(xy)cd)pqr
- 0: (ab(xy)cd)
- (ab(xycd)pqr
- 0: (xycd)
- () abc ()
- 0: ()
- 12(abcde(fsh)xyz(foo(bar))lmno)89
- 0: (abcde(fsh)xyz(foo(bar))lmno)
- *** Failers
-No match
- abcd
-No match
- abcd)
-No match
- (abcd
-No match
-
-/\( ( (?>[^()]+) | (?R) )* \) /Ixg
-Capturing subpattern count = 1
-Options: extended
-First char = '('
-Need char = ')'
- (ab(xy)cd)pqr
- 0: (ab(xy)cd)
- 1: cd
- 1(abcd)(x(y)z)pqr
- 0: (abcd)
- 1: abcd
- 0: (x(y)z)
- 1: z
-
-/\( (?: (?>[^()]+) | (?R) ) \) /Ix
-Capturing subpattern count = 0
-Options: extended
-First char = '('
-Need char = ')'
- (abcd)
- 0: (abcd)
- (ab(xy)cd)
- 0: (xy)
- (a(b(c)d)e)
- 0: (c)
- ((ab))
- 0: ((ab))
- *** Failers
-No match
- ()
-No match
-
-/\( (?: (?>[^()]+) | (?R) )? \) /Ix
-Capturing subpattern count = 0
-Options: extended
-First char = '('
-Need char = ')'
- ()
- 0: ()
- 12(abcde(fsh)xyz(foo(bar))lmno)89
- 0: (fsh)
-
-/\( ( (?>[^()]+) | (?R) )* \) /Ix
-Capturing subpattern count = 1
-Options: extended
-First char = '('
-Need char = ')'
- (ab(xy)cd)
- 0: (ab(xy)cd)
- 1: cd
-
-/\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
-Capturing subpattern count = 2
-Options: extended
-First char = '('
-Need char = ')'
- (ab(xy)cd)
- 0: (ab(xy)cd)
- 1: ab(xy)cd
- 2: cd
-
-/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
-Capturing subpattern count = 3
-Options: extended
-First char = '('
-Need char = ')'
- (ab(xy)cd)
- 0: (ab(xy)cd)
- 1: <unset>
- 2: ab(xy)cd
- 3: cd
- (123ab(xy)cd)
- 0: (123ab(xy)cd)
- 1: 123
- 2: ab(xy)cd
- 3: cd
-
-/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
-Capturing subpattern count = 3
-Options: extended
-First char = '('
-Need char = ')'
- (ab(xy)cd)
- 0: (ab(xy)cd)
- 1: ab(xy)cd
- 2: <unset>
- 3: cd
- (123ab(xy)cd)
- 0: (123ab(xy)cd)
- 1: 123ab(xy)cd
- 2: 123
- 3: cd
-
-/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
-Capturing subpattern count = 11
-Options: extended
-First char = '('
-Need char = ')'
- (ab(xy)cd)
- 0: (ab(xy)cd)
- 1: ab(xy)cd
- 2: ab(xy)cd
- 3: ab(xy)cd
- 4: ab(xy)cd
- 5: ab(xy)cd
- 6: ab(xy)cd
- 7: ab(xy)cd
- 8: ab(xy)cd
- 9: ab(xy)cd
-10: ab(xy)cd
-11: cd
-
-/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
-Capturing subpattern count = 3
-Options: extended
-First char = '('
-Need char = ')'
- (abcd(xyz<p>qrs)123)
- 0: (abcd(xyz<p>qrs)123)
- 1: abcd(xyz<p>qrs)123
- 2: 123
-
-/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
-Capturing subpattern count = 3
-Options: extended
-First char = '('
-Need char = ')'
- (ab(cd)ef)
- 0: (ab(cd)ef)
- 1: ab(cd)ef
- 2: ef
- 3: (cd)
- (ab(cd(ef)gh)ij)
- 0: (ab(cd(ef)gh)ij)
- 1: ab(cd(ef)gh)ij
- 2: ij
- 3: (cd(ef)gh)
-
-/^[[:alnum:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [0-9A-Za-z]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:^alnum:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x00-/:-@[-`{-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:alpha:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [A-Za-z]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:^alpha:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x00-@[-`{-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/[_[:alpha:]]/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
- _ a b c d e f g h i j k l m n o p q r s t u v w x y z
-
-/^[[:ascii:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x00-\x7f]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:^ascii:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x80-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:blank:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x09 ]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:^blank:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x00-\x08\x0a-\x1f!-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/[\n\x0b\x0c\x0d[:blank:]]/IS
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
-
-/^[[:cntrl:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x00-\x1f\x7f]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:digit:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [0-9]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:graph:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [!-~]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:lower:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [a-z]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:print:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [ -~]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:punct:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [!-/:-@[-`{-~]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:space:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x09-\x0d ]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:upper:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [A-Z]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:xdigit:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [0-9A-Fa-f]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:word:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [0-9A-Z_a-z]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:^cntrl:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [ -~\x80-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[12[:^digit:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x00-/12:-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/^[[:^blank:]]/DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x00-\x08\x0a-\x1f!-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/[01[:alpha:]%]/DZ
-------------------------------------------------------------------
- Bra
- [%01A-Za-z]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[[.ch.]]/I
-Failed: POSIX collating elements are not supported at offset 1
-
-/[[=ch=]]/I
-Failed: POSIX collating elements are not supported at offset 1
-
-/[[:rhubarb:]]/I
-Failed: unknown POSIX class name at offset 3
-
-/[[:upper:]]/Ii
-Capturing subpattern count = 0
-Options: caseless
-No first char
-No need char
- A
- 0: A
- a
- 0: a
-
-/[[:lower:]]/Ii
-Capturing subpattern count = 0
-Options: caseless
-No first char
-No need char
- A
- 0: A
- a
- 0: a
-
-/((?-i)[[:lower:]])[[:lower:]]/Ii
-Capturing subpattern count = 1
-Options: caseless
-No first char
-No need char
- ab
- 0: ab
- 1: a
- aB
- 0: aB
- 1: a
- *** Failers
- 0: ai
- 1: a
- Ab
-No match
- AB
-No match
-
-/[\200-\110]/I
-Failed: range out of order in character class at offset 9
-
-/^(?(0)f|b)oo/I
-Failed: invalid condition (?(0) at offset 6
-
-/This one's here because of the large output vector needed/I
-Capturing subpattern count = 0
-No options
-First char = 'T'
-Need char = 'd'
-
-/(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/I
-Capturing subpattern count = 271
-Max back reference = 270
-No options
-No first char
-No need char
- \O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC
- 0: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC
- 1: 1
- 2: 2
- 3: 3
- 4: 4
- 5: 5
- 6: 6
- 7: 7
- 8: 8
- 9: 9
-10: 10
-11: 11
-12: 12
-13: 13
-14: 14
-15: 15
-16: 16
-17: 17
-18: 18
-19: 19
-20: 20
-21: 21
-22: 22
-23: 23
-24: 24
-25: 25
-26: 26
-27: 27
-28: 28
-29: 29
-30: 30
-31: 31
-32: 32
-33: 33
-34: 34
-35: 35
-36: 36
-37: 37
-38: 38
-39: 39
-40: 40
-41: 41
-42: 42
-43: 43
-44: 44
-45: 45
-46: 46
-47: 47
-48: 48
-49: 49
-50: 50
-51: 51
-52: 52
-53: 53
-54: 54
-55: 55
-56: 56
-57: 57
-58: 58
-59: 59
-60: 60
-61: 61
-62: 62
-63: 63
-64: 64
-65: 65
-66: 66
-67: 67
-68: 68
-69: 69
-70: 70
-71: 71
-72: 72
-73: 73
-74: 74
-75: 75
-76: 76
-77: 77
-78: 78
-79: 79
-80: 80
-81: 81
-82: 82
-83: 83
-84: 84
-85: 85
-86: 86
-87: 87
-88: 88
-89: 89
-90: 90
-91: 91
-92: 92
-93: 93
-94: 94
-95: 95
-96: 96
-97: 97
-98: 98
-99: 99
-100: 100
-101: 101
-102: 102
-103: 103
-104: 104
-105: 105
-106: 106
-107: 107
-108: 108
-109: 109
-110: 110
-111: 111
-112: 112
-113: 113
-114: 114
-115: 115
-116: 116
-117: 117
-118: 118
-119: 119
-120: 120
-121: 121
-122: 122
-123: 123
-124: 124
-125: 125
-126: 126
-127: 127
-128: 128
-129: 129
-130: 130
-131: 131
-132: 132
-133: 133
-134: 134
-135: 135
-136: 136
-137: 137
-138: 138
-139: 139
-140: 140
-141: 141
-142: 142
-143: 143
-144: 144
-145: 145
-146: 146
-147: 147
-148: 148
-149: 149
-150: 150
-151: 151
-152: 152
-153: 153
-154: 154
-155: 155
-156: 156
-157: 157
-158: 158
-159: 159
-160: 160
-161: 161
-162: 162
-163: 163
-164: 164
-165: 165
-166: 166
-167: 167
-168: 168
-169: 169
-170: 170
-171: 171
-172: 172
-173: 173
-174: 174
-175: 175
-176: 176
-177: 177
-178: 178
-179: 179
-180: 180
-181: 181
-182: 182
-183: 183
-184: 184
-185: 185
-186: 186
-187: 187
-188: 188
-189: 189
-190: 190
-191: 191
-192: 192
-193: 193
-194: 194
-195: 195
-196: 196
-197: 197
-198: 198
-199: 199
-200: 200
-201: 201
-202: 202
-203: 203
-204: 204
-205: 205
-206: 206
-207: 207
-208: 208
-209: 209
-210: 210
-211: 211
-212: 212
-213: 213
-214: 214
-215: 215
-216: 216
-217: 217
-218: 218
-219: 219
-220: 220
-221: 221
-222: 222
-223: 223
-224: 224
-225: 225
-226: 226
-227: 227
-228: 228
-229: 229
-230: 230
-231: 231
-232: 232
-233: 233
-234: 234
-235: 235
-236: 236
-237: 237
-238: 238
-239: 239
-240: 240
-241: 241
-242: 242
-243: 243
-244: 244
-245: 245
-246: 246
-247: 247
-248: 248
-249: 249
-250: 250
-251: 251
-252: 252
-253: 253
-254: 254
-255: 255
-256: 256
-257: 257
-258: 258
-259: 259
-260: 260
-261: 261
-262: 262
-263: 263
-264: 264
-265: 265
-266: 266
-267: 267
-268: 268
-269: 269
-270: ABC
-271: ABC
-
-/This one's here because Perl does this differently and PCRE can't at present/I
-Capturing subpattern count = 0
-No options
-First char = 'T'
-Need char = 't'
-
-/(main(O)?)+/I
-Capturing subpattern count = 2
-No options
-First char = 'm'
-Need char = 'n'
- mainmain
- 0: mainmain
- 1: main
- mainOmain
- 0: mainOmain
- 1: main
- 2: O
-
-/These are all cases where Perl does it differently (nested captures)/I
-Capturing subpattern count = 1
-No options
-First char = 'T'
-Need char = 's'
-
-/^(a(b)?)+$/I
-Capturing subpattern count = 2
-Options: anchored
-No first char
-No need char
- aba
- 0: aba
- 1: a
- 2: b
-
-/^(aa(bb)?)+$/I
-Capturing subpattern count = 2
-Options: anchored
-No first char
-No need char
- aabbaa
- 0: aabbaa
- 1: aa
- 2: bb
-
-/^(aa|aa(bb))+$/I
-Capturing subpattern count = 2
-Options: anchored
-No first char
-No need char
- aabbaa
- 0: aabbaa
- 1: aa
- 2: bb
-
-/^(aa(bb)??)+$/I
-Capturing subpattern count = 2
-Options: anchored
-No first char
-No need char
- aabbaa
- 0: aabbaa
- 1: aa
- 2: bb
-
-/^(?:aa(bb)?)+$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- aabbaa
- 0: aabbaa
- 1: bb
-
-/^(aa(b(b))?)+$/I
-Capturing subpattern count = 3
-Options: anchored
-No first char
-No need char
- aabbaa
- 0: aabbaa
- 1: aa
- 2: bb
- 3: b
-
-/^(?:aa(b(b))?)+$/I
-Capturing subpattern count = 2
-Options: anchored
-No first char
-No need char
- aabbaa
- 0: aabbaa
- 1: bb
- 2: b
-
-/^(?:aa(b(?:b))?)+$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- aabbaa
- 0: aabbaa
- 1: bb
-
-/^(?:aa(bb(?:b))?)+$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- aabbbaa
- 0: aabbbaa
- 1: bbb
-
-/^(?:aa(b(?:bb))?)+$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- aabbbaa
- 0: aabbbaa
- 1: bbb
-
-/^(?:aa(?:b(b))?)+$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- aabbaa
- 0: aabbaa
- 1: b
-
-/^(?:aa(?:b(bb))?)+$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- aabbbaa
- 0: aabbbaa
- 1: bb
-
-/^(aa(b(bb))?)+$/I
-Capturing subpattern count = 3
-Options: anchored
-No first char
-No need char
- aabbbaa
- 0: aabbbaa
- 1: aa
- 2: bbb
- 3: bb
-
-/^(aa(bb(bb))?)+$/I
-Capturing subpattern count = 3
-Options: anchored
-No first char
-No need char
- aabbbbaa
- 0: aabbbbaa
- 1: aa
- 2: bbbb
- 3: bb
-
-/--------------------------------------------------------------------/I
-Capturing subpattern count = 0
-No options
-First char = '-'
-Need char = '-'
-
-/#/IxDZ
-------------------------------------------------------------------
- Bra
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: extended
-No first char
-No need char
-
-/a#/IxDZ
-------------------------------------------------------------------
- Bra
- a
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: extended
-First char = 'a'
-No need char
-
-/[\s]/DZ
-------------------------------------------------------------------
- Bra
- [\x09\x0a\x0c\x0d ]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[\S]/DZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0b\x0e-\x1f!-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/a(?i)b/DZ
-------------------------------------------------------------------
- Bra
- a
- /i b
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b' (caseless)
- ab
- 0: ab
- aB
- 0: aB
- *** Failers
-No match
- AB
-No match
-
-/(a(?i)b)/DZ
-------------------------------------------------------------------
- Bra
- CBra 1
- a
- /i b
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'b' (caseless)
- ab
- 0: ab
- 1: ab
- aB
- 0: aB
- 1: aB
- *** Failers
-No match
- AB
-No match
-
-/ (?i)abc/IxDZ
-------------------------------------------------------------------
- Bra
- /i abc
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless extended
-First char = 'a' (caseless)
-Need char = 'c' (caseless)
-
-/#this is a comment
- (?i)abc/IxDZ
-------------------------------------------------------------------
- Bra
- /i abc
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless extended
-First char = 'a' (caseless)
-Need char = 'c' (caseless)
-
-/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
-------------------------------------------------------------------
- Bra
- 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = '1'
-Need char = '0'
-
-/\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
-------------------------------------------------------------------
- Bra
- 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = '1'
-Need char = '0'
-
-/\Q\E/DZ
-------------------------------------------------------------------
- Bra
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- \
- 0:
-
-/\Q\Ex/DZ
-------------------------------------------------------------------
- Bra
- x
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = 'x'
-No need char
-
-/ \Q\E/DZ
-------------------------------------------------------------------
- Bra
-
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = ' '
-No need char
-
-/a\Q\E/DZ
-------------------------------------------------------------------
- Bra
- a
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
- abc
- 0: a
- bca
- 0: a
- bac
- 0: a
-
-/a\Q\Eb/DZ
-------------------------------------------------------------------
- Bra
- ab
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
- abc
- 0: ab
-
-/\Q\Eabc/DZ
-------------------------------------------------------------------
- Bra
- abc
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-
-/x*+\w/DZ
-------------------------------------------------------------------
- Bra
- x*+
- \w
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- *** Failers
- 0: F
- xxxxx
-No match
-
-/x?+/DZ
-------------------------------------------------------------------
- Bra
- x?+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/x++/DZ
-------------------------------------------------------------------
- Bra
- x++
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = 'x'
-No need char
-
-/x{1,3}+/DZ
-------------------------------------------------------------------
- Bra
- Once
- x
- x{0,2}
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = 'x'
-No need char
-
-/(x)*+/DZ
-------------------------------------------------------------------
- Bra
- Braposzero
- CBraPos 1
- x
- KetRpos
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-
-/^(\w++|\s++)*$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- now is the time for all good men to come to the aid of the party
- 0: now is the time for all good men to come to the aid of the party
- 1: party
- *** Failers
-No match
- this is not a line with only words and spaces!
-No match
-
-/(\d++)(\w)/I
-Capturing subpattern count = 2
-No options
-No first char
-No need char
- 12345a
- 0: 12345a
- 1: 12345
- 2: a
- *** Failers
-No match
- 12345+
-No match
-
-/a++b/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
- aaab
- 0: aaab
-
-/(a++b)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'b'
- aaab
- 0: aaab
- 1: aaab
-
-/(a++)b/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'b'
- aaab
- 0: aaab
- 1: aaa
-
-/([^()]++|\([^()]*\))+/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: x
-
-/\(([^()]++|\([^()]+\))+\)/I
-Capturing subpattern count = 1
-No options
-First char = '('
-Need char = ')'
- (abc)
- 0: (abc)
- 1: abc
- (abc(def)xyz)
- 0: (abc(def)xyz)
- 1: xyz
- *** Failers
-No match
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/(abc){1,3}+/DZ
-------------------------------------------------------------------
- Bra
- Once
- CBra 1
- abc
- Ket
- Brazero
- Bra
- CBra 1
- abc
- Ket
- Brazero
- CBra 1
- abc
- Ket
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'c'
-
-/a+?+/I
-Failed: nothing to repeat at offset 3
-
-/a{2,3}?+b/I
-Failed: nothing to repeat at offset 7
-
-/(?U)a+?+/I
-Failed: nothing to repeat at offset 7
-
-/a{2,3}?+b/IU
-Failed: nothing to repeat at offset 7
-
-/x(?U)a++b/DZ
-------------------------------------------------------------------
- Bra
- x
- a++
- b
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = 'x'
-Need char = 'b'
- xaaaab
- 0: xaaaab
-
-/(?U)xa++b/DZ
-------------------------------------------------------------------
- Bra
- x
- a++
- b
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: ungreedy
-First char = 'x'
-Need char = 'b'
- xaaaab
- 0: xaaaab
-
-/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
-------------------------------------------------------------------
- Bra
- ^
- CBra 1
- CBra 2
- a+
- Ket
- CBra 3
- [ab]+?
- Ket
- CBra 4
- [bc]+
- Ket
- CBra 5
- \w*
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 5
-Options: anchored
-No first char
-No need char
-
-/^x(?U)a+b/DZ
-------------------------------------------------------------------
- Bra
- ^
- x
- a++
- b
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-Need char = 'b'
-
-/^x(?U)(a+)b/DZ
-------------------------------------------------------------------
- Bra
- ^
- x
- CBra 1
- a+?
- Ket
- b
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: anchored
-No first char
-Need char = 'b'
-
-/[.x.]/I
-Failed: POSIX collating elements are not supported at offset 0
-
-/[=x=]/I
-Failed: POSIX collating elements are not supported at offset 0
-
-/[:x:]/I
-Failed: POSIX named classes are supported only within a class at offset 0
-
-/\l/I
-Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
-
-/\L/I
-Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
-
-/\N{name}/I
-Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
-
-/\u/I
-Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
-
-/\U/I
-Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
-
-/[/I
-Failed: missing terminating ] for character class at offset 1
-
-/[a-/I
-Failed: missing terminating ] for character class at offset 3
-
-/[[:space:]/I
-Failed: missing terminating ] for character class at offset 10
-
-/[\s]/IDZ
-------------------------------------------------------------------
- Bra
- [\x09\x0a\x0c\x0d ]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[[:space:]]/IDZ
-------------------------------------------------------------------
- Bra
- [\x09-\x0d ]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[[:space:]abcde]/IDZ
-------------------------------------------------------------------
- Bra
- [\x09-\x0d a-e]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix
-Capturing subpattern count = 0
-Options: extended
-First char = '<'
-Need char = '>'
- <>
- 0: <>
- <abcd>
- 0: <abcd>
- <abc <123> hij>
- 0: <abc <123> hij>
- <abc <def> hij>
- 0: <def>
- <abc<>def>
- 0: <abc<>def>
- <abc<>
- 0: <>
- *** Failers
-No match
- <abc
-No match
-
-|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
-------------------------------------------------------------------
- Bra
- 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
- \b
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = '8'
-Need char = 'X'
-
-|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
-------------------------------------------------------------------
- Bra
- $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
- \b
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = '$'
-Need char = 'X'
-
-/(.*)\d+\1/I
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-No first char
-No need char
-
-/(.*)\d+/I
-Capturing subpattern count = 1
-No options
-First char at start or follows newline
-No need char
-
-/(.*)\d+\1/Is
-Capturing subpattern count = 1
-Max back reference = 1
-Options: dotall
-No first char
-No need char
-
-/(.*)\d+/Is
-Capturing subpattern count = 1
-Options: anchored dotall
-No first char
-No need char
-
-/(.*(xyz))\d+\2/I
-Capturing subpattern count = 2
-Max back reference = 2
-No options
-First char at start or follows newline
-Need char = 'z'
-
-/((.*))\d+\1/I
-Capturing subpattern count = 2
-Max back reference = 1
-No options
-No first char
-No need char
- abc123bc
- 0: bc123bc
- 1: bc
- 2: bc
-
-/a[b]/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-
-/(?=a).*/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/(?=abc).xyz/IiI
-Capturing subpattern count = 0
-Options: caseless
-First char = 'a' (caseless)
-Need char = 'z' (caseless)
-
-/(?=abc)(?i).xyz/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'z' (caseless)
-
-/(?=a)(?=b)/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/(?=.)a/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/((?=abcda)a)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'a'
-
-/((?=abcda)ab)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'b'
-
-/()a/I
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'a'
-
-/(?(1)ab|ac)(.)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/(?(1)abz|acz)(.)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'z'
-
-/(?(1)abz)(.)/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-
-/(?(1)abz)(1)23/I
-Capturing subpattern count = 1
-No options
-No first char
-Need char = '3'
-
-/(a)+/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/(a){2,3}/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'a'
-
-/(a)*/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-
-/[a]/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/[ab]/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[ab]/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b
-
-/[^a]/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/\d456/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = '6'
-
-/\d456/IS
-Capturing subpattern count = 0
-No options
-No first char
-Need char = '6'
-Subject length lower bound = 4
-Starting byte set: 0 1 2 3 4 5 6 7 8 9
-
-/a^b/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-
-/^a/Im
-Capturing subpattern count = 0
-Options: multiline
-First char at start or follows newline
-Need char = 'a'
- abcde
- 0: a
- xy\nabc
- 0: a
- *** Failers
-No match
- xyabc
-No match
-
-/c|abc/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'c'
-
-/(?i)[ab]/IS
-Capturing subpattern count = 0
-Options: caseless
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: A B a b
-
-/[ab](?i)cd/IS
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'd' (caseless)
-Subject length lower bound = 3
-Starting byte set: a b
-
-/abc(?C)def/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'f'
- abcdef
---->abcdef
- 0 ^ ^ d
- 0: abcdef
- 1234abcdef
---->1234abcdef
- 0 ^ ^ d
- 0: abcdef
- *** Failers
-No match
- abcxyz
-No match
- abcxyzf
---->abcxyzf
- 0 ^ ^ d
-No match
-
-/abc(?C)de(?C1)f/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'f'
- 123abcdef
---->123abcdef
- 0 ^ ^ d
- 1 ^ ^ f
- 0: abcdef
-
-/(?C1)\dabc(?C2)def/IS
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'f'
-Subject length lower bound = 7
-Starting byte set: 0 1 2 3 4 5 6 7 8 9
- 1234abcdef
---->1234abcdef
- 1 ^ \d
- 1 ^ \d
- 1 ^ \d
- 1 ^ \d
- 2 ^ ^ d
- 0: 4abcdef
- *** Failers
-No match
- abcdef
-No match
-
-/(?C1)\dabc(?C2)def/ISS
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'f'
- 1234abcdef
---->1234abcdef
- 1 ^ \d
- 1 ^ \d
- 1 ^ \d
- 1 ^ \d
- 2 ^ ^ d
- 0: 4abcdef
- *** Failers
-No match
- abcdef
---->abcdef
- 1 ^ \d
- 1 ^ \d
- 1 ^ \d
- 1 ^ \d
- 1 ^ \d
- 1 ^ \d
-No match
-
-/(?C255)ab/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'b'
-
-/(?C256)ab/I
-Failed: number after (?C is > 255 at offset 6
-
-/(?Cab)xx/I
-Failed: closing ) for (?C expected at offset 3
-
-/(?C12vr)x/I
-Failed: closing ) for (?C expected at offset 5
-
-/abc(?C)def/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'f'
- *** Failers
-No match
- \x83\x0\x61bcdef
---->\x83\x00abcdef
- 0 ^ ^ d
- 0: abcdef
-
-/(abc)(?C)de(?C1)f/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'f'
- 123abcdef
---->123abcdef
- 0 ^ ^ d
- 1 ^ ^ f
- 0: abcdef
- 1: abc
- 123abcdef\C+
-Callout 0: last capture = 1
- 0: <unset>
- 1: abc
---->123abcdef
- ^ ^ d
-Callout 1: last capture = 1
- 0: <unset>
- 1: abc
---->123abcdef
- ^ ^ f
- 0: abcdef
- 1: abc
- 123abcdef\C-
- 0: abcdef
- 1: abc
- *** Failers
-No match
- 123abcdef\C!1
---->123abcdef
- 0 ^ ^ d
- 1 ^ ^ f
-No match
-
-/(?C0)(abc(?C1))*/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
- abcabcabc
---->abcabcabc
- 0 ^ (abc(?C1))*
- 1 ^ ^ )
- 1 ^ ^ )
- 1 ^ ^ )
- 0: abcabcabc
- 1: abc
- abcabc\C!1!3
---->abcabc
- 0 ^ (abc(?C1))*
- 1 ^ ^ )
- 1 ^ ^ )
- 0: abcabc
- 1: abc
- *** Failers
---->*** Failers
- 0 ^ (abc(?C1))*
- 0:
- abcabcabc\C!1!3
---->abcabcabc
- 0 ^ (abc(?C1))*
- 1 ^ ^ )
- 1 ^ ^ )
- 1 ^ ^ )
- 0: abcabc
- 1: abc
-
-/(\d{3}(?C))*/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
- 123\C+
-Callout 0: last capture = -1
- 0: <unset>
---->123
- ^ ^ )
- 0: 123
- 1: 123
- 123456\C+
-Callout 0: last capture = -1
- 0: <unset>
---->123456
- ^ ^ )
-Callout 0: last capture = 1
- 0: <unset>
- 1: 123
---->123456
- ^ ^ )
- 0: 123456
- 1: 456
- 123456789\C+
-Callout 0: last capture = -1
- 0: <unset>
---->123456789
- ^ ^ )
-Callout 0: last capture = 1
- 0: <unset>
- 1: 123
---->123456789
- ^ ^ )
-Callout 0: last capture = 1
- 0: <unset>
- 1: 456
---->123456789
- ^ ^ )
- 0: 123456789
- 1: 789
-
-/((xyz)(?C)p|(?C1)xyzabc)/I
-Capturing subpattern count = 2
-No options
-First char = 'x'
-No need char
- xyzabc\C+
-Callout 0: last capture = 2
- 0: <unset>
- 1: <unset>
- 2: xyz
---->xyzabc
- ^ ^ p
-Callout 1: last capture = -1
- 0: <unset>
---->xyzabc
- ^ x
- 0: xyzabc
- 1: xyzabc
-
-/(X)((xyz)(?C)p|(?C1)xyzabc)/I
-Capturing subpattern count = 3
-No options
-First char = 'X'
-Need char = 'x'
- Xxyzabc\C+
-Callout 0: last capture = 3
- 0: <unset>
- 1: X
- 2: <unset>
- 3: xyz
---->Xxyzabc
- ^ ^ p
-Callout 1: last capture = 1
- 0: <unset>
- 1: X
---->Xxyzabc
- ^^ x
- 0: Xxyzabc
- 1: X
- 2: xyzabc
-
-/(?=(abc))(?C)abcdef/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'f'
- abcdef\C+
-Callout 0: last capture = 1
- 0: <unset>
- 1: abc
---->abcdef
- ^ a
- 0: abcdef
- 1: abc
-
-/(?!(abc)(?C1)d)(?C2)abcxyz/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'z'
- abcxyz\C+
-Callout 1: last capture = 1
- 0: <unset>
- 1: abc
---->abcxyz
- ^ ^ d
-Callout 2: last capture = -1
- 0: <unset>
---->abcxyz
- ^ a
- 0: abcxyz
-
-/(?<=(abc)(?C))xyz/I
-Capturing subpattern count = 1
-No options
-First char = 'x'
-Need char = 'z'
- abcxyz\C+
-Callout 0: last capture = 1
- 0: <unset>
- 1: abc
---->abcxyz
- ^ )
- 0: xyz
- 1: abc
-
-/a(b+)(c*)(?C1)/I
-Capturing subpattern count = 2
-No options
-First char = 'a'
-Need char = 'b'
- abbbbbccc\C*1
---->abbbbbccc
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
-No match
-
-/a(b+?)(c*?)(?C1)/I
-Capturing subpattern count = 2
-No options
-First char = 'a'
-Need char = 'b'
- abbbbbccc\C*1
---->abbbbbccc
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
- 1 ^ ^
-Callout data = 1
-No match
-
-/(?C)abc/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-
-/(?C)^abc/I
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/(?C)a|b/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b
-
-/(?R)/I
-Failed: recursive call could loop indefinitely at offset 3
-
-/(a|(?R))/I
-Failed: recursive call could loop indefinitely at offset 6
-
-/(ab|(bc|(de|(?R))))/I
-Failed: recursive call could loop indefinitely at offset 15
-
-/x(ab|(bc|(de|(?R))))/I
-Capturing subpattern count = 3
-No options
-First char = 'x'
-No need char
- xab
- 0: xab
- 1: ab
- xbc
- 0: xbc
- 1: bc
- 2: bc
- xde
- 0: xde
- 1: de
- 2: de
- 3: de
- xxab
- 0: xxab
- 1: xab
- 2: xab
- 3: xab
- xxxab
- 0: xxxab
- 1: xxab
- 2: xxab
- 3: xxab
- *** Failers
-No match
- xyab
-No match
-
-/(ab|(bc|(de|(?1))))/I
-Failed: recursive call could loop indefinitely at offset 15
-
-/x(ab|(bc|(de|(?1)x)x)x)/I
-Failed: recursive call could loop indefinitely at offset 16
-
-/^([^()]|\((?1)*\))*$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- abc
- 0: abc
- 1: c
- a(b)c
- 0: a(b)c
- 1: c
- a(b(c))d
- 0: a(b(c))d
- 1: d
- *** Failers)
-No match
- a(b(c)d
-No match
-
-/^>abc>([^()]|\((?1)*\))*<xyz<$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-Need char = '<'
- >abc>123<xyz<
- 0: >abc>123<xyz<
- 1: 3
- >abc>1(2)3<xyz<
- 0: >abc>1(2)3<xyz<
- 1: 3
- >abc>(1(2)3)<xyz<
- 0: >abc>(1(2)3)<xyz<
- 1: (1(2)3)
-
-/(a(?1)b)/DZ
-------------------------------------------------------------------
- Bra
- CBra 1
- a
- Recurse
- b
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'b'
-
-/(a(?1)+b)/DZ
-------------------------------------------------------------------
- Bra
- CBra 1
- a
- Once
- Recurse
- KetRmax
- b
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'b'
-
-/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
-Capturing subpattern count = 2
-Options: anchored
-No first char
-No need char
- 12
- 0: 12
- 1: 12
- (((2+2)*-3)-7)
- 0: (((2+2)*-3)-7)
- 1: (((2+2)*-3)-7)
- 2: -
- -12
- 0: -12
- 1: -12
- *** Failers
-No match
- ((2+2)*-3)-7)
-No match
-
-/^(x(y|(?1){2})z)/I
-Capturing subpattern count = 2
-Options: anchored
-No first char
-No need char
- xyz
- 0: xyz
- 1: xyz
- 2: y
- xxyzxyzz
- 0: xxyzxyzz
- 1: xxyzxyzz
- 2: xyzxyz
- *** Failers
-No match
- xxyzz
-No match
- xxyzxyzxyzz
-No match
-
-/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix
-Capturing subpattern count = 2
-Options: extended
-First char = '<'
-Need char = '>'
- <>
- 0: <>
- 1: <>
- 2: <>
- <abcd>
- 0: <abcd>
- 1: <abcd>
- 2: <abcd>
- <abc <123> hij>
- 0: <abc <123> hij>
- 1: <abc <123> hij>
- 2: <abc <123> hij>
- <abc <def> hij>
- 0: <def>
- 1: <def>
- 2: <def>
- <abc<>def>
- 0: <abc<>def>
- 1: <abc<>def>
- 2: <abc<>def>
- <abc<>
- 0: <>
- 1: <>
- 2: <>
- *** Failers
-No match
- <abc
-No match
-
-/(?1)/I
-Failed: reference to non-existent subpattern at offset 3
-
-/((?2)(abc)/I
-Failed: missing ) at offset 10
-
-/^(abc)def(?1)/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- abcdefabc
- 0: abcdefabc
- 1: abc
-
-/^(a|b|c)=(?1)+/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- a=a
- 0: a=a
- 1: a
- a=b
- 0: a=b
- 1: a
- a=bc
- 0: a=bc
- 1: a
-
-/^(a|b|c)=((?1))+/I
-Capturing subpattern count = 2
-Options: anchored
-No first char
-No need char
- a=a
- 0: a=a
- 1: a
- 2: a
- a=b
- 0: a=b
- 1: a
- 2: b
- a=bc
- 0: a=bc
- 1: a
- 2: c
-
-/a(?P<name1>b|c)d(?P<longername2>e)/DZ
-------------------------------------------------------------------
- Bra
- a
- CBra 1
- b
- Alt
- c
- Ket
- d
- CBra 2
- e
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Named capturing subpatterns:
- longername2 2
- name1 1
-No options
-First char = 'a'
-Need char = 'e'
- abde
- 0: abde
- 1: b
- 2: e
- acde
- 0: acde
- 1: c
- 2: e
-
-/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
-------------------------------------------------------------------
- Bra
- Bra
- a
- CBra 1
- c
- CBra 2
- d
- Ket
- Ket
- Ket
- CBra 3
- a
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 3
-Named capturing subpatterns:
- a 3
- c 1
- d 2
-No options
-First char = 'a'
-Need char = 'a'
-
-/(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
-------------------------------------------------------------------
- Bra
- CBra 1
- a
- Ket
- Any
- Any
- Any
- \1
- bbb
- Recurse
- d
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Max back reference = 1
-Named capturing subpatterns:
- a 1
-No options
-First char = 'a'
-Need char = 'd'
-
-/^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/Ii
-Capturing subpattern count = 4
-Max back reference = 4
-Named capturing subpatterns:
- four 4
- one 1
- three 3
- two 2
-Options: anchored caseless
-No first char
-No need char
- 1221
- 0: 1221
- 1: 1221
- 2: 1
- Satan, oscillate my metallic sonatas!
- 0: Satan, oscillate my metallic sonatas!
- 1: <unset>
- 2: <unset>
- 3: Satan, oscillate my metallic sonatas
- 4: S
- A man, a plan, a canal: Panama!
- 0: A man, a plan, a canal: Panama!
- 1: <unset>
- 2: <unset>
- 3: A man, a plan, a canal: Panama
- 4: A
- Able was I ere I saw Elba.
- 0: Able was I ere I saw Elba.
- 1: <unset>
- 2: <unset>
- 3: Able was I ere I saw Elba
- 4: A
- *** Failers
-No match
- The quick brown fox
-No match
-
-/((?(R)a|b))\1(?1)?/I
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-No first char
-No need char
- bb
- 0: bb
- 1: b
- bbaa
- 0: bba
- 1: b
-
-/(.*)a/Is
-Capturing subpattern count = 1
-Options: anchored dotall
-No first char
-Need char = 'a'
-
-/(.*)a\1/Is
-Capturing subpattern count = 1
-Max back reference = 1
-Options: dotall
-No first char
-Need char = 'a'
-
-/(.*)a(b)\2/Is
-Capturing subpattern count = 2
-Max back reference = 2
-Options: anchored dotall
-No first char
-Need char = 'b'
-
-/((.*)a|(.*)b)z/Is
-Capturing subpattern count = 3
-Options: anchored dotall
-No first char
-Need char = 'z'
-
-/((.*)a|(.*)b)z\1/Is
-Capturing subpattern count = 3
-Max back reference = 1
-Options: dotall
-No first char
-Need char = 'z'
-
-/((.*)a|(.*)b)z\2/Is
-Capturing subpattern count = 3
-Max back reference = 2
-Options: dotall
-No first char
-Need char = 'z'
-
-/((.*)a|(.*)b)z\3/Is
-Capturing subpattern count = 3
-Max back reference = 3
-Options: dotall
-No first char
-Need char = 'z'
-
-/((.*)a|^(.*)b)z\3/Is
-Capturing subpattern count = 3
-Max back reference = 3
-Options: anchored dotall
-No first char
-Need char = 'z'
-
-/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
-Capturing subpattern count = 31
-Options: anchored dotall
-No first char
-No need char
-
-/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
-Capturing subpattern count = 31
-Max back reference = 31
-Options: dotall
-No first char
-No need char
-
-/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
-Capturing subpattern count = 32
-Max back reference = 32
-Options: dotall
-No first char
-No need char
-
-/(a)(bc)/INDZ
-------------------------------------------------------------------
- Bra
- Bra
- a
- Ket
- Bra
- bc
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: no_auto_capture
-First char = 'a'
-Need char = 'c'
- abc
- 0: abc
-
-/(?P<one>a)(bc)/INDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- a
- Ket
- Bra
- bc
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Named capturing subpatterns:
- one 1
-Options: no_auto_capture
-First char = 'a'
-Need char = 'c'
- abc
- 0: abc
- 1: a
-
-/(a)(?P<named>bc)/INDZ
-------------------------------------------------------------------
- Bra
- Bra
- a
- Ket
- CBra 1
- bc
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Named capturing subpatterns:
- named 1
-Options: no_auto_capture
-First char = 'a'
-Need char = 'c'
-
-/(a+)*zz/I
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'z'
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
-Minimum match() limit = 8
-Minimum match() recursion limit = 6
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaz\M
-Minimum match() limit = 32768
-Minimum match() recursion limit = 42
-No match
-
-/(aaa(?C1)bbb|ab)/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'b'
- aaabbb
---->aaabbb
- 1 ^ ^ b
- 0: aaabbb
- 1: aaabbb
- aaabbb\C*0
---->aaabbb
- 1 ^ ^ b
- 0: aaabbb
- 1: aaabbb
- aaabbb\C*1
---->aaabbb
- 1 ^ ^ b
-Callout data = 1
- 0: ab
- 1: ab
- aaabbb\C*-1
---->aaabbb
- 1 ^ ^ b
-Callout data = -1
-No match
-
-/ab(?P<one>cd)ef(?P<two>gh)/I
-Capturing subpattern count = 2
-Named capturing subpatterns:
- one 1
- two 2
-No options
-First char = 'a'
-Need char = 'h'
- abcdefgh
- 0: abcdefgh
- 1: cd
- 2: gh
- abcdefgh\C1\Gtwo
- 0: abcdefgh
- 1: cd
- 2: gh
- 1C cd (2)
- G gh (2) two
- abcdefgh\Cone\Ctwo
- 0: abcdefgh
- 1: cd
- 2: gh
- C cd (2) one
- C gh (2) two
- abcdefgh\Cthree
-no parentheses with name "three"
- 0: abcdefgh
- 1: cd
- 2: gh
-copy substring three failed -7
-
-/(?P<Tes>)(?P<Test>)/DZ
-------------------------------------------------------------------
- Bra
- CBra 1
- Ket
- CBra 2
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Named capturing subpatterns:
- Tes 1
- Test 2
-No options
-No first char
-No need char
-
-/(?P<Test>)(?P<Tes>)/DZ
-------------------------------------------------------------------
- Bra
- CBra 1
- Ket
- CBra 2
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Named capturing subpatterns:
- Tes 2
- Test 1
-No options
-No first char
-No need char
-
-/(?P<Z>zz)(?P<A>aa)/I
-Capturing subpattern count = 2
-Named capturing subpatterns:
- A 2
- Z 1
-No options
-First char = 'z'
-Need char = 'a'
- zzaa\CZ
- 0: zzaa
- 1: zz
- 2: aa
- C zz (2) Z
- zzaa\CA
- 0: zzaa
- 1: zz
- 2: aa
- C aa (2) A
-
-/(?P<x>eks)(?P<x>eccs)/I
-Failed: two named subpatterns have the same name at offset 15
-
-/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
-Failed: two named subpatterns have the same name at offset 30
-
-"\[((?P<elem>\d+)(,(?P>elem))*)\]"I
-Capturing subpattern count = 3
-Named capturing subpatterns:
- elem 2
-No options
-First char = '['
-Need char = ']'
- [10,20,30,5,5,4,4,2,43,23,4234]
- 0: [10,20,30,5,5,4,4,2,43,23,4234]
- 1: 10,20,30,5,5,4,4,2,43,23,4234
- 2: 10
- 3: ,4234
- *** Failers
-No match
- []
-No match
-
-"\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
-Capturing subpattern count = 3
-Named capturing subpatterns:
- elem 2
-No options
-First char = '['
-Need char = ']'
- [10,20,30,5,5,4,4,2,43,23,4234]
- 0: [10,20,30,5,5,4,4,2,43,23,4234]
- 1: 10,20,30,5,5,4,4,2,43,23,4234
- 2: 10
- 3: ,4234
- []
- 0: []
-
-/(a(b(?2)c))?/DZ
-------------------------------------------------------------------
- Bra
- Brazero
- CBra 1
- a
- CBra 2
- b
- Recurse
- c
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-No options
-No first char
-No need char
-
-/(a(b(?2)c))*/DZ
-------------------------------------------------------------------
- Bra
- Brazero
- CBra 1
- a
- CBra 2
- b
- Recurse
- c
- Ket
- KetRmax
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-No options
-No first char
-No need char
-
-/(a(b(?2)c)){0,2}/DZ
-------------------------------------------------------------------
- Bra
- Brazero
- Bra
- CBra 1
- a
- CBra 2
- b
- Recurse
- c
- Ket
- Ket
- Brazero
- CBra 1
- a
- CBra 2
- b
- Recurse
- c
- Ket
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-No options
-No first char
-No need char
-
-/[ab]{1}+/DZ
-------------------------------------------------------------------
- Bra
- Once
- [ab]{1,1}
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
-Capturing subpattern count = 3
-Options: caseless
-No first char
-Need char = 'g' (caseless)
- Baby Bjorn Active Carrier - With free SHIPPING!!
- 0: Baby Bjorn Active Carrier - With free SHIPPING!!
- 1: Baby Bjorn Active Carrier - With free SHIPPING!!
-
-/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
-Capturing subpattern count = 3
-Options: caseless
-No first char
-Need char = 'g' (caseless)
-Subject length lower bound = 8
-No set of starting bytes
- Baby Bjorn Active Carrier - With free SHIPPING!!
- 0: Baby Bjorn Active Carrier - With free SHIPPING!!
- 1: Baby Bjorn Active Carrier - With free SHIPPING!!
-
-/a*.*b/ISDZ
-------------------------------------------------------------------
- Bra
- a*
- Any*
- b
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'b'
-Subject length lower bound = 1
-No set of starting bytes
-
-/(a|b)*.?c/ISDZ
-------------------------------------------------------------------
- Bra
- Brazero
- CBra 1
- a
- Alt
- b
- KetRmax
- Any?
- c
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'c'
-Subject length lower bound = 1
-No set of starting bytes
-
-/abc(?C255)de(?C)f/DZ
-------------------------------------------------------------------
- Bra
- abc
- Callout 255 10 1
- de
- Callout 0 16 1
- f
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'f'
-
-/abcde/ICDZ
-------------------------------------------------------------------
- Bra
- Callout 255 0 1
- a
- Callout 255 1 1
- b
- Callout 255 2 1
- c
- Callout 255 3 1
- d
- Callout 255 4 1
- e
- Callout 255 5 0
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options:
-First char = 'a'
-Need char = 'e'
- abcde
---->abcde
- +0 ^ a
- +1 ^^ b
- +2 ^ ^ c
- +3 ^ ^ d
- +4 ^ ^ e
- +5 ^ ^
- 0: abcde
- abcdfe
---->abcdfe
- +0 ^ a
- +1 ^^ b
- +2 ^ ^ c
- +3 ^ ^ d
- +4 ^ ^ e
-No match
-
-/a*b/ICDZS
-------------------------------------------------------------------
- Bra
- Callout 255 0 2
- a*+
- Callout 255 2 1
- b
- Callout 255 3 0
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options:
-No first char
-Need char = 'b'
-Subject length lower bound = 1
-Starting byte set: a b
- ab
---->ab
- +0 ^ a*
- +2 ^^ b
- +3 ^ ^
- 0: ab
- aaaab
---->aaaab
- +0 ^ a*
- +2 ^ ^ b
- +3 ^ ^
- 0: aaaab
- aaaacb
---->aaaacb
- +0 ^ a*
- +2 ^ ^ b
- +0 ^ a*
- +2 ^ ^ b
- +0 ^ a*
- +2 ^ ^ b
- +0 ^ a*
- +2 ^^ b
- +0 ^ a*
- +2 ^ b
- +3 ^^
- 0: b
-
-/a*b/ICDZSS
-------------------------------------------------------------------
- Bra
- Callout 255 0 2
- a*+
- Callout 255 2 1
- b
- Callout 255 3 0
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options:
-No first char
-Need char = 'b'
- ab
---->ab
- +0 ^ a*
- +2 ^^ b
- +3 ^ ^
- 0: ab
- aaaab
---->aaaab
- +0 ^ a*
- +2 ^ ^ b
- +3 ^ ^
- 0: aaaab
- aaaacb
---->aaaacb
- +0 ^ a*
- +2 ^ ^ b
- +0 ^ a*
- +2 ^ ^ b
- +0 ^ a*
- +2 ^ ^ b
- +0 ^ a*
- +2 ^^ b
- +0 ^ a*
- +2 ^ b
- +0 ^ a*
- +2 ^ b
- +3 ^^
- 0: b
-
-/a+b/ICDZ
-------------------------------------------------------------------
- Bra
- Callout 255 0 2
- a++
- Callout 255 2 1
- b
- Callout 255 3 0
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options:
-First char = 'a'
-Need char = 'b'
- ab
---->ab
- +0 ^ a+
- +2 ^^ b
- +3 ^ ^
- 0: ab
- aaaab
---->aaaab
- +0 ^ a+
- +2 ^ ^ b
- +3 ^ ^
- 0: aaaab
- aaaacb
---->aaaacb
- +0 ^ a+
- +2 ^ ^ b
- +0 ^ a+
- +2 ^ ^ b
- +0 ^ a+
- +2 ^ ^ b
- +0 ^ a+
- +2 ^^ b
-No match
-
-/(abc|def)x/ICDZS
-------------------------------------------------------------------
- Bra
- Callout 255 0 9
- CBra 1
- Callout 255 1 1
- a
- Callout 255 2 1
- b
- Callout 255 3 1
- c
- Callout 255 4 0
- Alt
- Callout 255 5 1
- d
- Callout 255 6 1
- e
- Callout 255 7 1
- f
- Callout 255 8 0
- Ket
- Callout 255 9 1
- x
- Callout 255 10 0
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options:
-No first char
-Need char = 'x'
-Subject length lower bound = 4
-Starting byte set: a d
- abcx
---->abcx
- +0 ^ (abc|def)
- +1 ^ a
- +2 ^^ b
- +3 ^ ^ c
- +4 ^ ^ |
- +9 ^ ^ x
-+10 ^ ^
- 0: abcx
- 1: abc
- defx
---->defx
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
- +6 ^^ e
- +7 ^ ^ f
- +8 ^ ^ )
- +9 ^ ^ x
-+10 ^ ^
- 0: defx
- 1: def
- ** Failers
-No match
- abcdefzx
---->abcdefzx
- +0 ^ (abc|def)
- +1 ^ a
- +2 ^^ b
- +3 ^ ^ c
- +4 ^ ^ |
- +9 ^ ^ x
- +5 ^ d
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
- +6 ^^ e
- +7 ^ ^ f
- +8 ^ ^ )
- +9 ^ ^ x
-No match
-
-/(abc|def)x/ICDZSS
-------------------------------------------------------------------
- Bra
- Callout 255 0 9
- CBra 1
- Callout 255 1 1
- a
- Callout 255 2 1
- b
- Callout 255 3 1
- c
- Callout 255 4 0
- Alt
- Callout 255 5 1
- d
- Callout 255 6 1
- e
- Callout 255 7 1
- f
- Callout 255 8 0
- Ket
- Callout 255 9 1
- x
- Callout 255 10 0
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options:
-No first char
-Need char = 'x'
- abcx
---->abcx
- +0 ^ (abc|def)
- +1 ^ a
- +2 ^^ b
- +3 ^ ^ c
- +4 ^ ^ |
- +9 ^ ^ x
-+10 ^ ^
- 0: abcx
- 1: abc
- defx
---->defx
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
- +6 ^^ e
- +7 ^ ^ f
- +8 ^ ^ )
- +9 ^ ^ x
-+10 ^ ^
- 0: defx
- 1: def
- ** Failers
-No match
- abcdefzx
---->abcdefzx
- +0 ^ (abc|def)
- +1 ^ a
- +2 ^^ b
- +3 ^ ^ c
- +4 ^ ^ |
- +9 ^ ^ x
- +5 ^ d
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
- +6 ^^ e
- +7 ^ ^ f
- +8 ^ ^ )
- +9 ^ ^ x
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
- +0 ^ (abc|def)
- +1 ^ a
- +5 ^ d
-No match
-
-/(ab|cd){3,4}/IC
-Capturing subpattern count = 1
-Options:
-No first char
-No need char
- ababab
---->ababab
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +2 ^ ^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +2 ^ ^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
-+12 ^ ^
- 0: ababab
- 1: ab
- abcdabcd
---->abcdabcd
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
- +1 ^ ^ a
- +2 ^ ^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- 0: abcdabcd
- 1: cd
- abcdcdcdcdcd
---->abcdcdcdcdcd
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- 0: abcdcdcd
- 1: cd
-
-/([ab]{,4}c|xy)/ICDZS
-------------------------------------------------------------------
- Bra
- Callout 255 0 14
- CBra 1
- Callout 255 1 4
- [ab]
- Callout 255 5 1
- {
- Callout 255 6 1
- ,
- Callout 255 7 1
- 4
- Callout 255 8 1
- }
- Callout 255 9 1
- c
- Callout 255 10 0
- Alt
- Callout 255 11 1
- x
- Callout 255 12 1
- y
- Callout 255 13 0
- Ket
- Callout 255 14 0
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options:
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: a b x
- Note: that { does NOT introduce a quantifier
---->Note: that { does NOT introduce a quantifier
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
- +5 ^^ {
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
- +5 ^^ {
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
- +5 ^^ {
-+11 ^ x
-No match
-
-/([ab]{,4}c|xy)/ICDZSS
-------------------------------------------------------------------
- Bra
- Callout 255 0 14
- CBra 1
- Callout 255 1 4
- [ab]
- Callout 255 5 1
- {
- Callout 255 6 1
- ,
- Callout 255 7 1
- 4
- Callout 255 8 1
- }
- Callout 255 9 1
- c
- Callout 255 10 0
- Alt
- Callout 255 11 1
- x
- Callout 255 12 1
- y
- Callout 255 13 0
- Ket
- Callout 255 14 0
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options:
-No first char
-No need char
- Note: that { does NOT introduce a quantifier
---->Note: that { does NOT introduce a quantifier
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
- +5 ^^ {
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
- +5 ^^ {
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
- +5 ^^ {
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
- +0 ^ ([ab]{,4}c|xy)
- +1 ^ [ab]
-+11 ^ x
-No match
-
-/([ab]{1,4}c|xy){4,5}?123/ICDZ
-------------------------------------------------------------------
- Bra
- Callout 255 0 21
- CBra 1
- Callout 255 1 9
- [ab]{1,4}
- Callout 255 10 1
- c
- Callout 255 11 0
- Alt
- Callout 255 12 1
- x
- Callout 255 13 1
- y
- Callout 255 14 0
- Ket
- CBra 1
- Callout 255 1 9
- [ab]{1,4}
- Callout 255 10 1
- c
- Callout 255 11 0
- Alt
- Callout 255 12 1
- x
- Callout 255 13 1
- y
- Callout 255 14 0
- Ket
- CBra 1
- Callout 255 1 9
- [ab]{1,4}
- Callout 255 10 1
- c
- Callout 255 11 0
- Alt
- Callout 255 12 1
- x
- Callout 255 13 1
- y
- Callout 255 14 0
- Ket
- CBra 1
- Callout 255 1 9
- [ab]{1,4}
- Callout 255 10 1
- c
- Callout 255 11 0
- Alt
- Callout 255 12 1
- x
- Callout 255 13 1
- y
- Callout 255 14 0
- Ket
- Braminzero
- CBra 1
- Callout 255 1 9
- [ab]{1,4}
- Callout 255 10 1
- c
- Callout 255 11 0
- Alt
- Callout 255 12 1
- x
- Callout 255 13 1
- y
- Callout 255 14 0
- Ket
- Callout 255 21 1
- 1
- Callout 255 22 1
- 2
- Callout 255 23 1
- 3
- Callout 255 24 0
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options:
-No first char
-Need char = '3'
- aacaacaacaacaac123
---->aacaacaacaacaac123
- +0 ^ ([ab]{1,4}c|xy){4,5}?
- +1 ^ [ab]{1,4}
-+10 ^ ^ c
-+11 ^ ^ |
- +1 ^ ^ [ab]{1,4}
-+10 ^ ^ c
-+11 ^ ^ |
- +1 ^ ^ [ab]{1,4}
-+10 ^ ^ c
-+11 ^ ^ |
- +1 ^ ^ [ab]{1,4}
-+10 ^ ^ c
-+11 ^ ^ |
-+21 ^ ^ 1
- +1 ^ ^ [ab]{1,4}
-+10 ^ ^ c
-+11 ^ ^ |
-+21 ^ ^ 1
-+22 ^ ^ 2
-+23 ^ ^ 3
-+24 ^ ^
- 0: aacaacaacaacaac123
- 1: aac
-
-/\b.*/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- ab cd\>1
- 0: cd
-
-/\b.*/Is
-Capturing subpattern count = 0
-Options: dotall
-No first char
-No need char
- ab cd\>1
- 0: cd
-
-/(?!.bcd).*/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- Xbcd12345
- 0: bcd12345
-
-/abcde/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'e'
- ab\P
-Partial match: ab
- abc\P
-Partial match: abc
- abcd\P
-Partial match: abcd
- abcde\P
- 0: abcde
- the quick brown abc\P
-Partial match: abc
- ** Failers\P
-No match
- the quick brown abxyz fox\P
-No match
-
-"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
-Capturing subpattern count = 3
-Options: anchored
-No first char
-Need char = '/'
- 13/05/04\P
- 0: 13/05/04
- 1: 13
- 2: 05
- 13/5/2004\P
- 0: 13/5/2004
- 1: 13
- 2: 5
- 3: 20
- 02/05/09\P
- 0: 02/05/09
- 1: 02
- 2: 05
- 1\P
-Partial match: 1
- 1/2\P
-Partial match: 1/2
- 1/2/0\P
-Partial match: 1/2/0
- 1/2/04\P
- 0: 1/2/04
- 1: 1
- 2: 2
- 0\P
-Partial match: 0
- 02/\P
-Partial match: 02/
- 02/0\P
-Partial match: 02/0
- 02/1\P
-Partial match: 02/1
- ** Failers\P
-No match
- \P
-No match
- 123\P
-No match
- 33/4/04\P
-No match
- 3/13/04\P
-No match
- 0/1/2003\P
-No match
- 0/\P
-No match
- 02/0/\P
-No match
- 02/13\P
-No match
-
-/0{0,2}ABC/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'C'
-
-/\d{3,}ABC/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'C'
-
-/\d*ABC/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'C'
-
-/[abc]+DE/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'E'
-
-/[abc]?123/I
-Capturing subpattern count = 0
-No options
-No first char
-Need char = '3'
- 123\P
- 0: 123
- a\P
-Partial match: a
- b\P
-Partial match: b
- c\P
-Partial match: c
- c12\P
-Partial match: c12
- c123\P
- 0: c123
-
-/^(?:\d){3,5}X/I
-Capturing subpattern count = 0
-Options: anchored
-No first char
-Need char = 'X'
- 1\P
-Partial match: 1
- 123\P
-Partial match: 123
- 123X
- 0: 123X
- 1234\P
-Partial match: 1234
- 1234X
- 0: 1234X
- 12345\P
-Partial match: 12345
- 12345X
- 0: 12345X
- *** Failers
-No match
- 1X
-No match
- 123456\P
-No match
-
-/abc/IS>testsavedregex
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-Subject length lower bound = 3
-No set of starting bytes
-Compiled pattern written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled pattern loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: abc
- ** Failers
-No match
- bca
-No match
-
-/abc/ISS>testsavedregex
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-Compiled pattern written to testsavedregex
-<testsavedregex
-Compiled pattern loaded from testsavedregex
-No study data
- abc
- 0: abc
- ** Failers
-No match
- bca
-No match
-
-/abc/IFS>testsavedregex
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-Subject length lower bound = 3
-No set of starting bytes
-Compiled pattern written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled pattern (byte-inverted) loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: abc
- ** Failers
-No match
- bca
-No match
-
-/abc/IFSS>testsavedregex
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
-Compiled pattern written to testsavedregex
-<testsavedregex
-Compiled pattern (byte-inverted) loaded from testsavedregex
-No study data
- abc
- 0: abc
- ** Failers
-No match
- bca
-No match
-
-/(a|b)/IS>testsavedregex
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b
-Compiled pattern written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled pattern loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- 1: a
- ** Failers
- 0: a
- 1: a
- def
-No match
-
-/(a|b)/ISS>testsavedregex
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Compiled pattern written to testsavedregex
-<testsavedregex
-Compiled pattern loaded from testsavedregex
-No study data
- abc
- 0: a
- 1: a
- ** Failers
- 0: a
- 1: a
- def
-No match
-
-/(a|b)/ISF>testsavedregex
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b
-Compiled pattern written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled pattern (byte-inverted) loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- 1: a
- ** Failers
- 0: a
- 1: a
- def
-No match
-
-/(a|b)/ISSF>testsavedregex
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Compiled pattern written to testsavedregex
-<testsavedregex
-Compiled pattern (byte-inverted) loaded from testsavedregex
-No study data
- abc
- 0: a
- 1: a
- ** Failers
- 0: a
- 1: a
- def
-No match
-
-~<(\w+)/?>(.)*</(\1)>~smgI
-Capturing subpattern count = 3
-Max back reference = 1
-Options: multiline dotall
-First char = '<'
-Need char = '>'
- \J1024<!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
- 0: <seite>\x0a<dokumenteninformation>\x0a<seitentitel>Partner der LCO</seitentitel>\x0a<sprache>de</sprache>\x0a<seitenbeschreibung>Partner der LINEAS Consulting\x0aGmbH</seitenbeschreibung>\x0a<schluesselworte>LINEAS Consulting GmbH Hamburg\x0aPartnerfirmen</schluesselworte>\x0a<revisit>30 days</revisit>\x0a<robots>index,follow</robots>\x0a<menueinformation>\x0a<aktiv>ja</aktiv>\x0a<menueposition>3</menueposition>\x0a<menuetext>Partner</menuetext>\x0a</menueinformation>\x0a<lastedited>\x0a<autor>LCO</autor>\x0a<firma>LINEAS Consulting</firma>\x0a<datum>15.10.2003</datum>\x0a</lastedited>\x0a</dokumenteninformation>\x0a<inhalt>\x0a\x0a<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\x0aGmbH</absatzueberschrift>\x0a\x0a<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\x0a<bild name="logo_ca.gif" rahmen="no"/></link> <link\x0aziel="http://www.ey.com/" zielfenster="_blank"><bild\x0aname="logo_euy.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\x0a<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.atelion.de/"\x0azielfenster="_blank"><bild\x0aname="logo_atelion.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.line-information.de/"\x0azielfenster="_blank">\x0a<bild name="logo_line_information.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\x0a\x0a<absatz><link ziel="http://www.incognis.de/"\x0azielfenster="_blank"><bild\x0aname="logo_incognis.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.addcraft.com/"\x0azielfenster="_blank"><bild\x0aname="logo_addcraft.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.comendo.com/"\x0azielfenster="_blank"><bild\x0aname="logo_comendo.gif" rahmen="no"/></link></absatz>\x0a\x0a</inhalt>\x0a</seite>
- 1: seite
- 2: \x0a
- 3: seite
-
-/^a/IF
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/line\nbreak/I
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-No options
-First char = 'l'
-Need char = 'k'
- this is a line\nbreak
- 0: line\x0abreak
- line one\nthis is a line\nbreak in the second line
- 0: line\x0abreak
-
-/line\nbreak/If
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-Options: firstline
-First char = 'l'
-Need char = 'k'
- this is a line\nbreak
- 0: line\x0abreak
- ** Failers
-No match
- line one\nthis is a line\nbreak in the second line
-No match
-
-/line\nbreak/Imf
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-Options: multiline firstline
-First char = 'l'
-Need char = 'k'
- this is a line\nbreak
- 0: line\x0abreak
- ** Failers
-No match
- line one\nthis is a line\nbreak in the second line
-No match
-
-/(?i)(?-i)AbCd/I
-Capturing subpattern count = 0
-No options
-First char = 'A'
-Need char = 'd'
- AbCd
- 0: AbCd
- ** Failers
-No match
- abcd
-No match
-
-/a{11111111111111111111}/I
-Failed: number too big in {} quantifier at offset 22
-
-/(){64294967295}/I
-Failed: number too big in {} quantifier at offset 14
-
-/(){2,4294967295}/I
-Failed: number too big in {} quantifier at offset 15
-
-"(?i:a)(?i:b)(?i:c)(?i:d)(?i:e)(?i:f)(?i:g)(?i:h)(?i:i)(?i:j)(k)(?i:l)A\1B"I
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-First char = 'a' (caseless)
-Need char = 'B'
- abcdefghijklAkB
- 0: abcdefghijklAkB
- 1: k
-
-"(?P<n0>a)(?P<n1>b)(?P<n2>c)(?P<n3>d)(?P<n4>e)(?P<n5>f)(?P<n6>g)(?P<n7>h)(?P<n8>i)(?P<n9>j)(?P<n10>k)(?P<n11>l)A\11B"I
-Capturing subpattern count = 12
-Max back reference = 11
-Named capturing subpatterns:
- n0 1
- n1 2
- n10 11
- n11 12
- n2 3
- n3 4
- n4 5
- n5 6
- n6 7
- n7 8
- n8 9
- n9 10
-No options
-First char = 'a'
-Need char = 'B'
- abcdefghijklAkB
- 0: abcdefghijklAkB
- 1: a
- 2: b
- 3: c
- 4: d
- 5: e
- 6: f
- 7: g
- 8: h
- 9: i
-10: j
-11: k
-12: l
-
-"(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
-Capturing subpattern count = 12
-Max back reference = 11
-No options
-First char = 'a'
-Need char = 'B'
- abcdefghijklAkB
- 0: abcdefghijklAkB
- 1: a
- 2: b
- 3: c
- 4: d
- 5: e
- 6: f
- 7: g
- 8: h
- 9: i
-10: j
-11: k
-12: l
-
-"(?P<name0>a)(?P<name1>a)(?P<name2>a)(?P<name3>a)(?P<name4>a)(?P<name5>a)(?P<name6>a)(?P<name7>a)(?P<name8>a)(?P<name9>a)(?P<name10>a)(?P<name11>a)(?P<name12>a)(?P<name13>a)(?P<name14>a)(?P<name15>a)(?P<name16>a)(?P<name17>a)(?P<name18>a)(?P<name19>a)(?P<name20>a)(?P<name21>a)(?P<name22>a)(?P<name23>a)(?P<name24>a)(?P<name25>a)(?P<name26>a)(?P<name27>a)(?P<name28>a)(?P<name29>a)(?P<name30>a)(?P<name31>a)(?P<name32>a)(?P<name33>a)(?P<name34>a)(?P<name35>a)(?P<name36>a)(?P<name37>a)(?P<name38>a)(?P<name39>a)(?P<name40>a)(?P<name41>a)(?P<name42>a)(?P<name43>a)(?P<name44>a)(?P<name45>a)(?P<name46>a)(?P<name47>a)(?P<name48>a)(?P<name49>a)(?P<name50>a)(?P<name51>a)(?P<name52>a)(?P<name53>a)(?P<name54>a)(?P<name55>a)(?P<name56>a)(?P<name57>a)(?P<name58>a)(?P<name59>a)(?P<name60>a)(?P<name61>a)(?P<name62>a)(?P<name63>a)(?P<name64>a)(?P<name65>a)(?P<name66>a)(?P<name67>a)(?P<name68>a)(?P<name69>a)(?P<name70>a)(?P<name71>a)(?P<name72>a)(?P<name73>a)(?P<name74>a)(?P<name75>a)(?P<name76>a)(?P<name77>a)(?P<name78>a)(?P<name79>a)(?P<name80>a)(?P<name81>a)(?P<name82>a)(?P<name83>a)(?P<name84>a)(?P<name85>a)(?P<name86>a)(?P<name87>a)(?P<name88>a)(?P<name89>a)(?P<name90>a)(?P<name91>a)(?P<name92>a)(?P<name93>a)(?P<name94>a)(?P<name95>a)(?P<name96>a)(?P<name97>a)(?P<name98>a)(?P<name99>a)(?P<name100>a)"I
-Capturing subpattern count = 101
-Named capturing subpatterns:
- name0 1
- name1 2
- name10 11
- name100 101
- name11 12
- name12 13
- name13 14
- name14 15
- name15 16
- name16 17
- name17 18
- name18 19
- name19 20
- name2 3
- name20 21
- name21 22
- name22 23
- name23 24
- name24 25
- name25 26
- name26 27
- name27 28
- name28 29
- name29 30
- name3 4
- name30 31
- name31 32
- name32 33
- name33 34
- name34 35
- name35 36
- name36 37
- name37 38
- name38 39
- name39 40
- name4 5
- name40 41
- name41 42
- name42 43
- name43 44
- name44 45
- name45 46
- name46 47
- name47 48
- name48 49
- name49 50
- name5 6
- name50 51
- name51 52
- name52 53
- name53 54
- name54 55
- name55 56
- name56 57
- name57 58
- name58 59
- name59 60
- name6 7
- name60 61
- name61 62
- name62 63
- name63 64
- name64 65
- name65 66
- name66 67
- name67 68
- name68 69
- name69 70
- name7 8
- name70 71
- name71 72
- name72 73
- name73 74
- name74 75
- name75 76
- name76 77
- name77 78
- name78 79
- name79 80
- name8 9
- name80 81
- name81 82
- name82 83
- name83 84
- name84 85
- name85 86
- name86 87
- name87 88
- name88 89
- name89 90
- name9 10
- name90 91
- name91 92
- name92 93
- name93 94
- name94 95
- name95 96
- name96 97
- name97 98
- name98 99
- name99 100
-No options
-First char = 'a'
-Need char = 'a'
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many substrings
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: a
- 2: a
- 3: a
- 4: a
- 5: a
- 6: a
- 7: a
- 8: a
- 9: a
-10: a
-11: a
-12: a
-13: a
-14: a
-
-"(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)"I
-Capturing subpattern count = 101
-No options
-First char = 'a'
-Need char = 'a'
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many substrings
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: a
- 2: a
- 3: a
- 4: a
- 5: a
- 6: a
- 7: a
- 8: a
- 9: a
-10: a
-11: a
-12: a
-13: a
-14: a
-
-/[^()]*(?:\((?R)\)[^()]*)*/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- (this(and)that
- 0:
- (this(and)that)
- 0: (this(and)that)
- (this(and)that)stuff
- 0: (this(and)that)stuff
-
-/[^()]*(?:\((?>(?R))\)[^()]*)*/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- (this(and)that
- 0:
- (this(and)that)
- 0: (this(and)that)
-
-/[^()]*(?:\((?R)\))*[^()]*/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- (this(and)that
- 0:
- (this(and)that)
- 0: (this(and)that)
-
-/(?:\((?R)\))*[^()]*/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- (this(and)that
- 0:
- (this(and)that)
- 0:
- ((this))
- 0: ((this))
-
-/(?:\((?R)\))|[^()]*/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- (this(and)that
- 0:
- (this(and)that)
- 0:
- (this)
- 0: (this)
- ((this))
- 0: ((this))
-
-/\x{0000ff}/I
-Capturing subpattern count = 0
-No options
-First char = \xff
-No need char
-
-/^((?P<A>a1)|(?P<A>a2)b)/I
-Failed: two named subpatterns have the same name at offset 17
-
-/^((?P<A>a1)|(?P<A>a2)b)/IJ
-Capturing subpattern count = 3
-Named capturing subpatterns:
- A 2
- A 3
-Options: anchored dupnames
-No first char
-No need char
- a1b\CA
- 0: a1
- 1: a1
- 2: a1
- C a1 (2) A
- a2b\CA
- 0: a2b
- 1: a2b
- 2: <unset>
- 3: a2
- C a2 (2) A
- ** Failers
-No match
- a1b\CZ\CA
-no parentheses with name "Z"
- 0: a1
- 1: a1
- 2: a1
-copy substring Z failed -7
- C a1 (2) A
-
-/^(?P<A>a)(?P<A>b)/IJ
-Capturing subpattern count = 2
-Named capturing subpatterns:
- A 1
- A 2
-Options: anchored dupnames
-No first char
-No need char
- ab\CA
- 0: ab
- 1: a
- 2: b
- C a (1) A
-
-/^(?P<A>a)(?P<A>b)|cd/IJ
-Capturing subpattern count = 2
-Named capturing subpatterns:
- A 1
- A 2
-Options: dupnames
-No first char
-No need char
- ab\CA
- 0: ab
- 1: a
- 2: b
- C a (1) A
- cd\CA
- 0: cd
-copy substring A failed -7
-
-/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
-Capturing subpattern count = 4
-Named capturing subpatterns:
- A 1
- A 2
- A 3
- A 4
-Options: dupnames
-No first char
-No need char
- cdefgh\CA
- 0: cdefgh
- 1: <unset>
- 2: <unset>
- 3: ef
- 4: gh
- C ef (2) A
-
-/^((?P<A>a1)|(?P<A>a2)b)/IJ
-Capturing subpattern count = 3
-Named capturing subpatterns:
- A 2
- A 3
-Options: anchored dupnames
-No first char
-No need char
- a1b\GA
- 0: a1
- 1: a1
- 2: a1
- G a1 (2) A
- a2b\GA
- 0: a2b
- 1: a2b
- 2: <unset>
- 3: a2
- G a2 (2) A
- ** Failers
-No match
- a1b\GZ\GA
-no parentheses with name "Z"
- 0: a1
- 1: a1
- 2: a1
-get substring Z failed -7
- G a1 (2) A
-
-/^(?P<A>a)(?P<A>b)/IJ
-Capturing subpattern count = 2
-Named capturing subpatterns:
- A 1
- A 2
-Options: anchored dupnames
-No first char
-No need char
- ab\GA
- 0: ab
- 1: a
- 2: b
- G a (1) A
-
-/^(?P<A>a)(?P<A>b)|cd/IJ
-Capturing subpattern count = 2
-Named capturing subpatterns:
- A 1
- A 2
-Options: dupnames
-No first char
-No need char
- ab\GA
- 0: ab
- 1: a
- 2: b
- G a (1) A
- cd\GA
- 0: cd
-get substring A failed -7
-
-/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
-Capturing subpattern count = 4
-Named capturing subpatterns:
- A 1
- A 2
- A 3
- A 4
-Options: dupnames
-No first char
-No need char
- cdefgh\GA
- 0: cdefgh
- 1: <unset>
- 2: <unset>
- 3: ef
- 4: gh
- G ef (2) A
-
-/(?J)^((?P<A>a1)|(?P<A>a2)b)/I
-Capturing subpattern count = 3
-Named capturing subpatterns:
- A 2
- A 3
-Options: anchored dupnames
-Duplicate name status changes
-No first char
-No need char
- a1b\CA
- 0: a1
- 1: a1
- 2: a1
- C a1 (2) A
- a2b\CA
- 0: a2b
- 1: a2b
- 2: <unset>
- 3: a2
- C a2 (2) A
-
-/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
-Failed: two named subpatterns have the same name at offset 37
-
-/ In this next test, J is not set at the outer level; consequently it isn't
-set in the pattern's options; consequently pcre_get_named_substring() produces
-a random value. /Ix
-Capturing subpattern count = 1
-Options: extended
-First char = 'I'
-Need char = 'e'
-
-/^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
-Capturing subpattern count = 4
-Named capturing subpatterns:
- A 1
- B 2
- B 3
- C 4
-Options: anchored
-Duplicate name status changes
-No first char
-No need char
- a bc d\CA\CB\CC
- 0: a bc d
- 1: a
- 2: b
- 3: c
- 4: d
- C a (1) A
- C b (1) B
- C d (1) C
-
-/^(?P<A>a)?(?(A)a|b)/I
-Capturing subpattern count = 1
-Named capturing subpatterns:
- A 1
-Options: anchored
-No first char
-No need char
- aabc
- 0: aa
- 1: a
- bc
- 0: b
- ** Failers
-No match
- abc
-No match
-
-/(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
-Capturing subpattern count = 1
-Named capturing subpatterns:
- ZZ 1
-No options
-No first char
-Need char = 'X'
- bXaX
- 0: bXaX
- 1: X
-
-/(?:(?(2y)a|b)(X))+/I
-Failed: reference to non-existent subpattern at offset 9
-
-/(?:(?(ZA)a|b)(?P<ZZ>X))+/I
-Failed: reference to non-existent subpattern at offset 9
-
-/(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
-Capturing subpattern count = 1
-Named capturing subpatterns:
- ZZ 1
-No options
-No first char
-Need char = 'X'
- bbXaaX
- 0: bbXaaX
- 1: X
-
-/(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
-Capturing subpattern count = 1
-Named capturing subpatterns:
- ZZ 1
-No options
-No first char
-Need char = 'X'
- (b)\\Xa\\X
- 0: (b)\Xa\X
- 1: X
-
-/(?P<ABC/I
-Failed: syntax error in subpattern name (missing terminator) at offset 7
-
-/(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
-Capturing subpattern count = 1
-Max back reference = 1
-Named capturing subpatterns:
- A 1
-No options
-No first char
-No need char
- bXXaYYaY
- 0: bXXaYYaY
- 1: Y
- bXYaXXaX
- 0: bX
- 1: X
-
-/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
-Capturing subpattern count = 10
-Max back reference = 10
-Named capturing subpatterns:
- A 10
-No options
-No first char
-No need char
- bXXaYYaY
- 0: bXXaYYaY
- 1:
- 2:
- 3:
- 4:
- 5:
- 6:
- 7:
- 8:
- 9:
-10: Y
-
-/\s*,\s*/IS
-Capturing subpattern count = 0
-No options
-No first char
-Need char = ','
-Subject length lower bound = 1
-Starting byte set: \x09 \x0a \x0c \x0d \x20 ,
- \x0b,\x0b
- 0: ,
- \x0c,\x0d
- 0: \x0c,\x0d
-
-/^abc/Im
-Capturing subpattern count = 0
-Options: multiline
-First char at start or follows newline
-Need char = 'c'
- xyz\nabc
- 0: abc
- xyz\nabc\<lf>
- 0: abc
- xyz\r\nabc\<lf>
- 0: abc
- xyz\rabc\<cr>
- 0: abc
- xyz\r\nabc\<crlf>
- 0: abc
- ** Failers
-No match
- xyz\nabc\<cr>
-No match
- xyz\r\nabc\<cr>
-No match
- xyz\nabc\<crlf>
-No match
- xyz\rabc\<crlf>
-No match
- xyz\rabc\<lf>
-No match
-
-/abc$/Im<lf>
-Capturing subpattern count = 0
-Options: multiline
-Forced newline sequence: LF
-First char = 'a'
-Need char = 'c'
- xyzabc
- 0: abc
- xyzabc\n
- 0: abc
- xyzabc\npqr
- 0: abc
- xyzabc\r\<cr>
- 0: abc
- xyzabc\rpqr\<cr>
- 0: abc
- xyzabc\r\n\<crlf>
- 0: abc
- xyzabc\r\npqr\<crlf>
- 0: abc
- ** Failers
-No match
- xyzabc\r
-No match
- xyzabc\rpqr
-No match
- xyzabc\r\n
-No match
- xyzabc\r\npqr
-No match
-
-/^abc/Im<cr>
-Capturing subpattern count = 0
-Options: multiline
-Forced newline sequence: CR
-First char at start or follows newline
-Need char = 'c'
- xyz\rabcdef
- 0: abc
- xyz\nabcdef\<lf>
- 0: abc
- ** Failers
-No match
- xyz\nabcdef
-No match
-
-/^abc/Im<lf>
-Capturing subpattern count = 0
-Options: multiline
-Forced newline sequence: LF
-First char at start or follows newline
-Need char = 'c'
- xyz\nabcdef
- 0: abc
- xyz\rabcdef\<cr>
- 0: abc
- ** Failers
-No match
- xyz\rabcdef
-No match
-
-/^abc/Im<crlf>
-Capturing subpattern count = 0
-Options: multiline
-Forced newline sequence: CRLF
-First char at start or follows newline
-Need char = 'c'
- xyz\r\nabcdef
- 0: abc
- xyz\rabcdef\<cr>
- 0: abc
- ** Failers
-No match
- xyz\rabcdef
-No match
-
-/^abc/Im<bad>
-Unknown newline type at: <bad>
-
-
-/abc/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-Need char = 'c'
- xyz\rabc\<bad>
-Unknown newline type at: <bad>
- abc
- 0: abc
-
-/.*/I<lf>
-Capturing subpattern count = 0
-Options:
-Forced newline sequence: LF
-First char at start or follows newline
-No need char
- abc\ndef
- 0: abc
- abc\rdef
- 0: abc\x0ddef
- abc\r\ndef
- 0: abc\x0d
- \<cr>abc\ndef
- 0: abc\x0adef
- \<cr>abc\rdef
- 0: abc
- \<cr>abc\r\ndef
- 0: abc
- \<crlf>abc\ndef
- 0: abc\x0adef
- \<crlf>abc\rdef
- 0: abc\x0ddef
- \<crlf>abc\r\ndef
- 0: abc
-
-/\w+(.)(.)?def/Is
-Capturing subpattern count = 2
-Options: dotall
-No first char
-Need char = 'f'
- abc\ndef
- 0: abc\x0adef
- 1: \x0a
- abc\rdef
- 0: abc\x0ddef
- 1: \x0d
- abc\r\ndef
- 0: abc\x0d\x0adef
- 1: \x0d
- 2: \x0a
-
-+((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
- /* this is a C style comment */\M
-Minimum match() limit = 120
-Minimum match() recursion limit = 6
- 0: /* this is a C style comment */
- 1: /* this is a C style comment */
-
-/(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
-Capturing subpattern count = 1
-Named capturing subpatterns:
- B 1
-No options
-No first char
-Need char = '.'
-
-/()()()()()()()()()()()()()()()()()()()()
- ()()()()()()()()()()()()()()()()()()()()
- ()()()()()()()()()()()()()()()()()()()()
- ()()()()()()()()()()()()()()()()()()()()
- ()()()()()()()()()()()()()()()()()()()()
- (.(.))/Ix
-Capturing subpattern count = 102
-Options: extended
-No first char
-No need char
- XY\O400
- 0: XY
- 1:
- 2:
- 3:
- 4:
- 5:
- 6:
- 7:
- 8:
- 9:
-10:
-11:
-12:
-13:
-14:
-15:
-16:
-17:
-18:
-19:
-20:
-21:
-22:
-23:
-24:
-25:
-26:
-27:
-28:
-29:
-30:
-31:
-32:
-33:
-34:
-35:
-36:
-37:
-38:
-39:
-40:
-41:
-42:
-43:
-44:
-45:
-46:
-47:
-48:
-49:
-50:
-51:
-52:
-53:
-54:
-55:
-56:
-57:
-58:
-59:
-60:
-61:
-62:
-63:
-64:
-65:
-66:
-67:
-68:
-69:
-70:
-71:
-72:
-73:
-74:
-75:
-76:
-77:
-78:
-79:
-80:
-81:
-82:
-83:
-84:
-85:
-86:
-87:
-88:
-89:
-90:
-91:
-92:
-93:
-94:
-95:
-96:
-97:
-98:
-99:
-100:
-101: XY
-102: Y
-
-/(a*b|(?i:c*(?-i)d))/IS
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: C a b c d
-
-/()[ab]xyz/IS
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'z'
-Subject length lower bound = 4
-Starting byte set: a b
-
-/(|)[ab]xyz/IS
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'z'
-Subject length lower bound = 4
-Starting byte set: a b
-
-/(|c)[ab]xyz/IS
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'z'
-Subject length lower bound = 4
-Starting byte set: a b c
-
-/(|c?)[ab]xyz/IS
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'z'
-Subject length lower bound = 4
-Starting byte set: a b c
-
-/(d?|c?)[ab]xyz/IS
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'z'
-Subject length lower bound = 4
-Starting byte set: a b c d
-
-/(d?|c)[ab]xyz/IS
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'z'
-Subject length lower bound = 4
-Starting byte set: a b c d
-
-/^a*b\d/DZ
-------------------------------------------------------------------
- Bra
- ^
- a*+
- b
- \d
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-Need char = 'b'
-
-/^a*+b\d/DZ
-------------------------------------------------------------------
- Bra
- ^
- a*+
- b
- \d
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-Need char = 'b'
-
-/^a*?b\d/DZ
-------------------------------------------------------------------
- Bra
- ^
- a*+
- b
- \d
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-Need char = 'b'
-
-/^a+A\d/DZ
-------------------------------------------------------------------
- Bra
- ^
- a++
- A
- \d
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored
-No first char
-Need char = 'A'
- aaaA5
- 0: aaaA5
- ** Failers
-No match
- aaaa5
-No match
-
-/^a*A\d/IiDZ
-------------------------------------------------------------------
- Bra
- ^
- /i a*
- /i A
- \d
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored caseless
-No first char
-Need char = 'A' (caseless)
- aaaA5
- 0: aaaA5
- aaaa5
- 0: aaaa5
-
-/(a*|b*)[cd]/IS
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b c d
-
-/(a+|b*)[cd]/IS
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b c d
-
-/(a*|b+)[cd]/IS
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a b c d
-
-/(a+|b+)[cd]/IS
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: a b
-
-/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
- ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
- (((
- a
- ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
- ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
- )))
-/Ix
-Capturing subpattern count = 203
-Options: extended
-First char = 'a'
-No need char
- large nest
-Matched, but too many substrings
- 0: a
- 1: a
- 2: a
- 3: a
- 4: a
- 5: a
- 6: a
- 7: a
- 8: a
- 9: a
-10: a
-11: a
-12: a
-13: a
-14: a
-
-/a*\d/BZ
-------------------------------------------------------------------
- Bra
- a*+
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/a*\D/BZ
-------------------------------------------------------------------
- Bra
- a*
- \D
- Ket
- End
-------------------------------------------------------------------
-
-/0*\d/BZ
-------------------------------------------------------------------
- Bra
- 0*
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/0*\D/BZ
-------------------------------------------------------------------
- Bra
- 0*+
- \D
- Ket
- End
-------------------------------------------------------------------
-
-/a*\s/BZ
-------------------------------------------------------------------
- Bra
- a*+
- \s
- Ket
- End
-------------------------------------------------------------------
-
-/a*\S/BZ
-------------------------------------------------------------------
- Bra
- a*
- \S
- Ket
- End
-------------------------------------------------------------------
-
-/ *\s/BZ
-------------------------------------------------------------------
- Bra
- *
- \s
- Ket
- End
-------------------------------------------------------------------
-
-/ *\S/BZ
-------------------------------------------------------------------
- Bra
- *+
- \S
- Ket
- End
-------------------------------------------------------------------
-
-/a*\w/BZ
-------------------------------------------------------------------
- Bra
- a*
- \w
- Ket
- End
-------------------------------------------------------------------
-
-/a*\W/BZ
-------------------------------------------------------------------
- Bra
- a*+
- \W
- Ket
- End
-------------------------------------------------------------------
-
-/=*\w/BZ
-------------------------------------------------------------------
- Bra
- =*+
- \w
- Ket
- End
-------------------------------------------------------------------
-
-/=*\W/BZ
-------------------------------------------------------------------
- Bra
- =*
- \W
- Ket
- End
-------------------------------------------------------------------
-
-/\d*a/BZ
-------------------------------------------------------------------
- Bra
- \d*+
- a
- Ket
- End
-------------------------------------------------------------------
-
-/\d*2/BZ
-------------------------------------------------------------------
- Bra
- \d*
- 2
- Ket
- End
-------------------------------------------------------------------
-
-/\d*\d/BZ
-------------------------------------------------------------------
- Bra
- \d*
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/\d*\D/BZ
-------------------------------------------------------------------
- Bra
- \d*+
- \D
- Ket
- End
-------------------------------------------------------------------
-
-/\d*\s/BZ
-------------------------------------------------------------------
- Bra
- \d*+
- \s
- Ket
- End
-------------------------------------------------------------------
-
-/\d*\S/BZ
-------------------------------------------------------------------
- Bra
- \d*
- \S
- Ket
- End
-------------------------------------------------------------------
-
-/\d*\w/BZ
-------------------------------------------------------------------
- Bra
- \d*
- \w
- Ket
- End
-------------------------------------------------------------------
-
-/\d*\W/BZ
-------------------------------------------------------------------
- Bra
- \d*+
- \W
- Ket
- End
-------------------------------------------------------------------
-
-/\D*a/BZ
-------------------------------------------------------------------
- Bra
- \D*
- a
- Ket
- End
-------------------------------------------------------------------
-
-/\D*2/BZ
-------------------------------------------------------------------
- Bra
- \D*+
- 2
- Ket
- End
-------------------------------------------------------------------
-
-/\D*\d/BZ
-------------------------------------------------------------------
- Bra
- \D*+
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/\D*\D/BZ
-------------------------------------------------------------------
- Bra
- \D*
- \D
- Ket
- End
-------------------------------------------------------------------
-
-/\D*\s/BZ
-------------------------------------------------------------------
- Bra
- \D*
- \s
- Ket
- End
-------------------------------------------------------------------
-
-/\D*\S/BZ
-------------------------------------------------------------------
- Bra
- \D*
- \S
- Ket
- End
-------------------------------------------------------------------
-
-/\D*\w/BZ
-------------------------------------------------------------------
- Bra
- \D*
- \w
- Ket
- End
-------------------------------------------------------------------
-
-/\D*\W/BZ
-------------------------------------------------------------------
- Bra
- \D*
- \W
- Ket
- End
-------------------------------------------------------------------
-
-/\s*a/BZ
-------------------------------------------------------------------
- Bra
- \s*+
- a
- Ket
- End
-------------------------------------------------------------------
-
-/\s*2/BZ
-------------------------------------------------------------------
- Bra
- \s*+
- 2
- Ket
- End
-------------------------------------------------------------------
-
-/\s*\d/BZ
-------------------------------------------------------------------
- Bra
- \s*+
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/\s*\D/BZ
-------------------------------------------------------------------
- Bra
- \s*
- \D
- Ket
- End
-------------------------------------------------------------------
-
-/\s*\s/BZ
-------------------------------------------------------------------
- Bra
- \s*
- \s
- Ket
- End
-------------------------------------------------------------------
-
-/\s*\S/BZ
-------------------------------------------------------------------
- Bra
- \s*+
- \S
- Ket
- End
-------------------------------------------------------------------
-
-/\s*\w/BZ
-------------------------------------------------------------------
- Bra
- \s*+
- \w
- Ket
- End
-------------------------------------------------------------------
-
-/\s*\W/BZ
-------------------------------------------------------------------
- Bra
- \s*
- \W
- Ket
- End
-------------------------------------------------------------------
-
-/\S*a/BZ
-------------------------------------------------------------------
- Bra
- \S*
- a
- Ket
- End
-------------------------------------------------------------------
-
-/\S*2/BZ
-------------------------------------------------------------------
- Bra
- \S*
- 2
- Ket
- End
-------------------------------------------------------------------
-
-/\S*\d/BZ
-------------------------------------------------------------------
- Bra
- \S*
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/\S*\D/BZ
-------------------------------------------------------------------
- Bra
- \S*
- \D
- Ket
- End
-------------------------------------------------------------------
-
-/\S*\s/BZ
-------------------------------------------------------------------
- Bra
- \S*+
- \s
- Ket
- End
-------------------------------------------------------------------
-
-/\S*\S/BZ
-------------------------------------------------------------------
- Bra
- \S*
- \S
- Ket
- End
-------------------------------------------------------------------
-
-/\S*\w/BZ
-------------------------------------------------------------------
- Bra
- \S*
- \w
- Ket
- End
-------------------------------------------------------------------
-
-/\S*\W/BZ
-------------------------------------------------------------------
- Bra
- \S*
- \W
- Ket
- End
-------------------------------------------------------------------
-
-/\w*a/BZ
-------------------------------------------------------------------
- Bra
- \w*
- a
- Ket
- End
-------------------------------------------------------------------
-
-/\w*2/BZ
-------------------------------------------------------------------
- Bra
- \w*
- 2
- Ket
- End
-------------------------------------------------------------------
-
-/\w*\d/BZ
-------------------------------------------------------------------
- Bra
- \w*
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/\w*\D/BZ
-------------------------------------------------------------------
- Bra
- \w*
- \D
- Ket
- End
-------------------------------------------------------------------
-
-/\w*\s/BZ
-------------------------------------------------------------------
- Bra
- \w*+
- \s
- Ket
- End
-------------------------------------------------------------------
-
-/\w*\S/BZ
-------------------------------------------------------------------
- Bra
- \w*
- \S
- Ket
- End
-------------------------------------------------------------------
-
-/\w*\w/BZ
-------------------------------------------------------------------
- Bra
- \w*
- \w
- Ket
- End
-------------------------------------------------------------------
-
-/\w*\W/BZ
-------------------------------------------------------------------
- Bra
- \w*+
- \W
- Ket
- End
-------------------------------------------------------------------
-
-/\W*a/BZ
-------------------------------------------------------------------
- Bra
- \W*+
- a
- Ket
- End
-------------------------------------------------------------------
-
-/\W*2/BZ
-------------------------------------------------------------------
- Bra
- \W*+
- 2
- Ket
- End
-------------------------------------------------------------------
-
-/\W*\d/BZ
-------------------------------------------------------------------
- Bra
- \W*+
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/\W*\D/BZ
-------------------------------------------------------------------
- Bra
- \W*
- \D
- Ket
- End
-------------------------------------------------------------------
-
-/\W*\s/BZ
-------------------------------------------------------------------
- Bra
- \W*
- \s
- Ket
- End
-------------------------------------------------------------------
-
-/\W*\S/BZ
-------------------------------------------------------------------
- Bra
- \W*
- \S
- Ket
- End
-------------------------------------------------------------------
-
-/\W*\w/BZ
-------------------------------------------------------------------
- Bra
- \W*+
- \w
- Ket
- End
-------------------------------------------------------------------
-
-/\W*\W/BZ
-------------------------------------------------------------------
- Bra
- \W*
- \W
- Ket
- End
-------------------------------------------------------------------
-
-/[^a]+a/BZ
-------------------------------------------------------------------
- Bra
- [^a]++
- a
- Ket
- End
-------------------------------------------------------------------
-
-/[^a]+a/BZi
-------------------------------------------------------------------
- Bra
- /i [^a]++
- /i a
- Ket
- End
-------------------------------------------------------------------
-
-/[^a]+A/BZi
-------------------------------------------------------------------
- Bra
- /i [^a]++
- /i A
- Ket
- End
-------------------------------------------------------------------
-
-/[^a]+b/BZ
-------------------------------------------------------------------
- Bra
- [^a]+
- b
- Ket
- End
-------------------------------------------------------------------
-
-/[^a]+\d/BZ
-------------------------------------------------------------------
- Bra
- [^a]+
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/a*[^a]/BZ
-------------------------------------------------------------------
- Bra
- a*
- [^a]
- Ket
- End
-------------------------------------------------------------------
-
-/(?P<abc>x)(?P<xyz>y)/I
-Capturing subpattern count = 2
-Named capturing subpatterns:
- abc 1
- xyz 2
-No options
-First char = 'x'
-Need char = 'y'
- xy\Cabc\Cxyz
- 0: xy
- 1: x
- 2: y
- C x (1) abc
- C y (1) xyz
-
-/(?<abc>x)(?'xyz'y)/I
-Capturing subpattern count = 2
-Named capturing subpatterns:
- abc 1
- xyz 2
-No options
-First char = 'x'
-Need char = 'y'
- xy\Cabc\Cxyz
- 0: xy
- 1: x
- 2: y
- C x (1) abc
- C y (1) xyz
-
-/(?<abc'x)(?'xyz'y)/I
-Failed: syntax error in subpattern name (missing terminator) at offset 6
-
-/(?<abc>x)(?'xyz>y)/I
-Failed: syntax error in subpattern name (missing terminator) at offset 15
-
-/(?P'abc'x)(?P<xyz>y)/I
-Failed: unrecognized character after (?P at offset 3
-
-/^(?:(?(ZZ)a|b)(?<ZZ>X))+/
- bXaX
- 0: bXaX
- 1: X
- bXbX
- 0: bX
- 1: X
- ** Failers
-No match
- aXaX
-No match
- aXbX
-No match
-
-/^(?P>abc)(?<abcd>xxx)/
-Failed: reference to non-existent subpattern at offset 8
-
-/^(?P>abc)(?<abc>x|y)/
- xx
- 0: xx
- 1: x
- xy
- 0: xy
- 1: y
- yy
- 0: yy
- 1: y
- yx
- 0: yx
- 1: x
-
-/^(?P>abc)(?P<abc>x|y)/
- xx
- 0: xx
- 1: x
- xy
- 0: xy
- 1: y
- yy
- 0: yy
- 1: y
- yx
- 0: yx
- 1: x
-
-/^((?(abc)a|b)(?<abc>x|y))+/
- bxay
- 0: bxay
- 1: ay
- 2: y
- bxby
- 0: bx
- 1: bx
- 2: x
- ** Failers
-No match
- axby
-No match
-
-/^(((?P=abc)|X)(?<abc>x|y))+/
- XxXxxx
- 0: XxXxxx
- 1: xx
- 2: x
- 3: x
- XxXyyx
- 0: XxXyyx
- 1: yx
- 2: y
- 3: x
- XxXyxx
- 0: XxXy
- 1: Xy
- 2: X
- 3: y
- ** Failers
-No match
- x
-No match
-
-/^(?1)(abc)/
- abcabc
- 0: abcabc
- 1: abc
-
-/^(?:(?:\1|X)(a|b))+/
- Xaaa
- 0: Xaaa
- 1: a
- Xaba
- 0: Xa
- 1: a
-
-/^[\E\Qa\E-\Qz\E]+/BZ
-------------------------------------------------------------------
- Bra
- ^
- [a-z]+
- Ket
- End
-------------------------------------------------------------------
-
-/^[a\Q]bc\E]/BZ
-------------------------------------------------------------------
- Bra
- ^
- [\]a-c]
- Ket
- End
-------------------------------------------------------------------
-
-/^[a-\Q\E]/BZ
-------------------------------------------------------------------
- Bra
- ^
- [\-a]
- Ket
- End
-------------------------------------------------------------------
-
-/^(?P>abc)[()](?<abc>)/BZ
-------------------------------------------------------------------
- Bra
- ^
- Recurse
- [()]
- CBra 1
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/^((?(abc)y)[()](?P<abc>x))+/BZ
-------------------------------------------------------------------
- Bra
- ^
- CBra 1
- Cond
- 2 Cond nref
- y
- Ket
- [()]
- CBra 2
- x
- Ket
- KetRmax
- Ket
- End
-------------------------------------------------------------------
- (xy)x
- 0: (xy)x
- 1: y)x
- 2: x
-
-/^(?P>abc)\Q()\E(?<abc>)/BZ
-------------------------------------------------------------------
- Bra
- ^
- Recurse
- ()
- CBra 1
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
-------------------------------------------------------------------
- Bra
- ^
- Recurse
- [(\]a]
- CBra 1
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/^(?P>abc) # this is (a comment)
- (?<abc>)/BZx
-------------------------------------------------------------------
- Bra
- ^
- Recurse
- CBra 1
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
-Capturing subpattern count = 4
-Max back reference = 4
-Named capturing subpatterns:
- four 4
- one 1
- three 3
- two 2
-Options: anchored caseless
-No first char
-No need char
- 1221
- 0: 1221
- 1: 1221
- 2: 1
- Satan, oscillate my metallic sonatas!
- 0: Satan, oscillate my metallic sonatas!
- 1: <unset>
- 2: <unset>
- 3: Satan, oscillate my metallic sonatas
- 4: S
- A man, a plan, a canal: Panama!
- 0: A man, a plan, a canal: Panama!
- 1: <unset>
- 2: <unset>
- 3: A man, a plan, a canal: Panama
- 4: A
- Able was I ere I saw Elba.
- 0: Able was I ere I saw Elba.
- 1: <unset>
- 2: <unset>
- 3: Able was I ere I saw Elba
- 4: A
- *** Failers
-No match
- The quick brown fox
-No match
-
-/(?=(\w+))\1:/I
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-No first char
-Need char = ':'
- abcd:
- 0: abcd:
- 1: abcd
-
-/(?=(?'abc'\w+))\k<abc>:/I
-Capturing subpattern count = 1
-Max back reference = 1
-Named capturing subpatterns:
- abc 1
-No options
-No first char
-Need char = ':'
- abcd:
- 0: abcd:
- 1: abcd
-
-/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
- adaa
- 0: adaa
- 1: a
- 2: d
- ** Failers
-No match
- addd
-No match
- adbb
-No match
-
-/(?'abc'a|b)(?<abc>d|e)(?&abc){2}/J
- bdaa
- 0: bdaa
- 1: b
- 2: d
- bdab
- 0: bdab
- 1: b
- 2: d
- ** Failers
-No match
- bddd
-No match
-
-/(?(<bc))/
-Failed: malformed number or name after (?( at offset 6
-
-/(?(''))/
-Failed: assertion expected after (?( at offset 4
-
-/(?('R')stuff)/
-Failed: reference to non-existent subpattern at offset 7
-
-/((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) /x
- abcabc1Xabc2XabcXabcabc
- 0: abcabc1Xabc2XabcX
- 1: abcabc1Xabc2XabcX
- 2: abcabc1Xabc2XabcX
-
-/(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
- abcabc1Xabc2XabcXabcabc
- 0: abcabc1Xabc2XabcX
- 1: abcabc1Xabc2XabcX
- 2: abcabc1Xabc2XabcX
-
-/(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
-Failed: reference to non-existent subpattern at offset 29
-
-/(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
- abcabc1Xabc2XabcXabcabc
- 0: abcabc1Xabc2XabcX
- 1: abcabc1Xabc2XabcX
- 2: abcabc1Xabc2XabcX
-
-/^(?(DEFINE) abc | xyz ) /x
-Failed: DEFINE group contains more than one branch at offset 22
-
-/(?(DEFINE) abc) xyz/xI
-Capturing subpattern count = 0
-Options: extended
-First char = 'x'
-Need char = 'z'
-
-/(a|)*\d/
- \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-Matched, but too many substrings
-
-/^a.b/<lf>
- a\rb
- 0: a\x0db
- a\nb\<cr>
- 0: a\x0ab
- a\x85b\<anycrlf>
- 0: a\x85b
- ** Failers
-No match
- a\nb
-No match
- a\nb\<any>
-No match
- a\rb\<cr>
-No match
- a\rb\<any>
-No match
- a\x85b\<any>
-No match
- a\rb\<anycrlf>
-No match
-
-/^abc./mgx<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc7
-
-/abc.$/mgx<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc9
-
-/a/<cr><any>
-
-/a/<any><crlf>
-Failed: inconsistent NEWLINE options at offset 0
-
-/^a\Rb/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- ** Failers
-No match
- a\n\rb
-No match
-
-/^a\R*b/<bsr_unicode>
- ab
- 0: ab
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85\x0cb
- 0: a\x0a\x0d\x85\x0cb
-
-/^a\R+b/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85\x0cb
- 0: a\x0a\x0d\x85\x0cb
- ** Failers
-No match
- ab
-No match
-
-/^a\R{1,3}b/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85b
- 0: a\x0a\x0d\x85b
- a\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0ab
- a\r\n\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0a\x0d\x0ab
- a\n\r\n\rb
- 0: a\x0a\x0d\x0a\x0db
- a\n\n\r\nb
- 0: a\x0a\x0a\x0d\x0ab
- ** Failers
-No match
- a\n\n\n\rb
-No match
- a\r
-No match
-
-/^a[\R]b/<bsr_unicode>
- aRb
- 0: aRb
- ** Failers
-No match
- a\nb
-No match
-
-/(?&abc)X(?<abc>P)/I
-Capturing subpattern count = 1
-Named capturing subpatterns:
- abc 1
-No options
-No first char
-Need char = 'P'
- abcPXP123
- 0: PXP
- 1: P
-
-/(?1)X(?<abc>P)/I
-Capturing subpattern count = 1
-Named capturing subpatterns:
- abc 1
-No options
-No first char
-Need char = 'P'
- abcPXP123
- 0: PXP
- 1: P
-
-/(?:a(?&abc)b)*(?<abc>x)/
- 123axbaxbaxbx456
- 0: axbaxbaxbx
- 1: x
- 123axbaxbaxb456
- 0: x
- 1: x
-
-/(?:a(?&abc)b){1,5}(?<abc>x)/
- 123axbaxbaxbx456
- 0: axbaxbaxbx
- 1: x
-
-/(?:a(?&abc)b){2,5}(?<abc>x)/
- 123axbaxbaxbx456
- 0: axbaxbaxbx
- 1: x
-
-/(?:a(?&abc)b){2,}(?<abc>x)/
- 123axbaxbaxbx456
- 0: axbaxbaxbx
- 1: x
-
-/(abc)(?i:(?1))/
- defabcabcxyz
- 0: abcabc
- 1: abc
- DEFabcABCXYZ
-No match
-
-/(abc)(?:(?i)(?1))/
- defabcabcxyz
- 0: abcabc
- 1: abc
- DEFabcABCXYZ
-No match
-
-/^(a)\g-2/
-Failed: reference to non-existent subpattern at offset 7
-
-/^(a)\g/
-Failed: a numbered reference must not be zero at offset 5
-
-/^(a)\g{0}/
-Failed: a numbered reference must not be zero at offset 8
-
-/^(a)\g{3/
-Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 8
-
-/^(a)\g{4a}/
-Failed: reference to non-existent subpattern at offset 9
-
-/^a.b/<lf>
- a\rb
- 0: a\x0db
- *** Failers
-No match
- a\nb
-No match
-
-/.+foo/
- afoo
- 0: afoo
- ** Failers
-No match
- \r\nfoo
-No match
- \nfoo
-No match
-
-/.+foo/<crlf>
- afoo
- 0: afoo
- \nfoo
- 0: \x0afoo
- ** Failers
-No match
- \r\nfoo
-No match
-
-/.+foo/<any>
- afoo
- 0: afoo
- ** Failers
-No match
- \nfoo
-No match
- \r\nfoo
-No match
-
-/.+foo/s
- afoo
- 0: afoo
- \r\nfoo
- 0: \x0d\x0afoo
- \nfoo
- 0: \x0afoo
-
-/^$/mg<any>
- abc\r\rxyz
- 0:
- abc\n\rxyz
- 0:
- ** Failers
-No match
- abc\r\nxyz
-No match
-
-/(?m)^$/<any>g+
- abc\r\n\r\n
- 0:
- 0+ \x0d\x0a
-
-/(?m)^$|^\r\n/<any>g+
- abc\r\n\r\n
- 0:
- 0+ \x0d\x0a
- 0: \x0d\x0a
- 0+
-
-/(?m)$/<any>g+
- abc\r\n\r\n
- 0:
- 0+ \x0d\x0a\x0d\x0a
- 0:
- 0+ \x0d\x0a
- 0:
- 0+
-
-/abc.$/mgx<anycrlf>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
- 0: abc1
- 0: abc4
- 0: abc5
- 0: abc9
-
-/^X/m
- XABC
- 0: X
- ** Failers
-No match
- XABC\B
-No match
-
-/(ab|c)(?-1)/BZ
-------------------------------------------------------------------
- Bra
- CBra 1
- ab
- Alt
- c
- Ket
- Recurse
- Ket
- End
-------------------------------------------------------------------
- abc
- 0: abc
- 1: ab
-
-/xy(?+1)(abc)/BZ
-------------------------------------------------------------------
- Bra
- xy
- Recurse
- CBra 1
- abc
- Ket
- Ket
- End
-------------------------------------------------------------------
- xyabcabc
- 0: xyabcabc
- 1: abc
- ** Failers
-No match
- xyabc
-No match
-
-/x(?-0)y/
-Failed: a numbered reference must not be zero at offset 5
-
-/x(?-1)y/
-Failed: reference to non-existent subpattern at offset 5
-
-/x(?+0)y/
-Failed: a numbered reference must not be zero at offset 5
-
-/x(?+1)y/
-Failed: reference to non-existent subpattern at offset 5
-
-/^(abc)?(?(-1)X|Y)/BZ
-------------------------------------------------------------------
- Bra
- ^
- Brazero
- CBra 1
- abc
- Ket
- Cond
- 1 Cond ref
- X
- Alt
- Y
- Ket
- Ket
- End
-------------------------------------------------------------------
- abcX
- 0: abcX
- 1: abc
- Y
- 0: Y
- ** Failers
-No match
- abcY
-No match
-
-/^((?(+1)X|Y)(abc))+/BZ
-------------------------------------------------------------------
- Bra
- ^
- CBra 1
- Cond
- 2 Cond ref
- X
- Alt
- Y
- Ket
- CBra 2
- abc
- Ket
- KetRmax
- Ket
- End
-------------------------------------------------------------------
- YabcXabc
- 0: YabcXabc
- 1: Xabc
- 2: abc
- YabcXabcXabc
- 0: YabcXabcXabc
- 1: Xabc
- 2: abc
- ** Failers
-No match
- XabcXabc
-No match
-
-/(?(-1)a)/BZ
-Failed: reference to non-existent subpattern at offset 6
-
-/((?(-1)a))/BZ
-------------------------------------------------------------------
- Bra
- CBra 1
- Cond
- 1 Cond ref
- a
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/((?(-2)a))/BZ
-Failed: reference to non-existent subpattern at offset 7
-
-/^(?(+1)X|Y)(.)/BZ
-------------------------------------------------------------------
- Bra
- ^
- Cond
- 1 Cond ref
- X
- Alt
- Y
- Ket
- CBra 1
- Any
- Ket
- Ket
- End
-------------------------------------------------------------------
- Y!
- 0: Y!
- 1: !
-
-/(?<A>tom|bon)-\k{A}/
- tom-tom
- 0: tom-tom
- 1: tom
- bon-bon
- 0: bon-bon
- 1: bon
- ** Failers
-No match
- tom-bon
-No match
-
-/\g{A/
-Failed: syntax error in subpattern name (missing terminator) at offset 4
-
-/(?|(abc)|(xyz))/BZ
-------------------------------------------------------------------
- Bra
- Bra
- CBra 1
- abc
- Ket
- Alt
- CBra 1
- xyz
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
- >abc<
- 0: abc
- 1: abc
- >xyz<
- 0: xyz
- 1: xyz
-
-/(x)(?|(abc)|(xyz))(x)/BZ
-------------------------------------------------------------------
- Bra
- CBra 1
- x
- Ket
- Bra
- CBra 2
- abc
- Ket
- Alt
- CBra 2
- xyz
- Ket
- Ket
- CBra 3
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
- xabcx
- 0: xabcx
- 1: x
- 2: abc
- 3: x
- xxyzx
- 0: xxyzx
- 1: x
- 2: xyz
- 3: x
-
-/(x)(?|(abc)(pqr)|(xyz))(x)/BZ
-------------------------------------------------------------------
- Bra
- CBra 1
- x
- Ket
- Bra
- CBra 2
- abc
- Ket
- CBra 3
- pqr
- Ket
- Alt
- CBra 2
- xyz
- Ket
- Ket
- CBra 4
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
- xabcpqrx
- 0: xabcpqrx
- 1: x
- 2: abc
- 3: pqr
- 4: x
- xxyzx
- 0: xxyzx
- 1: x
- 2: xyz
- 3: <unset>
- 4: x
-
-/\H++X/BZ
-------------------------------------------------------------------
- Bra
- \H++
- X
- Ket
- End
-------------------------------------------------------------------
- ** Failers
-No match
- XXXX
-No match
-
-/\H+\hY/BZ
-------------------------------------------------------------------
- Bra
- \H++
- \h
- Y
- Ket
- End
-------------------------------------------------------------------
- XXXX Y
- 0: XXXX Y
-
-/\H+ Y/BZ
-------------------------------------------------------------------
- Bra
- \H++
- Y
- Ket
- End
-------------------------------------------------------------------
-
-/\h+A/BZ
-------------------------------------------------------------------
- Bra
- \h++
- A
- Ket
- End
-------------------------------------------------------------------
-
-/\v*B/BZ
-------------------------------------------------------------------
- Bra
- \v*+
- B
- Ket
- End
-------------------------------------------------------------------
-
-/\V+\x0a/BZ
-------------------------------------------------------------------
- Bra
- \V++
- \x0a
- Ket
- End
-------------------------------------------------------------------
-
-/A+\h/BZ
-------------------------------------------------------------------
- Bra
- A++
- \h
- Ket
- End
-------------------------------------------------------------------
-
-/ *\H/BZ
-------------------------------------------------------------------
- Bra
- *+
- \H
- Ket
- End
-------------------------------------------------------------------
-
-/A*\v/BZ
-------------------------------------------------------------------
- Bra
- A*+
- \v
- Ket
- End
-------------------------------------------------------------------
-
-/\x0b*\V/BZ
-------------------------------------------------------------------
- Bra
- \x0b*+
- \V
- Ket
- End
-------------------------------------------------------------------
-
-/\d+\h/BZ
-------------------------------------------------------------------
- Bra
- \d++
- \h
- Ket
- End
-------------------------------------------------------------------
-
-/\d*\v/BZ
-------------------------------------------------------------------
- Bra
- \d*+
- \v
- Ket
- End
-------------------------------------------------------------------
-
-/S+\h\S+\v/BZ
-------------------------------------------------------------------
- Bra
- S++
- \h
- \S++
- \v
- Ket
- End
-------------------------------------------------------------------
-
-/\w{3,}\h\w+\v/BZ
-------------------------------------------------------------------
- Bra
- \w{3}
- \w*+
- \h
- \w++
- \v
- Ket
- End
-------------------------------------------------------------------
-
-/\h+\d\h+\w\h+\S\h+\H/BZ
-------------------------------------------------------------------
- Bra
- \h++
- \d
- \h++
- \w
- \h++
- \S
- \h++
- \H
- Ket
- End
-------------------------------------------------------------------
-
-/\v+\d\v+\w\v+\S\v+\V/BZ
-------------------------------------------------------------------
- Bra
- \v++
- \d
- \v++
- \w
- \v+
- \S
- \v++
- \V
- Ket
- End
-------------------------------------------------------------------
-
-/\H+\h\H+\d/BZ
-------------------------------------------------------------------
- Bra
- \H++
- \h
- \H+
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/\V+\v\V+\w/BZ
-------------------------------------------------------------------
- Bra
- \V++
- \v
- \V+
- \w
- Ket
- End
-------------------------------------------------------------------
-
-/\( (?: [^()]* | (?R) )* \)/x
-\J1024(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
- 0: (0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
-
-/[\E]AAA/
-Failed: missing terminating ] for character class at offset 7
-
-/[\Q\E]AAA/
-Failed: missing terminating ] for character class at offset 9
-
-/[^\E]AAA/
-Failed: missing terminating ] for character class at offset 8
-
-/[^\Q\E]AAA/
-Failed: missing terminating ] for character class at offset 10
-
-/[\E^]AAA/
-Failed: missing terminating ] for character class at offset 8
-
-/[\Q\E^]AAA/
-Failed: missing terminating ] for character class at offset 10
-
-/A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ
-------------------------------------------------------------------
- Bra
- A
- *PRUNE
- B
- *SKIP
- C
- *THEN
- D
- *COMMIT
- E
- *FAIL
- F
- *FAIL
- G
- *FAIL
- H
- *ACCEPT
- I
- Ket
- End
-------------------------------------------------------------------
-
-/^a+(*FAIL)/C
- aaaaaa
---->aaaaaa
- +0 ^ ^
- +1 ^ a+
- +3 ^ ^ (*FAIL)
- +3 ^ ^ (*FAIL)
- +3 ^ ^ (*FAIL)
- +3 ^ ^ (*FAIL)
- +3 ^ ^ (*FAIL)
- +3 ^^ (*FAIL)
-No match
-
-/a+b?c+(*FAIL)/C
- aaabccc
---->aaabccc
- +0 ^ a+
- +2 ^ ^ b?
- +4 ^ ^ c+
- +6 ^ ^ (*FAIL)
- +6 ^ ^ (*FAIL)
- +6 ^ ^ (*FAIL)
- +4 ^ ^ c+
- +2 ^ ^ b?
- +4 ^ ^ c+
- +2 ^^ b?
- +4 ^^ c+
- +0 ^ a+
- +2 ^ ^ b?
- +4 ^ ^ c+
- +6 ^ ^ (*FAIL)
- +6 ^ ^ (*FAIL)
- +6 ^ ^ (*FAIL)
- +4 ^ ^ c+
- +2 ^^ b?
- +4 ^^ c+
- +0 ^ a+
- +2 ^^ b?
- +4 ^ ^ c+
- +6 ^ ^ (*FAIL)
- +6 ^ ^ (*FAIL)
- +6 ^ ^ (*FAIL)
- +4 ^^ c+
-No match
-
-/a+b?(*PRUNE)c+(*FAIL)/C
- aaabccc
---->aaabccc
- +0 ^ a+
- +2 ^ ^ b?
- +4 ^ ^ (*PRUNE)
-+12 ^ ^ c+
-+14 ^ ^ (*FAIL)
-+14 ^ ^ (*FAIL)
-+14 ^ ^ (*FAIL)
- +0 ^ a+
- +2 ^ ^ b?
- +4 ^ ^ (*PRUNE)
-+12 ^ ^ c+
-+14 ^ ^ (*FAIL)
-+14 ^ ^ (*FAIL)
-+14 ^ ^ (*FAIL)
- +0 ^ a+
- +2 ^^ b?
- +4 ^ ^ (*PRUNE)
-+12 ^ ^ c+
-+14 ^ ^ (*FAIL)
-+14 ^ ^ (*FAIL)
-+14 ^ ^ (*FAIL)
-No match
-
-/a+b?(*COMMIT)c+(*FAIL)/C
- aaabccc
---->aaabccc
- +0 ^ a+
- +2 ^ ^ b?
- +4 ^ ^ (*COMMIT)
-+13 ^ ^ c+
-+15 ^ ^ (*FAIL)
-+15 ^ ^ (*FAIL)
-+15 ^ ^ (*FAIL)
-No match
-
-/a+b?(*SKIP)c+(*FAIL)/C
- aaabcccaaabccc
---->aaabcccaaabccc
- +0 ^ a+
- +2 ^ ^ b?
- +4 ^ ^ (*SKIP)
-+11 ^ ^ c+
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
- +0 ^ a+
- +2 ^ ^ b?
- +4 ^ ^ (*SKIP)
-+11 ^ ^ c+
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
-No match
-
-/a+b?(*THEN)c+(*FAIL)/C
- aaabccc
---->aaabccc
- +0 ^ a+
- +2 ^ ^ b?
- +4 ^ ^ (*THEN)
-+11 ^ ^ c+
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
- +0 ^ a+
- +2 ^ ^ b?
- +4 ^ ^ (*THEN)
-+11 ^ ^ c+
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
- +0 ^ a+
- +2 ^^ b?
- +4 ^ ^ (*THEN)
-+11 ^ ^ c+
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
-+13 ^ ^ (*FAIL)
-No match
-
-/a(*MARK)b/
-Failed: (*MARK) must have an argument at offset 7
-
-/(?i:A{1,}\6666666666)/
-Failed: number is too big at offset 19
-
-/\g6666666666/
-Failed: number is too big at offset 11
-
-/[\g6666666666]/BZ
-------------------------------------------------------------------
- Bra
- [6g]
- Ket
- End
-------------------------------------------------------------------
-
-/(?1)\c[/
-Failed: reference to non-existent subpattern at offset 3
-
-/.+A/<crlf>
- \r\nA
-No match
-
-/\nA/<crlf>
- \r\nA
- 0: \x0aA
-
-/[\r\n]A/<crlf>
- \r\nA
- 0: \x0aA
-
-/(\r|\n)A/<crlf>
- \r\nA
- 0: \x0aA
- 1: \x0a
-
-/a(*CR)b/
-Failed: (*VERB) not recognized at offset 5
-
-/(*CR)a.b/
- a\nb
- 0: a\x0ab
- ** Failers
-No match
- a\rb
-No match
-
-/(*CR)a.b/<lf>
- a\nb
- 0: a\x0ab
- ** Failers
-No match
- a\rb
-No match
-
-/(*LF)a.b/<CRLF>
- a\rb
- 0: a\x0db
- ** Failers
-No match
- a\nb
-No match
-
-/(*CRLF)a.b/
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- ** Failers
-No match
- a\r\nb
-No match
-
-/(*ANYCRLF)a.b/<CR>
- ** Failers
-No match
- a\rb
-No match
- a\nb
-No match
- a\r\nb
-No match
-
-/(*ANY)a.b/<cr>
- ** Failers
-No match
- a\rb
-No match
- a\nb
-No match
- a\r\nb
-No match
- a\x85b
-No match
-
-/(*ANY).*/g
- abc\r\ndef
- 0: abc
- 0:
- 0: def
- 0:
-
-/(*ANYCRLF).*/g
- abc\r\ndef
- 0: abc
- 0:
- 0: def
- 0:
-
-/(*CRLF).*/g
- abc\r\ndef
- 0: abc
- 0:
- 0: def
- 0:
-
-/a\Rb/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- ** Failers
-No match
- a\x85b
-No match
- a\x0bb
-No match
-
-/a\Rb/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- a\x85b
- 0: a\x85b
- a\x0bb
- 0: a\x0bb
- ** Failers
-No match
- a\x85b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R?b/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- ** Failers
-No match
- a\x85b
-No match
- a\x0bb
-No match
-
-/a\R?b/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- a\x85b
- 0: a\x85b
- a\x0bb
- 0: a\x0bb
- ** Failers
-No match
- a\x85b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R{2,4}b/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\r\n\nb
- 0: a\x0d\x0a\x0ab
- a\n\r\rb
- 0: a\x0a\x0d\x0db
- a\r\n\r\n\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
- ** Failers
-No match
- a\x85\85b
-No match
- a\x0b\0bb
-No match
-
-/a\R{2,4}b/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\r\rb
- 0: a\x0d\x0db
- a\n\n\nb
- 0: a\x0a\x0a\x0ab
- a\r\n\n\r\rb
- 0: a\x0d\x0a\x0a\x0d\x0db
- a\x85\85b
-No match
- a\x0b\0bb
-No match
- ** Failers
-No match
- a\r\r\r\r\rb
-No match
- a\x85\85b\<bsr_anycrlf>
-No match
- a\x0b\0bb\<bsr_anycrlf>
-No match
-
-/(*BSR_ANYCRLF)a\Rb/I
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
-
-/(*BSR_UNICODE)a\Rb/I
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\x85b
- 0: a\x85b
-
-/(*BSR_ANYCRLF)(*CRLF)a\Rb/I
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-Forced newline sequence: CRLF
-First char = 'a'
-Need char = 'b'
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
-
-/(*CRLF)(*BSR_UNICODE)a\Rb/I
-Capturing subpattern count = 0
-Options: bsr_unicode
-Forced newline sequence: CRLF
-First char = 'a'
-Need char = 'b'
- a\x85b
- 0: a\x85b
-
-/(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-Forced newline sequence: CR
-First char = 'a'
-Need char = 'b'
-
-/(?<a>)(?&)/
-Failed: subpattern name expected at offset 9
-
-/(?<abc>)(?&a)/
-Failed: reference to non-existent subpattern at offset 12
-
-/(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
-Failed: reference to non-existent subpattern at offset 32
-
-/(?+-a)/
-Failed: digit expected after (?+ at offset 3
-
-/(?-+a)/
-Failed: unrecognized character after (? or (?- at offset 3
-
-/(?(-1))/
-Failed: reference to non-existent subpattern at offset 6
-
-/(?(+10))/
-Failed: reference to non-existent subpattern at offset 7
-
-/(?(10))/
-Failed: reference to non-existent subpattern at offset 6
-
-/(?(+2))()()/
-
-/(?(2))()()/
-
-/\k''/
-Failed: subpattern name expected at offset 3
-
-/\k<>/
-Failed: subpattern name expected at offset 3
-
-/\k{}/
-Failed: subpattern name expected at offset 3
-
-/\k/
-Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 2
-
-/\kabc/
-Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 5
-
-/(?P=)/
-Failed: subpattern name expected at offset 4
-
-/(?P>)/
-Failed: subpattern name expected at offset 4
-
-/(?!\w)(?R)/
-Failed: recursive call could loop indefinitely at offset 9
-
-/(?=\w)(?R)/
-Failed: recursive call could loop indefinitely at offset 9
-
-/(?<!\w)(?R)/
-Failed: recursive call could loop indefinitely at offset 10
-
-/(?<=\w)(?R)/
-Failed: recursive call could loop indefinitely at offset 10
-
-/[[:foo:]]/
-Failed: unknown POSIX class name at offset 3
-
-/[[:1234:]]/
-Failed: unknown POSIX class name at offset 3
-
-/[[:f\oo:]]/
-Failed: unknown POSIX class name at offset 3
-
-/[[: :]]/
-Failed: unknown POSIX class name at offset 3
-
-/[[:...:]]/
-Failed: unknown POSIX class name at offset 3
-
-/[[:l\ower:]]/
-Failed: unknown POSIX class name at offset 3
-
-/[[:abc\:]]/
-Failed: unknown POSIX class name at offset 3
-
-/[abc[:x\]pqr:]]/
-Failed: unknown POSIX class name at offset 6
-
-/[[:a\dz:]]/
-Failed: unknown POSIX class name at offset 3
-
-/(^(a|b\g<-1'c))/
-Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15
-
-/^(?+1)(?<a>x|y){0}z/
- xzxx
- 0: xz
- yzyy
- 0: yz
- ** Failers
-No match
- xxz
-No match
-
-/(\3)(\1)(a)/
- cat
-No match
-
-/(\3)(\1)(a)/<JS>
- cat
- 0: a
- 1:
- 2:
- 3: a
-
-/TA]/
- The ACTA] comes
- 0: TA]
-
-/TA]/<JS>
-Failed: ] is an invalid data character in JavaScript compatibility mode at offset 2
-
-/(?2)[]a()b](abc)/
-Failed: reference to non-existent subpattern at offset 3
-
-/(?2)[^]a()b](abc)/
-Failed: reference to non-existent subpattern at offset 3
-
-/(?1)[]a()b](abc)/
- abcbabc
- 0: abcbabc
- 1: abc
- ** Failers
-No match
- abcXabc
-No match
-
-/(?1)[^]a()b](abc)/
- abcXabc
- 0: abcXabc
- 1: abc
- ** Failers
-No match
- abcbabc
-No match
-
-/(?2)[]a()b](abc)(xyz)/
- xyzbabcxyz
- 0: xyzbabcxyz
- 1: abc
- 2: xyz
-
-/(?&N)[]a(?<N>)](?<M>abc)/
-Failed: reference to non-existent subpattern at offset 4
-
-/(?&N)[]a(?<N>)](abc)/
-Failed: reference to non-existent subpattern at offset 4
-
-/a[]b/
-Failed: missing terminating ] for character class at offset 4
-
-/a[^]b/
-Failed: missing terminating ] for character class at offset 5
-
-/a[]b/<JS>
- ** Failers
-No match
- ab
-No match
-
-/a[]+b/<JS>
- ** Failers
-No match
- ab
-No match
-
-/a[]*+b/<JS>
- ** Failers
-No match
- ab
-No match
-
-/a[^]b/<JS>
- aXb
- 0: aXb
- a\nb
- 0: a\x0ab
- ** Failers
-No match
- ab
-No match
-
-/a[^]+b/<JS>
- aXb
- 0: aXb
- a\nX\nXb
- 0: a\x0aX\x0aXb
- ** Failers
-No match
- ab
-No match
-
-/a(?!)+b/
-Failed: nothing to repeat at offset 5
-
-/a(*FAIL)+b/
-Failed: nothing to repeat at offset 8
-
-/(abc|pqr|123){0}[xyz]/SI
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: x y z
-
-/(?(?=.*b)b|^)/CI
-Capturing subpattern count = 0
-Options:
-No first char
-No need char
- adc
---->adc
- +0 ^ (?(?=.*b)b|^)
- +2 ^ (?=.*b)
- +5 ^ .*
- +7 ^ ^ b
- +7 ^ ^ b
- +7 ^^ b
- +7 ^ b
-+12 ^ )
-+13 ^
- 0:
- abc
---->abc
- +0 ^ (?(?=.*b)b|^)
- +2 ^ (?=.*b)
- +5 ^ .*
- +7 ^ ^ b
- +7 ^ ^ b
- +7 ^^ b
- +8 ^ ^ )
- +9 ^ b
- +0 ^ (?(?=.*b)b|^)
- +2 ^ (?=.*b)
- +5 ^ .*
- +7 ^ ^ b
- +7 ^^ b
- +7 ^ b
- +8 ^^ )
- +9 ^ b
-+10 ^^ |
-+13 ^^
- 0: b
-
-/(?(?=b).*b|^d)/I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/(?(?=.*b).*b|^d)/I
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-No need char
-
-/xyz/C
- xyz
---->xyz
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
- abcxyz
---->abcxyz
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
- abcxyz\Y
---->abcxyz
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
- ** Failers
-No match
- abc
-No match
- abc\Y
---->abc
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
-No match
- abcxypqr
-No match
- abcxypqr\Y
---->abcxypqr
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
-No match
-
-/(*NO_START_OPT)xyz/C
- abcxyz
---->abcxyz
-+15 ^ x
-+15 ^ x
-+15 ^ x
-+15 ^ x
-+16 ^^ y
-+17 ^ ^ z
-+18 ^ ^
- 0: xyz
-
-/xyz/CY
- abcxyz
---->abcxyz
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
-
-/^"((?(?=[a])[^"])|b)*"$/C
- "ab"
---->"ab"
- +0 ^ ^
- +1 ^ "
- +2 ^^ ((?(?=[a])[^"])|b)*
- +3 ^^ (?(?=[a])[^"])
- +5 ^^ (?=[a])
- +8 ^^ [a]
-+11 ^ ^ )
-+12 ^^ [^"]
-+16 ^ ^ )
-+17 ^ ^ |
- +3 ^ ^ (?(?=[a])[^"])
- +5 ^ ^ (?=[a])
- +8 ^ ^ [a]
-+21 ^ ^ "
-+18 ^ ^ b
-+19 ^ ^ )
- +3 ^ ^ (?(?=[a])[^"])
- +5 ^ ^ (?=[a])
- +8 ^ ^ [a]
-+21 ^ ^ "
-+22 ^ ^ $
-+23 ^ ^
- 0: "ab"
- 1:
-
-/^"((?(?=[a])[^"])|b)*"$/
- "ab"
- 0: "ab"
- 1:
-
-/^X(?5)(a)(?|(b)|(q))(c)(d)Y/
-Failed: reference to non-existent subpattern at offset 5
-
-/^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
- XYabcdY
- 0: XYabcdY
- 1: a
- 2: b
- 3: c
- 4: d
- 5: Y
-
-/Xa{2,4}b/
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/Xa{2,4}?b/
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/Xa{2,4}+b/
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X\d{2,4}b/
- X\P
-Partial match: X
- X3\P
-Partial match: X3
- X33\P
-Partial match: X33
- X333\P
-Partial match: X333
- X3333\P
-Partial match: X3333
-
-/X\d{2,4}?b/
- X\P
-Partial match: X
- X3\P
-Partial match: X3
- X33\P
-Partial match: X33
- X333\P
-Partial match: X333
- X3333\P
-Partial match: X3333
-
-/X\d{2,4}+b/
- X\P
-Partial match: X
- X3\P
-Partial match: X3
- X33\P
-Partial match: X33
- X333\P
-Partial match: X333
- X3333\P
-Partial match: X3333
-
-/X\D{2,4}b/
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X\D{2,4}?b/
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X\D{2,4}+b/
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X[abc]{2,4}b/
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X[abc]{2,4}?b/
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X[abc]{2,4}+b/
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X[^a]{2,4}b/
- X\P
-Partial match: X
- Xz\P
-Partial match: Xz
- Xzz\P
-Partial match: Xzz
- Xzzz\P
-Partial match: Xzzz
- Xzzzz\P
-Partial match: Xzzzz
-
-/X[^a]{2,4}?b/
- X\P
-Partial match: X
- Xz\P
-Partial match: Xz
- Xzz\P
-Partial match: Xzz
- Xzzz\P
-Partial match: Xzzz
- Xzzzz\P
-Partial match: Xzzzz
-
-/X[^a]{2,4}+b/
- X\P
-Partial match: X
- Xz\P
-Partial match: Xz
- Xzz\P
-Partial match: Xzz
- Xzzz\P
-Partial match: Xzzz
- Xzzzz\P
-Partial match: Xzzzz
-
-/(Y)X\1{2,4}b/
- YX\P
-Partial match: YX
- YXY\P
-Partial match: YXY
- YXYY\P
-Partial match: YXYY
- YXYYY\P
-Partial match: YXYYY
- YXYYYY\P
-Partial match: YXYYYY
-
-/(Y)X\1{2,4}?b/
- YX\P
-Partial match: YX
- YXY\P
-Partial match: YXY
- YXYY\P
-Partial match: YXYY
- YXYYY\P
-Partial match: YXYYY
- YXYYYY\P
-Partial match: YXYYYY
-
-/(Y)X\1{2,4}+b/
- YX\P
-Partial match: YX
- YXY\P
-Partial match: YXY
- YXYY\P
-Partial match: YXYY
- YXYYY\P
-Partial match: YXYYY
- YXYYYY\P
-Partial match: YXYYYY
-
-/\++\KZ|\d+X|9+Y/
- ++++123999\P
-Partial match: 123999
- ++++123999Y\P
- 0: 999Y
- ++++Z1234\P
- 0: Z
-
-/Z(*F)/
- Z\P
-No match
- ZA\P
-No match
-
-/Z(?!)/
- Z\P
-No match
- ZA\P
-No match
-
-/dog(sbody)?/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/dog(sbody)??/
- dogs\P
- 0: dog
- dogs\P\P
- 0: dog
-
-/dog|dogsbody/
- dogs\P
- 0: dog
- dogs\P\P
- 0: dog
-
-/dogsbody|dog/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/\bthe cat\b/
- the cat\P
- 0: the cat
- the cat\P\P
-Partial match: the cat
-
-/abc/
- abc\P
- 0: abc
- abc\P\P
- 0: abc
-
-/abc\K123/
- xyzabc123pqr
- 0: 123
- xyzabc12\P
-Partial match: abc12
- xyzabc12\P\P
-Partial match: abc12
-
-/(?<=abc)123/
- xyzabc123pqr
- 0: 123
- xyzabc12\P
-Partial match: abc12
- xyzabc12\P\P
-Partial match: abc12
-
-/\babc\b/
- +++abc+++
- 0: abc
- +++ab\P
-Partial match: +ab
- +++ab\P\P
-Partial match: +ab
-
-/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
-------------------------------------------------------------------
- Bra
- Recurse
- Recurse
- Cond
- Cond def
- CBra 1
- <
- [^m]
- [^>]
- >
- [^<]
- Ket
- CBra 2
- \w*+
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
-------------------------------------------------------------------
- Bra
- Recurse
- Recurse
- Cond
- Cond def
- CBra 1
- <
- [\x00-/:-\xff] (neg)
- [^>]
- >
- [^<]
- Ket
- CBra 2
- \w*+
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
-------------------------------------------------------------------
- Bra
- CBra 1
- ab
- Ket
- CBra 2
- x
- CBra 3
- y
- Ket
- z
- CBra 4
- cd
- Close 4
- Close 2
- *ACCEPT
- Ket
- Ket
- pq
- Ket
- End
-------------------------------------------------------------------
-
-/abc\K/+
- abcdef
- 0:
- 0+ def
- abcdef\N\N
- 0:
- 0+ def
- xyzabcdef\N\N
- 0:
- 0+ def
- ** Failers
-No match
- abcdef\N
-No match
- xyzabcdef\N
-No match
-
-/^(?:(?=abc)|abc\K)/+
- abcdef
- 0:
- 0+ abcdef
- abcdef\N\N
- 0:
- 0+ def
- ** Failers
-No match
- abcdef\N
-No match
-
-/a?b?/+
- xyz
- 0:
- 0+ xyz
- xyzabc
- 0:
- 0+ xyzabc
- xyzabc\N
- 0: ab
- 0+ c
- xyzabc\N\N
- 0:
- 0+ yzabc
- xyz\N\N
- 0:
- 0+ yz
- ** Failers
- 0:
- 0+ ** Failers
- xyz\N
-No match
-
-/^a?b?/+
- xyz
- 0:
- 0+ xyz
- xyzabc
- 0:
- 0+ xyzabc
- ** Failers
- 0:
- 0+ ** Failers
- xyzabc\N
-No match
- xyzabc\N\N
-No match
- xyz\N\N
-No match
- xyz\N
-No match
-
-/^(?<name>a|b\g<name>c)/
- aaaa
- 0: a
- 1: a
- bacxxx
- 0: bac
- 1: bac
- bbaccxxx
- 0: bbacc
- 1: bbacc
- bbbacccxx
- 0: bbbaccc
- 1: bbbaccc
-
-/^(?<name>a|b\g'name'c)/
- aaaa
- 0: a
- 1: a
- bacxxx
- 0: bac
- 1: bac
- bbaccxxx
- 0: bbacc
- 1: bbacc
- bbbacccxx
- 0: bbbaccc
- 1: bbbaccc
-
-/^(a|b\g<1>c)/
- aaaa
- 0: a
- 1: a
- bacxxx
- 0: bac
- 1: bac
- bbaccxxx
- 0: bbacc
- 1: bbacc
- bbbacccxx
- 0: bbbaccc
- 1: bbbaccc
-
-/^(a|b\g'1'c)/
- aaaa
- 0: a
- 1: a
- bacxxx
- 0: bac
- 1: bac
- bbaccxxx
- 0: bbacc
- 1: bbacc
- bbbacccxx
- 0: bbbaccc
- 1: bbbaccc
-
-/^(a|b\g'-1'c)/
- aaaa
- 0: a
- 1: a
- bacxxx
- 0: bac
- 1: bac
- bbaccxxx
- 0: bbacc
- 1: bbacc
- bbbacccxx
- 0: bbbaccc
- 1: bbbaccc
-
-/(^(a|b\g<-1>c))/
- aaaa
- 0: a
- 1: a
- 2: a
- bacxxx
- 0: bac
- 1: bac
- 2: bac
- bbaccxxx
- 0: bbacc
- 1: bbacc
- 2: bbacc
- bbbacccxx
- 0: bbbaccc
- 1: bbbaccc
- 2: bbbaccc
-
-/(?-i:\g<name>)(?i:(?<name>a))/
- XaaX
- 0: aa
- 1: a
- XAAX
- 0: AA
- 1: A
-
-/(?i:\g<name>)(?-i:(?<name>a))/
- XaaX
- 0: aa
- 1: a
- ** Failers
-No match
- XAAX
-No match
-
-/(?-i:\g<+1>)(?i:(a))/
- XaaX
- 0: aa
- 1: a
- XAAX
- 0: AA
- 1: A
-
-/(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/
-
-/(?<n>a|b|c)\g<n>*/
- abc
- 0: abc
- 1: a
- accccbbb
- 0: accccbbb
- 1: a
-
-/^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
- XYabcdY
- 0: XYabcdY
- 1: a
- 2: b
- 3: <unset>
- 4: <unset>
- 5: c
- 6: d
- 7: Y
-
-/(?<=b(?1)|zzz)(a)/
- xbaax
- 0: a
- 1: a
- xzzzax
- 0: a
- 1: a
-
-/(a)(?<=b\1)/
-Failed: lookbehind assertion is not fixed length at offset 10
-
-/(a)(?<=b+(?1))/
-Failed: lookbehind assertion is not fixed length at offset 13
-
-/(a+)(?<=b(?1))/
-Failed: lookbehind assertion is not fixed length at offset 14
-
-/(a(?<=b(?1)))/
-Failed: lookbehind assertion is not fixed length at offset 13
-
-/(?<=b(?1))xyz/
-Failed: reference to non-existent subpattern at offset 8
-
-/(?<=b(?1))xyz(b+)pqrstuvew/
-Failed: lookbehind assertion is not fixed length at offset 26
-
-/(a|bc)\1/SI
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: a b
-
-/(a|bc)\1{2,3}/SI
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-No first char
-No need char
-Subject length lower bound = 3
-Starting byte set: a b
-
-/(a|bc)(?1)/SI
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: a b
-
-/(a|b\1)(a|b\1)/SI
-Capturing subpattern count = 2
-Max back reference = 1
-No options
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: a b
-
-/(a|b\1){2}/SI
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: a b
-
-/(a|bbbb\1)(a|bbbb\1)/SI
-Capturing subpattern count = 2
-Max back reference = 1
-No options
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: a b
-
-/(a|bbbb\1){2}/SI
-Capturing subpattern count = 1
-Max back reference = 1
-No options
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: a b
-
-/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/SI
-Capturing subpattern count = 1
-Options: anchored
-No first char
-Need char = ':'
-Subject length lower bound = 22
-No set of starting bytes
-
-/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS
-Capturing subpattern count = 11
-Options: caseless dotall
-First char = '<'
-Need char = '>'
-Subject length lower bound = 47
-No set of starting bytes
-
-"(?>.*/)foo"SI
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-Need char = 'o'
-Subject length lower bound = 4
-No set of starting bytes
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /xSI
-Capturing subpattern count = 0
-Options: extended
-No first char
-Need char = '-'
-Subject length lower bound = 8
-No set of starting bytes
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
-Capturing subpattern count = 1
-Options: caseless
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: A B C a b c
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
-Capturing subpattern count = 0
-No options
-No first char
-Need char = 'b'
-Subject length lower bound = 41
-Starting byte set: c d
-
-/<a[\s]+href[\s]*=[\s]* # find <a href=
- ([\"\'])? # find single or double quote
- (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isxSI
-Capturing subpattern count = 3
-Max back reference = 1
-Options: caseless extended dotall
-First char = '<'
-Need char = '='
-Subject length lower bound = 9
-No set of starting bytes
-
-/^(?!:) # colon disallowed at start
- (?: # start of item
- (?: [0-9a-f]{1,4} | # 1-4 hex digits or
- (?(1)0 | () ) ) # if null previously matched, fail; else null
- : # followed by colon
- ){1,7} # end item; 1-7 of them required
- [0-9a-f]{1,4} $ # final hex number at end of string
- (?(1)|.) # check that there was an empty component
- /xiIS
-Capturing subpattern count = 1
-Options: anchored caseless extended
-No first char
-Need char = ':'
-Subject length lower bound = 2
-No set of starting bytes
-
-/(?|(?<a>A)|(?<a>B))/I
-Capturing subpattern count = 1
-Named capturing subpatterns:
- a 1
- a 1
-No options
-No first char
-No need char
- AB\Ca
- 0: A
- 1: A
- C A (1) a
- BA\Ca
- 0: B
- 1: B
- C B (1) a
-
-/(?|(?<a>A)|(?<b>B))/
-Failed: different names for subpatterns of the same number are not allowed at offset 15
-
-/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
- b(?<quote> (?<apostrophe>')|(?<realquote>")) )
- (?('quote')[a-z]+|[0-9]+)/JIx
-Capturing subpattern count = 6
-Named capturing subpatterns:
- apostrophe 2
- apostrophe 5
- quote 1
- quote 4
- realquote 3
- realquote 6
-Options: extended dupnames
-No first char
-No need char
- a"aaaaa
- 0: a"aaaaa
- 1: "
- 2: <unset>
- 3: "
- b"aaaaa
- 0: b"aaaaa
- 1: <unset>
- 2: <unset>
- 3: <unset>
- 4: "
- 5: <unset>
- 6: "
- ** Failers
-No match
- b"11111
-No match
- a"11111
-No match
-
-/^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
-------------------------------------------------------------------
- Bra
- ^
- Bra
- CBra 1
- a
- Ket
- CBra 2
- b
- Ket
- CBra 3
- c
- Ket
- CBra 4
- d
- Ket
- Alt
- CBra 1
- e
- Ket
- Ket
- Cond
- 4 Cond nref
- X
- Alt
- Y
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 4
-Named capturing subpatterns:
- D 4
- D 1
-Options: anchored extended dupnames
-No first char
-No need char
- abcdX
- 0: abcdX
- 1: a
- 2: b
- 3: c
- 4: d
- eX
- 0: eX
- 1: e
- ** Failers
-No match
- abcdY
-No match
- ey
-No match
-
-/(?<A>a) (b)(c) (?<A>d (?(R&A)$ | (?4)) )/JDZx
-------------------------------------------------------------------
- Bra
- CBra 1
- a
- Ket
- CBra 2
- b
- Ket
- CBra 3
- c
- Ket
- CBra 4
- d
- Cond
- Cond nrecurse 1
- $
- Alt
- Recurse
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 4
-Named capturing subpatterns:
- A 1
- A 4
-Options: extended dupnames
-First char = 'a'
-Need char = 'd'
- abcdd
- 0: abcdd
- 1: a
- 2: b
- 3: c
- 4: dd
- ** Failers
-No match
- abcdde
-No match
-
-/abcd*/
- xxxxabcd\P
- 0: abcd
- xxxxabcd\P\P
-Partial match: abcd
-
-/abcd*/i
- xxxxabcd\P
- 0: abcd
- xxxxabcd\P\P
-Partial match: abcd
- XXXXABCD\P
- 0: ABCD
- XXXXABCD\P\P
-Partial match: ABCD
-
-/abc\d*/
- xxxxabc1\P
- 0: abc1
- xxxxabc1\P\P
-Partial match: abc1
-
-/(a)bc\1*/
- xxxxabca\P
- 0: abca
- 1: a
- xxxxabca\P\P
-Partial match: abca
-
-/abc[de]*/
- xxxxabcde\P
- 0: abcde
- xxxxabcde\P\P
-Partial match: abcde
-
-/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
- broken and not behaving as specified in that it *does* bumpalong after
- hitting (*COMMIT). --/
-
-/(?1)(A(*COMMIT)|B)D/
- ABD
- 0: ABD
- 1: B
- XABD
- 0: ABD
- 1: B
- BAD
- 0: BAD
- 1: A
- ABXABD
- 0: ABD
- 1: B
- ** Failers
-No match
- ABX
-No match
- BAXBAD
-No match
-
-/(\3)(\1)(a)/<JS>
- cat
- 0: a
- 1:
- 2:
- 3: a
-
-/(\3)(\1)(a)/SI<JS>
-Capturing subpattern count = 3
-Max back reference = 3
-Options:
-No first char
-Need char = 'a'
-Subject length lower bound = 1
-No set of starting bytes
- cat
- 0: a
- 1:
- 2:
- 3: a
-
-/(\3)(\1)(a)/SI
-Capturing subpattern count = 3
-Max back reference = 3
-No options
-No first char
-Need char = 'a'
-Subject length lower bound = 3
-No set of starting bytes
- cat
-No match
-
-/i(?(DEFINE)(?<s>a))/SI
-Capturing subpattern count = 1
-Named capturing subpatterns:
- s 1
-No options
-First char = 'i'
-No need char
-Subject length lower bound = 1
-No set of starting bytes
- i
- 0: i
-
-/()i(?(1)a)/SI
-Capturing subpattern count = 1
-No options
-No first char
-Need char = 'i'
-Subject length lower bound = 1
-Starting byte set: i
- ia
- 0: ia
- 1:
-
-/(?i)a(?-i)b|c/BZ
-------------------------------------------------------------------
- Bra
- /i a
- b
- Alt
- c
- Ket
- End
-------------------------------------------------------------------
- XabX
- 0: ab
- XAbX
- 0: Ab
- CcC
- 0: c
- ** Failers
-No match
- XABX
-No match
-
-/(?i)a(?s)b|c/BZ
-------------------------------------------------------------------
- Bra
- /i ab
- Alt
- /i c
- Ket
- End
-------------------------------------------------------------------
-
-/(?i)a(?s-i)b|c/BZ
-------------------------------------------------------------------
- Bra
- /i a
- b
- Alt
- c
- Ket
- End
-------------------------------------------------------------------
-
-/^(ab(c\1)d|x){2}$/BZ
-------------------------------------------------------------------
- Bra
- ^
- Once
- CBra 1
- ab
- CBra 2
- c
- \1
- Ket
- d
- Alt
- x
- Ket
- Ket
- Once
- CBra 1
- ab
- CBra 2
- c
- \1
- Ket
- d
- Alt
- x
- Ket
- Ket
- $
- Ket
- End
-------------------------------------------------------------------
- xabcxd
- 0: xabcxd
- 1: abcxd
- 2: cx
-
-/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
-------------------------------------------------------------------
- Bra
- ^
- Braposzero
- SBraPos
- Recurse
- KetRpos
- Cond
- Cond def
- CBra 1
- Any
- Ket
- Ket
- $
- Ket
- End
-------------------------------------------------------------------
-
-/^(?&t)*(?(DEFINE)(?<t>.))$/BZ
-------------------------------------------------------------------
- Bra
- ^
- Brazero
- Once
- Recurse
- KetRmax
- Cond
- Cond def
- CBra 1
- Any
- Ket
- Ket
- $
- Ket
- End
-------------------------------------------------------------------
-
-/ -- The first four of these are not in the Perl >= 5.10 test because Perl
- documents that the use of \K in assertions is "not well defined". The
- last is here because Perl gives the match as "b" rather than "ab". I
- believe this to be a Perl bug. --/
-
-/(?=a\Kb)ab/
- ab
- 0: b
-
-/(?!a\Kb)ac/
- ac
- 0: ac
-
-/^abc(?<=b\Kc)d/
- abcd
- 0: cd
-
-/^abc(?<!b\Kq)d/
- abcd
- 0: abcd
-
-/(?>a\Kb)z|(ab)/
- ab
- 0: ab
- 1: ab
-
-/----------------------/
-
-/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
-Failed: recursive call could loop indefinitely at offset 31
-
-/abc(*MARK:)pqr/
-Failed: (*MARK) must have an argument at offset 10
-
-/abc(*:)pqr/
-Failed: (*MARK) must have an argument at offset 6
-
-/abc(*FAIL:123)xyz/
-Failed: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) at offset 13
-
-/--- This should, and does, fail. In Perl, it does not, which I think is a
- bug because replacing the B in the pattern by (B|D) does make it fail. ---/
-
-/A(*COMMIT)B/+K
- ACABX
-No match
-
-/--- These should be different, but in Perl 5.11 are not, which I think
- is a bug in Perl. ---/
-
-/A(*THEN)B|A(*THEN)C/K
- AC
- 0: AC
-
-/A(*PRUNE)B|A(*PRUNE)C/K
- AC
-No match
-
-/--- This should fail; the SKIP advances by one, but when we get to AC, the
- PRUNE kills it. Perl behaves differently. ---/
-
-/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
- AAAC
-No match, mark = A
-
-/--- Mark names can be duplicated. Perl doesn't give a mark for this one,
-though PCRE does. ---/
-
-/^A(*:A)B|^X(*:A)Y/K
- ** Failers
-No match
- XAQQ
-No match, mark = A
-
-/--- COMMIT at the start of a pattern should be the same as an anchor. Perl
-optimizations defeat this. So does the PCRE optimization unless we disable it
-with \Y. ---/
-
-/(*COMMIT)ABC/
- ABCDEFG
- 0: ABC
- ** Failers
-No match
- DEFGABC\Y
-No match
-
-/^(ab (c+(*THEN)cd) | xyz)/x
- abcccd
-No match
-
-/^(ab (c+(*PRUNE)cd) | xyz)/x
- abcccd
-No match
-
-/^(ab (c+(*FAIL)cd) | xyz)/x
- abcccd
-No match
-
-/--- Perl 5.11 gets some of these wrong ---/
-
-/(?>.(*ACCEPT))*?5/
- abcde
- 0: a
-
-/(.(*ACCEPT))*?5/
- abcde
- 0: a
- 1: a
-
-/(.(*ACCEPT))5/
- abcde
- 0: a
- 1: a
-
-/(.(*ACCEPT))*5/
- abcde
- 0: a
- 1: a
-
-/A\NB./BZ
-------------------------------------------------------------------
- Bra
- A
- Any
- B
- Any
- Ket
- End
-------------------------------------------------------------------
- ACBD
- 0: ACBD
- *** Failers
-No match
- A\nB
-No match
- ACB\n
-No match
-
-/A\NB./sBZ
-------------------------------------------------------------------
- Bra
- A
- Any
- B
- AllAny
- Ket
- End
-------------------------------------------------------------------
- ACBD
- 0: ACBD
- ACB\n
- 0: ACB\x0a
- *** Failers
-No match
- A\nB
-No match
-
-/A\NB/<crlf>
- A\nB
- 0: A\x0aB
- A\rB
- 0: A\x0dB
- ** Failers
-No match
- A\r\nB
-No match
-
-/\R+b/BZ
-------------------------------------------------------------------
- Bra
- \R++
- b
- Ket
- End
-------------------------------------------------------------------
-
-/\R+\n/BZ
-------------------------------------------------------------------
- Bra
- \R+
- \x0a
- Ket
- End
-------------------------------------------------------------------
-
-/\R+\d/BZ
-------------------------------------------------------------------
- Bra
- \R++
- \d
- Ket
- End
-------------------------------------------------------------------
-
-/\d*\R/BZ
-------------------------------------------------------------------
- Bra
- \d*+
- \R
- Ket
- End
-------------------------------------------------------------------
-
-/\s*\R/BZ
-------------------------------------------------------------------
- Bra
- \s*+
- \R
- Ket
- End
-------------------------------------------------------------------
-
-/-- Perl treats this one differently, not failing the second string. I believe
- that is a bug in Perl. --/
-
-/^((abc|abcx)(*THEN)y|abcd)/
- abcd
- 0: abcd
- 1: abcd
- *** Failers
-No match
- abcxy
-No match
-
-/(?<=abc)def/
- abc\P\P
-Partial match: abc
-
-/abc$/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
-
-/abc$/m
- abc
- 0: abc
- abc\n
- 0: abc
- abc\P\P
-Partial match: abc
- abc\n\P\P
- 0: abc
- abc\P
- 0: abc
- abc\n\P
- 0: abc
-
-/abc\z/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
-
-/abc\Z/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
-
-/abc\b/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
-
-/abc\B/
- abc
-No match
- abc\P
-Partial match: abc
- abc\P\P
-Partial match: abc
-
-/.+/
- abc\>0
- 0: abc
- abc\>1
- 0: bc
- abc\>2
- 0: c
- abc\>3
-No match
- abc\>4
-Error -24 (bad offset value)
- abc\>-4
-Error -24 (bad offset value)
-
-/^\cģ/
-Failed: \c must be followed by an ASCII character at offset 3
-
-/(?P<abn>(?P=abn)xxx)/BZ
-------------------------------------------------------------------
- Bra
- Once
- CBra 1
- \1
- xxx
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/(a\1z)/BZ
-------------------------------------------------------------------
- Bra
- Once
- CBra 1
- a
- \1
- z
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
-Failed: syntax error in subpattern name (missing terminator) at offset 29
-
-/(?P<abn>(?P=axn)xxx)/BZ
-Failed: reference to non-existent subpattern at offset 15
-
-/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \2
- xxx
- Ket
- CBra 2
- yy
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/-- These tests are here because Perl gets the first one wrong. --/
-
-/(\R*)(.)/s
- \r\n
- 0: \x0d
- 1:
- 2: \x0d
- \r\r\n\n\r
- 0: \x0d\x0d\x0a\x0a\x0d
- 1: \x0d\x0d\x0a\x0a
- 2: \x0d
- \r\r\n\n\r\n
- 0: \x0d\x0d\x0a\x0a\x0d
- 1: \x0d\x0d\x0a\x0a
- 2: \x0d
-
-/(\R)*(.)/s
- \r\n
- 0: \x0d
- 1: <unset>
- 2: \x0d
- \r\r\n\n\r
- 0: \x0d\x0d\x0a\x0a\x0d
- 1: \x0a
- 2: \x0d
- \r\r\n\n\r\n
- 0: \x0d\x0d\x0a\x0a\x0d
- 1: \x0a
- 2: \x0d
-
-/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
- \r\n
- 0: \x0d
- 1:
- 2: \x0d
- \r\r\n\n\r
- 0: \x0d\x0d\x0a\x0a\x0d
- 1: \x0d\x0d\x0a\x0a
- 2: \x0d
- \r\r\n\n\r\n
- 0: \x0d\x0d\x0a\x0a\x0d
- 1: \x0d\x0d\x0a\x0a
- 2: \x0d
-
-/-- --/
-
-/^abc$/BZ
-------------------------------------------------------------------
- Bra
- ^
- abc
- $
- Ket
- End
-------------------------------------------------------------------
-
-/^abc$/BZm
-------------------------------------------------------------------
- Bra
- /m ^
- abc
- /m $
- Ket
- End
-------------------------------------------------------------------
-
-/^(a)*+(\w)/S
- aaaaX
- 0: aaaaX
- 1: a
- 2: X
- ** Failers
-No match
- aaaa
-No match
-
-/^(?:a)*+(\w)/S
- aaaaX
- 0: aaaaX
- 1: X
- ** Failers
-No match
- aaaa
-No match
-
-/(a)++1234/SDZ
-------------------------------------------------------------------
- Bra
- CBraPos 1
- a
- KetRpos
- 1234
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = '4'
-Subject length lower bound = 5
-No set of starting bytes
-
-/([abc])++1234/SI
-Capturing subpattern count = 1
-No options
-No first char
-Need char = '4'
-Subject length lower bound = 5
-Starting byte set: a b c
-
-/(?<=(abc)+)X/
-Failed: lookbehind assertion is not fixed length at offset 10
-
-/(^ab)/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
-
-/(^ab)++/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
-
-/(^ab|^)+/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
-
-/(^ab|^)++/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
-
-/(?:^ab)/I
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/(?:^ab)++/I
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/(?:^ab|^)+/I
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/(?:^ab|^)++/I
-Capturing subpattern count = 0
-Options: anchored
-No first char
-No need char
-
-/(.*ab)/I
-Capturing subpattern count = 1
-No options
-First char at start or follows newline
-Need char = 'b'
-
-/(.*ab)++/I
-Capturing subpattern count = 1
-No options
-First char at start or follows newline
-Need char = 'b'
-
-/(.*ab|.*)+/I
-Capturing subpattern count = 1
-No options
-First char at start or follows newline
-No need char
-
-/(.*ab|.*)++/I
-Capturing subpattern count = 1
-No options
-First char at start or follows newline
-No need char
-
-/(?:.*ab)/I
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-Need char = 'b'
-
-/(?:.*ab)++/I
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-Need char = 'b'
-
-/(?:.*ab|.*)+/I
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-No need char
-
-/(?:.*ab|.*)++/I
-Capturing subpattern count = 0
-No options
-First char at start or follows newline
-No need char
-
-/(?=a)[bcd]/I
-Capturing subpattern count = 0
-No options
-First char = 'a'
-No need char
-
-/((?=a))[bcd]/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/((?=a))+[bcd]/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/((?=a))++[bcd]/I
-Capturing subpattern count = 1
-No options
-First char = 'a'
-No need char
-
-/(?=a+)[bcd]/iI
-Capturing subpattern count = 0
-Options: caseless
-First char = 'a' (caseless)
-No need char
-
-/(?=a+?)[bcd]/iI
-Capturing subpattern count = 0
-Options: caseless
-First char = 'a' (caseless)
-No need char
-
-/(?=a++)[bcd]/iI
-Capturing subpattern count = 0
-Options: caseless
-First char = 'a' (caseless)
-No need char
-
-/(?=a{3})[bcd]/iI
-Capturing subpattern count = 0
-Options: caseless
-First char = 'a' (caseless)
-Need char = 'a' (caseless)
-
-/(abc)\1+/S
-
-/-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
-
-/(?1)(?:(b(*ACCEPT))){0}/
- b
- 0: b
-
-/(?1)(?:(b(*ACCEPT))){0}c/
- bc
- 0: bc
- ** Failers
-No match
- b
-No match
-
-/(?1)(?:((*ACCEPT))){0}c/
- c
- 0: c
- c\N
- 0: c
-
-/^.*?(?(?=a)a|b(*THEN)c)/
- ba
-No match
-
-/^.*?(?(?=a)a|bc)/
- ba
- 0: ba
-
-/^.*?(?(?=a)a(*THEN)b|c)/
- ac
-No match
-
-/^.*?(?(?=a)a(*THEN)b)c/
- ac
-No match
-
-/^.*?(a(*THEN)b)c/
- aabc
-No match
-
-/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
- aabc
- 0: aabc
-
-/^.*?(a(*THEN)b|z)c/
- aabc
- 0: aabc
- 1: ab
-
-/^.*?(z|a(*THEN)b)c/
- aabc
- 0: aabc
- 1: ab
-
-/-- --/
-
-/-- These studied versions are here because they are not Perl-compatible; the
- studying means the mark is not seen. --/
-
-/(*MARK:A)(*SKIP:B)(C|X)/KS
- C
- 0: C
- 1: C
-MK: A
- D
-No match, mark = A
-
-/(*:A)A+(*SKIP:A)(B|Z)/KS
- AAAC
-No match, mark = A
-
-/-- --/
-
-"(?=a*(*ACCEPT)b)c"
- c
- 0: c
- c\N
- 0: c
-
-/(?1)c(?(DEFINE)((*ACCEPT)b))/
- c
- 0: c
- c\N
- 0: c
-
-/(?>(*ACCEPT)b)c/
- c
- 0:
- c\N
-No match
-
-/(?:(?>(a)))+a%/++
- %aa%
- 0: aa%
- 0+
- 1: a
- 1+ a%
-
-/(a)b|ac/++SS
- ac\O3
-Matched, but too many substrings
- 0: ac
- 0+
-
-/(a)(b)x|abc/++
- abc\O6
- 0: abc
- 0+
-
-/(a)bc|(a)(b)\2/
- \O3abc
-Matched, but too many substrings
- 0: abc
- \O4abc
-Matched, but too many substrings
- 0: abc
-
-/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
-Capturing subpattern count = 2
-No options
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
-
-/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
-Capturing subpattern count = 2
-No options
-No first char
-No need char
-Subject length lower bound = 3
-Starting byte set: a b
-
-/(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
-Capturing subpattern count = 2
-No options
-No first char
-No need char
-Subject length lower bound = 4
-Starting byte set: a b
-
-/(abc)(?1)/SI
-Capturing subpattern count = 1
-No options
-First char = 'a'
-Need char = 'c'
-Subject length lower bound = 6
-No set of starting bytes
-
-/^(?>a)++/
- aa\M
-Minimum match() limit = 5
-Minimum match() recursion limit = 2
- 0: aa
- aaaaaaaaa\M
-Minimum match() limit = 12
-Minimum match() recursion limit = 2
- 0: aaaaaaaaa
-
-/(a)(?1)++/
- aa\M
-Minimum match() limit = 7
-Minimum match() recursion limit = 4
- 0: aa
- 1: a
- aaaaaaaaa\M
-Minimum match() limit = 21
-Minimum match() recursion limit = 4
- 0: aaaaaaaaa
- 1: a
-
-/(?:(foo)|(bar)|(baz))X/SS=
- bazfooX
- 0: fooX
- 1: foo
- 2: <unset>
- 3: <unset>
- foobazbarX
- 0: barX
- 1: <unset>
- 2: bar
- 3: <unset>
- barfooX
- 0: fooX
- 1: foo
- 2: <unset>
- 3: <unset>
- bazX
- 0: bazX
- 1: <unset>
- 2: <unset>
- 3: baz
- foobarbazX
- 0: bazX
- 1: <unset>
- 2: <unset>
- 3: baz
- bazfooX\O0
-Matched, but too many substrings
- bazfooX\O2
-Matched, but too many substrings
- 0: fooX
- bazfooX\O4
-Matched, but too many substrings
- 0: fooX
- 1: <unset>
- bazfooX\O6
-Matched, but too many substrings
- 0: fooX
- 1: foo
- 2: <unset>
- bazfooX\O8
-Matched, but too many substrings
- 0: fooX
- 1: foo
- 2: <unset>
- 3: <unset>
- bazfooX\O10
- 0: fooX
- 1: foo
- 2: <unset>
- 3: <unset>
-
-/(?=abc){3}abc/BZ
-------------------------------------------------------------------
- Bra
- Assert
- abc
- Ket
- abc
- Ket
- End
-------------------------------------------------------------------
-
-/(?=abc)+abc/BZ
-------------------------------------------------------------------
- Bra
- Assert
- abc
- Ket
- abc
- Ket
- End
-------------------------------------------------------------------
-
-/(?=abc)++abc/BZ
-------------------------------------------------------------------
- Bra
- Assert
- abc
- Ket
- abc
- Ket
- End
-------------------------------------------------------------------
-
-/(?=abc){0}xyz/BZ
-------------------------------------------------------------------
- Bra
- Skip zero
- Assert
- abc
- Ket
- xyz
- Ket
- End
-------------------------------------------------------------------
-
-/(?=(a))?./BZ
-------------------------------------------------------------------
- Bra
- Brazero
- Assert
- CBra 1
- a
- Ket
- Ket
- Any
- Ket
- End
-------------------------------------------------------------------
-
-/(?=(a))??./BZ
-------------------------------------------------------------------
- Bra
- Braminzero
- Assert
- CBra 1
- a
- Ket
- Ket
- Any
- Ket
- End
-------------------------------------------------------------------
-
-/^(?=(a)){0}b(?1)/BZ
-------------------------------------------------------------------
- Bra
- ^
- Skip zero
- Assert
- CBra 1
- a
- Ket
- Ket
- b
- Recurse
- Ket
- End
-------------------------------------------------------------------
-
-/(?(DEFINE)(a))?b(?1)/BZ
-------------------------------------------------------------------
- Bra
- Cond
- Cond def
- CBra 1
- a
- Ket
- Ket
- b
- Recurse
- Ket
- End
-------------------------------------------------------------------
-
-/^(?=(?1))?[az]([abc])d/BZ
-------------------------------------------------------------------
- Bra
- ^
- Brazero
- Assert
- Recurse
- Ket
- [az]
- CBra 1
- [a-c]
- Ket
- d
- Ket
- End
-------------------------------------------------------------------
-
-/^(?!a){0}\w+/BZ
-------------------------------------------------------------------
- Bra
- ^
- Skip zero
- Assert not
- a
- Ket
- \w+
- Ket
- End
-------------------------------------------------------------------
-
-/(?<=(abc))?xyz/BZ
-------------------------------------------------------------------
- Bra
- Brazero
- AssertB
- Reverse
- CBra 1
- abc
- Ket
- Ket
- xyz
- Ket
- End
-------------------------------------------------------------------
-
-/[:a[:abc]b:]/BZ
-------------------------------------------------------------------
- Bra
- [:[a-c]
- b:]
- Ket
- End
-------------------------------------------------------------------
-
-/((?2))((?1))/SS
- abc
-Error -26 (nested recursion at the same subject position)
-
-/((?(R2)a+|(?1)b))/SS
- aaaabcde
-Error -26 (nested recursion at the same subject position)
-
-/(?(R)a*(?1)|((?R))b)/SS
- aaaabcde
-Error -26 (nested recursion at the same subject position)
-
-/(a+|(?R)b)/
-Failed: recursive call could loop indefinitely at offset 7
-
-/^(a(*:A)(d|e(*:B))z|aeq)/C
- adz
---->adz
- +0 ^ ^
- +1 ^ (a(*:A)(d|e(*:B))z|aeq)
- +2 ^ a
- +3 ^^ (*:A)
- +8 ^^ (d|e(*:B))
-Latest Mark: A
- +9 ^^ d
-+10 ^ ^ |
-+18 ^ ^ z
-+19 ^ ^ |
-+24 ^ ^
- 0: adz
- 1: adz
- 2: d
- aez
---->aez
- +0 ^ ^
- +1 ^ (a(*:A)(d|e(*:B))z|aeq)
- +2 ^ a
- +3 ^^ (*:A)
- +8 ^^ (d|e(*:B))
-Latest Mark: A
- +9 ^^ d
-+11 ^^ e
-+12 ^ ^ (*:B)
-+17 ^ ^ )
-Latest Mark: B
-+18 ^ ^ z
-+19 ^ ^ |
-+24 ^ ^
- 0: aez
- 1: aez
- 2: e
- aeqwerty
---->aeqwerty
- +0 ^ ^
- +1 ^ (a(*:A)(d|e(*:B))z|aeq)
- +2 ^ a
- +3 ^^ (*:A)
- +8 ^^ (d|e(*:B))
-Latest Mark: A
- +9 ^^ d
-+11 ^^ e
-+12 ^ ^ (*:B)
-+17 ^ ^ )
-Latest Mark: B
-+18 ^ ^ z
-+20 ^ a
-+21 ^^ e
-+22 ^ ^ q
-+23 ^ ^ )
-+24 ^ ^
- 0: aeq
- 1: aeq
-
-/.(*F)/
- \P\Pabc
-No match
-
-/\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
-Capturing subpattern count = 0
-No options
-First char = 't'
-Need char = 't'
-Subject length lower bound = 18
-No set of starting bytes
-
-/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 8
-Starting byte set: < o t u
-
-/a(*SKIP)c|b(*ACCEPT)|/+SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Study returned NULL
- a
- 0:
- 0+
-
-/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = -1
-Starting byte set: a b x
- ax
- 0: x
-
-'a*(*ACCEPT)b'+
- \N\N
-No match
- abc\N\N
- 0: a
- 0+ bc
- bbb\N\N
- 0:
- 0+ bb
-
-/(*ACCEPT)a/+I
-Capturing subpattern count = 0
-No options
-No first char
-No need char
- bax
- 0:
- 0+ bax
-
-/z(*ACCEPT)a/+I
-Capturing subpattern count = 0
-No options
-First char = 'z'
-No need char
- baxzbx
- 0: z
- 0+ bx
-
-/a(?:.)*?a/ims
- \Mabbbbbbbbbbbbbbbbbbbbba
-Minimum match() limit = 65
-Minimum match() recursion limit = 2
- 0: abbbbbbbbbbbbbbbbbbbbba
-
-/a(?:.(*THEN))*?a/ims
- \Mabbbbbbbbbbbbbbbbbbbbba
-Minimum match() limit = 86
-Minimum match() recursion limit = 45
- 0: abbbbbbbbbbbbbbbbbbbbba
-
-/a(?:.(*THEN:ABC))*?a/ims
- \Mabbbbbbbbbbbbbbbbbbbbba
-Minimum match() limit = 86
-Minimum match() recursion limit = 45
- 0: abbbbbbbbbbbbbbbbbbbbba
-
-/-- These tests are in agreement with development Perl 5.015, which has fixed
- some things, but they don't all work with 5.012, so they aren't in the
- Perl-compatible tests. Those after the first come from Perl's own test
- files. --/
-
-/^((yes|no)(*THEN)(*F))?/
- yes
-No match
-
-/(A (.*) C? (*THEN) | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*) C? (*THEN) | A D) z/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*) C? (*THEN) | A D) \s* (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*) C? (*THEN) | A D) \s* z/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*) (?:C|) (*THEN) | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*) (?:C|) (*THEN) | A D) z/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*) C{0,6} (*THEN) | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*) C{0,6} (*THEN) | A D) z/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*) (CE){0,6} (*THEN) | A D) (*FAIL)/x
-AbcdCEBefgBhiBqz
-No match
-
-/(A (.*) (CE){0,6} (*THEN) | A D) z/x
-AbcdCEBefgBhiBqz
-No match
-
-/(A (.*) (CE*){0,6} (*THEN) | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*) (CE*){0,6} (*THEN) | A D) z/x
-AbcdCBefgBhiBqz
-No match
-
-/-----------------------------------------------/
-
-/^(?>a+)(?>(z+))\w/BZ
-------------------------------------------------------------------
- Bra
- ^
- Once_NC
- a+
- Ket
- Once
- CBra 1
- z+
- Ket
- Ket
- \w
- Ket
- End
-------------------------------------------------------------------
- aaaazzzzb
- 0: aaaazzzzb
- 1: zzzz
- ** Failers
-No match
- aazz
-No match
-
-/(.)(\1|a(?2))/
- bab
- 0: bab
- 1: b
- 2: ab
-
-/\1|(.)(?R)\1/
- cbbbc
- 0: cbbbc
- 1: c
-
-/(.)((?(1)c|a)|a(?2))/
- baa
-No match
-
-/(?P<abn>(?P=abn)xxx)/BZ
-------------------------------------------------------------------
- Bra
- Once
- CBra 1
- \1
- xxx
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/(a\1z)/BZ
-------------------------------------------------------------------
- Bra
- Once
- CBra 1
- a
- \1
- z
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
- \Maabbccddee
-Minimum match() limit = 12
-Minimum match() recursion limit = 3
- 0: aabbccddee
-
-/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
- \Maabbccddee
-Minimum match() limit = 22
-Minimum match() recursion limit = 21
- 0: aabbccddee
- 1: aa
- 2: bb
- 3: cc
- 4: dd
- 5: ee
-
-/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
- \Maabbccddee
-Minimum match() limit = 18
-Minimum match() recursion limit = 13
- 0: aabbccddee
- 1: aa
- 2: cc
- 3: ee
-
-/^a\x41z/<JS>
- aAz
- 0: aAz
- *** Failers
-No match
- ax41z
-No match
-
-/^a[m\x41]z/<JS>
- aAz
- 0: aAz
-
-/^a\x1z/<JS>
- ax1z
- 0: ax1z
-
-/^a\u0041z/<JS>
- aAz
- 0: aAz
- *** Failers
-No match
- au0041z
-No match
-
-/^a[m\u0041]z/<JS>
- aAz
- 0: aAz
-
-/^a\u041z/<JS>
- au041z
- 0: au041z
- *** Failers
-No match
- aAz
-No match
-
-/^a\U0041z/<JS>
- aU0041z
- 0: aU0041z
- *** Failers
-No match
- aAz
-No match
-
-/(?(?=c)c|d)++Y/BZ
-------------------------------------------------------------------
- Bra
- BraPos
- Cond
- Assert
- c
- Ket
- c
- Alt
- d
- Ket
- KetRpos
- Y
- Ket
- End
-------------------------------------------------------------------
-
-/(?(?=c)c|d)*+Y/BZ
-------------------------------------------------------------------
- Bra
- Braposzero
- BraPos
- Cond
- Assert
- c
- Ket
- c
- Alt
- d
- Ket
- KetRpos
- Y
- Ket
- End
-------------------------------------------------------------------
-
-/a[\NB]c/
-Failed: \N is not supported in a class at offset 3
-
-/a[B-\Nc]/
-Failed: \N is not supported in a class at offset 5
-
-/(a)(?2){0,1999}?(b)/
-
-/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
-
-/--- This test, with something more complicated than individual letters, causes
-different behaviour in Perl. Perhaps it disables some optimization; no tag is
-passed back for the failures, whereas in PCRE there is a tag. ---/
-
-/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
- AABC
- 0: AB
- 1: A
- 2: B
-MK: A
- XXYZ
- 0: XXY
- 1: <unset>
- 2: <unset>
- 3: X
- 4: X
- 5: Y
-MK: B
- ** Failers
-No match
- XAQQ
-No match, mark = A
- XAQQXZZ
-No match, mark = A
- AXQQQ
-No match, mark = A
- AXXQQQ
-No match, mark = B
-
-/-- Perl doesn't give marks for these, though it does if the alternatives are
-replaced by single letters. --/
-
-/(b|q)(*:m)f|a(*:n)w/K
- aw
- 0: aw
-MK: n
- ** Failers
-No match, mark = n
- abc
-No match, mark = m
-
-/(q|b)(*:m)f|a(*:n)w/K
- aw
- 0: aw
-MK: n
- ** Failers
-No match, mark = n
- abc
-No match, mark = m
-
-/-- After a partial match, the behaviour is as for a failure. --/
-
-/^a(*:X)bcde/K
- abc\P
-Partial match, mark=X: abc
-
-/-- These are here because Perl doesn't return a mark, except for the first --/
-
-/(?=(*:x))(q|)/K+
- abc
- 0:
- 0+ abc
- 1:
-MK: x
-
-/(?=(*:x))((*:y)q|)/K+
- abc
- 0:
- 0+ abc
- 1:
-MK: x
-
-/(?=(*:x))(?:(*:y)q|)/K+
- abc
- 0:
- 0+ abc
-MK: x
-
-/(?=(*:x))(?>(*:y)q|)/K+
- abc
- 0:
- 0+ abc
-MK: x
-
-/(?=a(*:x))(?!a(*:y)c)/K+
- ab
- 0:
- 0+ ab
-MK: x
-
-/(?=a(*:x))(?=a(*:y)c|)/K+
- ab
- 0:
- 0+ ab
-MK: x
-
-/-- End of testinput2 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput20 b/src/third_party/pcre-8.30/testdata/testoutput20
deleted file mode 100644
index 82149216bc3..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput20
+++ /dev/null
@@ -1,24 +0,0 @@
-/-- These tests are for the handling of characters greater than 255 in 16-bit,
- non-UTF-16 mode. --/
-
-/^\x{ffff}+/i
- \x{ffff}
- 0: \x{ffff}
-
-/^\x{ffff}?/i
- \x{ffff}
- 0: \x{ffff}
-
-/^\x{ffff}*/i
- \x{ffff}
- 0: \x{ffff}
-
-/^\x{ffff}{3}/i
- \x{ffff}\x{ffff}\x{ffff}
- 0: \x{ffff}\x{ffff}\x{ffff}
-
-/^\x{ffff}{0,3}/i
- \x{ffff}
- 0: \x{ffff}
-
-/-- End of testinput20 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput21 b/src/third_party/pcre-8.30/testdata/testoutput21
deleted file mode 100644
index 52d3cc88e98..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput21
+++ /dev/null
@@ -1,78 +0,0 @@
-/-- Tests for reloading pre-compile patterns. The first one gives an error
-right away. The others require the linke size to be 2. */
-
-<!testsaved8
-Compiled pattern loaded from testsaved8
-No study data
-Error -28 from pcre16_fullinfo(0)
-Running in 16-bit mode but pattern was compiled in 8-bit mode
-
-/-- Generated from: ^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]|[^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ --/
-
-<!testsaved16LE-1
-Compiled pattern loaded from testsaved16LE-1
-Study data loaded from testsaved16LE-1
-------------------------------------------------------------------
- 0 134 Bra
- 2 ^
- 3 [La]
- 20 43 CBra 1
- 23 20 Bra
- 25 [ALal]+
- 43 20 Ket
- 45 [\x00-,.-WY-wy-\xff] (neg)*?
- 63 43 Ket
- 65 12 CBraPos 2
- 68 [\x{150}-\x{250}\x{300}]
- 77 27 Alt
- 79 [^AS-Uas-u\x{800}\x{d800}-\x{dfff}]
-104 39 KetRpos
-106 [^\x08#\x{500}\x{1000}]{3,5}
-133 $
-134 134 Ket
-136 End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Named capturing subpatterns:
- name 1
- other 2
-Options: anchored
-No first char
-No need char
-Subject length lower bound = 6
-No set of starting bytes
-
-<!testsaved16BE-1
-Compiled pattern loaded from testsaved16BE-1
-Study data loaded from testsaved16BE-1
-------------------------------------------------------------------
- 0 134 Bra
- 2 ^
- 3 [La]
- 20 43 CBra 1
- 23 20 Bra
- 25 [ALal]+
- 43 20 Ket
- 45 [\x00-,.-WY-wy-\xff] (neg)*?
- 63 43 Ket
- 65 12 CBraPos 2
- 68 [\x{150}-\x{250}\x{300}]
- 77 27 Alt
- 79 [^AS-Uas-u\x{800}\x{d800}-\x{dfff}]
-104 39 KetRpos
-106 [^\x08#\x{500}\x{1000}]{3,5}
-133 $
-134 134 Ket
-136 End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Named capturing subpatterns:
- name 1
- other 2
-Options: anchored
-No first char
-No need char
-Subject length lower bound = 6
-No set of starting bytes
-
-/-- End of testinput21 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput22 b/src/third_party/pcre-8.30/testdata/testoutput22
deleted file mode 100644
index f5f6ae7bb21..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput22
+++ /dev/null
@@ -1,59 +0,0 @@
-/-- Tests for reloading pre-compile patterns with UTF-16 support. */
-
-/-- Generated from: (?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,}[\x{f123}\x{10039}\x{20000}-\x{21234}]?|[A-Cx-z\x{100000}-\x{1000a7}\x{101234}])(?<cb2>[^az]) --/8
-
-<!testsaved16LE-2
-Compiled pattern loaded from testsaved16LE-2
-Study data loaded from testsaved16LE-2
-------------------------------------------------------------------
- 0 101 Bra
- 2 45 CBra 1
- 5 [Za\x{400}-\x{10ffff}]{4,}
- 32 [\x{f123}\x{10039}\x{20000}-\x{21234}]?
- 47 30 Alt
- 49 [A-Cx-z\x{100000}-\x{1000a7}\x{101234}]
- 77 75 Ket
- 79 20 CBra 2
- 82 [\x00-`b-y{-\xff] (neg)
- 99 20 Ket
-101 101 Ket
-103 End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Named capturing subpatterns:
- cb2 2
- cbra1 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 2
-No set of starting bytes
-
-<!testsaved16BE-2
-Compiled pattern loaded from testsaved16BE-2
-Study data loaded from testsaved16BE-2
-------------------------------------------------------------------
- 0 101 Bra
- 2 45 CBra 1
- 5 [Za\x{400}-\x{10ffff}]{4,}
- 32 [\x{f123}\x{10039}\x{20000}-\x{21234}]?
- 47 30 Alt
- 49 [A-Cx-z\x{100000}-\x{1000a7}\x{101234}]
- 77 75 Ket
- 79 20 CBra 2
- 82 [\x00-`b-y{-\xff] (neg)
- 99 20 Ket
-101 101 Ket
-103 End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Named capturing subpatterns:
- cb2 2
- cbra1 1
-Options: utf
-No first char
-No need char
-Subject length lower bound = 2
-No set of starting bytes
-
-/-- End of testinput22 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput3 b/src/third_party/pcre-8.30/testdata/testoutput3
deleted file mode 100644
index 7b0a3e926e1..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput3
+++ /dev/null
@@ -1,169 +0,0 @@
-/-- This set of tests checks local-specific features, using the fr_FR locale.
- It is not Perl-compatible. There is different version called wintestinput3
- f or use on Windows, where the locale is called "french". --/
-
-/^[\w]+/
- *** Failers
-No match
- cole
-No match
-
-/^[\w]+/Lfr_FR
- cole
- 0: cole
-
-/^[\w]+/
- *** Failers
-No match
- cole
-No match
-
-/^[\W]+/
- cole
- 0: \xc9
-
-/^[\W]+/Lfr_FR
- *** Failers
- 0: ***
- cole
-No match
-
-/[\b]/
- \b
- 0: \x08
- *** Failers
-No match
- a
-No match
-
-/[\b]/Lfr_FR
- \b
- 0: \x08
- *** Failers
-No match
- a
-No match
-
-/^\w+/
- *** Failers
-No match
- cole
-No match
-
-/^\w+/Lfr_FR
- cole
- 0: cole
-
-/(.+)\b(.+)/
- cole
- 0: \xc9cole
- 1: \xc9
- 2: cole
-
-/(.+)\b(.+)/Lfr_FR
- *** Failers
- 0: *** Failers
- 1: ***
- 2: Failers
- cole
-No match
-
-/cole/i
- cole
- 0: \xc9cole
- *** Failers
-No match
- cole
-No match
-
-/cole/iLfr_FR
- cole
- 0: cole
- cole
- 0: cole
-
-/\w/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
- Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
-
-/\w/ISLfr_FR
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
- Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
-
-
-
-/^[\xc8-\xc9]/iLfr_FR
- cole
- 0:
- cole
- 0:
-
-/^[\xc8-\xc9]/Lfr_FR
- cole
- 0:
- *** Failers
-No match
- cole
-No match
-
-/\W+/Lfr_FR
- >>>\xaa<<<
- 0: >>>
- >>>\xba<<<
- 0: >>>
-
-/[\W]+/Lfr_FR
- >>>\xaa<<<
- 0: >>>
- >>>\xba<<<
- 0: >>>
-
-/[^[:alpha:]]+/Lfr_FR
- >>>\xaa<<<
- 0: >>>
- >>>\xba<<<
- 0: >>>
-
-/\w+/Lfr_FR
- >>>\xaa<<<
- 0:
- >>>\xba<<<
- 0:
-
-/[\w]+/Lfr_FR
- >>>\xaa<<<
- 0:
- >>>\xba<<<
- 0:
-
-/[[:alpha:]]+/Lfr_FR
- >>>\xaa<<<
- 0:
- >>>\xba<<<
- 0:
-
-/[[:alpha:]][[:lower:]][[:upper:]]/DZLfr_FR
-------------------------------------------------------------------
- Bra
- [A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\xff]
- [a-z\xb5\xdf-\xf6\xf8-\xff]
- [A-Z\xc0-\xd6\xd8-\xde]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/-- End of testinput3 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput4 b/src/third_party/pcre-8.30/testdata/testoutput4
deleted file mode 100644
index 2082721c563..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput4
+++ /dev/null
@@ -1,1094 +0,0 @@
-/-- This set of tests is for UTF support, excluding Unicode properties. It is
- compatible with all versions of Perl >= 5.10 and both the 8-bit and 16-bit
- PCRE libraries. --/
-
-/a.b/8
- acb
- 0: acb
- a\x7fb
- 0: a\x{7f}b
- a\x{100}b
- 0: a\x{100}b
- *** Failers
-No match
- a\nb
-No match
-
-/a(.{3})b/8
- a\x{4000}xyb
- 0: a\x{4000}xyb
- 1: \x{4000}xy
- a\x{4000}\x7fyb
- 0: a\x{4000}\x{7f}yb
- 1: \x{4000}\x{7f}y
- a\x{4000}\x{100}yb
- 0: a\x{4000}\x{100}yb
- 1: \x{4000}\x{100}y
- *** Failers
-No match
- a\x{4000}b
-No match
- ac\ncb
-No match
-
-/a(.*?)(.)/
- a\xc0\x88b
- 0: a\xc0
- 1:
- 2: \xc0
-
-/a(.*?)(.)/8
- a\x{100}b
- 0: a\x{100}
- 1:
- 2: \x{100}
-
-/a(.*)(.)/
- a\xc0\x88b
- 0: a\xc0\x88b
- 1: \xc0\x88
- 2: b
-
-/a(.*)(.)/8
- a\x{100}b
- 0: a\x{100}b
- 1: \x{100}
- 2: b
-
-/a(.)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: \xc0
- 2: \x92
-
-/a(.)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: \x{240}
- 2: b
-
-/a(.?)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: \xc0
- 2: \x92
-
-/a(.?)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: \x{240}
- 2: b
-
-/a(.??)(.)/
- a\xc0\x92bcd
- 0: a\xc0
- 1:
- 2: \xc0
-
-/a(.??)(.)/8
- a\x{240}bcd
- 0: a\x{240}
- 1:
- 2: \x{240}
-
-/a(.{3})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- *** Failers
-No match
- a\x{1234}b
-No match
- ac\ncb
-No match
-
-/a(.{3,})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- axxxxbcdefghijb
- 0: axxxxbcdefghijb
- 1: xxxxbcdefghij
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- 1: \x{1234}\x{4321}\x{3412}\x{3421}
- *** Failers
-No match
- a\x{1234}b
-No match
-
-/a(.{3,}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- axxxxbcdefghijb
- 0: axxxxb
- 1: xxxx
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- 1: \x{1234}\x{4321}\x{3412}\x{3421}
- *** Failers
-No match
- a\x{1234}b
-No match
-
-/a(.{3,5})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- axxxxbcdefghijb
- 0: axxxxb
- 1: xxxx
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- 1: \x{1234}\x{4321}\x{3412}\x{3421}
- axbxxbcdefghijb
- 0: axbxxb
- 1: xbxx
- axxxxxbcdefghijb
- 0: axxxxxb
- 1: xxxxx
- *** Failers
-No match
- a\x{1234}b
-No match
- axxxxxxbcdefghijb
-No match
-
-/a(.{3,5}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- axxxxbcdefghijb
- 0: axxxxb
- 1: xxxx
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- 1: \x{1234}\x{4321}\x{3412}\x{3421}
- axbxxbcdefghijb
- 0: axbxxb
- 1: xbxx
- axxxxxbcdefghijb
- 0: axxxxxb
- 1: xxxxx
- *** Failers
-No match
- a\x{1234}b
-No match
- axxxxxxbcdefghijb
-No match
-
-/^[a\x{c0}]/8
- *** Failers
-No match
- \x{100}
-No match
-
-/(?<=aXb)cd/8
- aXbcd
- 0: cd
-
-/(?<=a\x{100}b)cd/8
- a\x{100}bcd
- 0: cd
-
-/(?<=a\x{100000}b)cd/8
- a\x{100000}bcd
- 0: cd
-
-/(?:\x{100}){3}b/8
- \x{100}\x{100}\x{100}b
- 0: \x{100}\x{100}\x{100}b
- *** Failers
-No match
- \x{100}\x{100}b
-No match
-
-/\x{ab}/8
- \x{ab}
- 0: \x{ab}
- \xc2\xab
- 0: \x{ab}
- *** Failers
-No match
- \x00{ab}
-No match
-
-/(?<=(.))X/8
- WXYZ
- 0: X
- 1: W
- \x{256}XYZ
- 0: X
- 1: \x{256}
- *** Failers
-No match
- XYZ
-No match
-
-/[^a]+/8g
- bcd
- 0: bcd
- \x{100}aY\x{256}Z
- 0: \x{100}
- 0: Y\x{256}Z
-
-/^[^a]{2}/8
- \x{100}bc
- 0: \x{100}b
-
-/^[^a]{2,}/8
- \x{100}bcAa
- 0: \x{100}bcA
-
-/^[^a]{2,}?/8
- \x{100}bca
- 0: \x{100}b
-
-/[^a]+/8ig
- bcd
- 0: bcd
- \x{100}aY\x{256}Z
- 0: \x{100}
- 0: Y\x{256}Z
-
-/^[^a]{2}/8i
- \x{100}bc
- 0: \x{100}b
-
-/^[^a]{2,}/8i
- \x{100}bcAa
- 0: \x{100}bc
-
-/^[^a]{2,}?/8i
- \x{100}bca
- 0: \x{100}b
-
-/\x{100}{0,0}/8
- abcd
- 0:
-
-/\x{100}?/8
- abcd
- 0:
- \x{100}\x{100}
- 0: \x{100}
-
-/\x{100}{0,3}/8
- \x{100}\x{100}
- 0: \x{100}\x{100}
- \x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}
-
-/\x{100}*/8
- abce
- 0:
- \x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}\x{100}
-
-/\x{100}{1,1}/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}
-
-/\x{100}{1,3}/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}
-
-/\x{100}+/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}\x{100}
-
-/\x{100}{3}/8
- abcd\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}
-
-/\x{100}{3,5}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}
-
-/\x{100}{3,}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-
-/(?<=a\x{100}{2}b)X/8+
- Xyyya\x{100}\x{100}bXzzz
- 0: X
- 0+ zzz
-
-/\D*/8
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\D*/8
- \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-
-/\D/8
- 1X2
- 0: X
- 1\x{100}2
- 0: \x{100}
-
-/>\S/8
- > >X Y
- 0: >X
- > >\x{100} Y
- 0: >\x{100}
-
-/\d/8
- \x{100}3
- 0: 3
-
-/\s/8
- \x{100} X
- 0:
-
-/\D+/8
- 12abcd34
- 0: abcd
- *** Failers
- 0: *** Failers
- 1234
-No match
-
-/\D{2,3}/8
- 12abcd34
- 0: abc
- 12ab34
- 0: ab
- *** Failers
- 0: ***
- 1234
-No match
- 12a34
-No match
-
-/\D{2,3}?/8
- 12abcd34
- 0: ab
- 12ab34
- 0: ab
- *** Failers
- 0: **
- 1234
-No match
- 12a34
-No match
-
-/\d+/8
- 12abcd34
- 0: 12
- *** Failers
-No match
-
-/\d{2,3}/8
- 12abcd34
- 0: 12
- 1234abcd
- 0: 123
- *** Failers
-No match
- 1.4
-No match
-
-/\d{2,3}?/8
- 12abcd34
- 0: 12
- 1234abcd
- 0: 12
- *** Failers
-No match
- 1.4
-No match
-
-/\S+/8
- 12abcd34
- 0: 12abcd34
- *** Failers
- 0: ***
- \ \
-No match
-
-/\S{2,3}/8
- 12abcd34
- 0: 12a
- 1234abcd
- 0: 123
- *** Failers
- 0: ***
- \ \
-No match
-
-/\S{2,3}?/8
- 12abcd34
- 0: 12
- 1234abcd
- 0: 12
- *** Failers
- 0: **
- \ \
-No match
-
-/>\s+</8+
- 12> <34
- 0: > <
- 0+ 34
- *** Failers
-No match
-
-/>\s{2,3}</8+
- ab> <cd
- 0: > <
- 0+ cd
- ab> <ce
- 0: > <
- 0+ ce
- *** Failers
-No match
- ab> <cd
-No match
-
-/>\s{2,3}?</8+
- ab> <cd
- 0: > <
- 0+ cd
- ab> <ce
- 0: > <
- 0+ ce
- *** Failers
-No match
- ab> <cd
-No match
-
-/\w+/8
- 12 34
- 0: 12
- *** Failers
- 0: Failers
- +++=*!
-No match
-
-/\w{2,3}/8
- ab cd
- 0: ab
- abcd ce
- 0: abc
- *** Failers
- 0: Fai
- a.b.c
-No match
-
-/\w{2,3}?/8
- ab cd
- 0: ab
- abcd ce
- 0: ab
- *** Failers
- 0: Fa
- a.b.c
-No match
-
-/\W+/8
- 12====34
- 0: ====
- *** Failers
- 0: ***
- abcd
-No match
-
-/\W{2,3}/8
- ab====cd
- 0: ===
- ab==cd
- 0: ==
- *** Failers
- 0: ***
- a.b.c
-No match
-
-/\W{2,3}?/8
- ab====cd
- 0: ==
- ab==cd
- 0: ==
- *** Failers
- 0: **
- a.b.c
-No match
-
-/[\x{100}]/8
- \x{100}
- 0: \x{100}
- Z\x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
-No match
-
-/[Z\x{100}]/8
- Z\x{100}
- 0: Z
- \x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
-No match
-
-/[\x{100}\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- *** Failers
-No match
-
-/[\x{100}-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- *** Failers
-No match
-
-/[z-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- abzcd
- 0: z
- ab|cd
- 0: |
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- Q?
- 0: Q
- *** Failers
-No match
-
-/[Q\x{100}-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- Q?
- 0: Q
- *** Failers
-No match
-
-/[Qz-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- abzcd
- 0: z
- ab|cd
- 0: |
- Q?
- 0: Q
- *** Failers
-No match
-
-/[\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- *** Failers
-No match
-
-/[\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}
- *** Failers
-No match
-
-/(?<=[\x{100}\x{200}])X/8
- abc\x{200}X
- 0: X
- abc\x{100}X
- 0: X
- *** Failers
-No match
- X
-No match
-
-/(?<=[Q\x{100}\x{200}])X/8
- abc\x{200}X
- 0: X
- abc\x{100}X
- 0: X
- abQX
- 0: X
- *** Failers
-No match
- X
-No match
-
-/(?<=[\x{100}\x{200}]{3})X/8
- abc\x{100}\x{200}\x{100}X
- 0: X
- *** Failers
-No match
- abc\x{200}X
-No match
- X
-No match
-
-/[^\x{100}\x{200}]X/8
- AX
- 0: AX
- \x{150}X
- 0: \x{150}X
- \x{500}X
- 0: \x{500}X
- *** Failers
-No match
- \x{100}X
-No match
- \x{200}X
-No match
-
-/[^Q\x{100}\x{200}]X/8
- AX
- 0: AX
- \x{150}X
- 0: \x{150}X
- \x{500}X
- 0: \x{500}X
- *** Failers
-No match
- \x{100}X
-No match
- \x{200}X
-No match
- QX
-No match
-
-/[^\x{100}-\x{200}]X/8
- AX
- 0: AX
- \x{500}X
- 0: \x{500}X
- *** Failers
-No match
- \x{100}X
-No match
- \x{150}X
-No match
- \x{200}X
-No match
-
-/[z-\x{100}]/8i
- z
- 0: z
- Z
- 0: Z
- \x{100}
- 0: \x{100}
- *** Failers
-No match
- \x{102}
-No match
- y
-No match
-
-/[\xFF]/
- >\xff<
- 0: \xff
-
-/[\xff]/8
- >\x{ff}<
- 0: \x{ff}
-
-/[^\xFF]/
- XYZ
- 0: X
-
-/[^\xff]/8
- XYZ
- 0: X
- \x{123}
- 0: \x{123}
-
-/^[ac]*b/8
- xb
-No match
-
-/^[ac\x{100}]*b/8
- xb
-No match
-
-/^[^x]*b/8i
- xb
-No match
-
-/^[^x]*b/8
- xb
-No match
-
-/^\d*b/8
- xb
-No match
-
-/(|a)/g8
- catac
- 0:
- 1:
- 0:
- 1:
- 0: a
- 1: a
- 0:
- 1:
- 0:
- 1:
- 0: a
- 1: a
- 0:
- 1:
- 0:
- 1:
- a\x{256}a
- 0:
- 1:
- 0: a
- 1: a
- 0:
- 1:
- 0:
- 1:
- 0: a
- 1: a
- 0:
- 1:
-
-/^\x{85}$/8i
- \x{85}
- 0: \x{85}
-
-/^ሴ/8
- ሴ
- 0: \x{1234}
-
-/^\ሴ/8
- ሴ
- 0: \x{1234}
-
-"(?s)(.{1,5})"8
- abcdefg
- 0: abcde
- 1: abcde
- ab
- 0: ab
- 1: ab
-
-/a*\x{100}*\w/8
- a
- 0: a
-
-/\S\S/8g
- A\x{a3}BC
- 0: A\x{a3}
- 0: BC
-
-/\S{2}/8g
- A\x{a3}BC
- 0: A\x{a3}
- 0: BC
-
-/\W\W/8g
- +\x{a3}==
- 0: +\x{a3}
- 0: ==
-
-/\W{2}/8g
- +\x{a3}==
- 0: +\x{a3}
- 0: ==
-
-/\S/8g
- \x{442}\x{435}\x{441}\x{442}
- 0: \x{442}
- 0: \x{435}
- 0: \x{441}
- 0: \x{442}
-
-/[\S]/8g
- \x{442}\x{435}\x{441}\x{442}
- 0: \x{442}
- 0: \x{435}
- 0: \x{441}
- 0: \x{442}
-
-/\D/8g
- \x{442}\x{435}\x{441}\x{442}
- 0: \x{442}
- 0: \x{435}
- 0: \x{441}
- 0: \x{442}
-
-/[\D]/8g
- \x{442}\x{435}\x{441}\x{442}
- 0: \x{442}
- 0: \x{435}
- 0: \x{441}
- 0: \x{442}
-
-/\W/8g
- \x{2442}\x{2435}\x{2441}\x{2442}
- 0: \x{2442}
- 0: \x{2435}
- 0: \x{2441}
- 0: \x{2442}
-
-/[\W]/8g
- \x{2442}\x{2435}\x{2441}\x{2442}
- 0: \x{2442}
- 0: \x{2435}
- 0: \x{2441}
- 0: \x{2442}
-
-/[\S\s]*/8
- abc\n\r\x{442}\x{435}\x{441}\x{442}xyz
- 0: abc\x{0a}\x{0d}\x{442}\x{435}\x{441}\x{442}xyz
-
-/[\x{41f}\S]/8g
- \x{442}\x{435}\x{441}\x{442}
- 0: \x{442}
- 0: \x{435}
- 0: \x{441}
- 0: \x{442}
-
-/.[^\S]./8g
- abc def\x{442}\x{443}xyz\npqr
- 0: c d
- 0: z\x{0a}p
-
-/.[^\S\n]./8g
- abc def\x{442}\x{443}xyz\npqr
- 0: c d
-
-/[[:^alnum:]]/8g
- +\x{2442}
- 0: +
- 0: \x{2442}
-
-/[[:^alpha:]]/8g
- +\x{2442}
- 0: +
- 0: \x{2442}
-
-/[[:^ascii:]]/8g
- A\x{442}
- 0: \x{442}
-
-/[[:^blank:]]/8g
- A\x{442}
- 0: A
- 0: \x{442}
-
-/[[:^cntrl:]]/8g
- A\x{442}
- 0: A
- 0: \x{442}
-
-/[[:^digit:]]/8g
- A\x{442}
- 0: A
- 0: \x{442}
-
-/[[:^graph:]]/8g
- \x19\x{e01ff}
- 0: \x{19}
- 0: \x{e01ff}
-
-/[[:^lower:]]/8g
- A\x{422}
- 0: A
- 0: \x{422}
-
-/[[:^print:]]/8g
- \x{19}\x{e01ff}
- 0: \x{19}
- 0: \x{e01ff}
-
-/[[:^punct:]]/8g
- A\x{442}
- 0: A
- 0: \x{442}
-
-/[[:^space:]]/8g
- A\x{442}
- 0: A
- 0: \x{442}
-
-/[[:^upper:]]/8g
- a\x{442}
- 0: a
- 0: \x{442}
-
-/[[:^word:]]/8g
- +\x{2442}
- 0: +
- 0: \x{2442}
-
-/[[:^xdigit:]]/8g
- M\x{442}
- 0: M
- 0: \x{442}
-
-/[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d-_^]/8
-
-/^[^d]*?$/
- abc
- 0: abc
-
-/^[^d]*?$/8
- abc
- 0: abc
-
-/^[^d]*?$/i
- abc
- 0: abc
-
-/^[^d]*?$/8i
- abc
- 0: abc
-
-/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8
-
-/^[a\x{c0}]b/8
- \x{c0}b
- 0: \x{c0}b
-
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
- 0: a\x{c0}aa
- 1: a\x{c0}
-
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
- 0: a\x{c0}aa
- 1: a\x{c0}
- a\x{c0}a\x{c0}aaa/
- 0: a\x{c0}a\x{c0}aa
- 1: a\x{c0}a\x{c0}
-
-/^([a\x{c0}]*)aa/8
- a\x{c0}aaaa/
- 0: a\x{c0}aaaa
- 1: a\x{c0}aa
- a\x{c0}a\x{c0}aaa/
- 0: a\x{c0}a\x{c0}aaa
- 1: a\x{c0}a\x{c0}a
-
-/^([a\x{c0}]*)a\x{c0}/8
- a\x{c0}aaaa/
- 0: a\x{c0}
- 1:
- a\x{c0}a\x{c0}aaa/
- 0: a\x{c0}a\x{c0}
- 1: a\x{c0}
-
-/A*/g8
- AAB\x{123}BAA
- 0: AA
- 0:
- 0:
- 0:
- 0: AA
- 0:
-
-/(abc)\1/8i
- abc
-No match
-
-/(abc)\1/8
- abc
-No match
-
-/a(*:a\x{1234}b)/8K
- abc
- 0: a
-MK: a\x{1234}b
-
-/a(*:a£b)/8K
- abc
- 0: a
-MK: a\x{a3}b
-
-/-- End of testinput4 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput5 b/src/third_party/pcre-8.30/testdata/testoutput5
deleted file mode 100644
index 3c90ea5ab19..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput5
+++ /dev/null
@@ -1,1652 +0,0 @@
-/-- This set of tests checks the API, internals, and non-Perl stuff for UTF
- support, excluding Unicode properties. However, tests that give different
- results in 8-bit and 16-bit modes are excluded (see tests 16 and 17). --/
-
-/\x{110000}/8DZ
-Failed: character value in \x{...} sequence is too large at offset 9
-
-/\x{ffffffff}/8
-Failed: character value in \x{...} sequence is too large at offset 11
-
-/\x{100000000}/8
-Failed: character value in \x{...} sequence is too large at offset 12
-
-/\x{d800}/8
-Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
-
-/\x{dfff}/8
-Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
-
-/\x{d7ff}/8
-
-/\x{e000}/8
-
-/^\x{100}a\x{1234}/8
- \x{100}a\x{1234}bcd
- 0: \x{100}a\x{1234}
-
-/\x{0041}\x{2262}\x{0391}\x{002e}/DZ8
-------------------------------------------------------------------
- Bra
- A\x{2262}\x{391}.
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'A'
-Need char = '.'
- \x{0041}\x{2262}\x{0391}\x{002e}
- 0: A\x{2262}\x{391}.
-
-/.{3,5}X/DZ8
-------------------------------------------------------------------
- Bra
- Any{3}
- Any{0,2}
- X
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'X'
- \x{212ab}\x{212ab}\x{212ab}\x{861}X
- 0: \x{212ab}\x{212ab}\x{212ab}\x{861}X
-
-/.{3,5}?/DZ8
-------------------------------------------------------------------
- Bra
- Any{3}
- Any{0,2}?
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
- \x{212ab}\x{212ab}\x{212ab}\x{861}
- 0: \x{212ab}\x{212ab}\x{212ab}
-
-/(?<=\C)X/8
-Failed: \C not allowed in lookbehind assertion at offset 6
-
-/^[ab]/8DZ
-------------------------------------------------------------------
- Bra
- ^
- [ab]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored utf
-No first char
-No need char
- bar
- 0: b
- *** Failers
-No match
- c
-No match
- \x{ff}
-No match
- \x{100}
-No match
-
-/^[^ab]/8DZ
-------------------------------------------------------------------
- Bra
- ^
- [\x00-`c-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored utf
-No first char
-No need char
- c
- 0: c
- \x{ff}
- 0: \x{ff}
- \x{100}
- 0: \x{100}
- *** Failers
- 0: *
- aaa
-No match
-
-/\x{100}*(\d+|"(?1)")/8
- 1234
- 0: 1234
- 1: 1234
- "1234"
- 0: "1234"
- 1: "1234"
- \x{100}1234
- 0: \x{100}1234
- 1: 1234
- "\x{100}1234"
- 0: \x{100}1234
- 1: 1234
- \x{100}\x{100}12ab
- 0: \x{100}\x{100}12
- 1: 12
- \x{100}\x{100}"12"
- 0: \x{100}\x{100}"12"
- 1: "12"
- *** Failers
-No match
- \x{100}\x{100}abcd
-No match
-
-/\x{100}*/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}*
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/a\x{100}*/8DZ
-------------------------------------------------------------------
- Bra
- a
- \x{100}*
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'a'
-No need char
-
-/ab\x{100}*/8DZ
-------------------------------------------------------------------
- Bra
- ab
- \x{100}*
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-First char = 'a'
-Need char = 'b'
-
-/\x{100}*A/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}*+
- A
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-Need char = 'A'
- A
- 0: A
-
-/\x{100}*\d(?R)/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}*+
- \d
- Recurse
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/[Z\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- [Z\x{100}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
- Z\x{100}
- 0: Z
- \x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
-No match
-
-/[\x{200}-\x{100}]/8
-Failed: range out of order in character class at offset 15
-
-/[Ā-Ą]/8
- \x{100}
- 0: \x{100}
- \x{104}
- 0: \x{104}
- *** Failers
-No match
- \x{105}
-No match
- \x{ff}
-No match
-
-/[z-\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- [z-\x{100}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/[z\Qa-d]Ā\E]/8DZ
-------------------------------------------------------------------
- Bra
- [\-\]adz\x{100}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
- \x{100}
- 0: \x{100}
- Ā
- 0: \x{100}
-
-/[\xFF]/DZ
-------------------------------------------------------------------
- Bra
- \xff
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-First char = \xff
-No need char
- >\xff<
- 0: \xff
-
-/[^\xFF]/DZ
-------------------------------------------------------------------
- Bra
- [^\xff]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[Ä-Ü]/8
- Ö # Matches without Study
- 0: \x{d6}
- \x{d6}
- 0: \x{d6}
-
-/[Ä-Ü]/8S
- Ö <-- Same with Study
- 0: \x{d6}
- \x{d6}
- 0: \x{d6}
-
-/[\x{c4}-\x{dc}]/8
- Ö # Matches without Study
- 0: \x{d6}
- \x{d6}
- 0: \x{d6}
-
-/[\x{c4}-\x{dc}]/8S
- Ö <-- Same with Study
- 0: \x{d6}
- \x{d6}
- 0: \x{d6}
-
-/[^\x{100}]abc(xyz(?1))/8DZ
-------------------------------------------------------------------
- Bra
- [^\x{100}]
- abc
- CBra 1
- xyz
- Recurse
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-Need char = 'z'
-
-/[ab\x{100}]abc(xyz(?1))/8DZ
-------------------------------------------------------------------
- Bra
- [ab\x{100}]
- abc
- CBra 1
- xyz
- Recurse
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf
-No first char
-Need char = 'z'
-
-/(\x{100}(b(?2)c))?/DZ8
-------------------------------------------------------------------
- Bra
- Brazero
- CBra 1
- \x{100}
- CBra 2
- b
- Recurse
- c
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Options: utf
-No first char
-No need char
-
-/(\x{100}(b(?2)c)){0,2}/DZ8
-------------------------------------------------------------------
- Bra
- Brazero
- Bra
- CBra 1
- \x{100}
- CBra 2
- b
- Recurse
- c
- Ket
- Ket
- Brazero
- CBra 1
- \x{100}
- CBra 2
- b
- Recurse
- c
- Ket
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Options: utf
-No first char
-No need char
-
-/(\x{100}(b(?1)c))?/DZ8
-------------------------------------------------------------------
- Bra
- Brazero
- CBra 1
- \x{100}
- CBra 2
- b
- Recurse
- c
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Options: utf
-No first char
-No need char
-
-/(\x{100}(b(?1)c)){0,2}/DZ8
-------------------------------------------------------------------
- Bra
- Brazero
- Bra
- CBra 1
- \x{100}
- CBra 2
- b
- Recurse
- c
- Ket
- Ket
- Brazero
- CBra 1
- \x{100}
- CBra 2
- b
- Recurse
- c
- Ket
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 2
-Options: utf
-No first char
-No need char
-
-/\W/8
- A.B
- 0: .
- A\x{100}B
- 0: \x{100}
-
-/\w/8
- \x{100}X
- 0: X
-
-/^\ሴ/8DZ
-------------------------------------------------------------------
- Bra
- ^
- \x{1234}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: anchored utf
-No first char
-No need char
-
-/\x{100}*\d/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}*+
- \d
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/\x{100}*\s/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}*+
- \s
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/\x{100}*\w/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}*+
- \w
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/\x{100}*\D/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}*
- \D
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/\x{100}*\S/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}*
- \S
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/\x{100}*\W/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}*
- \W
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/()()()()()()()()()()
- ()()()()()()()()()()
- ()()()()()()()()()()
- ()()()()()()()()()()
- A (x) (?41) B/8x
- AxxB
-Matched, but too many substrings
- 0: AxxB
- 1:
- 2:
- 3:
- 4:
- 5:
- 6:
- 7:
- 8:
- 9:
-10:
-11:
-12:
-13:
-14:
-
-/^[\x{100}\E-\Q\E\x{150}]/BZ8
-------------------------------------------------------------------
- Bra
- ^
- [\x{100}-\x{150}]
- Ket
- End
-------------------------------------------------------------------
-
-/^[\QĀ\E-\QŐ\E]/BZ8
-------------------------------------------------------------------
- Bra
- ^
- [\x{100}-\x{150}]
- Ket
- End
-------------------------------------------------------------------
-
-/^abc./mgx8<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc7
- 0: abc8
- 0: abc9
-
-/abc.$/mgx8<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc7
- 0: abc8
- 0: abc9
-
-/^a\Rb/8<bsr_unicode>
- a\nb
- 0: a\x{0a}b
- a\rb
- 0: a\x{0d}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x0bb
- 0: a\x{0b}b
- a\x0cb
- 0: a\x{0c}b
- a\x{85}b
- 0: a\x{85}b
- a\x{2028}b
- 0: a\x{2028}b
- a\x{2029}b
- 0: a\x{2029}b
- ** Failers
-No match
- a\n\rb
-No match
-
-/^a\R*b/8<bsr_unicode>
- ab
- 0: ab
- a\nb
- 0: a\x{0a}b
- a\rb
- 0: a\x{0d}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x0bb
- 0: a\x{0b}b
- a\x0c\x{2028}\x{2029}b
- 0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
- 0: a\x{85}b
- a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
- 0: a\x{0a}\x{0d}\x{85}\x{0c}b
-
-/^a\R+b/8<bsr_unicode>
- a\nb
- 0: a\x{0a}b
- a\rb
- 0: a\x{0d}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x0bb
- 0: a\x{0b}b
- a\x0c\x{2028}\x{2029}b
- 0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
- 0: a\x{85}b
- a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
- 0: a\x{0a}\x{0d}\x{85}\x{0c}b
- ** Failers
-No match
- ab
-No match
-
-/^a\R{1,3}b/8<bsr_unicode>
- a\nb
- 0: a\x{0a}b
- a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}b
- 0: a\x{0a}\x{0d}\x{85}b
- a\r\n\r\nb
- 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
- a\r\n\r\n\r\nb
- 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
- a\n\r\n\rb
- 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
- a\n\n\r\nb
- 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
- ** Failers
-No match
- a\n\n\n\rb
-No match
- a\r
-No match
-
-/\H\h\V\v/8
- X X\x0a
- 0: X X\x{0a}
- X\x09X\x0b
- 0: X\x{09}X\x{0b}
- ** Failers
-No match
- \x{a0} X\x0a
-No match
-
-/\H*\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
- \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
- \x09\x20\x{a0}\x0a\x0b\x0c
- 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
- ** Failers
-No match
- \x09\x20\x{a0}\x0a\x0b
-No match
-
-/\H\h\V\v/8
- \x{3001}\x{3000}\x{2030}\x{2028}
- 0: \x{3001}\x{3000}\x{2030}\x{2028}
- X\x{180e}X\x{85}
- 0: X\x{180e}X\x{85}
- ** Failers
-No match
- \x{2009} X\x0a
-No match
-
-/\H*\h+\V?\v{3,4}/8
- \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
- 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
- \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
- 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
- \x09\x20\x{202f}\x0a\x0b\x0c
- 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
- ** Failers
-No match
- \x09\x{200a}\x{a0}\x{2028}\x0b
-No match
-
-/[\h]/8BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]
- Ket
- End
-------------------------------------------------------------------
- >\x{1680}
- 0: \x{1680}
-
-/[\h]{3,}/8BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}]{3,}
- Ket
- End
-------------------------------------------------------------------
- >\x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}<
- 0: \x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}
-
-/[\v]/8BZ
-------------------------------------------------------------------
- Bra
- [\x0a-\x0d\x85\x{2028}-\x{2029}]
- Ket
- End
-------------------------------------------------------------------
-
-/[\H]/8BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}]
- Ket
- End
-------------------------------------------------------------------
-
-/[\V]/8BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}]
- Ket
- End
-------------------------------------------------------------------
-
-/.*$/8<any>
- \x{1ec5}
- 0: \x{1ec5}
-
-/a\Rb/I8<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf utf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x{0d}b
- a\nb
- 0: a\x{0a}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- ** Failers
-No match
- a\x{85}b
-No match
- a\x0bb
-No match
-
-/a\Rb/I8<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode utf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x{0d}b
- a\nb
- 0: a\x{0a}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x{85}b
- 0: a\x{85}b
- a\x0bb
- 0: a\x{0b}b
- ** Failers
-No match
- a\x{85}b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R?b/I8<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf utf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x{0d}b
- a\nb
- 0: a\x{0a}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- ** Failers
-No match
- a\x{85}b
-No match
- a\x0bb
-No match
-
-/a\R?b/I8<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode utf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x{0d}b
- a\nb
- 0: a\x{0a}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x{85}b
- 0: a\x{85}b
- a\x0bb
- 0: a\x{0b}b
- ** Failers
-No match
- a\x{85}b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/.*a.*=.b.*/8<ANY>
- QQQ\x{2029}ABCaXYZ=!bPQR
- 0: ABCaXYZ=!bPQR
- ** Failers
-No match
- a\x{2029}b
-No match
- \x61\xe2\x80\xa9\x62
-No match
-
-/[[:a\x{100}b:]]/8
-Failed: unknown POSIX class name at offset 3
-
-/a[^]b/<JS>8
- a\x{1234}b
- 0: a\x{1234}b
- a\nb
- 0: a\x{0a}b
- ** Failers
-No match
- ab
-No match
-
-/a[^]+b/<JS>8
- aXb
- 0: aXb
- a\nX\nX\x{1234}b
- 0: a\x{0a}X\x{0a}X\x{1234}b
- ** Failers
-No match
- ab
-No match
-
-/(\x{de})\1/
- \x{de}\x{de}
- 0: \xde\xde
- 1: \xde
-
-/X/8f<any>
- A\x{1ec5}ABCXYZ
- 0: X
-
-/Xa{2,4}b/8
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/Xa{2,4}?b/8
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/Xa{2,4}+b/8
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X\x{123}{2,4}b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X\x{123}{2,4}?b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X\x{123}{2,4}+b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X\x{123}{2,4}b/8
- Xx\P
-No match
- X\x{123}x\P
-No match
- X\x{123}\x{123}x\P
-No match
- X\x{123}\x{123}\x{123}x\P
-No match
- X\x{123}\x{123}\x{123}\x{123}x\P
-No match
-
-/X\x{123}{2,4}?b/8
- Xx\P
-No match
- X\x{123}x\P
-No match
- X\x{123}\x{123}x\P
-No match
- X\x{123}\x{123}\x{123}x\P
-No match
- X\x{123}\x{123}\x{123}\x{123}x\P
-No match
-
-/X\x{123}{2,4}+b/8
- Xx\P
-No match
- X\x{123}x\P
-No match
- X\x{123}\x{123}x\P
-No match
- X\x{123}\x{123}\x{123}x\P
-No match
- X\x{123}\x{123}\x{123}\x{123}x\P
-No match
-
-/X\d{2,4}b/8
- X\P
-Partial match: X
- X3\P
-Partial match: X3
- X33\P
-Partial match: X33
- X333\P
-Partial match: X333
- X3333\P
-Partial match: X3333
-
-/X\d{2,4}?b/8
- X\P
-Partial match: X
- X3\P
-Partial match: X3
- X33\P
-Partial match: X33
- X333\P
-Partial match: X333
- X3333\P
-Partial match: X3333
-
-/X\d{2,4}+b/8
- X\P
-Partial match: X
- X3\P
-Partial match: X3
- X33\P
-Partial match: X33
- X333\P
-Partial match: X333
- X3333\P
-Partial match: X3333
-
-/X\D{2,4}b/8
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X\D{2,4}?b/8
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X\D{2,4}+b/8
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X\D{2,4}b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X\D{2,4}?b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X\D{2,4}+b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X[abc]{2,4}b/8
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X[abc]{2,4}?b/8
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X[abc]{2,4}+b/8
- X\P
-Partial match: X
- Xa\P
-Partial match: Xa
- Xaa\P
-Partial match: Xaa
- Xaaa\P
-Partial match: Xaaa
- Xaaaa\P
-Partial match: Xaaaa
-
-/X[abc\x{123}]{2,4}b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X[abc\x{123}]{2,4}?b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X[abc\x{123}]{2,4}+b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X[^a]{2,4}b/8
- X\P
-Partial match: X
- Xz\P
-Partial match: Xz
- Xzz\P
-Partial match: Xzz
- Xzzz\P
-Partial match: Xzzz
- Xzzzz\P
-Partial match: Xzzzz
-
-/X[^a]{2,4}?b/8
- X\P
-Partial match: X
- Xz\P
-Partial match: Xz
- Xzz\P
-Partial match: Xzz
- Xzzz\P
-Partial match: Xzzz
- Xzzzz\P
-Partial match: Xzzzz
-
-/X[^a]{2,4}+b/8
- X\P
-Partial match: X
- Xz\P
-Partial match: Xz
- Xzz\P
-Partial match: Xzz
- Xzzz\P
-Partial match: Xzzz
- Xzzzz\P
-Partial match: Xzzzz
-
-/X[^a]{2,4}b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X[^a]{2,4}?b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/X[^a]{2,4}+b/8
- X\P
-Partial match: X
- X\x{123}\P
-Partial match: X\x{123}
- X\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}
- X\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}
- X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: X\x{123}\x{123}\x{123}\x{123}
-
-/(Y)X\1{2,4}b/8
- YX\P
-Partial match: YX
- YXY\P
-Partial match: YXY
- YXYY\P
-Partial match: YXYY
- YXYYY\P
-Partial match: YXYYY
- YXYYYY\P
-Partial match: YXYYYY
-
-/(Y)X\1{2,4}?b/8
- YX\P
-Partial match: YX
- YXY\P
-Partial match: YXY
- YXYY\P
-Partial match: YXYY
- YXYYY\P
-Partial match: YXYYY
- YXYYYY\P
-Partial match: YXYYYY
-
-/(Y)X\1{2,4}+b/8
- YX\P
-Partial match: YX
- YXY\P
-Partial match: YXY
- YXYY\P
-Partial match: YXYY
- YXYYY\P
-Partial match: YXYYY
- YXYYYY\P
-Partial match: YXYYYY
-
-/(\x{123})X\1{2,4}b/8
- \x{123}X\P
-Partial match: \x{123}X
- \x{123}X\x{123}\P
-Partial match: \x{123}X\x{123}
- \x{123}X\x{123}\x{123}\P
-Partial match: \x{123}X\x{123}\x{123}
- \x{123}X\x{123}\x{123}\x{123}\P
-Partial match: \x{123}X\x{123}\x{123}\x{123}
- \x{123}X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
-
-/(\x{123})X\1{2,4}?b/8
- \x{123}X\P
-Partial match: \x{123}X
- \x{123}X\x{123}\P
-Partial match: \x{123}X\x{123}
- \x{123}X\x{123}\x{123}\P
-Partial match: \x{123}X\x{123}\x{123}
- \x{123}X\x{123}\x{123}\x{123}\P
-Partial match: \x{123}X\x{123}\x{123}\x{123}
- \x{123}X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
-
-/(\x{123})X\1{2,4}+b/8
- \x{123}X\P
-Partial match: \x{123}X
- \x{123}X\x{123}\P
-Partial match: \x{123}X\x{123}
- \x{123}X\x{123}\x{123}\P
-Partial match: \x{123}X\x{123}\x{123}
- \x{123}X\x{123}\x{123}\x{123}\P
-Partial match: \x{123}X\x{123}\x{123}\x{123}
- \x{123}X\x{123}\x{123}\x{123}\x{123}\P
-Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
-
-/\bthe cat\b/8
- the cat\P
- 0: the cat
- the cat\P\P
-Partial match: the cat
-
-/abcd*/8
- xxxxabcd\P
- 0: abcd
- xxxxabcd\P\P
-Partial match: abcd
-
-/abcd*/i8
- xxxxabcd\P
- 0: abcd
- xxxxabcd\P\P
-Partial match: abcd
- XXXXABCD\P
- 0: ABCD
- XXXXABCD\P\P
-Partial match: ABCD
-
-/abc\d*/8
- xxxxabc1\P
- 0: abc1
- xxxxabc1\P\P
-Partial match: abc1
-
-/(a)bc\1*/8
- xxxxabca\P
- 0: abca
- 1: a
- xxxxabca\P\P
-Partial match: abca
-
-/abc[de]*/8
- xxxxabcde\P
- 0: abcde
- xxxxabcde\P\P
-Partial match: abcde
-
-/X\W{3}X/8
- \PX
-Partial match: X
-
-/\sxxx\s/8T1
- AB\x{85}xxx\x{a0}XYZ
- 0: \x{85}xxx\x{a0}
- AB\x{a0}xxx\x{85}XYZ
- 0: \x{a0}xxx\x{85}
-
-/\S \S/8T1
- \x{a2} \x{84}
- 0: \x{a2} \x{84}
-
-'A#хц'8x<any>BZ
-------------------------------------------------------------------
- Bra
- A
- Ket
- End
-------------------------------------------------------------------
-
-'A#хц
- PQ'8x<any>BZ
-------------------------------------------------------------------
- Bra
- APQ
- Ket
- End
-------------------------------------------------------------------
-
-/a+#хaa
- z#XX?/8x<any>BZ
-------------------------------------------------------------------
- Bra
- a++
- z
- Ket
- End
-------------------------------------------------------------------
-
-/a+#хaa
- z#х?/8x<any>BZ
-------------------------------------------------------------------
- Bra
- a++
- z
- Ket
- End
-------------------------------------------------------------------
-
-/\g{A}xxx#bXX(?'A'123) (?'A'456)/8x<any>BZ
-------------------------------------------------------------------
- Bra
- \1
- xxx
- CBra 1
- 456
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/\g{A}xxx#bх(?'A'123) (?'A'456)/8x<any>BZ
-------------------------------------------------------------------
- Bra
- \1
- xxx
- CBra 1
- 456
- Ket
- Ket
- End
-------------------------------------------------------------------
-
-/^\cģ/8
-Failed: \c must be followed by an ASCII character at offset 3
-
-/(\R*)(.)/s8
- \r\n
- 0: \x{0d}
- 1:
- 2: \x{0d}
- \r\r\n\n\r
- 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
- 1: \x{0d}\x{0d}\x{0a}\x{0a}
- 2: \x{0d}
- \r\r\n\n\r\n
- 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
- 1: \x{0d}\x{0d}\x{0a}\x{0a}
- 2: \x{0d}
-
-/(\R)*(.)/s8
- \r\n
- 0: \x{0d}
- 1: <unset>
- 2: \x{0d}
- \r\r\n\n\r
- 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
- 1: \x{0a}
- 2: \x{0d}
- \r\r\n\n\r\n
- 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
- 1: \x{0a}
- 2: \x{0d}
-
-/[^\x{1234}]+/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
-
-/[^\x{1234}]+?/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
-
-/[^\x{1234}]++/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-Subject length lower bound = 1
-No set of starting bytes
-
-/[^\x{1234}]{2}/iS8I
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-Subject length lower bound = 2
-No set of starting bytes
-
-//<bsr_anycrlf><bsr_unicode>
-Failed: inconsistent NEWLINE options at offset 0
-
-/f.*/
- \P\Pfor
-Partial match: for
-
-/f.*/s
- \P\Pfor
-Partial match: for
-
-/f.*/8
- \P\Pfor
-Partial match: for
-
-/f.*/8s
- \P\Pfor
-Partial match: for
-
-/\x{d7ff}\x{e000}/8
-
-/\x{d800}/8
-Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
-
-/\x{dfff}/8
-Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
-
-/\h+/8
- \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
- 0: \x{1680}\x{2000}\x{202f}\x{3000}
- \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
- 0: \x{200a}\x{a0}\x{2000}
-
-/[\h\x{e000}]+/8BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{e000}]+
- Ket
- End
-------------------------------------------------------------------
- \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
- 0: \x{1680}\x{2000}\x{202f}\x{3000}
- \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
- 0: \x{200a}\x{a0}\x{2000}
-
-/\H+/8
- \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
- 0: \x{167f}\x{1681}\x{180d}\x{180f}
- \x{2000}\x{200a}\x{1fff}\x{200b}
- 0: \x{1fff}\x{200b}
- \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
- 0: \x{202e}\x{2030}\x{205e}\x{2060}
- \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
- 0: \x{9f}\x{a1}\x{2fff}\x{3001}
-
-/[\H\x{d7ff}]+/8BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}\x{d7ff}]+
- Ket
- End
-------------------------------------------------------------------
- \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
- 0: \x{167f}\x{1681}\x{180d}\x{180f}
- \x{2000}\x{200a}\x{1fff}\x{200b}
- 0: \x{1fff}\x{200b}
- \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
- 0: \x{202e}\x{2030}\x{205e}\x{2060}
- \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
- 0: \x{9f}\x{a1}\x{2fff}\x{3001}
-
-/\v+/8
- \x{2027}\x{2030}\x{2028}\x{2029}
- 0: \x{2028}\x{2029}
- \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
- 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
-
-/[\v\x{e000}]+/8BZ
-------------------------------------------------------------------
- Bra
- [\x0a-\x0d\x85\x{2028}-\x{2029}\x{e000}]+
- Ket
- End
-------------------------------------------------------------------
- \x{2027}\x{2030}\x{2028}\x{2029}
- 0: \x{2028}\x{2029}
- \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
- 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
-
-/\V+/8
- \x{2028}\x{2029}\x{2027}\x{2030}
- 0: \x{2027}\x{2030}
- \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
- 0: \x{09}\x{0e}\x{84}\x{86}
-
-/[\V\x{d7ff}]+/8BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}\x{d7ff}]+
- Ket
- End
-------------------------------------------------------------------
- \x{2028}\x{2029}\x{2027}\x{2030}
- 0: \x{2027}\x{2030}
- \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
- 0: \x{09}\x{0e}\x{84}\x{86}
-
-/\R+/8<bsr_unicode>
- \x{2027}\x{2030}\x{2028}\x{2029}
- 0: \x{2028}\x{2029}
- \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
- 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
-
-/-- End of testinput5 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput6 b/src/third_party/pcre-8.30/testdata/testoutput6
deleted file mode 100644
index 68c0a46a22f..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput6
+++ /dev/null
@@ -1,1378 +0,0 @@
-/-- This set of tests is for Unicode property support. It is compatible with
- Perl >= 5.10, but not 5.8 because it tests some extra properties that are
- not in the earlier release. --/
-
-/^\pC\pL\pM\pN\pP\pS\pZ</8
- \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- 0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- \np\x{300}9!\$ <
- 0: \x{0a}p\x{300}9!$ <
- ** Failers
-No match
- ap\x{300}9!\$ <
-No match
-
-/^\PC/8
- X
- 0: X
- ** Failers
- 0: *
- \x7f
-No match
-
-/^\PL/8
- 9
- 0: 9
- ** Failers
- 0: *
- \x{c0}
-No match
-
-/^\PM/8
- X
- 0: X
- ** Failers
- 0: *
- \x{30f}
-No match
-
-/^\PN/8
- X
- 0: X
- ** Failers
- 0: *
- \x{660}
-No match
-
-/^\PP/8
- X
- 0: X
- ** Failers
-No match
- \x{66c}
-No match
-
-/^\PS/8
- X
- 0: X
- ** Failers
- 0: *
- \x{f01}
-No match
-
-/^\PZ/8
- X
- 0: X
- ** Failers
- 0: *
- \x{1680}
-No match
-
-/^\p{Cc}/8
- \x{017}
- 0: \x{17}
- \x{09f}
- 0: \x{9f}
- ** Failers
-No match
- \x{0600}
-No match
-
-/^\p{Cf}/8
- \x{601}
- 0: \x{601}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Cn}/8
- \x{e0000}
- 0: \x{e0000}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Co}/8
- \x{f8ff}
- 0: \x{f8ff}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Ll}/8
- a
- 0: a
- ** Failers
-No match
- Z
-No match
- \x{e000}
-No match
-
-/^\p{Lm}/8
- \x{2b0}
- 0: \x{2b0}
- ** Failers
-No match
- a
-No match
-
-/^\p{Lo}/8
- \x{1bb}
- 0: \x{1bb}
- \x{3400}
- 0: \x{3400}
- \x{3401}
- 0: \x{3401}
- \x{4d00}
- 0: \x{4d00}
- \x{4db4}
- 0: \x{4db4}
- \x{4db5}
- 0: \x{4db5}
- ** Failers
-No match
- a
-No match
- \x{2b0}
-No match
- \x{4db6}
-No match
-
-/^\p{Lt}/8
- \x{1c5}
- 0: \x{1c5}
- ** Failers
-No match
- a
-No match
- \x{2b0}
-No match
-
-/^\p{Lu}/8
- A
- 0: A
- ** Failers
-No match
- \x{2b0}
-No match
-
-/^\p{Mc}/8
- \x{903}
- 0: \x{903}
- ** Failers
-No match
- X
-No match
- \x{300}
-No match
-
-/^\p{Me}/8
- \x{488}
- 0: \x{488}
- ** Failers
-No match
- X
-No match
- \x{903}
-No match
- \x{300}
-No match
-
-/^\p{Mn}/8
- \x{300}
- 0: \x{300}
- ** Failers
-No match
- X
-No match
- \x{903}
-No match
-
-/^\p{Nd}+/8
- 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
- 0: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}
- \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
- 0: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}
- \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
- 0: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}
- ** Failers
-No match
- X
-No match
-
-/^\p{Nl}/8
- \x{16ee}
- 0: \x{16ee}
- ** Failers
-No match
- X
-No match
- \x{966}
-No match
-
-/^\p{No}/8
- \x{b2}
- 0: \x{b2}
- \x{b3}
- 0: \x{b3}
- ** Failers
-No match
- X
-No match
- \x{16ee}
-No match
-
-/^\p{Pc}/8
- \x5f
- 0: _
- \x{203f}
- 0: \x{203f}
- ** Failers
-No match
- X
-No match
- -
-No match
- \x{58a}
-No match
-
-/^\p{Pd}/8
- -
- 0: -
- \x{58a}
- 0: \x{58a}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Pe}/8
- )
- 0: )
- ]
- 0: ]
- }
- 0: }
- \x{f3b}
- 0: \x{f3b}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
- (
-No match
- [
-No match
- {
-No match
- \x{f3c}
-No match
-
-/^\p{Pf}/8
- \x{bb}
- 0: \x{bb}
- \x{2019}
- 0: \x{2019}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Pi}/8
- \x{ab}
- 0: \x{ab}
- \x{2018}
- 0: \x{2018}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Po}/8
- !
- 0: !
- \x{37e}
- 0: \x{37e}
- ** Failers
- 0: *
- X
-No match
- \x{203f}
-No match
-
-/^\p{Ps}/8
- (
- 0: (
- [
- 0: [
- {
- 0: {
- \x{f3c}
- 0: \x{f3c}
- ** Failers
-No match
- X
-No match
- )
-No match
- ]
-No match
- }
-No match
- \x{f3b}
-No match
-
-/^\p{Sk}/8
- \x{2c2}
- 0: \x{2c2}
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{Sm}+/8
- +<|~\x{ac}\x{2044}
- 0: +<|~\x{ac}\x{2044}
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{So}/8
- \x{a6}
- 0: \x{a6}
- \x{482}
- 0: \x{482}
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{Zl}/8
- \x{2028}
- 0: \x{2028}
- ** Failers
-No match
- X
-No match
- \x{2029}
-No match
-
-/^\p{Zp}/8
- \x{2029}
- 0: \x{2029}
- ** Failers
-No match
- X
-No match
- \x{2028}
-No match
-
-/\p{Nd}+(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: AB
-
-/\p{Nd}+?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}
- 1: \x{661}\x{662}
-
-/\p{Nd}{2,}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: AB
-
-/\p{Nd}{2,}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}A
- 1: \x{662}A
-
-/\p{Nd}*(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: AB
-
-/\p{Nd}*?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}
- 1: \x{660}\x{661}
-
-/\p{Nd}{2}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}A
- 1: \x{662}A
-
-/\p{Nd}{2,3}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: AB
-
-/\p{Nd}{2,3}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}A
- 1: \x{662}A
-
-/\p{Nd}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}
- 1: \x{661}\x{662}
-
-/\p{Nd}??(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}
- 1: \x{660}\x{661}
-
-/\p{Nd}*+(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: AB
-
-/\p{Nd}*+(...)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}ABC
- 1: ABC
-
-/\p{Nd}*+(....)/8
- ** Failers
- 0: ** F
- 1: ** F
- \x{660}\x{661}\x{662}ABC
-No match
-
-/(?<=A\p{Nd})XYZ/8
- A2XYZ
- 0: XYZ
- 123A5XYZPQR
- 0: XYZ
- ABA\x{660}XYZpqr
- 0: XYZ
- ** Failers
-No match
- AXYZ
-No match
- XYZ
-No match
-
-/(?<!\pL)XYZ/8
- 1XYZ
- 0: XYZ
- AB=XYZ..
- 0: XYZ
- XYZ
- 0: XYZ
- ** Failers
-No match
- WXYZ
-No match
-
-/[\P{Nd}]+/8
- abcd
- 0: abcd
- ** Failers
- 0: ** Failers
- 1234
-No match
-
-/\D+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\P{Nd}+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\pL/8
- a
- 0: a
- A
- 0: A
-
-/\pL/8i
- a
- 0: a
- A
- 0: A
-
-/\p{Lu}/8
- A
- 0: A
- aZ
- 0: Z
- ** Failers
- 0: F
- abc
-No match
-
-/\p{Lu}/8i
- A
- 0: A
- aZ
- 0: Z
- ** Failers
- 0: F
- abc
-No match
-
-/\p{Ll}/8
- a
- 0: a
- Az
- 0: z
- ** Failers
- 0: a
- ABC
-No match
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- ** Failers
-No match
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
-No match
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
-No match
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
-No match
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
-No match
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-No match
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{1044f}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/\x{391}+/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
-
-/\x{391}{3,5}(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 1: X
-
-/\x{391}{3,5}?(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}
- 1: \x{3b1}
-
-/[\x{391}\x{ff3a}]/8i
- \x{391}
- 0: \x{391}
- \x{ff3a}
- 0: \x{ff3a}
- \x{3b1}
- 0: \x{3b1}
- \x{ff5a}
- 0: \x{ff5a}
-
-/^[\X]/8
- X123
- 0: X
- *** Failers
-No match
- AXYZ
-No match
-
-/^(\X*)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BC
- 1: A\x{300}\x{301}\x{302}B
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
-
-/^(\X*?)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BC
- 1: A\x{300}\x{301}\x{302}B
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BC
- 1: A\x{300}\x{301}\x{302}B
-
-/^(\X*)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BCA
- 1: A\x{300}\x{301}\x{302}BC
- 2: A
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 2: C
-
-/^(\X*?)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A
- 1:
- 2: A
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A
- 1:
- 2: A
-
-/^\X(.)/8
- *** Failers
- 0: **
- 1: *
- A\x{300}\x{301}\x{302}
-No match
-
-/^\X{2,3}(.)/8
- A\x{300}\x{301}B\x{300}X
- 0: A\x{300}\x{301}B\x{300}X
- 1: X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- 0: A\x{300}\x{301}B\x{300}C
- 1: C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 1: X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
- 1: D
-
-/^\X{2,3}?(.)/8
- A\x{300}\x{301}B\x{300}X
- 0: A\x{300}\x{301}B\x{300}X
- 1: X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- 0: A\x{300}\x{301}B\x{300}C
- 1: C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 0: A\x{300}\x{301}B\x{300}C
- 1: C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
- 0: A\x{300}\x{301}B\x{300}C
- 1: C
-
-/^\p{Han}+/8
- \x{2e81}\x{3007}\x{2f804}\x{31a0}
- 0: \x{2e81}\x{3007}\x{2f804}
- ** Failers
-No match
- \x{2e7f}
-No match
-
-/^\P{Katakana}+/8
- \x{3105}
- 0: \x{3105}
- ** Failers
- 0: ** Failers
- \x{30ff}
-No match
-
-/^[\p{Arabic}]/8
- \x{06e9}
- 0: \x{6e9}
- \x{060b}
- 0: \x{60b}
- ** Failers
-No match
- X\x{06e9}
-No match
-
-/^[\P{Yi}]/8
- \x{2f800}
- 0: \x{2f800}
- ** Failers
- 0: *
- \x{a014}
-No match
- \x{a4c6}
-No match
-
-/^\p{Any}X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- X
-No match
-
-/^\P{Any}X/8
- ** Failers
-No match
- AX
-No match
-
-/^\p{Any}?X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- ABXYZ
-No match
-
-/^\P{Any}?X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- ABXYZ
-No match
-
-/^\p{Any}+X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
- XYZ
-No match
-
-/^\P{Any}+X/8
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
-No match
- XYZ
-No match
-
-/^\p{Any}*X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
-
-/^\P{Any}*X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
-No match
-
-/^[\p{Any}]X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- X
-No match
-
-/^[\P{Any}]X/8
- ** Failers
-No match
- AX
-No match
-
-/^[\p{Any}]?X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- ABXYZ
-No match
-
-/^[\P{Any}]?X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- ABXYZ
-No match
-
-/^[\p{Any}]+X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
- XYZ
-No match
-
-/^[\P{Any}]+X/8
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
-No match
- XYZ
-No match
-
-/^[\p{Any}]*X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
-
-/^[\P{Any}]*X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
-No match
-
-/^\p{Any}{3,5}?/8
- abcdefgh
- 0: abc
- \x{1234}\n\r\x{3456}xyz
- 0: \x{1234}\x{0a}\x{0d}
-
-/^\p{Any}{3,5}/8
- abcdefgh
- 0: abcde
- \x{1234}\n\r\x{3456}xyz
- 0: \x{1234}\x{0a}\x{0d}\x{3456}x
-
-/^\P{Any}{3,5}?/8
- ** Failers
-No match
- abcdefgh
-No match
- \x{1234}\n\r\x{3456}xyz
-No match
-
-/^\p{L&}X/8
- AXY
- 0: AX
- aXY
- 0: aX
- \x{1c5}XY
- 0: \x{1c5}X
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^[\p{L&}]X/8
- AXY
- 0: AX
- aXY
- 0: aX
- \x{1c5}XY
- 0: \x{1c5}X
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^\p{L&}+X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^[\p{L&}]+X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^\p{L&}+?X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^[\p{L&}]+?X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^\P{L&}X/8
- !XY
- 0: !X
- \x{1bb}XY
- 0: \x{1bb}X
- \x{2b0}XY
- 0: \x{2b0}X
- ** Failers
-No match
- \x{1c5}XY
-No match
- AXY
-No match
-
-/^[\P{L&}]X/8
- !XY
- 0: !X
- \x{1bb}XY
- 0: \x{1bb}X
- \x{2b0}XY
- 0: \x{2b0}X
- ** Failers
-No match
- \x{1c5}XY
-No match
- AXY
-No match
-
-/^(\p{Z}[^\p{C}\p{Z}]+)*$/
- \xa0!
- 0: \xa0!
- 1: \xa0!
-
-/^[\pL](abc)(?1)/
- AabcabcYZ
- 0: Aabcabc
- 1: abc
-
-/([\pL]=(abc))*X/
- L=abcX
- 0: L=abcX
- 1: L=abc
- 2: abc
-
-/^\p{Balinese}\p{Cuneiform}\p{Nko}\p{Phags_Pa}\p{Phoenician}/8
- \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
- 0: \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
-
-/Check property support in non-UTF-8 mode/
-
-/\p{L}{4}/
- 123abcdefg
- 0: abcd
- 123abc\xc4\xc5zz
- 0: abc\xc4
-
-/\X{1,3}\d/
- \x8aBCD
-No match
-
-/\X?\d/
- \x8aBCD
-No match
-
-/\P{L}?\d/
- \x8aBCD
-No match
-
-/[\PPP\x8a]{1,}\x80/
- A\x80
- 0: A\x80
-
-/^[\p{Arabic}]/8
- \x{60e}
- 0: \x{60e}
- \x{656}
- 0: \x{656}
- \x{657}
- 0: \x{657}
- \x{658}
- 0: \x{658}
- \x{659}
- 0: \x{659}
- \x{65a}
- 0: \x{65a}
- \x{65b}
- 0: \x{65b}
- \x{65c}
- 0: \x{65c}
- \x{65d}
- 0: \x{65d}
- \x{65e}
- 0: \x{65e}
- \x{66a}
- 0: \x{66a}
- \x{6e9}
- 0: \x{6e9}
- \x{6ef}
- 0: \x{6ef}
- \x{6fa}
- 0: \x{6fa}
- ** Failers
-No match
- \x{604}
-No match
- \x{650}
-No match
- \x{651}
-No match
- \x{652}
-No match
- \x{653}
-No match
- \x{654}
-No match
- \x{655}
-No match
- \x{65f}
-No match
-
-/^\p{Cyrillic}/8
- \x{1d2b}
- 0: \x{1d2b}
-
-/^\p{Common}/8
- \x{589}
- 0: \x{589}
- \x{60c}
- 0: \x{60c}
- \x{61f}
- 0: \x{61f}
- \x{964}
- 0: \x{964}
- \x{965}
- 0: \x{965}
- \x{970}
- 0: \x{970}
-
-/^\p{Inherited}/8
- \x{64b}
- 0: \x{64b}
- \x{654}
- 0: \x{654}
- \x{655}
- 0: \x{655}
- \x{200c}
- 0: \x{200c}
- ** Failers
-No match
- \x{64a}
-No match
- \x{656}
-No match
-
-/^\p{Shavian}/8
- \x{10450}
- 0: \x{10450}
- \x{1047f}
- 0: \x{1047f}
-
-/^\p{Deseret}/8
- \x{10400}
- 0: \x{10400}
- \x{1044f}
- 0: \x{1044f}
-
-/^\p{Osmanya}/8
- \x{10480}
- 0: \x{10480}
- \x{1049d}
- 0: \x{1049d}
- \x{104a0}
- 0: \x{104a0}
- \x{104a9}
- 0: \x{104a9}
- ** Failers
-No match
- \x{1049e}
-No match
- \x{1049f}
-No match
- \x{104aa}
-No match
-
-/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8
- \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
- 0: \x{102a4}\x{aa52}\x{a91d}\x{1c46}\x{10283}\x{1092e}\x{1c6b}\x{a93b}\x{a8bf}\x{1ba0}\x{a50a}
-
-/\x{a77d}\x{1d79}/8i
- \x{a77d}\x{1d79}
- 0: \x{a77d}\x{1d79}
- \x{1d79}\x{a77d}
- 0: \x{1d79}\x{a77d}
-
-/\x{a77d}\x{1d79}/8
- \x{a77d}\x{1d79}
- 0: \x{a77d}\x{1d79}
- ** Failers
-No match
- \x{1d79}\x{a77d}
-No match
-
-/(A)\1/8i
- AA
- 0: AA
- 1: A
- Aa
- 0: Aa
- 1: A
- aa
- 0: aa
- 1: a
- aA
- 0: aA
- 1: a
-
-/(\x{10a})\1/8i
- \x{10a}\x{10a}
- 0: \x{10a}\x{10a}
- 1: \x{10a}
- \x{10a}\x{10b}
- 0: \x{10a}\x{10b}
- 1: \x{10a}
- \x{10b}\x{10b}
- 0: \x{10b}\x{10b}
- 1: \x{10b}
- \x{10b}\x{10a}
- 0: \x{10b}\x{10a}
- 1: \x{10b}
-
-/The next two tests are for property support in non-UTF-8 mode/
-
-/(?:\p{Lu}|\x20)+/
- \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
- 0: A P\xc2T\xc9 TODAY
-
-/[\p{Lu}\x20]+/
- \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
- 0: A P\xc2T\xc9 TODAY
-
-/\p{Avestan}\p{Bamum}\p{Egyptian_Hieroglyphs}\p{Imperial_Aramaic}\p{Inscriptional_Pahlavi}\p{Inscriptional_Parthian}\p{Javanese}\p{Kaithi}\p{Lisu}\p{Meetei_Mayek}\p{Old_South_Arabian}\p{Old_Turkic}\p{Samaritan}\p{Tai_Tham}\p{Tai_Viet}/8
- \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{0800}\x{1aad}\x{aac0}
- 0: \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{800}\x{1aad}\x{aac0}
-
-/^\w+/8W
- Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
- 0: Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
-
-/^[[:xdigit:]]*/8W
- 1a\x{660}\x{bef}\x{16ee}
- 0: 1a
-
-/^\d+/8W
- 1\x{660}\x{bef}\x{16ee}
- 0: 1\x{660}\x{bef}
-
-/^[[:digit:]]+/8W
- 1\x{660}\x{bef}\x{16ee}
- 0: 1\x{660}\x{bef}
-
-/^>\s+/8W
- >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
- 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}
-
-/^>\pZ+/8W
- >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
- 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}
-
-/^>[[:space:]]*/8W
- >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
- 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}\x{0b}
-
-/^>[[:blank:]]*/8W
- >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
- 0: > \x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{09}
-
-/^[[:alpha:]]*/8W
- Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
- 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
-
-/^[[:alnum:]]*/8W
- Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
- 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
-
-/^[[:cntrl:]]*/8W
- \x{0}\x{09}\x{1f}\x{7f}\x{9f}
- 0: \x{00}\x{09}\x{1f}\x{7f}
-
-/^[[:graph:]]*/8W
- A\x{a1}\x{a0}
- 0: A
-
-/^[[:print:]]*/8W
- A z\x{a0}\x{a1}
- 0: A z
-
-/^[[:punct:]]*/8W
- .+\x{a1}\x{a0}
- 0: .+
-
-/\p{Zs}*?\R/
- ** Failers
-No match
- a\xFCb
-No match
-
-/\p{Zs}*\R/
- ** Failers
-No match
- a\xFCb
-No match
-
-/ⱥ/8i
- ⱥ
- 0: \x{2c65}
- Ⱥx
- 0: \x{23a}
- Ⱥ
- 0: \x{23a}
-
-/[ⱥ]/8i
- ⱥ
- 0: \x{2c65}
- Ⱥx
- 0: \x{23a}
- Ⱥ
- 0: \x{23a}
-
-/Ⱥ/8i
- Ⱥ
- 0: \x{23a}
- ⱥ
- 0: \x{2c65}
-
-/-- End of testinput6 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput7 b/src/third_party/pcre-8.30/testdata/testoutput7
deleted file mode 100644
index 982e8a71683..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput7
+++ /dev/null
@@ -1,1214 +0,0 @@
-/-- These tests for Unicode property support test PCRE's API and show some of
- the compiled code. They are not Perl-compatible. --/
-
-/[\p{L}]/DZ
-------------------------------------------------------------------
- Bra
- [\p{L}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[\p{^L}]/DZ
-------------------------------------------------------------------
- Bra
- [\P{L}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[\P{L}]/DZ
-------------------------------------------------------------------
- Bra
- [\P{L}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[\P{^L}]/DZ
-------------------------------------------------------------------
- Bra
- [\p{L}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[abc\p{L}\x{0660}]/8DZ
-------------------------------------------------------------------
- Bra
- [a-c\p{L}\x{660}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
-
-/[\p{Nd}]/8DZ
-------------------------------------------------------------------
- Bra
- [\p{Nd}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
- 1234
- 0: 1
-
-/[\p{Nd}+-]+/8DZ
-------------------------------------------------------------------
- Bra
- [+\-\p{Nd}]+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf
-No first char
-No need char
- 1234
- 0: 1234
- 12-34
- 0: 12-34
- 12+\x{661}-34
- 0: 12+\x{661}-34
- ** Failers
-No match
- abcd
-No match
-
-/[\x{105}-\x{109}]/8iDZ
-------------------------------------------------------------------
- Bra
- [\x{104}-\x{109}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
- \x{104}
- 0: \x{104}
- \x{105}
- 0: \x{105}
- \x{109}
- 0: \x{109}
- ** Failers
-No match
- \x{100}
-No match
- \x{10a}
-No match
-
-/[z-\x{100}]/8iDZ
-------------------------------------------------------------------
- Bra
- [Z\x{39c}\x{178}z-\x{101}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
- Z
- 0: Z
- z
- 0: z
- \x{39c}
- 0: \x{39c}
- \x{178}
- 0: \x{178}
- |
- 0: |
- \x{80}
- 0: \x{80}
- \x{ff}
- 0: \x{ff}
- \x{100}
- 0: \x{100}
- \x{101}
- 0: \x{101}
- ** Failers
-No match
- \x{102}
-No match
- Y
-No match
- y
-No match
-
-/[z-\x{100}]/8DZi
-------------------------------------------------------------------
- Bra
- [Z\x{39c}\x{178}z-\x{101}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf
-No first char
-No need char
-
-/(?:[\PPa*]*){8,}/
-
-/[\P{Any}]/BZ
-------------------------------------------------------------------
- Bra
- [\P{Any}]
- Ket
- End
-------------------------------------------------------------------
-
-/[\P{Any}\E]/BZ
-------------------------------------------------------------------
- Bra
- [\P{Any}]
- Ket
- End
-------------------------------------------------------------------
-
-/(\P{Yi}+\277)/
-
-/(\P{Yi}+\277)?/
-
-/(?<=\P{Yi}{3}A)X/
-
-/\p{Yi}+(\P{Yi}+)(?1)/
-
-/(\P{Yi}{2}\277)?/
-
-/[\P{Yi}A]/
-
-/[\P{Yi}\P{Yi}\P{Yi}A]/
-
-/[^\P{Yi}A]/
-
-/[^\P{Yi}\P{Yi}\P{Yi}A]/
-
-/(\P{Yi}*\277)*/
-
-/(\P{Yi}*?\277)*/
-
-/(\p{Yi}*+\277)*/
-
-/(\P{Yi}?\277)*/
-
-/(\P{Yi}??\277)*/
-
-/(\p{Yi}?+\277)*/
-
-/(\P{Yi}{0,3}\277)*/
-
-/(\P{Yi}{0,3}?\277)*/
-
-/(\p{Yi}{0,3}+\277)*/
-
-/\p{Zl}{2,3}+/8BZ
-------------------------------------------------------------------
- Bra
- prop Zl {2}
- prop Zl ?+
- Ket
- End
-------------------------------------------------------------------
- \xe2\x80\xa8\xe2\x80\xa8
- 0: \x{2028}\x{2028}
- \x{2028}\x{2028}\x{2028}
- 0: \x{2028}\x{2028}\x{2028}
-
-/\p{Zl}/8BZ
-------------------------------------------------------------------
- Bra
- prop Zl
- Ket
- End
-------------------------------------------------------------------
-
-/\p{Lu}{3}+/8BZ
-------------------------------------------------------------------
- Bra
- prop Lu {3}
- Ket
- End
-------------------------------------------------------------------
-
-/\pL{2}+/8BZ
-------------------------------------------------------------------
- Bra
- prop L {2}
- Ket
- End
-------------------------------------------------------------------
-
-/\p{Cc}{2}+/8BZ
-------------------------------------------------------------------
- Bra
- prop Cc {2}
- Ket
- End
-------------------------------------------------------------------
-
-/^\p{Cs}/8
- \?\x{dfff}
- 0: \x{dfff}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Sc}+/8
- $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
- 0: $\x{a2}\x{a3}\x{a4}\x{a5}
- \x{9f2}
- 0: \x{9f2}
- ** Failers
-No match
- X
-No match
- \x{2c2}
-No match
-
-/^\p{Zs}/8
- \ \
- 0:
- \x{a0}
- 0: \x{a0}
- \x{1680}
- 0: \x{1680}
- \x{180e}
- 0: \x{180e}
- \x{2000}
- 0: \x{2000}
- \x{2001}
- 0: \x{2001}
- ** Failers
-No match
- \x{2028}
-No match
- \x{200d}
-No match
-
-/-- These four are here rather than in test 6 because Perl has problems with
- the negative versions of the properties. --/
-
-/\p{^Lu}/8i
- 1234
- 0: 1
- ** Failers
- 0: *
- ABC
-No match
-
-/\P{Lu}/8i
- 1234
- 0: 1
- ** Failers
- 0: *
- ABC
-No match
-
-/\p{Ll}/8i
- a
- 0: a
- Az
- 0: z
- ** Failers
- 0: a
- ABC
-No match
-
-/\p{Lu}/8i
- A
- 0: A
- a\x{10a0}B
- 0: \x{10a0}
- ** Failers
- 0: F
- a
-No match
- \x{1d00}
-No match
-
-/[\x{c0}\x{391}]/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/-- The next two are special cases where the lengths of the different cases of
-the same character differ. The first went wrong with heap frame storage; the
-second was broken in all cases. --/
-
-/^\x{023a}+?(\x{0130}+)/8i
- \x{023a}\x{2c65}\x{0130}
- 0: \x{23a}\x{2c65}\x{130}
- 1: \x{130}
-
-/^\x{023a}+([^X])/8i
- \x{023a}\x{2c65}X
- 0: \x{23a}\x{2c65}
- 1: \x{2c65}
-
-/\x{c0}+\x{116}+/8i
- \x{c0}\x{e0}\x{116}\x{117}
- 0: \x{c0}\x{e0}\x{116}\x{117}
-
-/[\x{c0}\x{116}]+/8i
- \x{c0}\x{e0}\x{116}\x{117}
- 0: \x{c0}\x{e0}\x{116}\x{117}
-
-/(\x{de})\1/8i
- \x{de}\x{de}
- 0: \x{de}\x{de}
- 1: \x{de}
- \x{de}\x{fe}
- 0: \x{de}\x{fe}
- 1: \x{de}
- \x{fe}\x{fe}
- 0: \x{fe}\x{fe}
- 1: \x{fe}
- \x{fe}\x{de}
- 0: \x{fe}\x{de}
- 1: \x{fe}
-
-/^\x{c0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/^\x{e0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/-- The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE
-will match it only with UCP support, because without that it has no notion
-of case for anything other than the ASCII letters. --/
-
-/((?i)[\x{c0}])/8
- \x{c0}
- 0: \x{c0}
- 1: \x{c0}
- \x{e0}
- 0: \x{e0}
- 1: \x{e0}
-
-/(?i:[\x{c0}])/8
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/-- This should be Perl-compatible but Perl 5.11 gets \x{300} wrong. --/8
-
-/^\X/8
- A
- 0: A
- A\x{300}BC
- 0: A\x{300}
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}
- *** Failers
- 0: *
- \x{300}
-No match
-
-/-- These are PCRE's extra properties to help with Unicodizing \d etc. --/
-
-/^\p{Xan}/8
- ABCD
- 0: A
- 1234
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- ** Failers
-No match
- _ABC
-No match
-
-/^\p{Xan}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- ** Failers
-No match
- _ABC
-No match
-
-/^\p{Xan}+?/8
- \x{6ca}\x{a6c}\x{10a7}_
- 0: \x{6ca}
-
-/^\p{Xan}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
-
-/^\p{Xan}{2,9}/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}
-
-/^\p{Xan}{2,9}?/8
- \x{6ca}\x{a6c}\x{10a7}_
- 0: \x{6ca}\x{a6c}
-
-/^[\p{Xan}]/8
- ABCD1234_
- 0: A
- 1234abcd_
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- ** Failers
-No match
- _ABC
-No match
-
-/^[\p{Xan}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- ** Failers
-No match
- _ABC
-No match
-
-/^>\p{Xsp}/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}
- >\x{a0}
- 0: >\x{a0}
- ** Failers
-No match
- \x{0b}
-No match
-
-/^>\p{Xsp}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-
-/^>\p{Xsp}+?/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}
-
-/^>\p{Xsp}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-
-/^>\p{Xsp}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-
-/^>\p{Xsp}{2,9}?/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}
-
-/^>[\p{Xsp}]/8
- >\x{2028}\x{0b}
- 0: >\x{2028}
-
-/^>[\p{Xsp}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-
-/^>\p{Xps}/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}
- >\x{a0}
- 0: >\x{a0}
- ** Failers
-No match
- \x{0b}
-No match
-
-/^>\p{Xps}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}+?/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}
-
-/^>\p{Xps}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}{2,9}?/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}
-
-/^>[\p{Xps}]/8
- >\x{2028}\x{0b}
- 0: >\x{2028}
-
-/^>[\p{Xps}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^\p{Xwd}/8
- ABCD
- 0: A
- 1234
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- _ABC
- 0: _
- ** Failers
-No match
- []
-No match
-
-/^\p{Xwd}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xwd}+?/8
- \x{6ca}\x{a6c}\x{10a7}_
- 0: \x{6ca}
-
-/^\p{Xwd}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xwd}{2,9}/8
- A_B12\x{6ca}\x{a6c}\x{10a7}
- 0: A_B12\x{6ca}\x{a6c}\x{10a7}
-
-/^\p{Xwd}{2,9}?/8
- \x{6ca}\x{a6c}\x{10a7}_
- 0: \x{6ca}\x{a6c}
-
-/^[\p{Xwd}]/8
- ABCD1234_
- 0: A
- 1234abcd_
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- _ABC
- 0: _
- ** Failers
-No match
- []
-No match
-
-/^[\p{Xwd}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/-- A check not in UTF-8 mode --/
-
-/^[\p{Xwd}]+/
- ABCD1234_
- 0: ABCD1234_
-
-/-- Some negative checks --/
-
-/^[\P{Xwd}]+/8
- !.+\x{019}\x{35a}AB
- 0: !.+\x{19}\x{35a}
-
-/^[\p{^Xwd}]+/8
- !.+\x{019}\x{35a}AB
- 0: !.+\x{19}\x{35a}
-
-/[\D]/WBZ8
-------------------------------------------------------------------
- Bra
- [\P{Nd}]
- Ket
- End
-------------------------------------------------------------------
- 1\x{3c8}2
- 0: \x{3c8}
-
-/[\d]/WBZ8
-------------------------------------------------------------------
- Bra
- [\p{Nd}]
- Ket
- End
-------------------------------------------------------------------
- >\x{6f4}<
- 0: \x{6f4}
-
-/[\S]/WBZ8
-------------------------------------------------------------------
- Bra
- [\P{Xsp}]
- Ket
- End
-------------------------------------------------------------------
- \x{1680}\x{6f4}\x{1680}
- 0: \x{6f4}
-
-/[\s]/WBZ8
-------------------------------------------------------------------
- Bra
- [\p{Xsp}]
- Ket
- End
-------------------------------------------------------------------
- >\x{1680}<
- 0: \x{1680}
-
-/[\W]/WBZ8
-------------------------------------------------------------------
- Bra
- [\P{Xwd}]
- Ket
- End
-------------------------------------------------------------------
- A\x{1712}B
- 0: \x{1712}
-
-/[\w]/WBZ8
-------------------------------------------------------------------
- Bra
- [\p{Xwd}]
- Ket
- End
-------------------------------------------------------------------
- >\x{1723}<
- 0: \x{1723}
-
-/\D/WBZ8
-------------------------------------------------------------------
- Bra
- notprop Nd
- Ket
- End
-------------------------------------------------------------------
- 1\x{3c8}2
- 0: \x{3c8}
-
-/\d/WBZ8
-------------------------------------------------------------------
- Bra
- prop Nd
- Ket
- End
-------------------------------------------------------------------
- >\x{6f4}<
- 0: \x{6f4}
-
-/\S/WBZ8
-------------------------------------------------------------------
- Bra
- notprop Xsp
- Ket
- End
-------------------------------------------------------------------
- \x{1680}\x{6f4}\x{1680}
- 0: \x{6f4}
-
-/\s/WBZ8
-------------------------------------------------------------------
- Bra
- prop Xsp
- Ket
- End
-------------------------------------------------------------------
- >\x{1680}>
- 0: \x{1680}
-
-/\W/WBZ8
-------------------------------------------------------------------
- Bra
- notprop Xwd
- Ket
- End
-------------------------------------------------------------------
- A\x{1712}B
- 0: \x{1712}
-
-/\w/WBZ8
-------------------------------------------------------------------
- Bra
- prop Xwd
- Ket
- End
-------------------------------------------------------------------
- >\x{1723}<
- 0: \x{1723}
-
-/[[:alpha:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\p{L}]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:lower:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\p{Ll}]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:upper:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\p{Lu}]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:alnum:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\p{Xan}]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:ascii:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\x00-\x7f]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:cntrl:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\x00-\x1f\x7f]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:digit:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\p{Nd}]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:graph:]]/WBZ
-------------------------------------------------------------------
- Bra
- [!-~]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:print:]]/WBZ
-------------------------------------------------------------------
- Bra
- [ -~]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:punct:]]/WBZ
-------------------------------------------------------------------
- Bra
- [!-/:-@[-`{-~]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:space:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\p{Xps}]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:word:]]/WBZ
-------------------------------------------------------------------
- Bra
- [\p{Xwd}]
- Ket
- End
-------------------------------------------------------------------
-
-/[[:xdigit:]]/WBZ
-------------------------------------------------------------------
- Bra
- [0-9A-Fa-f]
- Ket
- End
-------------------------------------------------------------------
-
-/-- Unicode properties for \b abd \B --/
-
-/\b...\B/8W
- abc_
- 0: abc
- \x{37e}abc\x{376}
- 0: abc
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- 0: \x{376}\x{371}\x{393}
- !\x{c0}++\x{c1}\x{c2}
- 0: ++\x{c1}
- !\x{c0}+++++
- 0: \x{c0}++
-
-/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
-
-/\b...\B/8
- abc_
- 0: abc
- ** Failers
- 0: Fai
- \x{37e}abc\x{376}
-No match
- \x{37e}\x{376}\x{371}\x{393}\x{394}
-No match
- !\x{c0}++\x{c1}\x{c2}
-No match
- !\x{c0}+++++
-No match
-
-/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
-
-/\b...\B/W
- abc_
- 0: abc
- !\x{c0}++\x{c1}\x{c2}
- 0: ++\xc1
- !\x{c0}+++++
- 0: \xc0++
-
-/-- Some of these are silly, but they check various combinations --/
-
-/[[:^alpha:][:^cntrl:]]+/8WBZ
-------------------------------------------------------------------
- Bra
- [ -~\x80-\xff\P{L}]+
- Ket
- End
-------------------------------------------------------------------
- 123
- 0: 123
- abc
- 0: abc
-
-/[[:^cntrl:][:^alpha:]]+/8WBZ
-------------------------------------------------------------------
- Bra
- [ -~\x80-\xff\P{L}]+
- Ket
- End
-------------------------------------------------------------------
- 123
- 0: 123
- abc
- 0: abc
-
-/[[:alpha:]]+/8WBZ
-------------------------------------------------------------------
- Bra
- [\p{L}]+
- Ket
- End
-------------------------------------------------------------------
- abc
- 0: abc
-
-/[[:^alpha:]\S]+/8WBZ
-------------------------------------------------------------------
- Bra
- [\P{L}\P{Xsp}]+
- Ket
- End
-------------------------------------------------------------------
- 123
- 0: 123
- abc
- 0: abc
-
-/[^\d]+/8WBZ
-------------------------------------------------------------------
- Bra
- [^\p{Nd}]+
- Ket
- End
-------------------------------------------------------------------
- abc123
- 0: abc
- abc\x{123}
- 0: abc\x{123}
- \x{660}abc
- 0: abc
-
-/\p{Lu}+9\p{Lu}+B\p{Lu}+b/BZ
-------------------------------------------------------------------
- Bra
- prop Lu ++
- 9
- prop Lu +
- B
- prop Lu ++
- b
- Ket
- End
-------------------------------------------------------------------
-
-/\p{^Lu}+9\p{^Lu}+B\p{^Lu}+b/BZ
-------------------------------------------------------------------
- Bra
- notprop Lu +
- 9
- notprop Lu ++
- B
- notprop Lu +
- b
- Ket
- End
-------------------------------------------------------------------
-
-/\P{Lu}+9\P{Lu}+B\P{Lu}+b/BZ
-------------------------------------------------------------------
- Bra
- notprop Lu +
- 9
- notprop Lu ++
- B
- notprop Lu +
- b
- Ket
- End
-------------------------------------------------------------------
-
-/\p{Han}+X\p{Greek}+\x{370}/BZ8
-------------------------------------------------------------------
- Bra
- prop Han ++
- X
- prop Greek +
- \x{370}
- Ket
- End
-------------------------------------------------------------------
-
-/\p{Xan}+!\p{Xan}+A/BZ
-------------------------------------------------------------------
- Bra
- prop Xan ++
- !
- prop Xan +
- A
- Ket
- End
-------------------------------------------------------------------
-
-/\p{Xsp}+!\p{Xsp}\t/BZ
-------------------------------------------------------------------
- Bra
- prop Xsp ++
- !
- prop Xsp
- \x09
- Ket
- End
-------------------------------------------------------------------
-
-/\p{Xps}+!\p{Xps}\t/BZ
-------------------------------------------------------------------
- Bra
- prop Xps ++
- !
- prop Xps
- \x09
- Ket
- End
-------------------------------------------------------------------
-
-/\p{Xwd}+!\p{Xwd}_/BZ
-------------------------------------------------------------------
- Bra
- prop Xwd ++
- !
- prop Xwd
- _
- Ket
- End
-------------------------------------------------------------------
-
-/A+\p{N}A+\dB+\p{N}*B+\d*/WBZ
-------------------------------------------------------------------
- Bra
- A++
- prop N
- A++
- prop Nd
- B+
- prop N *+
- B+
- prop Nd *
- Ket
- End
-------------------------------------------------------------------
-
-/-- These behaved oddly in Perl, so they are kept in this test --/
-
-/(\x{23a}\x{23a}\x{23a})?\1/8i
- \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
-No match
-
-/(ȺȺȺ)?\1/8i
- ȺȺȺⱥⱥ
-No match
-
-/(\x{23a}\x{23a}\x{23a})?\1/8i
- \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
- 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
- 1: \x{23a}\x{23a}\x{23a}
-
-/(ȺȺȺ)?\1/8i
- ȺȺȺⱥⱥⱥ
- 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
- 1: \x{23a}\x{23a}\x{23a}
-
-/(\x{23a}\x{23a}\x{23a})\1/8i
- \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
-No match
-
-/(ȺȺȺ)\1/8i
- ȺȺȺⱥⱥ
-No match
-
-/(\x{23a}\x{23a}\x{23a})\1/8i
- \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
- 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
- 1: \x{23a}\x{23a}\x{23a}
-
-/(ȺȺȺ)\1/8i
- ȺȺȺⱥⱥⱥ
- 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
- 1: \x{23a}\x{23a}\x{23a}
-
-/(\x{2c65}\x{2c65})\1/8i
- \x{2c65}\x{2c65}\x{23a}\x{23a}
- 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
- 1: \x{2c65}\x{2c65}
-
-/(ⱥⱥ)\1/8i
- ⱥⱥȺȺ
- 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
- 1: \x{2c65}\x{2c65}
-
-/(\x{23a}\x{23a}\x{23a})\1Y/8i
- X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
- 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}Y
- 1: \x{23a}\x{23a}\x{23a}
-
-/(\x{2c65}\x{2c65})\1Y/8i
- X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
- 0: \x{2c65}\x{2c65}\x{23a}\x{23a}Y
- 1: \x{2c65}\x{2c65}
-
-/-- --/
-
-/-- These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE --/
-
-/^[\p{Batak}]/8
- \x{1bc0}
- 0: \x{1bc0}
- \x{1bff}
- 0: \x{1bff}
- ** Failers
-No match
- \x{1bf4}
-No match
-
-/^[\p{Brahmi}]/8
- \x{11000}
- 0: \x{11000}
- \x{1106f}
- 0: \x{1106f}
- ** Failers
-No match
- \x{1104e}
-No match
-
-/^[\p{Mandaic}]/8
- \x{840}
- 0: \x{840}
- \x{85e}
- 0: \x{85e}
- ** Failers
-No match
- \x{85c}
-No match
- \x{85d}
-No match
-
-/-- --/
-
-/(\X*)(.)/s8
- A\x{300}
- 0: A
- 1:
- 2: A
-
-/^S(\X*)e(\X*)$/8
- Stéréo
-No match
-
-/^\X/8
- ́réo
-No match
-
-/^a\X41z/<JS>
- aX41z
- 0: aX41z
- *** Failers
-No match
- aAz
-No match
-
-/(?<=ab\Cde)X/8
-Failed: \C not allowed in lookbehind assertion at offset 10
-
-/-- End of testinput7 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput8 b/src/third_party/pcre-8.30/testdata/testoutput8
deleted file mode 100644
index 15680a04e4c..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput8
+++ /dev/null
@@ -1,7869 +0,0 @@
-/-- This set of tests check the DFA matching functionality of pcre_dfa_exec().
- The -dfa flag must be used with pcretest when running it. --/
-
-/abc/
- abc
- 0: abc
-
-/ab*c/
- abc
- 0: abc
- abbbbc
- 0: abbbbc
- ac
- 0: ac
-
-/ab+c/
- abc
- 0: abc
- abbbbbbc
- 0: abbbbbbc
- *** Failers
-No match
- ac
-No match
- ab
-No match
-
-/a*/
- a
- 0: a
- 1:
- aaaaaaaaaaaaaaaaa
- 0: aaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaa
- 5: aaaaaaaaaaaa
- 6: aaaaaaaaaaa
- 7: aaaaaaaaaa
- 8: aaaaaaaaa
- 9: aaaaaaaa
-10: aaaaaaa
-11: aaaaaa
-12: aaaaa
-13: aaaa
-14: aaa
-15: aa
-16: a
-17:
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaa
-17: aaaaaaaaaaaaa
-18: aaaaaaaaaaaa
-19: aaaaaaaaaaa
-20: aaaaaaaaaa
-21: aaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
- 0:
-
-/(a|abcd|african)/
- a
- 0: a
- abcd
- 0: abcd
- 1: a
- african
- 0: african
- 1: a
-
-/^abc/
- abcdef
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyz\nabc
-No match
-
-/^abc/m
- abcdef
- 0: abc
- xyz\nabc
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
-
-/\Aabc/
- abcdef
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyz\nabc
-No match
-
-/\Aabc/m
- abcdef
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyz\nabc
-No match
-
-/\Gabc/
- abcdef
- 0: abc
- xyzabc\>3
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyzabc\>2
-No match
-
-/x\dy\Dz/
- x9yzz
- 0: x9yzz
- x0y+z
- 0: x0y+z
- *** Failers
-No match
- xyz
-No match
- xxy0z
-No match
-
-/x\sy\Sz/
- x yzz
- 0: x yzz
- x y+z
- 0: x y+z
- *** Failers
-No match
- xyz
-No match
- xxyyz
-No match
-
-/x\wy\Wz/
- xxy+z
- 0: xxy+z
- *** Failers
-No match
- xxy0z
-No match
- x+y+z
-No match
-
-/x.y/
- x+y
- 0: x+y
- x-y
- 0: x-y
- *** Failers
-No match
- x\ny
-No match
-
-/x.y/s
- x+y
- 0: x+y
- x-y
- 0: x-y
- x\ny
- 0: x\x0ay
-
-/(a.b(?s)c.d|x.y)p.q/
- a+bc+dp+q
- 0: a+bc+dp+q
- a+bc\ndp+q
- 0: a+bc\x0adp+q
- x\nyp+q
- 0: x\x0ayp+q
- *** Failers
-No match
- a\nbc\ndp+q
-No match
- a+bc\ndp\nq
-No match
- x\nyp\nq
-No match
-
-/a\d\z/
- ba0
- 0: a0
- *** Failers
-No match
- ba0\n
-No match
- ba0\ncd
-No match
-
-/a\d\z/m
- ba0
- 0: a0
- *** Failers
-No match
- ba0\n
-No match
- ba0\ncd
-No match
-
-/a\d\Z/
- ba0
- 0: a0
- ba0\n
- 0: a0
- *** Failers
-No match
- ba0\ncd
-No match
-
-/a\d\Z/m
- ba0
- 0: a0
- ba0\n
- 0: a0
- *** Failers
-No match
- ba0\ncd
-No match
-
-/a\d$/
- ba0
- 0: a0
- ba0\n
- 0: a0
- *** Failers
-No match
- ba0\ncd
-No match
-
-/a\d$/m
- ba0
- 0: a0
- ba0\n
- 0: a0
- ba0\ncd
- 0: a0
- *** Failers
-No match
-
-/abc/i
- abc
- 0: abc
- aBc
- 0: aBc
- ABC
- 0: ABC
-
-/[^a]/
- abcd
- 0: b
-
-/ab?\w/
- abz
- 0: abz
- 1: ab
- abbz
- 0: abb
- 1: ab
- azz
- 0: az
-
-/x{0,3}yz/
- ayzq
- 0: yz
- axyzq
- 0: xyz
- axxyz
- 0: xxyz
- axxxyzq
- 0: xxxyz
- axxxxyzq
- 0: xxxyz
- *** Failers
-No match
- ax
-No match
- axx
-No match
-
-/x{3}yz/
- axxxyzq
- 0: xxxyz
- axxxxyzq
- 0: xxxyz
- *** Failers
-No match
- ax
-No match
- axx
-No match
- ayzq
-No match
- axyzq
-No match
- axxyz
-No match
-
-/x{2,3}yz/
- axxyz
- 0: xxyz
- axxxyzq
- 0: xxxyz
- axxxxyzq
- 0: xxxyz
- *** Failers
-No match
- ax
-No match
- axx
-No match
- ayzq
-No match
- axyzq
-No match
-
-/[^a]+/
- bac
- 0: b
- bcdefax
- 0: bcdef
- 1: bcde
- 2: bcd
- 3: bc
- 4: b
- *** Failers
- 0: *** F
- 1: ***
- 2: ***
- 3: **
- 4: *
- aaaaa
-No match
-
-/[^a]*/
- bac
- 0: b
- 1:
- bcdefax
- 0: bcdef
- 1: bcde
- 2: bcd
- 3: bc
- 4: b
- 5:
- *** Failers
- 0: *** F
- 1: ***
- 2: ***
- 3: **
- 4: *
- 5:
- aaaaa
- 0:
-
-/[^a]{3,5}/
- xyz
- 0: xyz
- awxyza
- 0: wxyz
- 1: wxy
- abcdefa
- 0: bcdef
- 1: bcde
- 2: bcd
- abcdefghijk
- 0: bcdef
- 1: bcde
- 2: bcd
- *** Failers
- 0: *** F
- 1: ***
- 2: ***
- axya
-No match
- axa
-No match
- aaaaa
-No match
-
-/\d*/
- 1234b567
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- 4:
- xyz
- 0:
-
-/\D*/
- a1234b567
- 0: a
- 1:
- xyz
- 0: xyz
- 1: xy
- 2: x
- 3:
-
-/\d+/
- ab1234c56
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- *** Failers
-No match
- xyz
-No match
-
-/\D+/
- ab123c56
- 0: ab
- 1: a
- *** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- 7: ***
- 8: ***
- 9: **
-10: *
- 789
-No match
-
-/\d?A/
- 045ABC
- 0: 5A
- ABC
- 0: A
- *** Failers
-No match
- XYZ
-No match
-
-/\D?A/
- ABC
- 0: A
- BAC
- 0: BA
- 9ABC
- 0: A
- *** Failers
-No match
-
-/a+/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/^.*xyz/
- xyz
- 0: xyz
- ggggggggxyz
- 0: ggggggggxyz
-
-/^.+xyz/
- abcdxyz
- 0: abcdxyz
- axyz
- 0: axyz
- *** Failers
-No match
- xyz
-No match
-
-/^.?xyz/
- xyz
- 0: xyz
- cxyz
- 0: cxyz
-
-/^\d{2,3}X/
- 12X
- 0: 12X
- 123X
- 0: 123X
- *** Failers
-No match
- X
-No match
- 1X
-No match
- 1234X
-No match
-
-/^[abcd]\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- *** Failers
-No match
- e45
-No match
- abcd
-No match
- abcd1234
-No match
- 1234
-No match
-
-/^[abcd]*\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- abcd1234
- 0: abcd1
- 1234
- 0: 1
- *** Failers
-No match
- e45
-No match
- abcd
-No match
-
-/^[abcd]+\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- abcd1234
- 0: abcd1
- *** Failers
-No match
- 1234
-No match
- e45
-No match
- abcd
-No match
-
-/^a+X/
- aX
- 0: aX
- aaX
- 0: aaX
-
-/^[abcd]?\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- 1234
- 0: 1
- *** Failers
-No match
- abcd1234
-No match
- e45
-No match
-
-/^[abcd]{2,3}\d/
- ab45
- 0: ab4
- bcd93
- 0: bcd9
- *** Failers
-No match
- 1234
-No match
- a36
-No match
- abcd1234
-No match
- ee45
-No match
-
-/^(abc)*\d/
- abc45
- 0: abc4
- abcabcabc45
- 0: abcabcabc4
- 42xyz
- 0: 4
- *** Failers
-No match
-
-/^(abc)+\d/
- abc45
- 0: abc4
- abcabcabc45
- 0: abcabcabc4
- *** Failers
-No match
- 42xyz
-No match
-
-/^(abc)?\d/
- abc45
- 0: abc4
- 42xyz
- 0: 4
- *** Failers
-No match
- abcabcabc45
-No match
-
-/^(abc){2,3}\d/
- abcabc45
- 0: abcabc4
- abcabcabc45
- 0: abcabcabc4
- *** Failers
-No match
- abcabcabcabc45
-No match
- abc45
-No match
- 42xyz
-No match
-
-/1(abc|xyz)2(?1)3/
- 1abc2abc3456
- 0: 1abc2abc3
- 1abc2xyz3456
- 0: 1abc2xyz3
-
-/^(a*\w|ab)=(a*\w|ab)/
- ab=ab
- 0: ab=ab
- 1: ab=a
-
-/^(a*\w|ab)=(?1)/
- ab=ab
- 0: ab=ab
- 1: ab=a
-
-/^([^()]|\((?1)*\))*$/
- abc
- 0: abc
- a(b)c
- 0: a(b)c
- a(b(c))d
- 0: a(b(c))d
- *** Failers)
-No match
- a(b(c)d
-No match
-
-/^>abc>([^()]|\((?1)*\))*<xyz<$/
- >abc>123<xyz<
- 0: >abc>123<xyz<
- >abc>1(2)3<xyz<
- 0: >abc>1(2)3<xyz<
- >abc>(1(2)3)<xyz<
- 0: >abc>(1(2)3)<xyz<
-
-/^(?>a*)\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9
- *** Failers
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
- <>
- 0: <>
- <abcd>
- 0: <abcd>
- <abc <123> hij>
- 0: <abc <123> hij>
- <abc <def> hij>
- 0: <def>
- <abc<>def>
- 0: <abc<>def>
- <abc<>
- 0: <>
- *** Failers
-No match
- <abc
-No match
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/^(?=abc)\w{5}:$/
- abcde:
- 0: abcde:
- *** Failers
-No match
- abc..
-No match
- 123
-No match
- vwxyz
-No match
-
-/^(?!abc)\d\d$/
- 12
- 0: 12
- *** Failers
-No match
- abcde:
-No match
- abc..
-No match
- 123
-No match
- vwxyz
-No match
-
-/(?<=abc|xy)123/
- abc12345
- 0: 123
- wxy123z
- 0: 123
- *** Failers
-No match
- 123abc
-No match
-
-/(?<!abc|xy)123/
- 123abc
- 0: 123
- mno123456
- 0: 123
- *** Failers
-No match
- abc12345
-No match
- wxy123z
-No match
-
-/abc(?C1)xyz/
- abcxyz
---->abcxyz
- 1 ^ ^ x
- 0: abcxyz
- 123abcxyz999
---->123abcxyz999
- 1 ^ ^ x
- 0: abcxyz
-
-/(ab|cd){3,4}/C
- ababab
---->ababab
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +4 ^ c
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +2 ^ ^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +2 ^ ^ b
- +3 ^ ^ |
-+12 ^ ^
- +1 ^ ^ a
- +4 ^ ^ c
- 0: ababab
- abcdabcd
---->abcdabcd
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +4 ^ c
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
- +1 ^ ^ a
- +4 ^ ^ c
- +2 ^ ^ b
- +3 ^ ^ |
-+12 ^ ^
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- 0: abcdabcd
- 1: abcdab
- abcdcdcdcdcd
---->abcdcdcdcdcd
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +4 ^ c
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- 0: abcdcdcd
- 1: abcdcd
-
-/^abc/
- abcdef
- 0: abc
- *** Failers
-No match
- abcdef\B
-No match
-
-/^(a*|xyz)/
- bcd
- 0:
- aaabcd
- 0: aaa
- 1: aa
- 2: a
- 3:
- xyz
- 0: xyz
- 1:
- xyz\N
- 0: xyz
- *** Failers
- 0:
- bcd\N
-No match
-
-/xyz$/
- xyz
- 0: xyz
- xyz\n
- 0: xyz
- *** Failers
-No match
- xyz\Z
-No match
- xyz\n\Z
-No match
-
-/xyz$/m
- xyz
- 0: xyz
- xyz\n
- 0: xyz
- abcxyz\npqr
- 0: xyz
- abcxyz\npqr\Z
- 0: xyz
- xyz\n\Z
- 0: xyz
- *** Failers
-No match
- xyz\Z
-No match
-
-/\Gabc/
- abcdef
- 0: abc
- defabcxyz\>3
- 0: abc
- *** Failers
-No match
- defabcxyz
-No match
-
-/^abcdef/
- ab\P
-Partial match: ab
- abcde\P
-Partial match: abcde
- abcdef\P
- 0: abcdef
- *** Failers
-No match
- abx\P
-No match
-
-/^a{2,4}\d+z/
- a\P
-Partial match: a
- aa\P
-Partial match: aa
- aa2\P
-Partial match: aa2
- aaa\P
-Partial match: aaa
- aaa23\P
-Partial match: aaa23
- aaaa12345\P
-Partial match: aaaa12345
- aa0z\P
- 0: aa0z
- aaaa4444444444444z\P
- 0: aaaa4444444444444z
- *** Failers
-No match
- az\P
-No match
- aaaaa\P
-No match
- a56\P
-No match
-
-/^abcdef/
- abc\P
-Partial match: abc
- def\R
- 0: def
-
-/(?<=foo)bar/
- xyzfo\P
-No match
- foob\P\>2
-Partial match: foob
- foobar...\R\P\>4
- 0: ar
- xyzfo\P
-No match
- foobar\>2
- 0: bar
- *** Failers
-No match
- xyzfo\P
-No match
- obar\R
-No match
-
-/(ab*(cd|ef))+X/
- adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
-No match
- lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
-Partial match: abbbbbbcdaefabbbbbbbefa
- cdabbbbbbbb\P\R\B\Z
-Partial match: cdabbbbbbbb
- efabbbbbbbbbbbbbbbb\P\R\B\Z
-Partial match: efabbbbbbbbbbbbbbbb
- bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
- 0: bbbbbbbbbbbbcdX
-
-/(a|b)/SF>testsavedregex
-Compiled pattern written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled pattern (byte-inverted) loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- ** Failers
- 0: a
- def
-No match
-
-/the quick brown fox/
- the quick brown fox
- 0: the quick brown fox
- The quick brown FOX
-No match
- What do you know about the quick brown fox?
- 0: the quick brown fox
- What do you know about THE QUICK BROWN FOX?
-No match
-
-/The quick brown fox/i
- the quick brown fox
- 0: the quick brown fox
- The quick brown FOX
- 0: The quick brown FOX
- What do you know about the quick brown fox?
- 0: the quick brown fox
- What do you know about THE QUICK BROWN FOX?
- 0: THE QUICK BROWN FOX
-
-/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
- abcd\t\n\r\f\a\e9;\$\\?caxyz
- 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
-
-/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
- abxyzpqrrrabbxyyyypqAzz
- 0: abxyzpqrrrabbxyyyypqAzz
- abxyzpqrrrabbxyyyypqAzz
- 0: abxyzpqrrrabbxyyyypqAzz
- aabxyzpqrrrabbxyyyypqAzz
- 0: aabxyzpqrrrabbxyyyypqAzz
- aaabxyzpqrrrabbxyyyypqAzz
- 0: aaabxyzpqrrrabbxyyyypqAzz
- aaaabxyzpqrrrabbxyyyypqAzz
- 0: aaaabxyzpqrrrabbxyyyypqAzz
- abcxyzpqrrrabbxyyyypqAzz
- 0: abcxyzpqrrrabbxyyyypqAzz
- aabcxyzpqrrrabbxyyyypqAzz
- 0: aabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypAzz
- 0: aaabcxyzpqrrrabbxyyyypAzz
- aaabcxyzpqrrrabbxyyyypqAzz
- 0: aaabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqAzz
- aaabcxyzpqrrrabbxyyyypqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- aaaabcxyzpqrrrabbxyyyypqAzz
- 0: aaaabcxyzpqrrrabbxyyyypqAzz
- abxyzzpqrrrabbxyyyypqAzz
- 0: abxyzzpqrrrabbxyyyypqAzz
- aabxyzzzpqrrrabbxyyyypqAzz
- 0: aabxyzzzpqrrrabbxyyyypqAzz
- aaabxyzzzzpqrrrabbxyyyypqAzz
- 0: aaabxyzzzzpqrrrabbxyyyypqAzz
- aaaabxyzzzzpqrrrabbxyyyypqAzz
- 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
- abcxyzzpqrrrabbxyyyypqAzz
- 0: abcxyzzpqrrrabbxyyyypqAzz
- aabcxyzzzpqrrrabbxyyyypqAzz
- 0: aabcxyzzzpqrrrabbxyyyypqAzz
- aaabcxyzzzzpqrrrabbxyyyypqAzz
- 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbxyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- aaabcxyzpqrrrabbxyyyypABzz
- 0: aaabcxyzpqrrrabbxyyyypABzz
- aaabcxyzpqrrrabbxyyyypABBzz
- 0: aaabcxyzpqrrrabbxyyyypABBzz
- >>>aaabxyzpqrrrabbxyyyypqAzz
- 0: aaabxyzpqrrrabbxyyyypqAzz
- >aaaabxyzpqrrrabbxyyyypqAzz
- 0: aaaabxyzpqrrrabbxyyyypqAzz
- >>>>abcxyzpqrrrabbxyyyypqAzz
- 0: abcxyzpqrrrabbxyyyypqAzz
- *** Failers
-No match
- abxyzpqrrabbxyyyypqAzz
-No match
- abxyzpqrrrrabbxyyyypqAzz
-No match
- abxyzpqrrrabxyyyypqAzz
-No match
- aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
-No match
- aaaabcxyzzzzpqrrrabbbxyyypqAzz
-No match
- aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
-No match
-
-/^(abc){1,2}zz/
- abczz
- 0: abczz
- abcabczz
- 0: abcabczz
- *** Failers
-No match
- zz
-No match
- abcabcabczz
-No match
- >>abczz
-No match
-
-/^(b+?|a){1,2}?c/
- bc
- 0: bc
- bbc
- 0: bbc
- bbbc
- 0: bbbc
- bac
- 0: bac
- bbac
- 0: bbac
- aac
- 0: aac
- abbbbbbbbbbbc
- 0: abbbbbbbbbbbc
- bbbbbbbbbbbac
- 0: bbbbbbbbbbbac
- *** Failers
-No match
- aaac
-No match
- abbbbbbbbbbbac
-No match
-
-/^(b+|a){1,2}c/
- bc
- 0: bc
- bbc
- 0: bbc
- bbbc
- 0: bbbc
- bac
- 0: bac
- bbac
- 0: bbac
- aac
- 0: aac
- abbbbbbbbbbbc
- 0: abbbbbbbbbbbc
- bbbbbbbbbbbac
- 0: bbbbbbbbbbbac
- *** Failers
-No match
- aaac
-No match
- abbbbbbbbbbbac
-No match
-
-/^(b+|a){1,2}?bc/
- bbc
- 0: bbc
-
-/^(b*|ba){1,2}?bc/
- babc
- 0: babc
- bbabc
- 0: bbabc
- bababc
- 0: bababc
- *** Failers
-No match
- bababbc
-No match
- babababc
-No match
-
-/^(ba|b*){1,2}?bc/
- babc
- 0: babc
- bbabc
- 0: bbabc
- bababc
- 0: bababc
- *** Failers
-No match
- bababbc
-No match
- babababc
-No match
-
-/^\ca\cA\c[\c{\c:/
- \x01\x01\e;z
- 0: \x01\x01\x1b;z
-
-/^[ab\]cde]/
- athing
- 0: a
- bthing
- 0: b
- ]thing
- 0: ]
- cthing
- 0: c
- dthing
- 0: d
- ething
- 0: e
- *** Failers
-No match
- fthing
-No match
- [thing
-No match
- \\thing
-No match
-
-/^[]cde]/
- ]thing
- 0: ]
- cthing
- 0: c
- dthing
- 0: d
- ething
- 0: e
- *** Failers
-No match
- athing
-No match
- fthing
-No match
-
-/^[^ab\]cde]/
- fthing
- 0: f
- [thing
- 0: [
- \\thing
- 0: \
- *** Failers
- 0: *
- athing
-No match
- bthing
-No match
- ]thing
-No match
- cthing
-No match
- dthing
-No match
- ething
-No match
-
-/^[^]cde]/
- athing
- 0: a
- fthing
- 0: f
- *** Failers
- 0: *
- ]thing
-No match
- cthing
-No match
- dthing
-No match
- ething
-No match
-
-/^\/
-
- 0: \x81
-
-/^/
-
- 0: \xff
-
-/^[0-9]+$/
- 0
- 0: 0
- 1
- 0: 1
- 2
- 0: 2
- 3
- 0: 3
- 4
- 0: 4
- 5
- 0: 5
- 6
- 0: 6
- 7
- 0: 7
- 8
- 0: 8
- 9
- 0: 9
- 10
- 0: 10
- 100
- 0: 100
- *** Failers
-No match
- abc
-No match
-
-/^.*nter/
- enter
- 0: enter
- inter
- 0: inter
- uponter
- 0: uponter
-
-/^xxx[0-9]+$/
- xxx0
- 0: xxx0
- xxx1234
- 0: xxx1234
- *** Failers
-No match
- xxx
-No match
-
-/^.+[0-9][0-9][0-9]$/
- x123
- 0: x123
- xx123
- 0: xx123
- 123456
- 0: 123456
- *** Failers
-No match
- 123
-No match
- x1234
- 0: x1234
-
-/^.+?[0-9][0-9][0-9]$/
- x123
- 0: x123
- xx123
- 0: xx123
- 123456
- 0: 123456
- *** Failers
-No match
- 123
-No match
- x1234
- 0: x1234
-
-/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
- abc!pqr=apquxz.ixr.zzz.ac.uk
- 0: abc!pqr=apquxz.ixr.zzz.ac.uk
- *** Failers
-No match
- !pqr=apquxz.ixr.zzz.ac.uk
-No match
- abc!=apquxz.ixr.zzz.ac.uk
-No match
- abc!pqr=apquxz:ixr.zzz.ac.uk
-No match
- abc!pqr=apquxz.ixr.zzz.ac.ukk
-No match
-
-/:/
- Well, we need a colon: somewhere
- 0: :
- *** Fail if we don't
-No match
-
-/([\da-f:]+)$/i
- 0abc
- 0: 0abc
- abc
- 0: abc
- fed
- 0: fed
- E
- 0: E
- ::
- 0: ::
- 5f03:12C0::932e
- 0: 5f03:12C0::932e
- fed def
- 0: def
- Any old stuff
- 0: ff
- *** Failers
-No match
- 0zzz
-No match
- gzzz
-No match
- fed\x20
-No match
- Any old rubbish
-No match
-
-/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
- .1.2.3
- 0: .1.2.3
- A.12.123.0
- 0: A.12.123.0
- *** Failers
-No match
- .1.2.3333
-No match
- 1.2.3
-No match
- 1234.2.3
-No match
-
-/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- 0: 1 IN SOA non-sp1 non-sp2(
- 1 IN SOA non-sp1 non-sp2 (
- 0: 1 IN SOA non-sp1 non-sp2 (
- *** Failers
-No match
- 1IN SOA non-sp1 non-sp2(
-No match
-
-/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
- a.
- 0: a.
- Z.
- 0: Z.
- 2.
- 0: 2.
- ab-c.pq-r.
- 0: ab-c.pq-r.
- sxk.zzz.ac.uk.
- 0: sxk.zzz.ac.uk.
- x-.y-.
- 0: x-.y-.
- *** Failers
-No match
- -abc.peq.
-No match
-
-/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
- *.a
- 0: *.a
- *.b0-a
- 0: *.b0-a
- *.c3-b.c
- 0: *.c3-b.c
- *.c-a.b-c
- 0: *.c-a.b-c
- *** Failers
-No match
- *.0
-No match
- *.a-
-No match
- *.a-b.c-
-No match
- *.c-a.0-c
-No match
-
-/^(?=ab(de))(abd)(e)/
- abde
- 0: abde
-
-/^(?!(ab)de|x)(abd)(f)/
- abdf
- 0: abdf
-
-/^(?=(ab(cd)))(ab)/
- abcd
- 0: ab
-
-/^[\da-f](\.[\da-f])*$/i
- a.b.c.d
- 0: a.b.c.d
- A.B.C.D
- 0: A.B.C.D
- a.b.c.1.2.3.C
- 0: a.b.c.1.2.3.C
-
-/^\".*\"\s*(;.*)?$/
- \"1234\"
- 0: "1234"
- \"abcd\" ;
- 0: "abcd" ;
- \"\" ; rhubarb
- 0: "" ; rhubarb
- *** Failers
-No match
- \"1234\" : things
-No match
-
-/^$/
- \
- 0:
- *** Failers
-No match
-
-/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
- ab c
- 0: ab c
- *** Failers
-No match
- abc
-No match
- ab cde
-No match
-
-/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
- ab c
- 0: ab c
- *** Failers
-No match
- abc
-No match
- ab cde
-No match
-
-/^ a\ b[c ]d $/x
- a bcd
- 0: a bcd
- a b d
- 0: a b d
- *** Failers
-No match
- abcd
-No match
- ab d
-No match
-
-/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
- abcdefhijklm
- 0: abcdefhijklm
-
-/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
- abcdefhijklm
- 0: abcdefhijklm
-
-/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
- a+ Z0+\x08\n\x1d\x12
- 0: a+ Z0+\x08\x0a\x1d\x12
-
-/^[.^$|()*+?{,}]+/
- .^\$(*+)|{?,?}
- 0: .^$(*+)|{?,?}
- 1: .^$(*+)|{?,?
- 2: .^$(*+)|{?,
- 3: .^$(*+)|{?
- 4: .^$(*+)|{
- 5: .^$(*+)|
- 6: .^$(*+)
- 7: .^$(*+
- 8: .^$(*
- 9: .^$(
-10: .^$
-11: .^
-12: .
-
-/^a*\w/
- z
- 0: z
- az
- 0: az
- 1: a
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- 3: a
- a
- 0: a
- aa
- 0: aa
- 1: a
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- a+
- 0: a
- aa+
- 0: aa
- 1: a
-
-/^a*?\w/
- z
- 0: z
- az
- 0: az
- 1: a
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- 3: a
- a
- 0: a
- aa
- 0: aa
- 1: a
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- a+
- 0: a
- aa+
- 0: aa
- 1: a
-
-/^a+\w/
- az
- 0: az
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- aa
- 0: aa
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- aa+
- 0: aa
-
-/^a+?\w/
- az
- 0: az
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- aa
- 0: aa
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- aa+
- 0: aa
-
-/^\d{8}\w{2,}/
- 1234567890
- 0: 1234567890
- 12345678ab
- 0: 12345678ab
- 12345678__
- 0: 12345678__
- *** Failers
-No match
- 1234567
-No match
-
-/^[aeiou\d]{4,5}$/
- uoie
- 0: uoie
- 1234
- 0: 1234
- 12345
- 0: 12345
- aaaaa
- 0: aaaaa
- *** Failers
-No match
- 123456
-No match
-
-/^[aeiou\d]{4,5}?/
- uoie
- 0: uoie
- 1234
- 0: 1234
- 12345
- 0: 12345
- 1: 1234
- aaaaa
- 0: aaaaa
- 1: aaaa
- 123456
- 0: 12345
- 1: 1234
-
-/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
- From abcd Mon Sep 01 12:33:02 1997
- 0: From abcd Mon Sep 01 12:33
-
-/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
- From abcd Mon Sep 01 12:33:02 1997
- 0: From abcd Mon Sep 01 12:33
- From abcd Mon Sep 1 12:33:02 1997
- 0: From abcd Mon Sep 1 12:33
- *** Failers
-No match
- From abcd Sep 01 12:33:02 1997
-No match
-
-/^12.34/s
- 12\n34
- 0: 12\x0a34
- 12\r34
- 0: 12\x0d34
-
-/\w+(?=\t)/
- the quick brown\t fox
- 0: brown
-
-/foo(?!bar)(.*)/
- foobar is foolish see?
- 0: foolish see?
- 1: foolish see
- 2: foolish se
- 3: foolish s
- 4: foolish
- 5: foolish
- 6: foolis
- 7: fooli
- 8: fool
- 9: foo
-
-/(?:(?!foo)...|^.{0,2})bar(.*)/
- foobar crowbar etc
- 0: rowbar etc
- 1: rowbar et
- 2: rowbar e
- 3: rowbar
- 4: rowbar
- barrel
- 0: barrel
- 1: barre
- 2: barr
- 3: bar
- 2barrel
- 0: 2barrel
- 1: 2barre
- 2: 2barr
- 3: 2bar
- A barrel
- 0: A barrel
- 1: A barre
- 2: A barr
- 3: A bar
-
-/^(\D*)(?=\d)(?!123)/
- abc456
- 0: abc
- *** Failers
-No match
- abc123
-No match
-
-/^1234(?# test newlines
- inside)/
- 1234
- 0: 1234
-
-/^1234 #comment in extended re
- /x
- 1234
- 0: 1234
-
-/#rhubarb
- abcd/x
- abcd
- 0: abcd
-
-/^abcd#rhubarb/x
- abcd
- 0: abcd
-
-/(?!^)abc/
- the abc
- 0: abc
- *** Failers
-No match
- abc
-No match
-
-/(?=^)abc/
- abc
- 0: abc
- *** Failers
-No match
- the abc
-No match
-
-/^[ab]{1,3}(ab*|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/^[ab]{1,3}?(ab*|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/^[ab]{1,3}?(ab*?|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/^[ab]{1,3}(ab*?|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/x
- Alan Other <user\@dom.ain>
- 0: Alan Other <user@dom.ain>
- <user\@dom.ain>
- 0: user@dom.ain
- 1: user@dom
- user\@dom.ain
- 0: user@dom.ain
- 1: user@dom
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- 0: "A. Other" <user.1234@dom.ain> (a comment)
- 1: "A. Other" <user.1234@dom.ain>
- 2: "A. Other" <user.1234@dom.ain>
- A. Other <user.1234\@dom.ain> (a comment)
- 0: Other <user.1234@dom.ain> (a comment)
- 1: Other <user.1234@dom.ain>
- 2: Other <user.1234@dom.ain>
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
- 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
- A missing angle <user\@some.where
- 0: user@some.where
- 1: user@some
- *** Failers
-No match
- The quick brown fox
-No match
-
-/[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional leading comment
-(?:
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-# leading word
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
-(?:
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-|
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-) # "special" comment or quoted string
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
-)*
-<
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# <
-(?:
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-(?: ,
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-)* # additional domains
-:
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address spec
-> # >
-# name and address
-)
-/x
- Alan Other <user\@dom.ain>
- 0: Alan Other <user@dom.ain>
- <user\@dom.ain>
- 0: user@dom.ain
- 1: user@dom
- user\@dom.ain
- 0: user@dom.ain
- 1: user@dom
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- 0: "A. Other" <user.1234@dom.ain>
- A. Other <user.1234\@dom.ain> (a comment)
- 0: Other <user.1234@dom.ain>
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
- 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
- A missing angle <user\@some.where
- 0: user@some.where
- 1: user@some
- *** Failers
-No match
- The quick brown fox
-No match
-
-/abc\0def\00pqr\000xyz\0000AB/
- abc\0def\00pqr\000xyz\0000AB
- 0: abc\x00def\x00pqr\x00xyz\x000AB
- abc456 abc\0def\00pqr\000xyz\0000ABCDE
- 0: abc\x00def\x00pqr\x00xyz\x000AB
-
-/abc\x0def\x00pqr\x000xyz\x0000AB/
- abc\x0def\x00pqr\x000xyz\x0000AB
- 0: abc\x0def\x00pqr\x000xyz\x0000AB
- abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
- 0: abc\x0def\x00pqr\x000xyz\x0000AB
-
-/^[\000-\037]/
- \0A
- 0: \x00
- \01B
- 0: \x01
- \037C
- 0: \x1f
-
-/\0*/
- \0\0\0\0
- 0: \x00\x00\x00\x00
- 1: \x00\x00\x00
- 2: \x00\x00
- 3: \x00
- 4:
-
-/A\x0{2,3}Z/
- The A\x0\x0Z
- 0: A\x00\x00Z
- An A\0\x0\0Z
- 0: A\x00\x00\x00Z
- *** Failers
-No match
- A\0Z
-No match
- A\0\x0\0\x0Z
-No match
-
-/^\s/
- \040abc
- 0:
- \x0cabc
- 0: \x0c
- \nabc
- 0: \x0a
- \rabc
- 0: \x0d
- \tabc
- 0: \x09
- *** Failers
-No match
- abc
-No match
-
-/^a b
- c/x
- abc
- 0: abc
-
-/ab{1,3}bc/
- abbbbc
- 0: abbbbc
- abbbc
- 0: abbbc
- abbc
- 0: abbc
- *** Failers
-No match
- abc
-No match
- abbbbbc
-No match
-
-/([^.]*)\.([^:]*):[T ]+(.*)/
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1.title:TBlah blah bla
- 2: track1.title:TBlah blah bl
- 3: track1.title:TBlah blah b
- 4: track1.title:TBlah blah
- 5: track1.title:TBlah blah
- 6: track1.title:TBlah bla
- 7: track1.title:TBlah bl
- 8: track1.title:TBlah b
- 9: track1.title:TBlah
-10: track1.title:TBlah
-11: track1.title:TBla
-12: track1.title:TBl
-13: track1.title:TB
-14: track1.title:T
-
-/([^.]*)\.([^:]*):[T ]+(.*)/i
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1.title:TBlah blah bla
- 2: track1.title:TBlah blah bl
- 3: track1.title:TBlah blah b
- 4: track1.title:TBlah blah
- 5: track1.title:TBlah blah
- 6: track1.title:TBlah bla
- 7: track1.title:TBlah bl
- 8: track1.title:TBlah b
- 9: track1.title:TBlah
-10: track1.title:TBlah
-11: track1.title:TBla
-12: track1.title:TBl
-13: track1.title:TB
-14: track1.title:T
-
-/([^.]*)\.([^:]*):[t ]+(.*)/i
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1.title:TBlah blah bla
- 2: track1.title:TBlah blah bl
- 3: track1.title:TBlah blah b
- 4: track1.title:TBlah blah
- 5: track1.title:TBlah blah
- 6: track1.title:TBlah bla
- 7: track1.title:TBlah bl
- 8: track1.title:TBlah b
- 9: track1.title:TBlah
-10: track1.title:TBlah
-11: track1.title:TBla
-12: track1.title:TBl
-13: track1.title:TB
-14: track1.title:T
-
-/^[W-c]+$/
- WXY_^abc
- 0: WXY_^abc
- *** Failers
-No match
- wxy
-No match
-
-/^[W-c]+$/i
- WXY_^abc
- 0: WXY_^abc
- wxy_^ABC
- 0: wxy_^ABC
-
-/^[\x3f-\x5F]+$/i
- WXY_^abc
- 0: WXY_^abc
- wxy_^ABC
- 0: wxy_^ABC
-
-/^abc$/m
- abc
- 0: abc
- qqq\nabc
- 0: abc
- abc\nzzz
- 0: abc
- qqq\nabc\nzzz
- 0: abc
-
-/^abc$/
- abc
- 0: abc
- *** Failers
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-/\Aabc\Z/m
- abc
- 0: abc
- abc\n
- 0: abc
- *** Failers
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-/\A(.)*\Z/s
- abc\ndef
- 0: abc\x0adef
-
-/\A(.)*\Z/m
- *** Failers
- 0: *** Failers
- abc\ndef
-No match
-
-/(?:b)|(?::+)/
- b::c
- 0: b
- c::b
- 0: ::
- 1: :
-
-/[-az]+/
- az-
- 0: az-
- 1: az
- 2: a
- *** Failers
- 0: a
- b
-No match
-
-/[az-]+/
- za-
- 0: za-
- 1: za
- 2: z
- *** Failers
- 0: a
- b
-No match
-
-/[a\-z]+/
- a-z
- 0: a-z
- 1: a-
- 2: a
- *** Failers
- 0: a
- b
-No match
-
-/[a-z]+/
- abcdxyz
- 0: abcdxyz
- 1: abcdxy
- 2: abcdx
- 3: abcd
- 4: abc
- 5: ab
- 6: a
-
-/[\d-]+/
- 12-34
- 0: 12-34
- 1: 12-3
- 2: 12-
- 3: 12
- 4: 1
- *** Failers
-No match
- aaa
-No match
-
-/[\d-z]+/
- 12-34z
- 0: 12-34z
- 1: 12-34
- 2: 12-3
- 3: 12-
- 4: 12
- 5: 1
- *** Failers
-No match
- aaa
-No match
-
-/\x5c/
- \\
- 0: \
-
-/\x20Z/
- the Zoo
- 0: Z
- *** Failers
-No match
- Zulu
-No match
-
-/ab{3cd/
- ab{3cd
- 0: ab{3cd
-
-/ab{3,cd/
- ab{3,cd
- 0: ab{3,cd
-
-/ab{3,4a}cd/
- ab{3,4a}cd
- 0: ab{3,4a}cd
-
-/{4,5a}bc/
- {4,5a}bc
- 0: {4,5a}bc
-
-/^a.b/<lf>
- a\rb
- 0: a\x0db
- *** Failers
-No match
- a\nb
-No match
-
-/abc$/
- abc
- 0: abc
- abc\n
- 0: abc
- *** Failers
-No match
- abc\ndef
-No match
-
-/(abc)\123/
- abc\x53
- 0: abcS
-
-/(abc)\223/
- abc\x93
- 0: abc\x93
-
-/(abc)\323/
- abc\xd3
- 0: abc\xd3
-
-/(abc)\100/
- abc\x40
- 0: abc@
- abc\100
- 0: abc@
-
-/(abc)\1000/
- abc\x400
- 0: abc@0
- abc\x40\x30
- 0: abc@0
- abc\1000
- 0: abc@0
- abc\100\x30
- 0: abc@0
- abc\100\060
- 0: abc@0
- abc\100\60
- 0: abc@0
-
-/abc\81/
- abc\081
- 0: abc\x0081
- abc\0\x38\x31
- 0: abc\x0081
-
-/abc\91/
- abc\091
- 0: abc\x0091
- abc\0\x39\x31
- 0: abc\x0091
-
-/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
- abcdefghijk\12S
- 0: abcdefghijk\x0aS
-
-/ab\idef/
- abidef
- 0: abidef
-
-/a{0}bc/
- bc
- 0: bc
-
-/(a|(bc)){0,0}?xyz/
- xyz
- 0: xyz
-
-/abc[\10]de/
- abc\010de
- 0: abc\x08de
-
-/abc[\1]de/
- abc\1de
- 0: abc\x01de
-
-/(abc)[\1]de/
- abc\1de
- 0: abc\x01de
-
-/(?s)a.b/
- a\nb
- 0: a\x0ab
-
-/^([^a])([^\b])([^c]*)([^d]{3,4})/
- baNOTccccd
- 0: baNOTcccc
- 1: baNOTccc
- 2: baNOTcc
- 3: baNOTc
- 4: baNOT
- baNOTcccd
- 0: baNOTccc
- 1: baNOTcc
- 2: baNOTc
- 3: baNOT
- baNOTccd
- 0: baNOTcc
- 1: baNOTc
- 2: baNOT
- bacccd
- 0: baccc
- *** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- anything
-No match
- b\bc
-No match
- baccd
-No match
-
-/[^a]/
- Abc
- 0: A
-
-/[^a]/i
- Abc
- 0: b
-
-/[^a]+/
- AAAaAbc
- 0: AAA
- 1: AA
- 2: A
-
-/[^a]+/i
- AAAaAbc
- 0: bc
- 1: b
-
-/[^a]+/
- bbb\nccc
- 0: bbb\x0accc
- 1: bbb\x0acc
- 2: bbb\x0ac
- 3: bbb\x0a
- 4: bbb
- 5: bb
- 6: b
-
-/[^k]$/
- abc
- 0: c
- *** Failers
- 0: s
- abk
-No match
-
-/[^k]{2,3}$/
- abc
- 0: abc
- kbc
- 0: bc
- kabc
- 0: abc
- *** Failers
- 0: ers
- abk
-No match
- akb
-No match
- akk
-No match
-
-/^\d{8,}\@.+[^k]$/
- 12345678\@a.b.c.d
- 0: 12345678@a.b.c.d
- 123456789\@x.y.z
- 0: 123456789@x.y.z
- *** Failers
-No match
- 12345678\@x.y.uk
-No match
- 1234567\@a.b.c.d
-No match
-
-/[^a]/
- aaaabcd
- 0: b
- aaAabcd
- 0: A
-
-/[^a]/i
- aaaabcd
- 0: b
- aaAabcd
- 0: b
-
-/[^az]/
- aaaabcd
- 0: b
- aaAabcd
- 0: A
-
-/[^az]/i
- aaaabcd
- 0: b
- aaAabcd
- 0: b
-
-/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
- \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
- 0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff
-
-/P[^*]TAIRE[^*]{1,6}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- 0: PSTAIREISLL
-
-/P[^*]TAIRE[^*]{1,}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- 0: PSTAIREISLL
-
-/(\.\d\d[1-9]?)\d+/
- 1.230003938
- 0: .230003938
- 1: .23000393
- 2: .2300039
- 3: .230003
- 4: .23000
- 5: .2300
- 6: .230
- 1.875000282
- 0: .875000282
- 1: .87500028
- 2: .8750002
- 3: .875000
- 4: .87500
- 5: .8750
- 6: .875
- 1.235
- 0: .235
-
-/(\.\d\d((?=0)|\d(?=\d)))/
- 1.230003938
- 0: .230
- 1: .23
- 1.875000282
- 0: .875
- *** Failers
-No match
- 1.235
-No match
-
-/a(?)b/
- ab
- 0: ab
-
-/\b(foo)\s+(\w+)/i
- Food is on the foo table
- 0: foo table
- 1: foo tabl
- 2: foo tab
- 3: foo ta
- 4: foo t
-
-/foo(.*)bar/
- The food is under the bar in the barn.
- 0: food is under the bar in the bar
- 1: food is under the bar
-
-/foo(.*?)bar/
- The food is under the bar in the barn.
- 0: food is under the bar in the bar
- 1: food is under the bar
-
-/(.*)(\d*)/
- I have 2 numbers: 53147
-Matched, but too many subsidiary matches
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2 numbers:
- 6: I have 2 numbers:
- 7: I have 2 numbers
- 8: I have 2 number
- 9: I have 2 numbe
-10: I have 2 numb
-11: I have 2 num
-12: I have 2 nu
-13: I have 2 n
-14: I have 2
-15: I have 2
-16: I have
-17: I have
-18: I hav
-19: I ha
-20: I h
-21: I
-
-/(.*)(\d+)/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2
-
-/(.*?)(\d*)/
- I have 2 numbers: 53147
-Matched, but too many subsidiary matches
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2 numbers:
- 6: I have 2 numbers:
- 7: I have 2 numbers
- 8: I have 2 number
- 9: I have 2 numbe
-10: I have 2 numb
-11: I have 2 num
-12: I have 2 nu
-13: I have 2 n
-14: I have 2
-15: I have 2
-16: I have
-17: I have
-18: I hav
-19: I ha
-20: I h
-21: I
-
-/(.*?)(\d+)/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2
-
-/(.*)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/(.*?)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/(.*)\b(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/(.*\D)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/^\D*(?!123)/
- ABC123
- 0: AB
- 1: A
- 2:
-
-/^(\D*)(?=\d)(?!123)/
- ABC445
- 0: ABC
- *** Failers
-No match
- ABC123
-No match
-
-/^[W-]46]/
- W46]789
- 0: W46]
- -46]789
- 0: -46]
- *** Failers
-No match
- Wall
-No match
- Zebra
-No match
- 42
-No match
- [abcd]
-No match
- ]abcd[
-No match
-
-/^[W-\]46]/
- W46]789
- 0: W
- Wall
- 0: W
- Zebra
- 0: Z
- Xylophone
- 0: X
- 42
- 0: 4
- [abcd]
- 0: [
- ]abcd[
- 0: ]
- \\backslash
- 0: \
- *** Failers
-No match
- -46]789
-No match
- well
-No match
-
-/\d\d\/\d\d\/\d\d\d\d/
- 01/01/2000
- 0: 01/01/2000
-
-/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-No match
-
-/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-No match
-
-/^(a){0,0}/
- bcd
- 0:
- abc
- 0:
- aab
- 0:
-
-/^(a){0,1}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: a
- 1:
-
-/^(a){0,2}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: aa
- 1: a
- 2:
-
-/^(a){0,3}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: aa
- 1: a
- 2:
- aaa
- 0: aaa
- 1: aa
- 2: a
- 3:
-
-/^(a){0,}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: aa
- 1: a
- 2:
- aaa
- 0: aaa
- 1: aa
- 2: a
- 3:
- aaaaaaaa
- 0: aaaaaaaa
- 1: aaaaaaa
- 2: aaaaaa
- 3: aaaaa
- 4: aaaa
- 5: aaa
- 6: aa
- 7: a
- 8:
-
-/^(a){1,1}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: a
-
-/^(a){1,2}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: aa
- 1: a
-
-/^(a){1,3}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: aa
- 2: a
-
-/^(a){1,}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: aa
- 2: a
- aaaaaaaa
- 0: aaaaaaaa
- 1: aaaaaaa
- 2: aaaaaa
- 3: aaaaa
- 4: aaaa
- 5: aaa
- 6: aa
- 7: a
-
-/.*\.gif/
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.{0,}\.gif/
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.*\.gif/m
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.*\.gif/s
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif
-
-/.*\.gif/ms
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif
-
-/.*$/
- borfle\nbib.gif\nno
- 0: no
-
-/.*$/m
- borfle\nbib.gif\nno
- 0: borfle
-
-/.*$/s
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif\x0ano
-
-/.*$/ms
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif\x0ano
- 1: borfle\x0abib.gif
- 2: borfle
-
-/.*$/
- borfle\nbib.gif\nno\n
- 0: no
-
-/.*$/m
- borfle\nbib.gif\nno\n
- 0: borfle
-
-/.*$/s
- borfle\nbib.gif\nno\n
- 0: borfle\x0abib.gif\x0ano\x0a
- 1: borfle\x0abib.gif\x0ano
-
-/.*$/ms
- borfle\nbib.gif\nno\n
- 0: borfle\x0abib.gif\x0ano\x0a
- 1: borfle\x0abib.gif\x0ano
- 2: borfle\x0abib.gif
- 3: borfle
-
-/(.*X|^B)/
- abcde\n1234Xyz
- 0: 1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(.*X|^B)/m
- abcde\n1234Xyz
- 0: 1234X
- BarFoo
- 0: B
- abcde\nBar
- 0: B
-
-/(.*X|^B)/s
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(.*X|^B)/ms
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- abcde\nBar
- 0: B
-
-/(?s)(.*X|^B)/
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(?s:.*X|^B)/
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/^.*B/
- **** Failers
-No match
- abc\nB
-No match
-
-/(?s)^.*B/
- abc\nB
- 0: abc\x0aB
-
-/(?m)^.*B/
- abc\nB
- 0: B
-
-/(?ms)^.*B/
- abc\nB
- 0: abc\x0aB
-
-/(?ms)^B/
- abc\nB
- 0: B
-
-/(?s)B$/
- B\n
- 0: B
-
-/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
- 123456654321
- 0: 123456654321
-
-/^\d\d\d\d\d\d\d\d\d\d\d\d/
- 123456654321
- 0: 123456654321
-
-/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
- 123456654321
- 0: 123456654321
-
-/^[abc]{12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^[a-c]{12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^(a|b|c){12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^[abcdefghijklmnopqrstuvwxy0123456789]/
- n
- 0: n
- *** Failers
-No match
- z
-No match
-
-/abcde{0,0}/
- abcd
- 0: abcd
- *** Failers
-No match
- abce
-No match
-
-/ab[cd]{0,0}e/
- abe
- 0: abe
- *** Failers
-No match
- abcde
-No match
-
-/ab(c){0,0}d/
- abd
- 0: abd
- *** Failers
-No match
- abcd
-No match
-
-/a(b*)/
- a
- 0: a
- ab
- 0: ab
- 1: a
- abbbb
- 0: abbbb
- 1: abbb
- 2: abb
- 3: ab
- 4: a
- *** Failers
- 0: a
- bbbbb
-No match
-
-/ab\d{0}e/
- abe
- 0: abe
- *** Failers
-No match
- ab1e
-No match
-
-/"([^\\"]+|\\.)*"/
- the \"quick\" brown fox
- 0: "quick"
- \"the \\\"quick\\\" brown fox\"
- 0: "the \"quick\" brown fox"
-
-/.*?/g+
- abc
- 0: abc
- 0+
- 1: ab
- 2: a
- 3:
- 0:
- 0+
-
-/\b/g+
- abc
- 0:
- 0+ abc
- 0:
- 0+
-
-/\b/+g
- abc
- 0:
- 0+ abc
- 0:
- 0+
-
-//g
- abc
- 0:
- 0:
- 0:
- 0:
-
-/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
- <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
- 0: <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
-
-/a[^a]b/
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/a.b/
- acb
- 0: acb
- *** Failers
-No match
- a\nb
-No match
-
-/a[^a]b/s
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/a.b/s
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/^(b+?|a){1,2}?c/
- bac
- 0: bac
- bbac
- 0: bbac
- bbbac
- 0: bbbac
- bbbbac
- 0: bbbbac
- bbbbbac
- 0: bbbbbac
-
-/^(b+|a){1,2}?c/
- bac
- 0: bac
- bbac
- 0: bbac
- bbbac
- 0: bbbac
- bbbbac
- 0: bbbbac
- bbbbbac
- 0: bbbbbac
-
-/(?!\A)x/m
- x\nb\n
-No match
- a\bx\n
- 0: x
-
-/\x0{ab}/
- \0{ab}
- 0: \x00{ab}
-
-/(A|B)*?CD/
- CD
- 0: CD
-
-/(A|B)*CD/
- CD
- 0: CD
-
-/(?<!bar)foo/
- foo
- 0: foo
- catfood
- 0: foo
- arfootle
- 0: foo
- rfoosh
- 0: foo
- *** Failers
-No match
- barfoo
-No match
- towbarfoo
-No match
-
-/\w{3}(?<!bar)foo/
- catfood
- 0: catfoo
- *** Failers
-No match
- foo
-No match
- barfoo
-No match
- towbarfoo
-No match
-
-/(?<=(foo)a)bar/
- fooabar
- 0: bar
- *** Failers
-No match
- bar
-No match
- foobbar
-No match
-
-/\Aabc\z/m
- abc
- 0: abc
- *** Failers
-No match
- abc\n
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
-No match
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
- 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
-
-/(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 0: .230003938
- 1: .23000393
- 2: .2300039
- 3: .230003
- 4: .23000
- 5: .2300
- 6: .230
- 1.875000282
- 0: .875000282
- 1: .87500028
- 2: .8750002
- 3: .875000
- 4: .87500
- 5: .8750
- *** Failers
-No match
- 1.235
-No match
-
-/^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- 0: now is the time for all good men to come to the aid of the party
- *** Failers
-No match
- this is not a line with only words and spaces!
-No match
-
-/(\d+)(\w)/
- 12345a
- 0: 12345a
- 1: 12345
- 2: 1234
- 3: 123
- 4: 12
- 12345+
- 0: 12345
- 1: 1234
- 2: 123
- 3: 12
-
-/((?>\d+))(\w)/
- 12345a
- 0: 12345a
- *** Failers
-No match
- 12345+
-No match
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/((?>a+)b)/
- aaab
- 0: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
-
-/(?>b)+/
- aaabbbccc
- 0: bbb
- 1: bb
- 2: b
-
-/(?>a+|b+|c+)*c/
- aaabbbbccccd
- 0: aaabbbbcccc
- 1: aaabbbbc
-
-/(a+|b+|c+)*c/
- aaabbbbccccd
- 0: aaabbbbcccc
- 1: aaabbbbccc
- 2: aaabbbbcc
- 3: aaabbbbc
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: abc(ade)ufh()()
- 2: abc(ade)ufh()
- 3: abc(ade)ufh
- 4: abc(ade)
- 5: abc
-
-/\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- 0: (abc)
- (abc(def)xyz)
- 0: (abc(def)xyz)
- *** Failers
-No match
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/a(?-i)b/i
- ab
- 0: ab
- Ab
- 0: Ab
- *** Failers
-No match
- aB
-No match
- AB
-No match
-
-/(a (?x)b c)d e/
- a bcd e
- 0: a bcd e
- *** Failers
-No match
- a b cd e
-No match
- abcd e
-No match
- a bcde
-No match
-
-/(a b(?x)c d (?-x)e f)/
- a bcde f
- 0: a bcde f
- *** Failers
-No match
- abcdef
-No match
-
-/(a(?i)b)c/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- abC
-No match
- aBC
-No match
- Abc
-No match
- ABc
-No match
- ABC
-No match
- AbC
-No match
-
-/a(?i:b)c/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- ABC
-No match
- abC
-No match
- aBC
-No match
-
-/a(?i:b)*c/
- aBc
- 0: aBc
- aBBc
- 0: aBBc
- *** Failers
-No match
- aBC
-No match
- aBBC
-No match
-
-/a(?=b(?i)c)\w\wd/
- abcd
- 0: abcd
- abCd
- 0: abCd
- *** Failers
-No match
- aBCd
-No match
- abcD
-No match
-
-/(?s-i:more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
-No match
- more \n than \n million
-No match
-
-/(?:(?s-i)more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
-No match
- more \n than \n million
-No match
-
-/(?>a(?i)b+)+c/
- abc
- 0: abc
- aBbc
- 0: aBbc
- aBBc
- 0: aBBc
- *** Failers
-No match
- Abc
-No match
- abAb
-No match
- abbC
-No match
-
-/(?=a(?i)b)\w\wc/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- Ab
-No match
- abC
-No match
- aBC
-No match
-
-/(?<=a(?i)b)(\w\w)c/
- abxxc
- 0: xxc
- aBxxc
- 0: xxc
- *** Failers
-No match
- Abxxc
-No match
- ABxxc
-No match
- abxxC
-No match
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/(?(?<=foo)bar|cat)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/(?(?<!foo)cat|bar)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/(?>a*)*/
- a
- 0: a
- 1:
- aa
- 0: aa
- 1:
- aaaa
- 0: aaaa
- 1:
-
-/(abc|)+/
- abc
- 0: abc
- 1:
- abcabc
- 0: abcabc
- 1: abc
- 2:
- abcabcabc
- 0: abcabcabc
- 1: abcabc
- 2: abc
- 3:
- xyz
- 0:
-
-/([a]*)*/
- a
- 0: a
- 1:
- aaaaa
- 0: aaaaa
- 1: aaaa
- 2: aaa
- 3: aa
- 4: a
- 5:
-
-/([ab]*)*/
- a
- 0: a
- 1:
- b
- 0: b
- 1:
- ababab
- 0: ababab
- 1: ababa
- 2: abab
- 3: aba
- 4: ab
- 5: a
- 6:
- aaaabcde
- 0: aaaab
- 1: aaaa
- 2: aaa
- 3: aa
- 4: a
- 5:
- bbbb
- 0: bbbb
- 1: bbb
- 2: bb
- 3: b
- 4:
-
-/([^a]*)*/
- b
- 0: b
- 1:
- bbbb
- 0: bbbb
- 1: bbb
- 2: bb
- 3: b
- 4:
- aaa
- 0:
-
-/([^ab]*)*/
- cccc
- 0: cccc
- 1: ccc
- 2: cc
- 3: c
- 4:
- abab
- 0:
-
-/([a]*?)*/
- a
- 0: a
- 1:
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- 4:
-
-/([ab]*?)*/
- a
- 0: a
- 1:
- b
- 0: b
- 1:
- abab
- 0: abab
- 1: aba
- 2: ab
- 3: a
- 4:
- baba
- 0: baba
- 1: bab
- 2: ba
- 3: b
- 4:
-
-/([^a]*?)*/
- b
- 0: b
- 1:
- bbbb
- 0: bbbb
- 1: bbb
- 2: bb
- 3: b
- 4:
- aaa
- 0:
-
-/([^ab]*?)*/
- c
- 0: c
- 1:
- cccc
- 0: cccc
- 1: ccc
- 2: cc
- 3: c
- 4:
- baba
- 0:
-
-/(?>a*)*/
- a
- 0: a
- 1:
- aaabcde
- 0: aaa
- 1:
-
-/((?>a*))*/
- aaaaa
- 0: aaaaa
- 1:
- aabbaa
- 0: aa
- 1:
-
-/((?>a*?))*/
- aaaaa
- 0: aaaaa
- 1:
- aabbaa
- 0: aa
- 1:
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 0: 12-sep-98
- 12-09-98
- 0: 12-09-98
- *** Failers
-No match
- sep-12-98
-No match
-
-/(?i:saturday|sunday)/
- saturday
- 0: saturday
- sunday
- 0: sunday
- Saturday
- 0: Saturday
- Sunday
- 0: Sunday
- SATURDAY
- 0: SATURDAY
- SUNDAY
- 0: SUNDAY
- SunDay
- 0: SunDay
-
-/(a(?i)bc|BB)x/
- abcx
- 0: abcx
- aBCx
- 0: aBCx
- bbx
- 0: bbx
- BBx
- 0: BBx
- *** Failers
-No match
- abcX
-No match
- aBCX
-No match
- bbX
-No match
- BBX
-No match
-
-/^([ab](?i)[cd]|[ef])/
- ac
- 0: ac
- aC
- 0: aC
- bD
- 0: bD
- elephant
- 0: e
- Europe
- 0: E
- frog
- 0: f
- France
- 0: F
- *** Failers
-No match
- Africa
-No match
-
-/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- 0: ab
- aBd
- 0: aBd
- xy
- 0: xy
- xY
- 0: xY
- zebra
- 0: z
- Zambesi
- 0: Z
- *** Failers
-No match
- aCD
-No match
- XY
-No match
-
-/(?<=foo\n)^bar/m
- foo\nbar
- 0: bar
- *** Failers
-No match
- bar
-No match
- baz\nbar
-No match
-
-/(?<=(?<!foo)bar)baz/
- barbaz
- 0: baz
- barbarbaz
- 0: baz
- koobarbaz
- 0: baz
- *** Failers
-No match
- baz
-No match
- foobarbaz
-No match
-
-/The following tests are taken from the Perl 5.005 test suite; some of them/
-/are compatible with 5.004, but I'd rather not have to sort them out./
-No match
-
-/abc/
- abc
- 0: abc
- xabcy
- 0: abc
- ababc
- 0: abc
- *** Failers
-No match
- xbc
-No match
- axc
-No match
- abx
-No match
-
-/ab*c/
- abc
- 0: abc
-
-/ab*bc/
- abc
- 0: abc
- abbc
- 0: abbc
- abbbbc
- 0: abbbbc
-
-/.{1}/
- abbbbc
- 0: a
-
-/.{3,4}/
- abbbbc
- 0: abbb
- 1: abb
-
-/ab{0,}bc/
- abbbbc
- 0: abbbbc
-
-/ab+bc/
- abbc
- 0: abbc
- *** Failers
-No match
- abc
-No match
- abq
-No match
-
-/ab+bc/
- abbbbc
- 0: abbbbc
-
-/ab{1,}bc/
- abbbbc
- 0: abbbbc
-
-/ab{1,3}bc/
- abbbbc
- 0: abbbbc
-
-/ab{3,4}bc/
- abbbbc
- 0: abbbbc
-
-/ab{4,5}bc/
- *** Failers
-No match
- abq
-No match
- abbbbc
-No match
-
-/ab?bc/
- abbc
- 0: abbc
- abc
- 0: abc
-
-/ab{0,1}bc/
- abc
- 0: abc
-
-/ab?bc/
-
-/ab?c/
- abc
- 0: abc
-
-/ab{0,1}c/
- abc
- 0: abc
-
-/^abc$/
- abc
- 0: abc
- *** Failers
-No match
- abbbbc
-No match
- abcc
-No match
-
-/^abc/
- abcc
- 0: abc
-
-/^abc$/
-
-/abc$/
- aabc
- 0: abc
- *** Failers
-No match
- aabc
- 0: abc
- aabcd
-No match
-
-/^/
- abc
- 0:
-
-/$/
- abc
- 0:
-
-/a.c/
- abc
- 0: abc
- axc
- 0: axc
-
-/a.*c/
- axyzc
- 0: axyzc
-
-/a[bc]d/
- abd
- 0: abd
- *** Failers
-No match
- axyzd
-No match
- abc
-No match
-
-/a[b-d]e/
- ace
- 0: ace
-
-/a[b-d]/
- aac
- 0: ac
-
-/a[-b]/
- a-
- 0: a-
-
-/a[b-]/
- a-
- 0: a-
-
-/a]/
- a]
- 0: a]
-
-/a[]]b/
- a]b
- 0: a]b
-
-/a[^bc]d/
- aed
- 0: aed
- *** Failers
-No match
- abd
-No match
- abd
-No match
-
-/a[^-b]c/
- adc
- 0: adc
-
-/a[^]b]c/
- adc
- 0: adc
- *** Failers
-No match
- a-c
- 0: a-c
- a]c
-No match
-
-/\ba\b/
- a-
- 0: a
- -a
- 0: a
- -a-
- 0: a
-
-/\by\b/
- *** Failers
-No match
- xy
-No match
- yz
-No match
- xyz
-No match
-
-/\Ba\B/
- *** Failers
- 0: a
- a-
-No match
- -a
-No match
- -a-
-No match
-
-/\By\b/
- xy
- 0: y
-
-/\by\B/
- yz
- 0: y
-
-/\By\B/
- xyz
- 0: y
-
-/\w/
- a
- 0: a
-
-/\W/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- a
-No match
-
-/a\sb/
- a b
- 0: a b
-
-/a\Sb/
- a-b
- 0: a-b
- *** Failers
-No match
- a-b
- 0: a-b
- a b
-No match
-
-/\d/
- 1
- 0: 1
-
-/\D/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- 1
-No match
-
-/[\w]/
- a
- 0: a
-
-/[\W]/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- a
-No match
-
-/a[\s]b/
- a b
- 0: a b
-
-/a[\S]b/
- a-b
- 0: a-b
- *** Failers
-No match
- a-b
- 0: a-b
- a b
-No match
-
-/[\d]/
- 1
- 0: 1
-
-/[\D]/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- 1
-No match
-
-/ab|cd/
- abc
- 0: ab
- abcd
- 0: ab
-
-/()ef/
- def
- 0: ef
-
-/$b/
-
-/a\(b/
- a(b
- 0: a(b
-
-/a\(*b/
- ab
- 0: ab
- a((b
- 0: a((b
-
-/a\\b/
- a\b
-No match
-
-/((a))/
- abc
- 0: a
-
-/(a)b(c)/
- abc
- 0: abc
-
-/a+b+c/
- aabbabc
- 0: abc
-
-/a{1,}b{1,}c/
- aabbabc
- 0: abc
-
-/a.+?c/
- abcabc
- 0: abcabc
- 1: abc
-
-/(a+|b)*/
- ab
- 0: ab
- 1: a
- 2:
-
-/(a+|b){0,}/
- ab
- 0: ab
- 1: a
- 2:
-
-/(a+|b)+/
- ab
- 0: ab
- 1: a
-
-/(a+|b){1,}/
- ab
- 0: ab
- 1: a
-
-/(a+|b)?/
- ab
- 0: a
- 1:
-
-/(a+|b){0,1}/
- ab
- 0: a
- 1:
-
-/[^ab]*/
- cde
- 0: cde
- 1: cd
- 2: c
- 3:
-
-/abc/
- *** Failers
-No match
- b
-No match
-
-
-/a*/
-
-
-/([abc])*d/
- abbbcd
- 0: abbbcd
-
-/([abc])*bcd/
- abcd
- 0: abcd
-
-/a|b|c|d|e/
- e
- 0: e
-
-/(a|b|c|d|e)f/
- ef
- 0: ef
-
-/abcd*efg/
- abcdefg
- 0: abcdefg
-
-/ab*/
- xabyabbbz
- 0: ab
- 1: a
- xayabbbz
- 0: a
-
-/(ab|cd)e/
- abcde
- 0: cde
-
-/[abhgefdc]ij/
- hij
- 0: hij
-
-/^(ab|cd)e/
-
-/(abc|)ef/
- abcdef
- 0: ef
-
-/(a|b)c*d/
- abcd
- 0: bcd
-
-/(ab|ab*)bc/
- abc
- 0: abc
-
-/a([bc]*)c*/
- abc
- 0: abc
- 1: ab
- 2: a
-
-/a([bc]*)(c*d)/
- abcd
- 0: abcd
-
-/a([bc]+)(c*d)/
- abcd
- 0: abcd
-
-/a([bc]*)(c+d)/
- abcd
- 0: abcd
-
-/a[bcd]*dcdcde/
- adcdcde
- 0: adcdcde
-
-/a[bcd]+dcdcde/
- *** Failers
-No match
- abcde
-No match
- adcdcde
-No match
-
-/(ab|a)b*c/
- abc
- 0: abc
-
-/((a)(b)c)(d)/
- abcd
- 0: abcd
-
-/[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
- 0: alpha
- 1: alph
- 2: alp
- 3: al
- 4: a
-
-/^a(bc+|b[eh])g|.h$/
- abh
- 0: bh
-
-/(bc+d$|ef*g.|h?i(j|k))/
- effgz
- 0: effgz
- ij
- 0: ij
- reffgz
- 0: effgz
- *** Failers
-No match
- effg
-No match
- bcdd
-No match
-
-/((((((((((a))))))))))/
- a
- 0: a
-
-/(((((((((a)))))))))/
- a
- 0: a
-
-/multiple words of text/
- *** Failers
-No match
- aa
-No match
- uh-uh
-No match
-
-/multiple words/
- multiple words, yeah
- 0: multiple words
-
-/(.*)c(.*)/
- abcde
- 0: abcde
- 1: abcd
- 2: abc
-
-/\((.*), (.*)\)/
- (a, b)
- 0: (a, b)
-
-/[k]/
-
-/abcd/
- abcd
- 0: abcd
-
-/a(bc)d/
- abcd
- 0: abcd
-
-/a[-]?c/
- ac
- 0: ac
-
-/abc/i
- ABC
- 0: ABC
- XABCY
- 0: ABC
- ABABC
- 0: ABC
- *** Failers
-No match
- aaxabxbaxbbx
-No match
- XBC
-No match
- AXC
-No match
- ABX
-No match
-
-/ab*c/i
- ABC
- 0: ABC
-
-/ab*bc/i
- ABC
- 0: ABC
- ABBC
- 0: ABBC
-
-/ab*?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{0,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab+?bc/i
- ABBC
- 0: ABBC
-
-/ab+bc/i
- *** Failers
-No match
- ABC
-No match
- ABQ
-No match
-
-/ab{1,}bc/i
-
-/ab+bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,3}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{3,4}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{4,5}?bc/i
- *** Failers
-No match
- ABQ
-No match
- ABBBBC
-No match
-
-/ab??bc/i
- ABBC
- 0: ABBC
- ABC
- 0: ABC
-
-/ab{0,1}?bc/i
- ABC
- 0: ABC
-
-/ab??bc/i
-
-/ab??c/i
- ABC
- 0: ABC
-
-/ab{0,1}?c/i
- ABC
- 0: ABC
-
-/^abc$/i
- ABC
- 0: ABC
- *** Failers
-No match
- ABBBBC
-No match
- ABCC
-No match
-
-/^abc/i
- ABCC
- 0: ABC
-
-/^abc$/i
-
-/abc$/i
- AABC
- 0: ABC
-
-/^/i
- ABC
- 0:
-
-/$/i
- ABC
- 0:
-
-/a.c/i
- ABC
- 0: ABC
- AXC
- 0: AXC
-
-/a.*?c/i
- AXYZC
- 0: AXYZC
-
-/a.*c/i
- *** Failers
-No match
- AABC
- 0: AABC
- AXYZD
-No match
-
-/a[bc]d/i
- ABD
- 0: ABD
-
-/a[b-d]e/i
- ACE
- 0: ACE
- *** Failers
-No match
- ABC
-No match
- ABD
-No match
-
-/a[b-d]/i
- AAC
- 0: AC
-
-/a[-b]/i
- A-
- 0: A-
-
-/a[b-]/i
- A-
- 0: A-
-
-/a]/i
- A]
- 0: A]
-
-/a[]]b/i
- A]B
- 0: A]B
-
-/a[^bc]d/i
- AED
- 0: AED
-
-/a[^-b]c/i
- ADC
- 0: ADC
- *** Failers
-No match
- ABD
-No match
- A-C
-No match
-
-/a[^]b]c/i
- ADC
- 0: ADC
-
-/ab|cd/i
- ABC
- 0: AB
- ABCD
- 0: AB
-
-/()ef/i
- DEF
- 0: EF
-
-/$b/i
- *** Failers
-No match
- A]C
-No match
- B
-No match
-
-/a\(b/i
- A(B
- 0: A(B
-
-/a\(*b/i
- AB
- 0: AB
- A((B
- 0: A((B
-
-/a\\b/i
- A\B
-No match
-
-/((a))/i
- ABC
- 0: A
-
-/(a)b(c)/i
- ABC
- 0: ABC
-
-/a+b+c/i
- AABBABC
- 0: ABC
-
-/a{1,}b{1,}c/i
- AABBABC
- 0: ABC
-
-/a.+?c/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/a.*?c/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/a.{0,5}?c/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/(a+|b)*/i
- AB
- 0: AB
- 1: A
- 2:
-
-/(a+|b){0,}/i
- AB
- 0: AB
- 1: A
- 2:
-
-/(a+|b)+/i
- AB
- 0: AB
- 1: A
-
-/(a+|b){1,}/i
- AB
- 0: AB
- 1: A
-
-/(a+|b)?/i
- AB
- 0: A
- 1:
-
-/(a+|b){0,1}/i
- AB
- 0: A
- 1:
-
-/(a+|b){0,1}?/i
- AB
- 0: A
- 1:
-
-/[^ab]*/i
- CDE
- 0: CDE
- 1: CD
- 2: C
- 3:
-
-/abc/i
-
-/a*/i
-
-
-/([abc])*d/i
- ABBBCD
- 0: ABBBCD
-
-/([abc])*bcd/i
- ABCD
- 0: ABCD
-
-/a|b|c|d|e/i
- E
- 0: E
-
-/(a|b|c|d|e)f/i
- EF
- 0: EF
-
-/abcd*efg/i
- ABCDEFG
- 0: ABCDEFG
-
-/ab*/i
- XABYABBBZ
- 0: AB
- 1: A
- XAYABBBZ
- 0: A
-
-/(ab|cd)e/i
- ABCDE
- 0: CDE
-
-/[abhgefdc]ij/i
- HIJ
- 0: HIJ
-
-/^(ab|cd)e/i
- ABCDE
-No match
-
-/(abc|)ef/i
- ABCDEF
- 0: EF
-
-/(a|b)c*d/i
- ABCD
- 0: BCD
-
-/(ab|ab*)bc/i
- ABC
- 0: ABC
-
-/a([bc]*)c*/i
- ABC
- 0: ABC
- 1: AB
- 2: A
-
-/a([bc]*)(c*d)/i
- ABCD
- 0: ABCD
-
-/a([bc]+)(c*d)/i
- ABCD
- 0: ABCD
-
-/a([bc]*)(c+d)/i
- ABCD
- 0: ABCD
-
-/a[bcd]*dcdcde/i
- ADCDCDE
- 0: ADCDCDE
-
-/a[bcd]+dcdcde/i
-
-/(ab|a)b*c/i
- ABC
- 0: ABC
-
-/((a)(b)c)(d)/i
- ABCD
- 0: ABCD
-
-/[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
- 0: ALPHA
- 1: ALPH
- 2: ALP
- 3: AL
- 4: A
-
-/^a(bc+|b[eh])g|.h$/i
- ABH
- 0: BH
-
-/(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- 0: EFFGZ
- IJ
- 0: IJ
- REFFGZ
- 0: EFFGZ
- *** Failers
-No match
- ADCDCDE
-No match
- EFFG
-No match
- BCDD
-No match
-
-/((((((((((a))))))))))/i
- A
- 0: A
-
-/(((((((((a)))))))))/i
- A
- 0: A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
- 0: A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
- 0: C
-
-/multiple words of text/i
- *** Failers
-No match
- AA
-No match
- UH-UH
-No match
-
-/multiple words/i
- MULTIPLE WORDS, YEAH
- 0: MULTIPLE WORDS
-
-/(.*)c(.*)/i
- ABCDE
- 0: ABCDE
- 1: ABCD
- 2: ABC
-
-/\((.*), (.*)\)/i
- (A, B)
- 0: (A, B)
-
-/[k]/i
-
-/abcd/i
- ABCD
- 0: ABCD
-
-/a(bc)d/i
- ABCD
- 0: ABCD
-
-/a[-]?c/i
- AC
- 0: AC
-
-/a(?!b)./
- abad
- 0: ad
-
-/a(?=d)./
- abad
- 0: ad
-
-/a(?=c|d)./
- abad
- 0: ad
-
-/a(?:b|c|d)(.)/
- ace
- 0: ace
-
-/a(?:b|c|d)*(.)/
- ace
- 0: ace
- 1: ac
-
-/a(?:b|c|d)+?(.)/
- ace
- 0: ace
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
- 2: acdbcd
- 3: acdbc
- 4: acdb
- 5: acd
-
-/a(?:b|c|d)+(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
- 2: acdbcd
- 3: acdbc
- 4: acdb
- 5: acd
-
-/a(?:b|c|d){2}(.)/
- acdbcdbe
- 0: acdb
-
-/a(?:b|c|d){4,5}(.)/
- acdbcdbe
- 0: acdbcdb
- 1: acdbcd
-
-/a(?:b|c|d){4,5}?(.)/
- acdbcdbe
- 0: acdbcdb
- 1: acdbcd
-
-/((foo)|(bar))*/
- foobar
- 0: foobar
- 1: foo
- 2:
-
-/a(?:b|c|d){6,7}(.)/
- acdbcdbe
- 0: acdbcdbe
-
-/a(?:b|c|d){6,7}?(.)/
- acdbcdbe
- 0: acdbcdbe
-
-/a(?:b|c|d){5,6}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|c|d){5,6}?(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|c|d){5,7}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|c|d){5,7}?(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
- 0: ace
-
-/^(.+)?B/
- AB
- 0: AB
-
-/^([^a-z])|(\^)$/
- .
- 0: .
-
-/^[<>]&/
- <&OUT
- 0: <&
-
-/(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
- 0: foobar
- 1: foo
- 2:
-
-/(?<=a)b/
- ab
- 0: b
- *** Failers
-No match
- cb
-No match
- b
-No match
-
-/(?<!c)b/
- ab
- 0: b
- b
- 0: b
- b
- 0: b
-
-/(?:..)*a/
- aba
- 0: aba
- 1: a
-
-/(?:..)*?a/
- aba
- 0: aba
- 1: a
-
-/^(){3,5}/
- abc
- 0:
-
-/^(a+)*ax/
- aax
- 0: aax
-
-/^((a|b)+)*ax/
- aax
- 0: aax
-
-/^((a|bc)+)*ax/
- aax
- 0: aax
-
-/(a|x)*ab/
- cab
- 0: ab
-
-/(a)*ab/
- cab
- 0: ab
-
-/(?:(?i)a)b/
- ab
- 0: ab
-
-/((?i)a)b/
- ab
- 0: ab
-
-/(?:(?i)a)b/
- Ab
- 0: Ab
-
-/((?i)a)b/
- Ab
- 0: Ab
-
-/(?:(?i)a)b/
- *** Failers
-No match
- cb
-No match
- aB
-No match
-
-/((?i)a)b/
-
-/(?i:a)b/
- ab
- 0: ab
-
-/((?i:a))b/
- ab
- 0: ab
-
-/(?i:a)b/
- Ab
- 0: Ab
-
-/((?i:a))b/
- Ab
- 0: Ab
-
-/(?i:a)b/
- *** Failers
-No match
- aB
-No match
- aB
-No match
-
-/((?i:a))b/
-
-/(?:(?-i)a)b/i
- ab
- 0: ab
-
-/((?-i)a)b/i
- ab
- 0: ab
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- aB
- 0: aB
- Ab
-No match
-
-/((?-i)a)b/i
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i)a)b/i
-
-/(?-i:a)b/i
- ab
- 0: ab
-
-/((?-i:a))b/i
- ab
- 0: ab
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
-
-/(?-i:a)b/i
- *** Failers
-No match
- AB
-No match
- Ab
-No match
-
-/((?-i:a))b/i
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
-
-/(?-i:a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i:a))b/i
-
-/((?-i:a.))b/i
- *** Failers
-No match
- AB
-No match
- a\nB
-No match
-
-/((?s-i:a.))b/i
- a\nB
- 0: a\x0aB
-
-/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
- 0: cabbbb
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
- 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-
-/foo\w*\d{4}baz/
- foobar1234baz
- 0: foobar1234baz
-
-/x(~~)*(?:(?:F)?)?/
- x~~
- 0: x~~
- 1: x
-
-/^a(?#xxx){3}c/
- aaac
- 0: aaac
-
-/^a (?#xxx) (?#yyy) {3}c/x
- aaac
- 0: aaac
-
-/(?<![cd])b/
- *** Failers
-No match
- B\nB
-No match
- dbcb
-No match
-
-/(?<![cd])[ab]/
- dbaacb
- 0: a
-
-/(?<!(c|d))b/
-
-/(?<!(c|d))[ab]/
- dbaacb
- 0: a
-
-/(?<!cd)[ab]/
- cdaccb
- 0: b
-
-/^(?:a?b?)*$/
- *** Failers
-No match
- dbcb
-No match
- a--
-No match
-
-/((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
- 0: a\x0ab
-
-/((?m)^b$)/
- a\nb\nc\n
- 0: b
-
-/(?m)^b/
- a\nb\n
- 0: b
-
-/(?m)^(b)/
- a\nb\n
- 0: b
-
-/((?m)^b)/
- a\nb\n
- 0: b
-
-/\n((?m)^b)/
- a\nb\n
- 0: \x0ab
-
-/((?s).)c(?!.)/
- a\nb\nc\n
- 0: \x0ac
- a\nb\nc\n
- 0: \x0ac
-
-/((?s)b.)c(?!.)/
- a\nb\nc\n
- 0: b\x0ac
- a\nb\nc\n
- 0: b\x0ac
-
-/^b/
-
-/()^b/
- *** Failers
-No match
- a\nb\nc\n
-No match
- a\nb\nc\n
-No match
-
-/((?m)^b)/
- a\nb\nc\n
- 0: b
-
-/(?(?!a)a|b)/
-
-/(?(?!a)b|a)/
- a
- 0: a
-
-/(?(?=a)b|a)/
- *** Failers
-No match
- a
-No match
- a
-No match
-
-/(?(?=a)a|b)/
- a
- 0: a
-
-/(\w+:)+/
- one:
- 0: one:
-
-/$(?<=^(a))/
- a
- 0:
-
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
-
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
-
-/(a*)b+/
- caab
- 0: aab
-
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
- *** Failers
- 0: Failers
- abcd:
-No match
- abcd:
-No match
-
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
-
-/(>a+)ab/
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/([[:]+)/
- a:[b]:
- 0: :[
- 1: :
-
-/([[=]+)/
- a=[b]=
- 0: =[
- 1: =
-
-/([[.]+)/
- a.[b].
- 0: .[
- 1: .
-
-/((?>a+)b)/
- aaab
- 0: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: abc(ade)ufh()()
- 2: abc(ade)ufh()
- 3: abc(ade)ufh
- 4: abc(ade)
- 5: abc
-
-/a\Z/
- *** Failers
-No match
- aaab
-No match
- a\nb\n
-No match
-
-/b\Z/
- a\nb\n
- 0: b
-
-/b\z/
-
-/b\Z/
- a\nb
- 0: b
-
-/b\z/
- a\nb
- 0: b
- *** Failers
-No match
-
-/(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- 0: alphabetabcd
- endingwxyz
- 0: endingwxyz
- *** Failers
-No match
- a rather long string that doesn't end with one of them
-No match
-
-/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-No match
-
-/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-No match
-
-/(?<=\d{3}(?!999))foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
-
-/(?<=(?!...999)\d{3})foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
-
-/(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
- *** Failers
-No match
- 123999foo
-No match
-
-/(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
- *** Failers
-No match
- 123999foo
-No match
-
-/((Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/(Z()|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/(Z(())|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/((?>Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/((?>)+|A)*/
- ZABCDEFG
- 0:
-
-/a*/g
- abbab
- 0: a
- 1:
- 0:
- 0:
- 0: a
- 1:
- 0:
- 0:
-
-/^[a-\d]/
- abcde
- 0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
-No match
- bcdef
-No match
-
-/^[\d-a]/
- abcde
- 0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
-No match
- bcdef
-No match
-
-/[[:space:]]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d\x0b
- 1: \x09\x0a\x0c\x0d
- 2: \x09\x0a\x0c
- 3: \x09\x0a
- 4: \x09
- 5:
-
-/[[:blank:]]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09
- 1:
-
-/[\s]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d
- 1: \x09\x0a\x0c
- 2: \x09\x0a
- 3: \x09
- 4:
-
-/\s+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d
- 1: \x09\x0a\x0c
- 2: \x09\x0a
- 3: \x09
- 4:
-
-/a b/x
- ab
-No match
-
-/(?!\A)x/m
- a\nxb\n
- 0: x
-
-/(?!^)x/m
- a\nxb\n
-No match
-
-/abc\Qabc\Eabc/
- abcabcabc
- 0: abcabcabc
-
-/abc\Q(*+|\Eabc/
- abc(*+|abc
- 0: abc(*+|abc
-
-/ abc\Q abc\Eabc/x
- abc abcabc
- 0: abc abcabc
- *** Failers
-No match
- abcabcabc
-No match
-
-/abc#comment
- \Q#not comment
- literal\E/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment
- /x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/\Qabc\$xyz\E/
- abc\\\$xyz
- 0: abc\$xyz
-
-/\Qabc\E\$\Qxyz\E/
- abc\$xyz
- 0: abc$xyz
-
-/\Gabc/
- abc
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
-
-/\Gabc./g
- abc1abc2xyzabc3
- 0: abc1
- 0: abc2
-
-/abc./g
- abc1abc2xyzabc3
- 0: abc1
- 0: abc2
- 0: abc3
-
-/a(?x: b c )d/
- XabcdY
- 0: abcd
- *** Failers
-No match
- Xa b c d Y
-No match
-
-/((?x)x y z | a b c)/
- XabcY
- 0: abc
- AxyzB
- 0: xyz
-
-/(?i)AB(?-i)C/
- XabCY
- 0: abC
- *** Failers
-No match
- XabcY
-No match
-
-/((?i)AB(?-i)C|D)E/
- abCE
- 0: abCE
- DE
- 0: DE
- *** Failers
-No match
- abcE
-No match
- abCe
-No match
- dE
-No match
- De
-No match
-
-/[z\Qa-d]\E]/
- z
- 0: z
- a
- 0: a
- -
- 0: -
- d
- 0: d
- ]
- 0: ]
- *** Failers
- 0: a
- b
-No match
-
-/[\z\C]/
- z
- 0: z
- C
- 0: C
-
-/\M/
- M
- 0: M
-
-/(a+)*b/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/(?i)reg(?:ul(?:[a]|ae)r|ex)/
- REGular
- 0: REGular
- regulaer
- 0: regulaer
- Regex
- 0: Regex
- regulr
- 0: regul\xe4r
-
-/[--]+/
-
- 0: \xc5\xe6\xe5\xe4\xe0
-
- 0: \xc5\xe6\xe5\xe4\xff
-
- 0: \xc5\xe6\xe5\xe4\xc0
-
- 0: \xc5\xe6\xe5\xe4\xdf
-
-/(?<=Z)X./
- \x84XAZXB
- 0: XB
-
-/^(?(2)a|(1)(2))+$/
- 123a
-Error -17 (backreference condition or recursion test not supported for DFA matching)
-
-/(?<=a|bbbb)c/
- ac
- 0: c
- bbbbc
- 0: c
-
-/abc/SS>testsavedregex
-Compiled pattern written to testsavedregex
-<testsavedregex
-Compiled pattern loaded from testsavedregex
-No study data
- abc
- 0: abc
- *** Failers
-No match
- bca
-No match
-
-/abc/FSS>testsavedregex
-Compiled pattern written to testsavedregex
-<testsavedregex
-Compiled pattern (byte-inverted) loaded from testsavedregex
-No study data
- abc
- 0: abc
- *** Failers
-No match
- bca
-No match
-
-/(a|b)/S>testsavedregex
-Compiled pattern written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled pattern loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- *** Failers
- 0: a
- def
-No match
-
-/(a|b)/SF>testsavedregex
-Compiled pattern written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled pattern (byte-inverted) loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- *** Failers
- 0: a
- def
-No match
-
-/line\nbreak/
- this is a line\nbreak
- 0: line\x0abreak
- line one\nthis is a line\nbreak in the second line
- 0: line\x0abreak
-
-/line\nbreak/f
- this is a line\nbreak
- 0: line\x0abreak
- ** Failers
-No match
- line one\nthis is a line\nbreak in the second line
-No match
-
-/line\nbreak/mf
- this is a line\nbreak
- 0: line\x0abreak
- ** Failers
-No match
- line one\nthis is a line\nbreak in the second line
-No match
-
-/1234/
- 123\P
-Partial match: 123
- a4\P\R
-No match
-
-/1234/
- 123\P
-Partial match: 123
- 4\P\R
- 0: 4
-
-/^/mg
- a\nb\nc\n
- 0:
- 0:
- 0:
- \
- 0:
-
-/(?<=C\n)^/mg
- A\nC\nC\n
- 0:
-
-/(?s)A?B/
- AB
- 0: AB
- aB
- 0: B
-
-/(?s)A*B/
- AB
- 0: AB
- aB
- 0: B
-
-/(?m)A?B/
- AB
- 0: AB
- aB
- 0: B
-
-/(?m)A*B/
- AB
- 0: AB
- aB
- 0: B
-
-/Content-Type\x3A[^\r\n]{6,}/
- Content-Type:xxxxxyyy
- 0: Content-Type:xxxxxyyy
- 1: Content-Type:xxxxxyy
- 2: Content-Type:xxxxxy
-
-/Content-Type\x3A[^\r\n]{6,}z/
- Content-Type:xxxxxyyyz
- 0: Content-Type:xxxxxyyyz
-
-/Content-Type\x3A[^a]{6,}/
- Content-Type:xxxyyy
- 0: Content-Type:xxxyyy
-
-/Content-Type\x3A[^a]{6,}z/
- Content-Type:xxxyyyz
- 0: Content-Type:xxxyyyz
-
-/^abc/m
- xyz\nabc
- 0: abc
- xyz\nabc\<lf>
- 0: abc
- xyz\r\nabc\<lf>
- 0: abc
- xyz\rabc\<cr>
- 0: abc
- xyz\r\nabc\<crlf>
- 0: abc
- ** Failers
-No match
- xyz\nabc\<cr>
-No match
- xyz\r\nabc\<cr>
-No match
- xyz\nabc\<crlf>
-No match
- xyz\rabc\<crlf>
-No match
- xyz\rabc\<lf>
-No match
-
-/abc$/m<lf>
- xyzabc
- 0: abc
- xyzabc\n
- 0: abc
- xyzabc\npqr
- 0: abc
- xyzabc\r\<cr>
- 0: abc
- xyzabc\rpqr\<cr>
- 0: abc
- xyzabc\r\n\<crlf>
- 0: abc
- xyzabc\r\npqr\<crlf>
- 0: abc
- ** Failers
-No match
- xyzabc\r
-No match
- xyzabc\rpqr
-No match
- xyzabc\r\n
-No match
- xyzabc\r\npqr
-No match
-
-/^abc/m<cr>
- xyz\rabcdef
- 0: abc
- xyz\nabcdef\<lf>
- 0: abc
- ** Failers
-No match
- xyz\nabcdef
-No match
-
-/^abc/m<lf>
- xyz\nabcdef
- 0: abc
- xyz\rabcdef\<cr>
- 0: abc
- ** Failers
-No match
- xyz\rabcdef
-No match
-
-/^abc/m<crlf>
- xyz\r\nabcdef
- 0: abc
- xyz\rabcdef\<cr>
- 0: abc
- ** Failers
-No match
- xyz\rabcdef
-No match
-
-/.*/<lf>
- abc\ndef
- 0: abc
- 1: ab
- 2: a
- 3:
- abc\rdef
- 0: abc\x0ddef
- 1: abc\x0dde
- 2: abc\x0dd
- 3: abc\x0d
- 4: abc
- 5: ab
- 6: a
- 7:
- abc\r\ndef
- 0: abc\x0d
- 1: abc
- 2: ab
- 3: a
- 4:
- \<cr>abc\ndef
- 0: abc\x0adef
- 1: abc\x0ade
- 2: abc\x0ad
- 3: abc\x0a
- 4: abc
- 5: ab
- 6: a
- 7:
- \<cr>abc\rdef
- 0: abc
- 1: ab
- 2: a
- 3:
- \<cr>abc\r\ndef
- 0: abc
- 1: ab
- 2: a
- 3:
- \<crlf>abc\ndef
- 0: abc\x0adef
- 1: abc\x0ade
- 2: abc\x0ad
- 3: abc\x0a
- 4: abc
- 5: ab
- 6: a
- 7:
- \<crlf>abc\rdef
- 0: abc\x0ddef
- 1: abc\x0dde
- 2: abc\x0dd
- 3: abc\x0d
- 4: abc
- 5: ab
- 6: a
- 7:
- \<crlf>abc\r\ndef
- 0: abc
- 1: ab
- 2: a
- 3:
-
-/\w+(.)(.)?def/s
- abc\ndef
- 0: abc\x0adef
- abc\rdef
- 0: abc\x0ddef
- abc\r\ndef
- 0: abc\x0d\x0adef
-
-/^\w+=.*(\\\n.*)*/
- abc=xyz\\\npqr
- 0: abc=xyz\\x0apqr
- 1: abc=xyz\\x0apq
- 2: abc=xyz\\x0ap
- 3: abc=xyz\\x0a
- 4: abc=xyz\
- 5: abc=xyz
- 6: abc=xy
- 7: abc=x
- 8: abc=
-
-/^(a()*)*/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- 4:
-
-/^(?:a(?:(?:))*)*/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- 4:
-
-/^(a()+)+/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/^(?:a(?:(?:))+)+/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/(a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?>a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?:a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/^a.b/<lf>
- a\rb
- 0: a\x0db
- a\nb\<cr>
- 0: a\x0ab
- ** Failers
-No match
- a\nb
-No match
- a\nb\<any>
-No match
- a\rb\<cr>
-No match
- a\rb\<any>
-No match
-
-/^abc./mgx<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc7
-
-/abc.$/mgx<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc9
-
-/^a\Rb/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- ** Failers
-No match
- a\n\rb
-No match
-
-/^a\R*b/<bsr_unicode>
- ab
- 0: ab
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85\x0cb
- 0: a\x0a\x0d\x85\x0cb
-
-/^a\R+b/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85\x0cb
- 0: a\x0a\x0d\x85\x0cb
- ** Failers
-No match
- ab
-No match
-
-/^a\R{1,3}b/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85b
- 0: a\x0a\x0d\x85b
- a\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0ab
- a\r\n\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0a\x0d\x0ab
- a\n\r\n\rb
- 0: a\x0a\x0d\x0a\x0db
- a\n\n\r\nb
- 0: a\x0a\x0a\x0d\x0ab
- ** Failers
-No match
- a\n\n\n\rb
-No match
- a\r
-No match
-
-/^a[\R]b/<bsr_unicode>
- aRb
- 0: aRb
- ** Failers
-No match
- a\nb
-No match
-
-/.+foo/
- afoo
- 0: afoo
- ** Failers
-No match
- \r\nfoo
-No match
- \nfoo
-No match
-
-/.+foo/<crlf>
- afoo
- 0: afoo
- \nfoo
- 0: \x0afoo
- ** Failers
-No match
- \r\nfoo
-No match
-
-/.+foo/<any>
- afoo
- 0: afoo
- ** Failers
-No match
- \nfoo
-No match
- \r\nfoo
-No match
-
-/.+foo/s
- afoo
- 0: afoo
- \r\nfoo
- 0: \x0d\x0afoo
- \nfoo
- 0: \x0afoo
-
-/^$/mg<any>
- abc\r\rxyz
- 0:
- abc\n\rxyz
- 0:
- ** Failers
-No match
- abc\r\nxyz
-No match
-
-/^X/m
- XABC
- 0: X
- ** Failers
-No match
- XABC\B
-No match
-
-/(?m)^$/<any>g+
- abc\r\n\r\n
- 0:
- 0+ \x0d\x0a
-
-/(?m)^$|^\r\n/<any>g+
- abc\r\n\r\n
- 0: \x0d\x0a
- 0+
- 1:
-
-/(?m)$/<any>g+
- abc\r\n\r\n
- 0:
- 0+ \x0d\x0a\x0d\x0a
- 0:
- 0+ \x0d\x0a
- 0:
- 0+
-
-/(?|(abc)|(xyz))/
- >abc<
- 0: abc
- >xyz<
- 0: xyz
-
-/(x)(?|(abc)|(xyz))(x)/
- xabcx
- 0: xabcx
- xxyzx
- 0: xxyzx
-
-/(x)(?|(abc)(pqr)|(xyz))(x)/
- xabcpqrx
- 0: xabcpqrx
- xxyzx
- 0: xxyzx
-
-/(?|(abc)|(xyz))(?1)/
- abcabc
- 0: abcabc
- xyzabc
- 0: xyzabc
- ** Failers
-No match
- xyzxyz
-No match
-
-/\H\h\V\v/
- X X\x0a
- 0: X X\x0a
- X\x09X\x0b
- 0: X\x09X\x0b
- ** Failers
-No match
- \xa0 X\x0a
-No match
-
-/\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0X\x0a\x0b\x0c\x0d
- 1: \x09 \xa0X\x0a\x0b\x0c
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0\x0a\x0b\x0c\x0d
- 1: \x09 \xa0\x0a\x0b\x0c
- \x09\x20\xa0\x0a\x0b\x0c
- 0: \x09 \xa0\x0a\x0b\x0c
- ** Failers
-No match
- \x09\x20\xa0\x0a\x0b
-No match
-
-/\H{3,4}/
- XY ABCDE
- 0: ABCD
- 1: ABC
- XY PQR ST
- 0: PQR
-
-/.\h{3,4}./
- XY AB PQRS
- 0: B P
- 1: B
-
-/\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- 0: XNNNYZ
- > X NYQZ
- 0: X NYQZ
- ** Failers
-No match
- >XYZ
-No match
- > X NY Z
-No match
-
-/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- 0: XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
- 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
-
-/.+A/<crlf>
- \r\nA
-No match
-
-/\nA/<crlf>
- \r\nA
- 0: \x0aA
-
-/[\r\n]A/<crlf>
- \r\nA
- 0: \x0aA
-
-/(\r|\n)A/<crlf>
- \r\nA
- 0: \x0aA
-
-/a\Rb/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- ** Failers
-No match
- a\x85b
-No match
- a\x0bb
-No match
-
-/a\Rb/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- a\x85b
- 0: a\x85b
- a\x0bb
- 0: a\x0bb
- ** Failers
-No match
- a\x85b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R?b/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- ** Failers
-No match
- a\x85b
-No match
- a\x0bb
-No match
-
-/a\R?b/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- a\x85b
- 0: a\x85b
- a\x0bb
- 0: a\x0bb
- ** Failers
-No match
- a\x85b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R{2,4}b/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\r\n\nb
- 0: a\x0d\x0a\x0ab
- a\n\r\rb
- 0: a\x0a\x0d\x0db
- a\r\n\r\n\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
- ** Failers
-No match
- a\x85\85b
-No match
- a\x0b\0bb
-No match
-
-/a\R{2,4}b/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\r\rb
- 0: a\x0d\x0db
- a\n\n\nb
- 0: a\x0a\x0a\x0ab
- a\r\n\n\r\rb
- 0: a\x0d\x0a\x0a\x0d\x0db
- a\x85\85b
-No match
- a\x0b\0bb
-No match
- ** Failers
-No match
- a\r\r\r\r\rb
-No match
- a\x85\85b\<bsr_anycrlf>
-No match
- a\x0b\0bb\<bsr_anycrlf>
-No match
-
-/a(?!)|\wbc/
- abc
- 0: abc
-
-/a[]b/<JS>
- ** Failers
-No match
- ab
-No match
-
-/a[]+b/<JS>
- ** Failers
-No match
- ab
-No match
-
-/a[]*+b/<JS>
- ** Failers
-No match
- ab
-No match
-
-/a[^]b/<JS>
- aXb
- 0: aXb
- a\nb
- 0: a\x0ab
- ** Failers
-No match
- ab
-No match
-
-/a[^]+b/<JS>
- aXb
- 0: aXb
- a\nX\nXb
- 0: a\x0aX\x0aXb
- ** Failers
-No match
- ab
-No match
-
-/X$/E
- X
- 0: X
- ** Failers
-No match
- X\n
-No match
-
-/X$/
- X
- 0: X
- X\n
- 0: X
-
-/xyz/C
- xyz
---->xyz
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
- abcxyz
---->abcxyz
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
- abcxyz\Y
---->abcxyz
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
- ** Failers
-No match
- abc
-No match
- abc\Y
---->abc
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
-No match
- abcxypqr
-No match
- abcxypqr\Y
---->abcxypqr
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
-No match
-
-/(*NO_START_OPT)xyz/C
- abcxyz
---->abcxyz
-+15 ^ x
-+15 ^ x
-+15 ^ x
-+15 ^ x
-+16 ^^ y
-+17 ^ ^ z
-+18 ^ ^
- 0: xyz
-
-/(?C)ab/
- ab
---->ab
- 0 ^ a
- 0: ab
- \C-ab
- 0: ab
-
-/ab/C
- ab
---->ab
- +0 ^ a
- +1 ^^ b
- +2 ^ ^
- 0: ab
- \C-ab
- 0: ab
-
-/^"((?(?=[a])[^"])|b)*"$/C
- "ab"
---->"ab"
- +0 ^ ^
- +1 ^ "
- +2 ^^ ((?(?=[a])[^"])|b)*
-+21 ^^ "
- +3 ^^ (?(?=[a])[^"])
-+18 ^^ b
- +5 ^^ (?=[a])
- +8 ^ [a]
-+11 ^^ )
-+12 ^^ [^"]
-+16 ^ ^ )
-+17 ^ ^ |
-+21 ^ ^ "
- +3 ^ ^ (?(?=[a])[^"])
-+18 ^ ^ b
- +5 ^ ^ (?=[a])
- +8 ^ [a]
-+19 ^ ^ )
-+21 ^ ^ "
- +3 ^ ^ (?(?=[a])[^"])
-+18 ^ ^ b
- +5 ^ ^ (?=[a])
- +8 ^ [a]
-+17 ^ ^ |
-+22 ^ ^ $
-+23 ^ ^
- 0: "ab"
- \C-"ab"
- 0: "ab"
-
-/\d+X|9+Y/
- ++++123999\P
-Partial match: 123999
- ++++123999Y\P
- 0: 999Y
-
-/Z(*F)/
- Z\P
-No match
- ZA\P
-No match
-
-/Z(?!)/
- Z\P
-No match
- ZA\P
-No match
-
-/dog(sbody)?/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/dog(sbody)??/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/dog|dogsbody/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/dogsbody|dog/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/Z(*F)Q|ZXY/
- Z\P
-Partial match: Z
- ZA\P
-No match
- X\P
-No match
-
-/\bthe cat\b/
- the cat\P
- 0: the cat
- the cat\P\P
-Partial match: the cat
-
-/dog(sbody)?/
- dogs\D\P
- 0: dog
- body\D\R
- 0: body
-
-/dog(sbody)?/
- dogs\D\P\P
-Partial match: dogs
- body\D\R
- 0: body
-
-/abc/
- abc\P
- 0: abc
- abc\P\P
- 0: abc
-
-/abc\K123/
- xyzabc123pqr
-Error -16 (item unsupported for DFA matching)
-
-/(?<=abc)123/
- xyzabc123pqr
- 0: 123
- xyzabc12\P
-Partial match: abc12
- xyzabc12\P\P
-Partial match: abc12
-
-/\babc\b/
- +++abc+++
- 0: abc
- +++ab\P
-Partial match: +ab
- +++ab\P\P
-Partial match: +ab
-
-/(?=C)/g+
- ABCDECBA
- 0:
- 0+ CDECBA
- 0:
- 0+ CBA
-
-/(abc|def|xyz)/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
- terhjk;abcdaadsfe
- 0: abc
- the quick xyz brown fox
- 0: xyz
- \Yterhjk;abcdaadsfe
- 0: abc
- \Ythe quick xyz brown fox
- 0: xyz
- ** Failers
-No match
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-No match
- \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-No match
-
-/(abc|def|xyz)/SI
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 3
-Starting byte set: a d x
- terhjk;abcdaadsfe
- 0: abc
- the quick xyz brown fox
- 0: xyz
- \Yterhjk;abcdaadsfe
- 0: abc
- \Ythe quick xyz brown fox
- 0: xyz
- ** Failers
-No match
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-No match
- \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-No match
-
-/abcd*/+
- xxxxabcd\P
- 0: abcd
- 0+
- 1: abc
- xxxxabcd\P\P
-Partial match: abcd
- dddxxx\R
- 0: ddd
- 0+ xxx
- 1: dd
- 2: d
- 3:
- xxxxabcd\P\P
-Partial match: abcd
- xxx\R
- 0:
- 0+ xxx
-
-/abcd*/i
- xxxxabcd\P
- 0: abcd
- 1: abc
- xxxxabcd\P\P
-Partial match: abcd
- XXXXABCD\P
- 0: ABCD
- 1: ABC
- XXXXABCD\P\P
-Partial match: ABCD
-
-/abc\d*/
- xxxxabc1\P
- 0: abc1
- 1: abc
- xxxxabc1\P\P
-Partial match: abc1
-
-/abc[de]*/
- xxxxabcde\P
- 0: abcde
- 1: abcd
- 2: abc
- xxxxabcde\P\P
-Partial match: abcde
-
-/(?:(?1)|B)(A(*F)|C)/
- ABCD
- 0: BC
- CCD
- 0: CC
- ** Failers
-No match
- CAD
-No match
-
-/^(?:(?1)|B)(A(*F)|C)/
- CCD
- 0: CC
- BCD
- 0: BC
- ** Failers
-No match
- ABCD
-No match
- CAD
-No match
- BAD
-No match
-
-/^(?!a(*SKIP)b)/
- ac
-Error -16 (item unsupported for DFA matching)
-
-/^(?=a(*SKIP)b|ac)/
- ** Failers
-No match
- ac
-Error -16 (item unsupported for DFA matching)
-
-/^(?=a(*THEN)b|ac)/
- ac
-Error -16 (item unsupported for DFA matching)
-
-/^(?=a(*PRUNE)b)/
- ab
-Error -16 (item unsupported for DFA matching)
- ** Failers
-No match
- ac
-Error -16 (item unsupported for DFA matching)
-
-/^(?(?!a(*SKIP)b))/
- ac
-Error -16 (item unsupported for DFA matching)
-
-/(?<=abc)def/
- abc\P\P
-Partial match: abc
-
-/abc$/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
-
-/abc$/m
- abc
- 0: abc
- abc\n
- 0: abc
- abc\P\P
-Partial match: abc
- abc\n\P\P
- 0: abc
- abc\P
- 0: abc
- abc\n\P
- 0: abc
-
-/abc\z/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
-
-/abc\Z/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
-
-/abc\b/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
-
-/abc\B/
- abc
-No match
- abc\P
-Partial match: abc
- abc\P\P
-Partial match: abc
-
-/.+/
- abc\>0
- 0: abc
- 1: ab
- 2: a
- abc\>1
- 0: bc
- 1: b
- abc\>2
- 0: c
- abc\>3
-No match
- abc\>4
-Error -24 (bad offset value)
- abc\>-4
-Error -24 (bad offset value)
-
-/^(?:a)++\w/
- aaaab
- 0: aaaab
- ** Failers
-No match
- aaaa
-No match
- bbb
-No match
-
-/^(?:aa|(?:a)++\w)/
- aaaab
- 0: aaaab
- 1: aa
- aaaa
- 0: aa
- ** Failers
-No match
- bbb
-No match
-
-/^(?:a)*+\w/
- aaaab
- 0: aaaab
- bbb
- 0: b
- ** Failers
-No match
- aaaa
-No match
-
-/^(a)++\w/
- aaaab
- 0: aaaab
- ** Failers
-No match
- aaaa
-No match
- bbb
-No match
-
-/^(a|)++\w/
- aaaab
- 0: aaaab
- ** Failers
-No match
- aaaa
-No match
- bbb
-No match
-
-/(?=abc){3}abc/+
- abcabcabc
- 0: abc
- 0+ abcabc
- ** Failers
-No match
- xyz
-No match
-
-/(?=abc)+abc/+
- abcabcabc
- 0: abc
- 0+ abcabc
- ** Failers
-No match
- xyz
-No match
-
-/(?=abc)++abc/+
- abcabcabc
- 0: abc
- 0+ abcabc
- ** Failers
-No match
- xyz
-No match
-
-/(?=abc){0}xyz/
- xyz
- 0: xyz
-
-/(?=abc){1}xyz/
- ** Failers
-No match
- xyz
-No match
-
-/(?=(a))?./
- ab
- 0: a
- bc
- 0: b
-
-/(?=(a))??./
- ab
- 0: a
- bc
- 0: b
-
-/^(?=(a)){0}b(?1)/
- backgammon
- 0: ba
-
-/^(?=(?1))?[az]([abc])d/
- abd
- 0: abd
- zcdxx
- 0: zcd
-
-/^(?!a){0}\w+/
- aaaaa
- 0: aaaaa
- 1: aaaa
- 2: aaa
- 3: aa
- 4: a
-
-/(?<=(abc))?xyz/
- abcxyz
- 0: xyz
- pqrxyz
- 0: xyz
-
-/((?2))((?1))/
- abc
-Error -26 (nested recursion at the same subject position)
-
-/(?(R)a+|(?R)b)/
- aaaabcde
- 0: aaaab
-
-/(?(R)a+|((?R))b)/
- aaaabcde
- 0: aaaab
-
-/((?(R)a+|(?1)b))/
- aaaabcde
- 0: aaaab
-
-/((?(R2)a+|(?1)b))/
- aaaabcde
-Error -17 (backreference condition or recursion test not supported for DFA matching)
-
-/(?(R)a*(?1)|((?R))b)/
- aaaabcde
-Error -26 (nested recursion at the same subject position)
-
-/(a+)/
- \O6aaaa
-Matched, but too many subsidiary matches
- 0: aaaa
- 1: aaa
- 2: aa
- \O8aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/ab\Cde/
- abXde
- 0: abXde
-
-/(?<=ab\Cde)X/
- abZdeX
- 0: X
-
-/-- End of testinput8 --/
diff --git a/src/third_party/pcre-8.30/testdata/testoutput9 b/src/third_party/pcre-8.30/testdata/testoutput9
deleted file mode 100644
index 1acd6c530a6..00000000000
--- a/src/third_party/pcre-8.30/testdata/testoutput9
+++ /dev/null
@@ -1,1326 +0,0 @@
-/-- This set of tests checks UTF-8 support with the DFA matching functionality
- of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running
- it. --/
-
-/\x{100}ab/8
- \x{100}ab
- 0: \x{100}ab
-
-/a\x{100}*b/8
- ab
- 0: ab
- a\x{100}b
- 0: a\x{100}b
- a\x{100}\x{100}b
- 0: a\x{100}\x{100}b
-
-/a\x{100}+b/8
- a\x{100}b
- 0: a\x{100}b
- a\x{100}\x{100}b
- 0: a\x{100}\x{100}b
- *** Failers
-No match
- ab
-No match
-
-/\bX/8
- Xoanon
- 0: X
- +Xoanon
- 0: X
- \x{300}Xoanon
- 0: X
- *** Failers
-No match
- YXoanon
-No match
-
-/\BX/8
- YXoanon
- 0: X
- *** Failers
-No match
- Xoanon
-No match
- +Xoanon
-No match
- \x{300}Xoanon
-No match
-
-/X\b/8
- X+oanon
- 0: X
- ZX\x{300}oanon
- 0: X
- FAX
- 0: X
- *** Failers
-No match
- Xoanon
-No match
-
-/X\B/8
- Xoanon
- 0: X
- *** Failers
-No match
- X+oanon
-No match
- ZX\x{300}oanon
-No match
- FAX
-No match
-
-/[^a]/8
- abcd
- 0: b
- a\x{100}
- 0: \x{100}
-
-/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
- ab99
- 0: ab9
- \x{123}\x{123}45
- 0: \x{123}\x{123}4
- \x{400}\x{401}\x{402}6
- 0: \x{400}\x{401}\x{402}6
- *** Failers
-No match
- d99
-No match
- \x{123}\x{122}4
-No match
- \x{400}\x{403}6
-No match
- \x{400}\x{401}\x{402}\x{402}6
-No match
-
-/a.b/8
- acb
- 0: acb
- a\x7fb
- 0: a\x{7f}b
- a\x{100}b
- 0: a\x{100}b
- *** Failers
-No match
- a\nb
-No match
-
-/a(.{3})b/8
- a\x{4000}xyb
- 0: a\x{4000}xyb
- a\x{4000}\x7fyb
- 0: a\x{4000}\x{7f}yb
- a\x{4000}\x{100}yb
- 0: a\x{4000}\x{100}yb
- *** Failers
-No match
- a\x{4000}b
-No match
- ac\ncb
-No match
-
-/a(.*?)(.)/
- a\xc0\x88b
- 0: a\xc0\x88b
- 1: a\xc0\x88
- 2: a\xc0
-
-/a(.*?)(.)/8
- a\x{100}b
- 0: a\x{100}b
- 1: a\x{100}
-
-/a(.*)(.)/
- a\xc0\x88b
- 0: a\xc0\x88b
- 1: a\xc0\x88
- 2: a\xc0
-
-/a(.*)(.)/8
- a\x{100}b
- 0: a\x{100}b
- 1: a\x{100}
-
-/a(.)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
-
-/a(.)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
-
-/a(.?)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: a\xc0
-
-/a(.?)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: a\x{240}
-
-/a(.??)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: a\xc0
-
-/a(.??)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: a\x{240}
-
-/a(.{3})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- *** Failers
-No match
- a\x{1234}b
-No match
- ac\ncb
-No match
-
-/a(.{3,})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxbcdefghijb
- 1: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- *** Failers
-No match
- a\x{1234}b
-No match
-
-/a(.{3,}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxbcdefghijb
- 1: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- *** Failers
-No match
- a\x{1234}b
-No match
-
-/a(.{3,5})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- 0: axbxxb
- axxxxxbcdefghijb
- 0: axxxxxb
- *** Failers
-No match
- a\x{1234}b
-No match
- axxxxxxbcdefghijb
-No match
-
-/a(.{3,5}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- 0: axbxxb
- axxxxxbcdefghijb
- 0: axxxxxb
- *** Failers
-No match
- a\x{1234}b
-No match
- axxxxxxbcdefghijb
-No match
-
-/^[a\x{c0}]/8
- *** Failers
-No match
- \x{100}
-No match
-
-/(?<=aXb)cd/8
- aXbcd
- 0: cd
-
-/(?<=a\x{100}b)cd/8
- a\x{100}bcd
- 0: cd
-
-/(?<=a\x{100000}b)cd/8
- a\x{100000}bcd
- 0: cd
-
-/(?:\x{100}){3}b/8
- \x{100}\x{100}\x{100}b
- 0: \x{100}\x{100}\x{100}b
- *** Failers
-No match
- \x{100}\x{100}b
-No match
-
-/\x{ab}/8
- \x{ab}
- 0: \x{ab}
- \xc2\xab
- 0: \x{ab}
- *** Failers
-No match
- \x00{ab}
-No match
-
-/(?<=(.))X/8
- WXYZ
- 0: X
- \x{256}XYZ
- 0: X
- *** Failers
-No match
- XYZ
-No match
-
-/[^a]+/8g
- bcd
- 0: bcd
- 1: bc
- 2: b
- \x{100}aY\x{256}Z
- 0: \x{100}
- 0: Y\x{256}Z
- 1: Y\x{256}
- 2: Y
-
-/^[^a]{2}/8
- \x{100}bc
- 0: \x{100}b
-
-/^[^a]{2,}/8
- \x{100}bcAa
- 0: \x{100}bcA
- 1: \x{100}bc
- 2: \x{100}b
-
-/^[^a]{2,}?/8
- \x{100}bca
- 0: \x{100}bc
- 1: \x{100}b
-
-/[^a]+/8ig
- bcd
- 0: bcd
- 1: bc
- 2: b
- \x{100}aY\x{256}Z
- 0: \x{100}
- 0: Y\x{256}Z
- 1: Y\x{256}
- 2: Y
-
-/^[^a]{2}/8i
- \x{100}bc
- 0: \x{100}b
-
-/^[^a]{2,}/8i
- \x{100}bcAa
- 0: \x{100}bc
- 1: \x{100}b
-
-/^[^a]{2,}?/8i
- \x{100}bca
- 0: \x{100}bc
- 1: \x{100}b
-
-/\x{100}{0,0}/8
- abcd
- 0:
-
-/\x{100}?/8
- abcd
- 0:
- \x{100}\x{100}
- 0: \x{100}
- 1:
-
-/\x{100}{0,3}/8
- \x{100}\x{100}
- 0: \x{100}\x{100}
- 1: \x{100}
- 2:
- \x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}
- 1: \x{100}\x{100}
- 2: \x{100}
- 3:
-
-/\x{100}*/8
- abce
- 0:
- \x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}
- 2: \x{100}\x{100}
- 3: \x{100}
- 4:
-
-/\x{100}{1,1}/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}
-
-/\x{100}{1,3}/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}
- 1: \x{100}\x{100}
- 2: \x{100}
-
-/\x{100}+/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}
- 2: \x{100}\x{100}
- 3: \x{100}
-
-/\x{100}{3}/8
- abcd\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}
-
-/\x{100}{3,5}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}\x{100}
- 2: \x{100}\x{100}\x{100}
-
-/\x{100}{3,}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 2: \x{100}\x{100}\x{100}\x{100}\x{100}
- 3: \x{100}\x{100}\x{100}\x{100}
- 4: \x{100}\x{100}\x{100}
-
-/(?<=a\x{100}{2}b)X/8
- Xyyya\x{100}\x{100}bXzzz
- 0: X
-
-/\D*/8
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\D*/8
- \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-Matched, but too many subsidiary matches
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 2: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 3: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 4: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 5: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 6: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 7: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 8: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 9: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-10: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-11: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-12: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-13: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-14: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-15: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-16: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-17: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-18: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-19: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-20: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-21: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-
-/\D/8
- 1X2
- 0: X
- 1\x{100}2
- 0: \x{100}
-
-/>\S/8
- > >X Y
- 0: >X
- > >\x{100} Y
- 0: >\x{100}
-
-/\d/8
- \x{100}3
- 0: 3
-
-/\s/8
- \x{100} X
- 0:
-
-/\D+/8
- 12abcd34
- 0: abcd
- 1: abc
- 2: ab
- 3: a
- *** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- 7: ***
- 8: ***
- 9: **
-10: *
- 1234
-No match
-
-/\D{2,3}/8
- 12abcd34
- 0: abc
- 1: ab
- 12ab34
- 0: ab
- *** Failers
- 0: ***
- 1: **
- 1234
-No match
- 12a34
-No match
-
-/\D{2,3}?/8
- 12abcd34
- 0: abc
- 1: ab
- 12ab34
- 0: ab
- *** Failers
- 0: ***
- 1: **
- 1234
-No match
- 12a34
-No match
-
-/\d+/8
- 12abcd34
- 0: 12
- 1: 1
- *** Failers
-No match
-
-/\d{2,3}/8
- 12abcd34
- 0: 12
- 1234abcd
- 0: 123
- 1: 12
- *** Failers
-No match
- 1.4
-No match
-
-/\d{2,3}?/8
- 12abcd34
- 0: 12
- 1234abcd
- 0: 123
- 1: 12
- *** Failers
-No match
- 1.4
-No match
-
-/\S+/8
- 12abcd34
- 0: 12abcd34
- 1: 12abcd3
- 2: 12abcd
- 3: 12abc
- 4: 12ab
- 5: 12a
- 6: 12
- 7: 1
- *** Failers
- 0: ***
- 1: **
- 2: *
- \ \
-No match
-
-/\S{2,3}/8
- 12abcd34
- 0: 12a
- 1: 12
- 1234abcd
- 0: 123
- 1: 12
- *** Failers
- 0: ***
- 1: **
- \ \
-No match
-
-/\S{2,3}?/8
- 12abcd34
- 0: 12a
- 1: 12
- 1234abcd
- 0: 123
- 1: 12
- *** Failers
- 0: ***
- 1: **
- \ \
-No match
-
-/>\s+</8
- 12> <34
- 0: > <
- *** Failers
-No match
-
-/>\s{2,3}</8
- ab> <cd
- 0: > <
- ab> <ce
- 0: > <
- *** Failers
-No match
- ab> <cd
-No match
-
-/>\s{2,3}?</8
- ab> <cd
- 0: > <
- ab> <ce
- 0: > <
- *** Failers
-No match
- ab> <cd
-No match
-
-/\w+/8
- 12 34
- 0: 12
- 1: 1
- *** Failers
- 0: Failers
- 1: Failer
- 2: Faile
- 3: Fail
- 4: Fai
- 5: Fa
- 6: F
- +++=*!
-No match
-
-/\w{2,3}/8
- ab cd
- 0: ab
- abcd ce
- 0: abc
- 1: ab
- *** Failers
- 0: Fai
- 1: Fa
- a.b.c
-No match
-
-/\w{2,3}?/8
- ab cd
- 0: ab
- abcd ce
- 0: abc
- 1: ab
- *** Failers
- 0: Fai
- 1: Fa
- a.b.c
-No match
-
-/\W+/8
- 12====34
- 0: ====
- 1: ===
- 2: ==
- 3: =
- *** Failers
- 0: ***
- 1: ***
- 2: **
- 3: *
- abcd
-No match
-
-/\W{2,3}/8
- ab====cd
- 0: ===
- 1: ==
- ab==cd
- 0: ==
- *** Failers
- 0: ***
- 1: **
- a.b.c
-No match
-
-/\W{2,3}?/8
- ab====cd
- 0: ===
- 1: ==
- ab==cd
- 0: ==
- *** Failers
- 0: ***
- 1: **
- a.b.c
-No match
-
-/[\x{100}]/8
- \x{100}
- 0: \x{100}
- Z\x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
-No match
-
-/[Z\x{100}]/8
- Z\x{100}
- 0: Z
- \x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
-No match
-
-/[\x{100}\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- *** Failers
-No match
-
-/[\x{100}-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- *** Failers
-No match
-
-/[z-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- abzcd
- 0: z
- ab|cd
- 0: |
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- Q?
- 0: Q
- *** Failers
-No match
-
-/[Q\x{100}-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- Q?
- 0: Q
- *** Failers
-No match
-
-/[Qz-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- abzcd
- 0: z
- ab|cd
- 0: |
- Q?
- 0: Q
- *** Failers
-No match
-
-/[\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/[\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/(?<=[\x{100}\x{200}])X/8
- abc\x{200}X
- 0: X
- abc\x{100}X
- 0: X
- *** Failers
-No match
- X
-No match
-
-/(?<=[Q\x{100}\x{200}])X/8
- abc\x{200}X
- 0: X
- abc\x{100}X
- 0: X
- abQX
- 0: X
- *** Failers
-No match
- X
-No match
-
-/(?<=[\x{100}\x{200}]{3})X/8
- abc\x{100}\x{200}\x{100}X
- 0: X
- *** Failers
-No match
- abc\x{200}X
-No match
- X
-No match
-
-/[^\x{100}\x{200}]X/8
- AX
- 0: AX
- \x{150}X
- 0: \x{150}X
- \x{500}X
- 0: \x{500}X
- *** Failers
-No match
- \x{100}X
-No match
- \x{200}X
-No match
-
-/[^Q\x{100}\x{200}]X/8
- AX
- 0: AX
- \x{150}X
- 0: \x{150}X
- \x{500}X
- 0: \x{500}X
- *** Failers
-No match
- \x{100}X
-No match
- \x{200}X
-No match
- QX
-No match
-
-/[^\x{100}-\x{200}]X/8
- AX
- 0: AX
- \x{500}X
- 0: \x{500}X
- *** Failers
-No match
- \x{100}X
-No match
- \x{150}X
-No match
- \x{200}X
-No match
-
-/[z-\x{100}]/8i
- z
- 0: z
- Z
- 0: Z
- \x{100}
- 0: \x{100}
- *** Failers
-No match
- \x{102}
-No match
- y
-No match
-
-/[\xFF]/
- >\xff<
- 0: \xff
-
-/[\xff]/8
- >\x{ff}<
- 0: \x{ff}
-
-/[^\xFF]/
- XYZ
- 0: X
-
-/[^\xff]/8
- XYZ
- 0: X
- \x{123}
- 0: \x{123}
-
-/^[ac]*b/8
- xb
-No match
-
-/^[ac\x{100}]*b/8
- xb
-No match
-
-/^[^x]*b/8i
- xb
-No match
-
-/^[^x]*b/8
- xb
-No match
-
-/^\d*b/8
- xb
-No match
-
-/(|a)/g8
- catac
- 0:
- 0: a
- 1:
- 0:
- 0: a
- 1:
- 0:
- 0:
- a\x{256}a
- 0: a
- 1:
- 0:
- 0: a
- 1:
- 0:
-
-/^\x{85}$/8i
- \x{85}
- 0: \x{85}
-
-/^abc./mgx8<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc7
- 0: abc8
- 0: abc9
-
-/abc.$/mgx8<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc7
- 0: abc8
- 0: abc9
-
-/^a\Rb/8<bsr_unicode>
- a\nb
- 0: a\x{0a}b
- a\rb
- 0: a\x{0d}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x0bb
- 0: a\x{0b}b
- a\x0cb
- 0: a\x{0c}b
- a\x{85}b
- 0: a\x{85}b
- a\x{2028}b
- 0: a\x{2028}b
- a\x{2029}b
- 0: a\x{2029}b
- ** Failers
-No match
- a\n\rb
-No match
-
-/^a\R*b/8<bsr_unicode>
- ab
- 0: ab
- a\nb
- 0: a\x{0a}b
- a\rb
- 0: a\x{0d}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x0bb
- 0: a\x{0b}b
- a\x0c\x{2028}\x{2029}b
- 0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
- 0: a\x{85}b
- a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
- 0: a\x{0a}\x{0d}\x{85}\x{0c}b
-
-/^a\R+b/8<bsr_unicode>
- a\nb
- 0: a\x{0a}b
- a\rb
- 0: a\x{0d}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x0bb
- 0: a\x{0b}b
- a\x0c\x{2028}\x{2029}b
- 0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
- 0: a\x{85}b
- a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
- 0: a\x{0a}\x{0d}\x{85}\x{0c}b
- ** Failers
-No match
- ab
-No match
-
-/^a\R{1,3}b/8<bsr_unicode>
- a\nb
- 0: a\x{0a}b
- a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}b
- 0: a\x{0a}\x{0d}\x{85}b
- a\r\n\r\nb
- 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
- a\r\n\r\n\r\nb
- 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
- a\n\r\n\rb
- 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
- a\n\n\r\nb
- 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
- ** Failers
-No match
- a\n\n\n\rb
-No match
- a\r
-No match
-
-/\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
- 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
-
-/\V?\v{3,4}/8
- \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: X\x{0a}\x{0b}\x{0c}\x{0d}
- 1: X\x{0a}\x{0b}\x{0c}
-
-/\h+\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
- 0: \x{09} \x{a0}X\x{0a}\x{0a}\x{0a}
-
-/\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
- 0: X\x{0a}\x{0a}\x{0a}
-
-/\H\h\V\v/8
- X X\x0a
- 0: X X\x{0a}
- X\x09X\x0b
- 0: X\x{09}X\x{0b}
- ** Failers
-No match
- \x{a0} X\x0a
-No match
-
-/\H*\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
- 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
- \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
- 1: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
- \x09\x20\x{a0}\x0a\x0b\x0c
- 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
- ** Failers
-No match
- \x09\x20\x{a0}\x0a\x0b
-No match
-
-/\H\h\V\v/8
- \x{3001}\x{3000}\x{2030}\x{2028}
- 0: \x{3001}\x{3000}\x{2030}\x{2028}
- X\x{180e}X\x{85}
- 0: X\x{180e}X\x{85}
- ** Failers
-No match
- \x{2009} X\x0a
-No match
-
-/\H*\h+\V?\v{3,4}/8
- \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
- 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
- 1: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}
- \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
- 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
- 1: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}
- \x09\x20\x{202f}\x0a\x0b\x0c
- 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
- ** Failers
-No match
- \x09\x{200a}\x{a0}\x{2028}\x0b
-No match
-
-/a\Rb/I8<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf utf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x{0d}b
- a\nb
- 0: a\x{0a}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- ** Failers
-No match
- a\x{85}b
-No match
- a\x0bb
-No match
-
-/a\Rb/I8<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode utf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x{0d}b
- a\nb
- 0: a\x{0a}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x{85}b
- 0: a\x{85}b
- a\x0bb
- 0: a\x{0b}b
- ** Failers
-No match
- a\x{85}b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R?b/I8<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf utf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x{0d}b
- a\nb
- 0: a\x{0a}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- ** Failers
-No match
- a\x{85}b
-No match
- a\x0bb
-No match
-
-/a\R?b/I8<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode utf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x{0d}b
- a\nb
- 0: a\x{0a}b
- a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x{85}b
- 0: a\x{85}b
- a\x0bb
- 0: a\x{0b}b
- ** Failers
-No match
- a\x{85}b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/X/8f<any>
- A\x{1ec5}ABCXYZ
- 0: X
-
-/abcd*/8
- xxxxabcd\P
- 0: abcd
- 1: abc
- xxxxabcd\P\P
-Partial match: abcd
-
-/abcd*/i8
- xxxxabcd\P
- 0: abcd
- 1: abc
- xxxxabcd\P\P
-Partial match: abcd
- XXXXABCD\P
- 0: ABCD
- 1: ABC
- XXXXABCD\P\P
-Partial match: ABCD
-
-/abc\d*/8
- xxxxabc1\P
- 0: abc1
- 1: abc
- xxxxabc1\P\P
-Partial match: abc1
-
-/abc[de]*/8
- xxxxabcde\P
- 0: abcde
- 1: abcd
- 2: abc
- xxxxabcde\P\P
-Partial match: abcde
-
-/\bthe cat\b/8
- the cat\P
- 0: the cat
- the cat\P\P
-Partial match: the cat
-
-/ab\Cde/8
- abXde
-Error -16 (item unsupported for DFA matching)
-
-/(?<=ab\Cde)X/8
-Failed: \C not allowed in lookbehind assertion at offset 10
-
-/-- End of testinput9 --/
diff --git a/src/third_party/pcre-8.30/testdata/wintestinput3 b/src/third_party/pcre-8.30/testdata/wintestinput3
deleted file mode 100644
index 04e76a6dc85..00000000000
--- a/src/third_party/pcre-8.30/testdata/wintestinput3
+++ /dev/null
@@ -1,91 +0,0 @@
-/^[\w]+/
- *** Failers
- cole
-
-/^[\w]+/Lfrench
- cole
-
-/^[\w]+/
- *** Failers
- cole
-
-/^[\W]+/
- cole
-
-/^[\W]+/Lfrench
- *** Failers
- cole
-
-/[\b]/
- \b
- *** Failers
- a
-
-/[\b]/Lfrench
- \b
- *** Failers
- a
-
-/^\w+/
- *** Failers
- cole
-
-/^\w+/Lfrench
- cole
-
-/(.+)\b(.+)/
- cole
-
-/(.+)\b(.+)/Lfrench
- *** Failers
- cole
-
-/cole/i
- cole
- *** Failers
- cole
-
-/cole/iLfrench
- cole
- cole
-
-/\w/IS
-
-/\w/ISLfrench
-
-/^[\xc8-\xc9]/iLfrench
- cole
- cole
-
-/^[\xc8-\xc9]/Lfrench
- cole
- *** Failers
- cole
-
-/\W+/Lfrench
- >>>\xaa<<<
- >>>\xba<<<
-
-/[\W]+/Lfrench
- >>>\xaa<<<
- >>>\xba<<<
-
-/[^[:alpha:]]+/Lfrench
- >>>\xaa<<<
- >>>\xba<<<
-
-/\w+/Lfrench
- >>>\xaa<<<
- >>>\xba<<<
-
-/[\w]+/Lfrench
- >>>\xaa<<<
- >>>\xba<<<
-
-/[[:alpha:]]+/Lfrench
- >>>\xaa<<<
- >>>\xba<<<
-
-/[[:alpha:]][[:lower:]][[:upper:]]/DZLfrench
-
-/ End of testinput3 /
diff --git a/src/third_party/pcre-8.30/testdata/wintestoutput3 b/src/third_party/pcre-8.30/testdata/wintestoutput3
deleted file mode 100644
index 00880070670..00000000000
--- a/src/third_party/pcre-8.30/testdata/wintestoutput3
+++ /dev/null
@@ -1,166 +0,0 @@
-/^[\w]+/
- *** Failers
-No match
- cole
-No match
-
-/^[\w]+/Lfrench
- cole
- 0: cole
-
-/^[\w]+/
- *** Failers
-No match
- cole
-No match
-
-/^[\W]+/
- cole
- 0: \xc9
-
-/^[\W]+/Lfrench
- *** Failers
- 0: ***
- cole
-No match
-
-/[\b]/
- \b
- 0: \x08
- *** Failers
-No match
- a
-No match
-
-/[\b]/Lfrench
- \b
- 0: \x08
- *** Failers
-No match
- a
-No match
-
-/^\w+/
- *** Failers
-No match
- cole
-No match
-
-/^\w+/Lfrench
- cole
- 0: cole
-
-/(.+)\b(.+)/
- cole
- 0: \xc9cole
- 1: \xc9
- 2: cole
-
-/(.+)\b(.+)/Lfrench
- *** Failers
- 0: *** Failers
- 1: ***
- 2: Failers
- cole
-No match
-
-/cole/i
- cole
- 0: \xc9cole
- *** Failers
-No match
- cole
-No match
-
-/cole/iLfrench
- cole
- 0: cole
- cole
- 0: cole
-
-/\w/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
- Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
-
-/\w/ISLfrench
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
- Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
-
-
-
-
-/^[\xc8-\xc9]/iLfrench
- cole
- 0:
- cole
- 0:
-
-/^[\xc8-\xc9]/Lfrench
- cole
- 0:
- *** Failers
-No match
- cole
-No match
-
-/\W+/Lfrench
- >>>\xaa<<<
- 0: >>>
- >>>\xba<<<
- 0: >>>
-
-/[\W]+/Lfrench
- >>>\xaa<<<
- 0: >>>
- >>>\xba<<<
- 0: >>>
-
-/[^[:alpha:]]+/Lfrench
- >>>\xaa<<<
- 0: >>>
- >>>\xba<<<
- 0: >>>
-
-/\w+/Lfrench
- >>>\xaa<<<
- 0:
- >>>\xba<<<
- 0:
-
-/[\w]+/Lfrench
- >>>\xaa<<<
- 0:
- >>>\xba<<<
- 0:
-
-/[[:alpha:]]+/Lfrench
- >>>\xaa<<<
- 0:
- >>>\xba<<<
- 0:
-
-/[[:alpha:]][[:lower:]][[:upper:]]/DZLfrench
-------------------------------------------------------------------
- Bra
- [A-Za-z\x83\x8a\x8c\x8e\x9a\x9c\x9e\x9f\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\xff]
- [a-z\x83\x9a\x9c\x9e\xaa\xb5\xba\xdf-\xf6\xf8-\xff]
- [A-Z\x8a\x8c\x8e\x9f\xc0-\xd6\xd8-\xde]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/ End of testinput3 /