906N/A//
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//
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//
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//
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.
906N/A//
2362N/A// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A// or visit www.oracle.com if you need additional information or have any
2362N/A// questions.
906N/A//
906N/A//
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//
906N/A// Test unsetting of backed off groups
906N/A^(a)?a
906N/Aa
906N/Atrue a 1
906N/A
906N/A^(aa(bb)?)+$
906N/Aaabbaa
906N/Atrue aabbaa 2 aa bb
906N/A
906N/A((a|b)?b)+
906N/Ab
906N/Atrue b 2 b
906N/A
906N/A(aaa)?aaa
906N/Aaaa
906N/Atrue aaa 1
906N/A
906N/A^(a(b)?)+$
906N/Aaba
906N/Atrue aba 2 a b
906N/A
906N/A^(a(b(c)?)?)?abc
906N/Aabc
906N/Atrue abc 3
906N/A
906N/A^(a(b(c))).*
906N/Aabc
906N/Atrue abc 3 abc bc c
906N/A
906N/A// use of x modifier
906N/Aabc(?x)blah
906N/Aabcblah
906N/Atrue abcblah 0
906N/A
906N/Aabc(?x) blah
906N/Aabcblah
906N/Atrue abcblah 0
906N/A
906N/Aabc(?x) blah blech
906N/Aabcblahblech
906N/Atrue abcblahblech 0
906N/A
906N/Aabc(?x) blah # ignore comment
906N/Aabcblah
906N/Atrue abcblah 0
906N/A
906N/A// Simple alternation
906N/Aa|b
906N/Aa
906N/Atrue a 0
906N/A
906N/Aa|b
906N/Az
906N/Afalse 0
906N/A
906N/Aa|b
906N/Ab
906N/Atrue b 0
906N/A
906N/Aa|b|cd
906N/Acd
906N/Atrue cd 0
906N/A
906N/Aa|ad
906N/Aad
906N/Atrue a 0
906N/A
906N/Az(a|ac)b
906N/Azacb
906N/Atrue zacb 1 ac
906N/A
906N/A// Simple char class
906N/A[abc]+
906N/Aababab
906N/Atrue ababab 0
906N/A
906N/A[abc]+
906N/Adefg
906N/Afalse 0
906N/A
906N/A[abc]+[def]+[ghi]+
906N/Azzzaaddggzzz
906N/Atrue aaddgg 0
906N/A
906N/A// Range char class
906N/A[a-g]+
906N/Azzzggg
906N/Atrue ggg 0
906N/A
906N/A[a-g]+
906N/Ammm
906N/Afalse 0
906N/A
906N/A[a-]+
906N/Aza-9z
906N/Atrue a- 0
906N/A
906N/A[a-\\u4444]+
906N/Aza-9z
906N/Atrue za 0
906N/A
906N/A// Negated char class
906N/A[^abc]+
906N/Aababab
906N/Afalse 0
906N/A
906N/A[^abc]+
906N/Aaaabbbcccdefg
906N/Atrue defg 0
906N/A
906N/A// Making sure a ^ not in first position matches literal ^
906N/A[abc^b]
906N/Ab
906N/Atrue b 0
906N/A
906N/A[abc^b]
906N/A^
906N/Atrue ^ 0
906N/A
906N/A// Class union and intersection
906N/A[abc[def]]
906N/Ab
906N/Atrue b 0
906N/A
906N/A[abc[def]]
906N/Ae
906N/Atrue e 0
906N/A
906N/A[a-d[0-9][m-p]]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[a-d[0-9][m-p]]
906N/Ao
906N/Atrue o 0
906N/A
906N/A[a-d[0-9][m-p]]
906N/A4
906N/Atrue 4 0
906N/A
906N/A[a-d[0-9][m-p]]
906N/Ae
906N/Afalse 0
906N/A
906N/A[a-d[0-9][m-p]]
906N/Au
906N/Afalse 0
906N/A
906N/A[[a-d][0-9][m-p]]
906N/Ab
906N/Atrue b 0
906N/A
906N/A[[a-d][0-9][m-p]]
906N/Az
906N/Afalse 0
906N/A
906N/A[a-c[d-f[g-i]]]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[a-c[d-f[g-i]]]
906N/Ae
906N/Atrue e 0
906N/A
906N/A[a-c[d-f[g-i]]]
906N/Ah
906N/Atrue h 0
906N/A
906N/A[a-c[d-f[g-i]]]
906N/Am
906N/Afalse 0
906N/A
906N/A[a-c[d-f[g-i]]m]
906N/Am
906N/Atrue m 0
906N/A
906N/A[abc[def]ghi]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[abc[def]ghi]
906N/Ad
906N/Atrue d 0
906N/A
906N/A[abc[def]ghi]
906N/Ah
906N/Atrue h 0
906N/A
906N/A[abc[def]ghi]
906N/Aw
906N/Afalse 0
906N/A
906N/A[a-c&&[d-f]]
906N/Aa
906N/Afalse 0
906N/A
906N/A[a-c&&[d-f]]
906N/Ae
906N/Afalse 0
906N/A
906N/A[a-c&&[d-f]]
906N/Az
906N/Afalse 0
906N/A
906N/A[[a-c]&&[d-f]]
906N/Aa
906N/Afalse 0
906N/A
906N/A[[a-c]&&[d-f]]
906N/Ae
906N/Afalse 0
906N/A
906N/A[[a-c]&&[d-f]]
906N/Az
906N/Afalse 0
906N/A
906N/A[a-c&&d-f]
906N/Aa
906N/Afalse 0
906N/A
906N/A[a-m&&m-z]
906N/Am
906N/Atrue m 0
906N/A
906N/A[a-m&&m-z&&a-c]
906N/Am
906N/Afalse 0
906N/A
906N/A[a-m&&m-z&&a-z]
906N/Am
906N/Atrue m 0
906N/A
906N/A[[a-m]&&[m-z]]
906N/Aa
906N/Afalse 0
906N/A
906N/A[[a-m]&&[m-z]]
906N/Am
906N/Atrue m 0
906N/A
906N/A[[a-m]&&[m-z]]
906N/Az
906N/Afalse 0
906N/A
906N/A[[a-m]&&[^a-c]]
906N/Aa
906N/Afalse 0
906N/A
906N/A[[a-m]&&[^a-c]]
906N/Ad
906N/Atrue d 0
906N/A
906N/A[a-m&&[^a-c]]
906N/Aa
906N/Afalse 0
906N/A
906N/A[a-m&&[^a-c]]
906N/Ad
906N/Atrue d 0
906N/A
906N/A[a-cd-f&&[d-f]]
906N/Aa
906N/Afalse 0
906N/A
906N/A[a-cd-f&&[d-f]]
906N/Ae
906N/Atrue e 0
906N/A
906N/A[[a-c]&&d-fa-c]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[[a-c]&&[d-f][a-c]]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[[a-c][d-f]&&abc]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[[a-c][d-f]&&abc[def]]
906N/Ae
906N/Atrue e 0
906N/A
906N/A[[a-c]&&[b-d]&&[c-e]]
906N/Aa
906N/Afalse 0
906N/A
906N/A[[a-c]&&[b-d]&&[c-e]]
906N/Ac
906N/Atrue c 0
906N/A
906N/A[[a-c]&&[b-d][c-e]&&[u-z]]
906N/Ac
906N/Afalse 0
906N/A
906N/A[abc[^bcd]]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[abc[^bcd]]
906N/Ad
906N/Afalse 0
906N/A
906N/A[a-c&&a-d&&a-eghi]
906N/Ab
906N/Atrue b 0
906N/A
906N/A[a-c&&a-d&&a-eghi]
906N/Ag
906N/Afalse 0
906N/A
906N/A[[a[b]]&&[b[a]]]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[[a]&&[b][c][a]&&[^d]]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[[a]&&[b][c][a]&&[^d]]
906N/Ad
906N/Afalse 0
906N/A
906N/A[[[a-d]&&[c-f]]]
906N/Aa
906N/Afalse 0
906N/A
906N/A[[[a-d]&&[c-f]]]
906N/Ac
906N/Atrue c 0
906N/A
906N/A[[[a-d]&&[c-f]]&&[c]]
906N/Ac
906N/Atrue c 0
906N/A
906N/A[[[a-d]&&[c-f]]&&[c]&&c]
906N/Ac
906N/Atrue c 0
906N/A
906N/A[[[a-d]&&[c-f]]&&[c]&&c&&c]
906N/Ac
906N/Atrue c 0
906N/A
906N/A[[[a-d]&&[c-f]]&&[c]&&c&&[cde]]
906N/Ac
906N/Atrue c 0
906N/A
906N/A[z[abc&&bcd]]
906N/Ac
906N/Atrue c 0
906N/A
906N/A[z[abc&&bcd]&&[u-z]]
906N/Az
906N/Atrue z 0
906N/A
906N/A[x[abc&&bcd[z]]&&[u-z]]
906N/Az
906N/Afalse 0
906N/A
906N/A[x[[wz]abc&&bcd[z]]&&[u-z]]
906N/Az
906N/Atrue z 0
906N/A
906N/A[[abc]&&[def]abc]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[[abc]&&[def]xyz[abc]]
906N/Aa
906N/Atrue a 0
906N/A
906N/A\pL
906N/Aa
906N/Atrue a 0
906N/A
906N/A\pL
906N/A7
906N/Afalse 0
906N/A
906N/A\p{L}
906N/Aa
906N/Atrue a 0
906N/A
906N/A\p{LC}
906N/Aa
906N/Atrue a 0
906N/A
906N/A\p{LC}
906N/AA
906N/Atrue A 0
906N/A
906N/A\p{IsL}
906N/Aa
906N/Atrue a 0
906N/A
906N/A\p{IsLC}
906N/Aa
906N/Atrue a 0
906N/A
906N/A\p{IsLC}
906N/AA
906N/Atrue A 0
906N/A
906N/A\p{IsLC}
906N/A9
906N/Afalse 0
906N/A
906N/A\P{IsLC}
906N/A9
906N/Atrue 9 0
906N/A
906N/A// Guillemet left is initial quote punctuation
906N/A\p{Pi}
906N/A\u00ab
906N/Atrue \u00ab 0
906N/A
906N/A\P{Pi}
906N/A\u00ac
906N/Atrue \u00ac 0
906N/A
906N/A// Guillemet right is final quote punctuation
906N/A\p{IsPf}
906N/A\u00bb
906N/Atrue \u00bb 0
906N/A
906N/A\p{P}
906N/A\u00bb
906N/Atrue \u00bb 0
906N/A
906N/A\p{P}+
906N/A\u00bb
906N/Atrue \u00bb 0
906N/A
906N/A\P{IsPf}
906N/A\u00bc
906N/Atrue \u00bc 0
906N/A
906N/A\P{IsP}
906N/A\u00bc
906N/Atrue \u00bc 0
906N/A
906N/A\p{L1}
906N/A\u00bc
906N/Atrue \u00bc 0
906N/A
906N/A\p{L1}+
906N/A\u00bc
906N/Atrue \u00bc 0
906N/A
906N/A\p{L1}
906N/A\u02bc
906N/Afalse 0
906N/A
906N/A\p{ASCII}
906N/Aa
906N/Atrue a 0
906N/A
906N/A\p{IsASCII}
906N/Aa
906N/Atrue a 0
906N/A
906N/A\p{IsASCII}
906N/A\u0370
906N/Afalse 0
906N/A
906N/A\pLbc
906N/Aabc
906N/Atrue abc 0
906N/A
906N/Aa[r\p{InGreek}]c
906N/Aa\u0370c
906N/Atrue a\u0370c 0
906N/A
906N/Aa\p{InGreek}
906N/Aa\u0370
906N/Atrue a\u0370 0
906N/A
906N/Aa\P{InGreek}
906N/Aa\u0370
906N/Afalse 0
906N/A
906N/Aa\P{InGreek}
906N/Aab
906N/Atrue ab 0
906N/A
906N/Aa{^InGreek}
906N/A-
906N/Aerror
906N/A
906N/Aa\p{^InGreek}
906N/A-
906N/Aerror
906N/A
906N/Aa\P{^InGreek}
906N/A-
906N/Aerror
906N/A
906N/Aa\p{InGreek}
906N/Aa\u0370
906N/Atrue a\u0370 0
906N/A
906N/Aa[\p{InGreek}]c
906N/Aa\u0370c
906N/Atrue a\u0370c 0
906N/A
906N/Aa[\P{InGreek}]c
906N/Aa\u0370c
906N/Afalse 0
906N/A
906N/Aa[\P{InGreek}]c
906N/Aabc
906N/Atrue abc 0
906N/A
906N/Aa[{^InGreek}]c
906N/Aanc
906N/Atrue anc 0
906N/A
906N/Aa[{^InGreek}]c
906N/Aazc
906N/Afalse 0
906N/A
906N/Aa[\p{^InGreek}]c
906N/A-
906N/Aerror
906N/A
906N/Aa[\P{^InGreek}]c
906N/A-
906N/Aerror
906N/A
906N/Aa[\p{InGreek}]
906N/Aa\u0370
906N/Atrue a\u0370 0
906N/A
906N/Aa[r\p{InGreek}]c
906N/Aarc
906N/Atrue arc 0
906N/A
906N/Aa[\p{InGreek}r]c
906N/Aarc
906N/Atrue arc 0
906N/A
906N/Aa[r\p{InGreek}]c
906N/Aarc
906N/Atrue arc 0
906N/A
906N/Aa[^\p{InGreek}]c
906N/Aa\u0370c
906N/Afalse 0
906N/A
906N/Aa[^\P{InGreek}]c
906N/Aa\u0370c
906N/Atrue a\u0370c 0
906N/A
906N/Aa[\p{InGreek}&&[^\u0370]]c
906N/Aa\u0370c
906N/Afalse 0
906N/A
906N/A// Test the dot metacharacter
906N/Aa.c.+
906N/Aa#c%&
906N/Atrue a#c%& 0
906N/A
906N/Aab.
906N/Aab\n
906N/Afalse 0
906N/A
906N/A(?s)ab.
906N/Aab\n
906N/Atrue ab\n 0
906N/A
906N/Aa[\p{L}&&[\P{InGreek}]]c
906N/Aa\u6000c
906N/Atrue a\u6000c 0
906N/A
906N/Aa[\p{L}&&[\P{InGreek}]]c
906N/Aarc
906N/Atrue arc 0
906N/A
906N/Aa[\p{L}&&[\P{InGreek}]]c
906N/Aa\u0370c
906N/Afalse 0
906N/A
906N/Aa\p{InGreek}c
906N/Aa\u0370c
906N/Atrue a\u0370c 0
906N/A
906N/Aa\p{Sc}
906N/Aa$
906N/Atrue a$ 0
906N/A
906N/A// Test the word char escape sequence
906N/Aab\wc
906N/Aabcc
906N/Atrue abcc 0
906N/A
906N/A\W\w\W
906N/A#r#
906N/Atrue #r# 0
906N/A
906N/A\W\w\W
906N/Arrrr#ggg
906N/Afalse 0
906N/A
906N/Aabc[\w]
906N/Aabcd
906N/Atrue abcd 0
906N/A
906N/Aabc[\sdef]*
906N/Aabc def
906N/Atrue abc def 0
906N/A
906N/Aabc[\sy-z]*
906N/Aabc y z
906N/Atrue abc y z 0
906N/A
906N/Aabc[a-d\sm-p]*
906N/Aabcaa mn p
906N/Atrue abcaa mn p 0
906N/A
906N/A// Test the whitespace escape sequence
906N/Aab\sc
906N/Aab c
906N/Atrue ab c 0
906N/A
906N/A\s\s\s
906N/Ablah err
906N/Afalse 0
906N/A
906N/A\S\S\s
906N/Ablah err
906N/Atrue ah 0
906N/A
906N/A// Test the digit escape sequence
906N/Aab\dc
906N/Aab9c
906N/Atrue ab9c 0
906N/A
906N/A\d\d\d
906N/Ablah45
906N/Afalse 0
906N/A
906N/A// Test the caret metacharacter
906N/A^abc
906N/Aabcdef
906N/Atrue abc 0
906N/A
906N/A^abc
906N/Abcdabc
906N/Afalse 0
906N/A
906N/A// Greedy ? metacharacter
906N/Aa?b
906N/Aaaaab
906N/Atrue ab 0
906N/A
906N/Aa?b
906N/Ab
906N/Atrue b 0
906N/A
906N/Aa?b
906N/Aaaaccc
906N/Afalse 0
906N/A
906N/A.?b
906N/Aaaaab
906N/Atrue ab 0
906N/A
906N/A// Reluctant ? metacharacter
906N/Aa??b
906N/Aaaaab
906N/Atrue ab 0
906N/A
906N/Aa??b
906N/Ab
906N/Atrue b 0
906N/A
906N/Aa??b
906N/Aaaaccc
906N/Afalse 0
906N/A
906N/A.??b
906N/Aaaaab
906N/Atrue ab 0
906N/A
906N/A// Possessive ? metacharacter
906N/Aa?+b
906N/Aaaaab
906N/Atrue ab 0
906N/A
906N/Aa?+b
906N/Ab
906N/Atrue b 0
906N/A
906N/Aa?+b
906N/Aaaaccc
906N/Afalse 0
906N/A
906N/A.?+b
906N/Aaaaab
906N/Atrue ab 0
906N/A
906N/A// Greedy + metacharacter
906N/Aa+b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/Aa+b
906N/Ab
906N/Afalse 0
906N/A
906N/Aa+b
906N/Aaaaccc
906N/Afalse 0
906N/A
906N/A.+b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/A// Reluctant + metacharacter
906N/Aa+?b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/Aa+?b
906N/Ab
906N/Afalse 0
906N/A
906N/Aa+?b
906N/Aaaaccc
906N/Afalse 0
906N/A
906N/A.+?b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/A// Possessive + metacharacter
906N/Aa++b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/Aa++b
906N/Ab
906N/Afalse 0
906N/A
906N/Aa++b
906N/Aaaaccc
906N/Afalse 0
906N/A
906N/A.++b
906N/Aaaaab
906N/Afalse 0
906N/A
906N/A// Greedy Repetition
906N/Aa{2,3}
906N/Aa
906N/Afalse 0
906N/A
906N/Aa{2,3}
906N/Aaa
906N/Atrue aa 0
906N/A
906N/Aa{2,3}
906N/Aaaa
906N/Atrue aaa 0
906N/A
906N/Aa{2,3}
906N/Aaaaa
906N/Atrue aaa 0
906N/A
906N/Aa{3,}
906N/Azzzaaaazzz
906N/Atrue aaaa 0
906N/A
906N/Aa{3,}
906N/Azzzaazzz
906N/Afalse 0
906N/A
906N/A// Reluctant Repetition
906N/Aa{2,3}?
906N/Aa
906N/Afalse 0
906N/A
906N/Aa{2,3}?
906N/Aaa
906N/Atrue aa 0
906N/A
906N/Aa{2,3}?
906N/Aaaa
906N/Atrue aa 0
906N/A
906N/Aa{2,3}?
906N/Aaaaa
906N/Atrue aa 0
906N/A
906N/A// Zero width Positive lookahead
906N/Aabc(?=d)
906N/Azzzabcd
906N/Atrue abc 0
906N/A
906N/Aabc(?=d)
906N/Azzzabced
906N/Afalse 0
906N/A
906N/A// Zero width Negative lookahead
906N/Aabc(?!d)
906N/Azzabcd
906N/Afalse 0
906N/A
906N/Aabc(?!d)
906N/Azzabced
906N/Atrue abc 0
906N/A
906N/A// Zero width Positive lookbehind
906N/A\w(?<=a)
906N/A###abc###
906N/Atrue a 0
906N/A
906N/A\w(?<=a)
906N/A###ert###
906N/Afalse 0
906N/A
906N/A// Zero width Negative lookbehind
906N/A(?<!a)\w
906N/A###abc###
906N/Atrue a 0
906N/A
906N/A(?<!a)c
906N/Abc
906N/Atrue c 0
906N/A
906N/A(?<!a)c
906N/Aac
906N/Afalse 0
906N/A
906N/A// Nondeterministic group
906N/A(a+b)+
906N/Aababab
906N/Atrue ababab 1 ab
906N/A
906N/A(a|b)+
906N/Accccd
906N/Afalse 1
906N/A
906N/A// Deterministic group
906N/A(ab)+
906N/Aababab
906N/Atrue ababab 1 ab
906N/A
906N/A(ab)+
906N/Aaccccd
906N/Afalse 1
906N/A
906N/A(ab)*
906N/Aababab
906N/Atrue ababab 1 ab
906N/A
906N/A(ab)(cd*)
906N/Azzzabczzz
906N/Atrue abc 2 ab c
906N/A
906N/Aabc(d)*abc
906N/Aabcdddddabc
906N/Atrue abcdddddabc 1 d
906N/A
906N/A// Escaped metacharacter
906N/A\*
906N/A*
906N/Atrue * 0
906N/A
906N/A\\
906N/A\
906N/Atrue \ 0
906N/A
906N/A\\
906N/A\\\\
906N/Atrue \ 0
906N/A
906N/A// Back references
906N/A(a*)bc\1
906N/Azzzaabcaazzz
906N/Atrue aabcaa 1 aa
906N/A
906N/A(a*)bc\1
906N/Azzzaabcazzz
906N/Atrue abca 1 a
906N/A
906N/A(gt*)(dde)*(yu)\1\3(vv)
906N/Azzzgttddeddeyugttyuvvzzz
906N/Atrue gttddeddeyugttyuvv 4 gtt dde yu vv
906N/A
906N/A// Greedy * metacharacter
906N/Aa*b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/Aa*b
906N/Ab
906N/Atrue b 0
906N/A
906N/Aa*b
906N/Aaaaccc
906N/Afalse 0
906N/A
906N/A.*b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/A// Reluctant * metacharacter
906N/Aa*?b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/Aa*?b
906N/Ab
906N/Atrue b 0
906N/A
906N/Aa*?b
906N/Aaaaccc
906N/Afalse 0
906N/A
906N/A.*?b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/A// Possessive * metacharacter
906N/Aa*+b
906N/Aaaaab
906N/Atrue aaaab 0
906N/A
906N/Aa*+b
906N/Ab
906N/Atrue b 0
906N/A
906N/Aa*+b
906N/Aaaaccc
906N/Afalse 0
906N/A
906N/A.*+b
906N/Aaaaab
906N/Afalse 0
906N/A
906N/A// Case insensitivity
906N/A(?i)foobar
906N/AfOobAr
906N/Atrue fOobAr 0
906N/A
906N/Af(?i)oobar
906N/AfOobAr
906N/Atrue fOobAr 0
906N/A
906N/Afoo(?i)bar
906N/AfOobAr
906N/Afalse 0
906N/A
906N/A(?i)foo[bar]+
906N/AfoObAr
906N/Atrue foObAr 0
906N/A
906N/A(?i)foo[a-r]+
906N/AfoObAr
906N/Atrue foObAr 0
906N/A
906N/A// Disable metacharacters- test both length <=3 and >3
906N/A// So that the BM optimization is part of test
906N/A\Q***\Eabc
906N/A***abc
906N/Atrue ***abc 0
906N/A
906N/Abl\Q***\Eabc
906N/Abl***abc
906N/Atrue bl***abc 0
906N/A
906N/A\Q***abc
906N/A***abc
906N/Atrue ***abc 0
906N/A
906N/Ablah\Q***\Eabc
906N/Ablah***abc
906N/Atrue blah***abc 0
906N/A
906N/A\Q***abc
906N/A***abc
906N/Atrue ***abc 0
906N/A
906N/A\Q*ab
906N/A*ab
906N/Atrue *ab 0
906N/A
906N/Ablah\Q***abc
906N/Ablah***abc
906N/Atrue blah***abc 0
906N/A
906N/Abla\Q***abc
906N/Abla***abc
906N/Atrue bla***abc 0
906N/A
906N/A// Escapes in char classes
906N/A[ab\Qdef\E]
906N/Ad
906N/Atrue d 0
906N/A
906N/A[ab\Q[\E]
906N/A[
906N/Atrue [ 0
906N/A
906N/A[\Q]\E]
906N/A]
906N/Atrue ] 0
906N/A
906N/A[\Q\\E]
906N/A\
906N/Atrue \ 0
906N/A
906N/A[\Q(\E]
906N/A(
906N/Atrue ( 0
906N/A
906N/A[\n-#]
906N/A!
906N/Atrue ! 0
906N/A
906N/A[\n-#]
906N/A-
906N/Afalse 0
906N/A
906N/A[\w-#]
906N/A!
906N/Afalse 0
906N/A
906N/A[\w-#]
906N/Aa
906N/Atrue a 0
906N/A
906N/A[\w-#]
906N/A-
906N/Atrue - 0
906N/A
906N/A[\w-#]
906N/A#
906N/Atrue # 0
906N/A
906N/A[\043]+
906N/Ablahblah#blech
906N/Atrue # 0
906N/A
906N/A[\042-\044]+
906N/Ablahblah#blech
906N/Atrue # 0
906N/A
906N/A[\u1234-\u1236]
906N/Ablahblah\u1235blech
906N/Atrue \u1235 0
906N/A
906N/A[^\043]*
906N/Ablahblah#blech
906N/Atrue blahblah 0
906N/A
906N/A(|f)?+
906N/Afoo
906N/Atrue 1