2362N/A// Copyright (c) 1999, 2009, Oracle
and/or its affiliates. All rights reserved.
906N/A// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
906N/A// This code is free software; you can redistribute it
and/or modify it
906N/A// under the terms of the GNU General Public License version 2 only, as
906N/A// published by the Free Software Foundation.
906N/A// This code is distributed in the hope that it will be useful, but WITHOUT
906N/A// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
906N/A// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
906N/A// version 2 for more details (a copy is included in the LICENSE file that
906N/A// accompanied this code).
906N/A// You should have received a copy of the GNU General Public License version
906N/A// 2 along with this work; if not, write to the Free Software Foundation,
906N/A// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2362N/A// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
906N/A// This file contains test cases for regular expressions.
906N/A// A test case consists of three lines:
906N/A// The first line is a pattern used in the test
906N/A// The second line is the input to search for the pattern in
906N/A// The third line is a concatentation of the match, the number of groups,
906N/A// and the contents of the first four subexpressions.
906N/A// Empty lines and lines beginning with comment slashes are ignored.
906N/A// Test unsetting of backed off groups
906N/Aabc(?x) blah # ignore comment
906N/A// Making sure a ^ not in first position matches literal ^
906N/A// Class union and intersection
906N/A[[a-c]&&[b-d][c-e]&&[u-z]]
906N/A[[[a-d]&&[c-f]]&&[c]&&c]
906N/A[[[a-d]&&[c-f]]&&[c]&&c&&c]
906N/A[[[a-d]&&[c-f]]&&[c]&&c&&[cde]]
906N/A[x[[wz]abc&&bcd[z]]&&[u-z]]
906N/A// Guillemet left is initial quote punctuation
906N/A// Guillemet right is final quote punctuation
906N/Aa[\p{InGreek}&&[^\u0370]]c
906N/A// Test the dot metacharacter
906N/Aa[\p{L}&&[\P{InGreek}]]c
906N/Aa[\p{L}&&[\P{InGreek}]]c
906N/Aa[\p{L}&&[\P{InGreek}]]c
906N/A// Test the word char escape sequence
906N/A// Test the whitespace escape sequence
906N/A// Test the digit escape sequence
906N/A// Test the caret metacharacter
906N/A// Greedy ? metacharacter
906N/A// Reluctant ? metacharacter
906N/A// Possessive ? metacharacter
906N/A// Greedy + metacharacter
906N/A// Reluctant + metacharacter
906N/A// Possessive + metacharacter
906N/A// Zero width Positive lookahead
906N/A// Zero width Negative lookahead
906N/A// Zero width Positive lookbehind
906N/A// Zero width Negative lookbehind
906N/A// Nondeterministic group
906N/A// Escaped metacharacter
906N/Azzzgttddeddeyugttyuvvzzz
906N/Atrue gttddeddeyugttyuvv 4 gtt dde yu vv
906N/A// Greedy * metacharacter
906N/A// Reluctant * metacharacter
906N/A// Possessive * metacharacter
906N/A// Disable metacharacters- test both length <=3 and >3
906N/A// So that the BM optimization is part of test
906N/A// Escapes in char classes