aboutsummaryrefslogblamecommitdiffstats
path: root/lib/stdlib/test/re_SUITE_data/testoutput2
blob: fd958c2eb7ee90e95094b38b2e69b2076be64e5f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668









                                                                             









































                              





                              





                              





                              

































                                                              





























                                                                  
















                                                          





                                      


















                                                                          
                              










                                                                          
                              










                                                                     
                              






                              
                              



















                                                                               
                              






































































































































                                                          












                                      







                                                             







                              







                              







                              







                              







                              







                              







                              







                              
                  
















































                                                             








                              
                              






                              
                              






                                   
                              





































                                                                        






                              







                                                                  
         
           






                                                                  

                              


                              


             
                              



































                              
                  











                                      












                              
                  


             
                              



                              
                  


               
                              






                              
                              



                              
                  
















                                
                  









































                                                                             
                  















                              
                  





                              
                  
          
             










                               
                  



























                              
                  











                
                                                                            










                              

        
          
























                                                                                









































































































                                                             
























                                       
















                                 













                                    


























































                                      
                  





                                                                            













                                                                  






                                                                  
               




                                                                  

















                                                                  







                                                                  
               








                                                                  







                                                                  
               








                                                                  







                                                                  
               

           


           



                                                                  

                 



                              
                  






                












                              
                  








                              
                  














                              
                  










                              
                  

















                              






























































                                      
                





































                              





                              





                              





                              





                              





                              





























                              
                  























                              





                              





                              





                              





                              





                              





                              





                              





                              





                              











                              





                              

















                              









































































                              




                              

                              









                                                                     



























                                     













                                   

















                                    









                                     








                                     









                                            















                                            















                                                       


















                                                      






                        


                                       






































































                                                                  
                              




























































                                                                       
                              





















































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          















































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
         




















                                                                  
         
           




















                                                                  
           











                                                                  
           

























































































































                                                                                                                                                                                                                                                                                                                    



























                                                                  














                                                                  






                                                                  

                  
         
               









                                                                  












                                                                    













                              







                              








                              








                              








                              





























































                                                                  















                                                                  



























                                                                  














                                                                  
















                                                                  













                                                                         
                                                                     

     
                                                                     

           
                                                                     

     
                                                                     

     
                                                                     















































                                                                  




























                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                  












                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                  






                              





                              






                                      





                              






                              






                                      















                              








































































































                              
                              


















                              
                              
































                                       
                              






                              
                              


































                              




















                                       
























































































































                                              

















































































































                              
                  













                              
























                              







































                              
                              























































































                                                                  
               



























                                                                  

                                    







































                                                





















































































































































                                                                  
               



















                                                                                                                  












































                                         






                              






                              





                              






                              






                              






                              






                              





                                                                                                                                                               






                                                                                                                                                                  






                                                                                                                                                                       

































































                                                                  









                                                                           
                                    




























































































































                                                                  
















                                    


















                                                                  
               


















                                                                  
               



















                                                                  
               







               
               



























                                                                  








                                                         


                          

                              













                                                                  


               

                              


















                                                                  

                              























































                                                                  












































                                                                  










                                                                  











































                                                                  


























                 
                 





























                                                                  

                              






















                      

             








                          






                          

        












































































































                                                                  














































                                 



















































                                                                   






























































































































































































































































                                                                   






























                                                
                  







                              
                  







                              











                              
                 
         
                  
          
                   


                         
                  























                                                         
                
         
                  
           
                    




            
                
         
                  
          
                   
          
                   




















                              





                              





                              





                              











                              
                
       
                
       
                
         
                  








                              
                
         
                  


          
                   


           
                    








               



















                                           



                              
                                          
               
                                           







              



















                                                           



                              
                                          
               
                                                           












                              
                              
                       
                                          

                                    
                                           









                                     

















                                           




                              
                              
                       
                                          

                                    
                                                           









                                     

















                                                           


                              


                         
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         















































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            











































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           











                                









                              









                              











                              











                   


                              
                 












































































































                                                             
                         






























                              
                         






































































































































































                                                                              

                              


               
                              





























































































































                                              
























                                      















                                        





































































































































                                                    


             
                              






                              
                              






                              
                              






                              
                              






                              
                              






                              
                              






                              
                              












                                                                  














                                                                  














                                                                  














                                                                  













                                                                  

          




                                                                  









                              


             
                              



                              


             
                              



                              


             
                              



                              


             
                              







































































































































































































































































































































































































































































































































































































                                                                                                     

              






                                                                  

              

































































































































































































                                                                         
               












                                                                  
                 


















                                                                  
               










                                                                  
               











                                                                  
               













                                                                                                          
































                                         











                              






               

























                                   





























                                                                         








                                                               




























                                                                  
                                                                           








               
                                                                       




























































































































                                                




































                             



                                                        
                                                         

           
                                                         

          
                                                                                                               

















































































                                                        
                                                                  




















                                                                  

               









                                                                  
               














                                                                  
                                                         




                                                        
                                                         




































































































                                                                  











                     





























































































                                                                        






























































































































































































                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              











































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            































































































































                              
            
                                                 






                                      






                                                                  





















                                                        
                                                       























































                   




















               


















































































                              

















                                      







































































































                                                          





                                                                                   












































                                                           























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
/-- 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
Max lookbehind = 6
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
Max lookbehind = 1
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
Max lookbehind = 3
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
Max lookbehind = 3
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
Max lookbehind = 4
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
Max lookbehind = 4
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
Max lookbehind = 7
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
Max lookbehind = 3
No options
No first char
No need char

/(?>.*)(?<=(abcd)|(xyz))/I
Capturing subpattern count = 2
Max lookbehind = 4
No options
No first char
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
Max lookbehind = 4
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
Max lookbehind = 4
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 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
Max lookbehind = 1
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
Max lookbehind = 1
No options
First char = 'i'
Need char = 's'
    Mississippi
 0: iss
 0+ issippi

/\Biss\B/Ig+
Capturing subpattern count = 0
Max lookbehind = 1
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
Max lookbehind = 1
No options
First char = 'i'
Need char = 's'
    Mississippi
 0: iss
 0+ issippi
 0: iss
 0+ ippi

/(?<=[Ms])iss/IG+
Capturing subpattern count = 0
Max lookbehind = 1
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
Max lookbehind = 3
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
Max lookbehind = 1
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
Max lookbehind = 1
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
Max lookbehind = 3
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 = 29
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
Max lookbehind = 1
No options
No first char
No need char
  ab cd\>1
 0:  cd

/\b.*/Is
Capturing subpattern count = 0
Max lookbehind = 1
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 or malformed 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
+11 ^       ^
+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]
+17 ^ ^      |
+21 ^ ^      "
+18 ^ ^      b
+19 ^  ^     )
 +3 ^  ^     (?(?=[a])[^"])
 +5 ^  ^     (?=[a])
 +8 ^  ^     [a]
+17 ^  ^     |
+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 at offset 6: abc12
    xyzabc12\P\P
Partial match at offset 6: abc12

/\babc\b/
    +++abc+++
 0: abc
    +++ab\P
Partial match at offset 3: +ab
    +++ab\P\P  
Partial match at offset 3: +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
No first char
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-compatible 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
------------------------------------------------------------------

/ -- This one is here because Perl gives the match as "b" rather than "ab". I
     believe this to be a Perl bug. --/  
      
/(?>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 they 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
    
/--- 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 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
------------------------------------------------------------------
    \x20\x0a
 0:  \x0a
    \x20\x0d
 0:  \x0d
    \x20\x0d\x0a
 0:  \x0d\x0a

/\S*\R/BZ
------------------------------------------------------------------
        Bra
        \S*+
        \R
        Ket
        End
------------------------------------------------------------------
    a\x0a
 0: a\x0a

/X\h*\R/BZ
------------------------------------------------------------------
        Bra
        X
        \h*+
        \R
        Ket
        End
------------------------------------------------------------------
    X\x20\x0a
 0: X \x0a

/X\H*\R/BZ
------------------------------------------------------------------
        Bra
        X
        \H*
        \R
        Ket
        End
------------------------------------------------------------------
    X\x0d\x0a
 0: X\x0d\x0a

/X\H+\R/BZ
------------------------------------------------------------------
        Bra
        X
        \H+
        \R
        Ket
        End
------------------------------------------------------------------
    X\x0d\x0a
 0: X\x0d\x0a

/X\H++\R/BZ
------------------------------------------------------------------
        Bra
        X
        \H++
        \R
        Ket
        End
------------------------------------------------------------------
    X\x0d\x0a
No match

/(?<=abc)def/
    abc\P\P
Partial match at offset 3: 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
 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
Max lookbehind = 1
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
Max lookbehind = 1
No options
No first char
No need char
Subject length lower bound = 8
Starting byte set: < o t u 

/a(*SKIP)c|b(*ACCEPT)|/+S!I
Capturing subpattern count = 0
No options
No first char
No need char
Subject length lower bound = -1
No set of starting bytes
    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

/^(?>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

/(..)\1/
    ab\P
Partial match: ab
    aba\P
Partial match: aba
    abab\P
 0: abab
 1: ab

/(..)\1/i
    ab\P
Partial match: ab
    abA\P
Partial match: abA
    aBAb\P
 0: aBAb
 1: aB

/(..)\1{2,}/
    ab\P
Partial match: ab
    aba\P
Partial match: aba
    abab\P
Partial match: abab
    ababa\P
Partial match: ababa
    ababab\P
 0: ababab
 1: ab
    ababab\P\P
Partial match: ababab
    abababa\P
 0: ababab
 1: ab
    abababa\P\P
Partial match: abababa

/(..)\1{2,}/i
    ab\P
Partial match: ab
    aBa\P
Partial match: aBa
    aBAb\P
Partial match: aBAb
    AbaBA\P
Partial match: AbaBA
    abABAb\P
 0: abABAb
 1: ab
    aBAbaB\P\P
Partial match: aBAbaB
    abABabA\P
 0: abABab
 1: ab
    abaBABa\P\P
Partial match: abaBABa

/(..)\1{2,}?x/i
    ab\P
Partial match: ab
    abA\P
Partial match: abA
    aBAb\P
Partial match: aBAb
    abaBA\P
Partial match: abaBA
    abAbaB\P
Partial match: abAbaB
    abaBabA\P
Partial match: abaBabA
    abAbABaBx\P
 0: abAbABaBx
 1: ab

/^(..)\1/
    aba\P
Partial match: aba

/^(..)\1{2,3}x/
    aba\P
Partial match: aba
    ababa\P
Partial match: ababa
    ababa\P\P
Partial match: ababa
    abababx
 0: abababx
 1: ab
    ababababx  
 0: ababababx
 1: ab

/^(..)\1{2,3}?x/
    aba\P
Partial match: aba
    ababa\P
Partial match: ababa
    ababa\P\P
Partial match: ababa
    abababx
 0: abababx
 1: ab
    ababababx  
 0: ababababx
 1: ab
    
/^(..)(\1{2,3})ab/
    abababab
 0: abababab
 1: ab
 2: abab

/^\R/
    \r\P
 0: \x0d
    \r\P\P
Partial match: \x0d
    
/^\R{2,3}x/
    \r\P
Partial match: \x0d
    \r\P\P
Partial match: \x0d
    \r\r\P 
Partial match: \x0d\x0d
    \r\r\P\P
Partial match: \x0d\x0d
    \r\r\r\P  
Partial match: \x0d\x0d\x0d
    \r\r\r\P\P
Partial match: \x0d\x0d\x0d
    \r\rx
 0: \x0d\x0dx
    \r\r\rx    
 0: \x0d\x0d\x0dx

/^\R{2,3}?x/
    \r\P
Partial match: \x0d
    \r\P\P
Partial match: \x0d
    \r\r\P 
Partial match: \x0d\x0d
    \r\r\P\P
Partial match: \x0d\x0d
    \r\r\r\P  
Partial match: \x0d\x0d\x0d
    \r\r\r\P\P
Partial match: \x0d\x0d\x0d
    \r\rx
 0: \x0d\x0dx
    \r\r\rx    
 0: \x0d\x0d\x0dx
    
/^\R?x/
    \r\P
Partial match: \x0d
    \r\P\P 
Partial match: \x0d
    x
 0: x
    \rx  
 0: \x0dx

/^\R+x/
    \r\P
Partial match: \x0d
    \r\P\P 
Partial match: \x0d
    \r\n\P
Partial match: \x0d\x0a
    \r\n\P\P  
Partial match: \x0d\x0a
    \rx  
 0: \x0dx

/^a$/<CRLF>
    a\r\P
Partial match: a\x0d
    a\r\P\P 
Partial match: a\x0d

/^a$/m<CRLF>
    a\r\P
Partial match: a\x0d
    a\r\P\P 
Partial match: a\x0d

/^(a$|a\r)/<CRLF>
    a\r\P
 0: a\x0d
 1: a\x0d
    a\r\P\P 
Partial match: a\x0d

/^(a$|a\r)/m<CRLF>
    a\r\P
 0: a\x0d
 1: a\x0d
    a\r\P\P 
Partial match: a\x0d

/./<CRLF>
    \r\P
 0: \x0d
    \r\P\P 
Partial match: \x0d
  
/.{2,3}/<CRLF>
    \r\P 
Partial match: \x0d
    \r\P\P
Partial match: \x0d
    \r\r\P
 0: \x0d\x0d
    \r\r\P\P
Partial match: \x0d\x0d
    \r\r\r\P
 0: \x0d\x0d\x0d
    \r\r\r\P\P     
Partial match: \x0d\x0d\x0d

/.{2,3}?/<CRLF>
    \r\P 
Partial match: \x0d
    \r\P\P
Partial match: \x0d
    \r\r\P
 0: \x0d\x0d
    \r\r\P\P
Partial match: \x0d\x0d
    \r\r\r\P
 0: \x0d\x0d
    \r\r\r\P\P     
 0: \x0d\x0d

"AB(C(D))(E(F))?(?(?=\2)(?=\4))"
    ABCDGHI\O03
Matched, but too many substrings
 0: ABCD
    
/-- These are all run as real matches in test 1; here we are just checking the
settings of the anchored and startline bits. --/ 

/(?>.*?a)(?<=ba)/I
Capturing subpattern count = 0
Max lookbehind = 2
No options
No first char
Need char = 'a'

/(?:.*?a)(?<=ba)/I
Capturing subpattern count = 0
Max lookbehind = 2
No options
First char at start or follows newline
Need char = 'a'

/.*?a(*PRUNE)b/I
Capturing subpattern count = 0
No options
No first char
Need char = 'b'

/.*?a(*PRUNE)b/sI
Capturing subpattern count = 0
Options: dotall
No first char
Need char = 'b'

/^a(*PRUNE)b/sI
Capturing subpattern count = 0
Options: anchored dotall
No first char
No need char

/.*?a(*SKIP)b/I
Capturing subpattern count = 0
No options
No first char
Need char = 'b'

/(?>.*?a)b/sI
Capturing subpattern count = 0
Options: dotall
No first char
Need char = 'b'

/(?>.*?a)b/I
Capturing subpattern count = 0
No options
No first char
Need char = 'b'

/(?>^a)b/sI
Capturing subpattern count = 0
Options: anchored dotall
No first char
No need char

/(?>.*?)(?<=(abcd)|(wxyz))/I
Capturing subpattern count = 2
Max lookbehind = 4
No options
No first char
No need char

/(?>.*)(?<=(abcd)|(wxyz))/I
Capturing subpattern count = 2
Max lookbehind = 4
No options
No first char
No need char

"(?>.*)foo"I
Capturing subpattern count = 0
No options
No first char
Need char = 'o'

"(?>.*?)foo"I
Capturing subpattern count = 0
No options
No first char
Need char = 'o'

/(?>^abc)/mI
Capturing subpattern count = 0
Options: multiline
First char at start or follows newline
Need char = 'c'

/(?>.*abc)/mI
Capturing subpattern count = 0
Options: multiline
No first char
Need char = 'c'

/(?:.*abc)/mI
Capturing subpattern count = 0
Options: multiline
First char at start or follows newline
Need char = 'c'

/-- Check PCRE_STUDY_EXTRA_NEEDED --/

/.?/S-I
Capturing subpattern count = 0
No options
No first char
No need char
Study returned NULL

/.?/S!I
Capturing subpattern count = 0
No options
No first char
No need char
Subject length lower bound = -1
No set of starting bytes

/(?:(a)+(?C1)bb|aa(?C2)b)/
    aab\C+
Callout 1: last capture = 1
 0: <unset>
 1: a
--->aab
    ^ ^     b
Callout 1: last capture = 1
 0: <unset>
 1: a
--->aab
    ^^      b
Callout 2: last capture = -1
 0: <unset>
--->aab
    ^ ^     b
 0: aab
   
/(?:(a)++(?C1)bb|aa(?C2)b)/
    aab\C+ 
Callout 1: last capture = 1
 0: <unset>
 1: a
--->aab
    ^ ^     b
Callout 2: last capture = -1
 0: <unset>
--->aab
    ^ ^     b
 0: aab
    
/(?:(?>(a))(?C1)bb|aa(?C2)b)/
    aab\C+ 
Callout 1: last capture = 1
 0: <unset>
 1: a
--->aab
    ^^      b
Callout 2: last capture = -1
 0: <unset>
--->aab
    ^ ^     b
 0: aab

/(?:(?1)(?C1)x|ab(?C2))((a)){0}/                                                
    aab\C+ 
Callout 1: last capture = -1
 0: <unset>
--->aab
    ^^      x
Callout 1: last capture = -1
 0: <unset>
--->aab
     ^^     x
Callout 2: last capture = -1
 0: <unset>
--->aab
     ^ ^    )
 0: ab

/(?1)(?C1)((a)(?C2)){0}/   
    aab\C+ 
Callout 2: last capture = 2
 0: <unset>
 1: <unset>
 2: a
--->aab
    ^^      )
Callout 1: last capture = -1
 0: <unset>
--->aab
    ^^      ((a)(?C2)){0}
 0: a

/(?:(a)+(?C1)bb|aa(?C2)b)++/
    aab\C+
Callout 1: last capture = 1
 0: <unset>
 1: a
--->aab
    ^ ^     b
Callout 1: last capture = 1
 0: <unset>
 1: a
--->aab
    ^^      b
Callout 2: last capture = -1
 0: <unset>
--->aab
    ^ ^     b
 0: aab
    aab\C+\O2
Callout 1: last capture = 1
 0: <unset>
--->aab
    ^ ^     b
Callout 1: last capture = 1
 0: <unset>
--->aab
    ^^      b
Callout 2: last capture = -1
 0: <unset>
--->aab
    ^ ^     b
 0: aab

/(ab)x|ab/
    ab\O3
 0: ab
    ab\O2 
 0: ab
  
/(ab)/
    ab\O3
Matched, but too many substrings
 0: ab
    ab\O2 
Matched, but too many substrings
 0: ab
    
/(?<=123)(*MARK:xx)abc/K
    xxxx123a\P\P
Partial match at offset 7, mark=xx: 123a
    xxxx123a\P
Partial match at offset 7, mark=xx: 123a
    
/123\Kabc/
    xxxx123a\P\P
Partial match: 123a
    xxxx123a\P
Partial match: 123a

/^(?(?=a)aa|bb)/C
    bb
--->bb
 +0 ^      ^
 +1 ^      (?(?=a)aa|bb)
 +3 ^      (?=a)
 +6 ^      a
+11 ^      b
+12 ^^     b
+13 ^ ^    )
+14 ^ ^    
 0: bb

/(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/
    bb
--->bb
  1 ^      ^
  2 ^      (?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))
 99 ^      (?=(?C3)a(?C4))
  3 ^      a
  8 ^      b
  9 ^^     b
 10 ^ ^    )
 11 ^ ^    
 0: bb

/-- Perl seems to have a bug with this one --/

/aaaaa(*COMMIT)(*PRUNE)b|a+c/
    aaaaaac
 0: aaaac
    
/-- Here are some that Perl treats differently because of the way it handles
backtracking verbs. --/

 /(?!a(*COMMIT)b)ac|ad/
     ac
 0: ac
     ad 
 0: ad

/^(?!a(*THEN)b|ac)../
     ac
No match
     ad 
 0: ad

/^(?=a(*THEN)b|ac)/
    ac
 0: 
    
/\A.*?(?:a|b(*THEN)c)/
    ba
 0: ba

/\A.*?(?:a|b(*THEN)c)++/
    ba
 0: ba

/\A.*?(?:a|b(*THEN)c|d)/
    ba
 0: ba

/(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/
    aac 
 0: aac

/\A.*?(a|b(*THEN)c)/
    ba
 0: ba
 1: a

/^(A(*THEN)B|A(*THEN)D)/
    AD           
 0: AD
 1: AD
    
/(?!b(*THEN)a)bn|bnn/
    bnn
 0: bn

/(?(?=b(*SKIP)a)bn|bnn)/
    bnn
No match

/(?=b(*THEN)a|)bn|bnn/
    bnn
 0: bn

/-------------------------/ 

/(*LIMIT_MATCH=12bc)abc/
Failed: (*VERB) not recognized or malformed at offset 7

/(*LIMIT_MATCH=4294967290)abc/
Failed: (*VERB) not recognized or malformed at offset 7

/(*LIMIT_RECURSION=4294967280)abc/I
Capturing subpattern count = 0
Recursion limit = 4294967280
No options
First char = 'a'
Need char = 'c'

/(a+)*zz/
    aaaaaaaaaaaaaz
No match
    aaaaaaaaaaaaaz\q3000
Error -8 (match limit exceeded)

/(a+)*zz/S-
    aaaaaaaaaaaaaz\Q10 
Error -21 (recursion limit exceeded)

/(*LIMIT_MATCH=3000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 3000
No options
No first char
Need char = 'z'
    aaaaaaaaaaaaaz
Error -8 (match limit exceeded)
    aaaaaaaaaaaaaz\q60000
Error -8 (match limit exceeded)

/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 3000
No options
No first char
Need char = 'z'
    aaaaaaaaaaaaaz
Error -8 (match limit exceeded)

/(*LIMIT_MATCH=60000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 60000
No options
No first char
Need char = 'z'
    aaaaaaaaaaaaaz
No match
    aaaaaaaaaaaaaz\q3000
Error -8 (match limit exceeded)

/(*LIMIT_RECURSION=10)(a+)*zz/IS-
Capturing subpattern count = 1
Recursion limit = 10
No options
No first char
Need char = 'z'
Subject length lower bound = 2
Starting byte set: a z 
    aaaaaaaaaaaaaz
Error -21 (recursion limit exceeded)
    aaaaaaaaaaaaaz\Q1000
Error -21 (recursion limit exceeded)

/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/IS-
Capturing subpattern count = 1
Recursion limit = 10
No options
No first char
Need char = 'z'
Subject length lower bound = 2
Starting byte set: a z 
    aaaaaaaaaaaaaz
Error -21 (recursion limit exceeded)

/(*LIMIT_RECURSION=1000)(a+)*zz/IS-
Capturing subpattern count = 1
Recursion limit = 1000
No options
No first char
Need char = 'z'
Subject length lower bound = 2
Starting byte set: a z 
    aaaaaaaaaaaaaz
No match
    aaaaaaaaaaaaaz\Q10
Error -21 (recursion limit exceeded)

/-- End of testinput2 --/