< Summary

Information
Class: System.Text.RegularExpressions.Generated.<RegexGenerator_g>F36A651036645E8412F949870328796960F521B01C75A54DBCB080152C5565E24__Email_0
Assembly: ArturRios.Util
File(s): /home/runner/work/dotnet-util/dotnet-util/src/obj/Release/net10.0/generated/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs
Line coverage
93%
Covered lines: 302
Uncovered lines: 21
Coverable lines: 323
Total lines: 1774
Line coverage: 93.4%
Branch coverage
85%
Covered branches: 163
Total branches: 190
Branch coverage: 85.7%
Method coverage
100%
Covered methods: 7
Fully covered methods: 6
Total methods: 7
Method coverage: 100%
Full method coverage: 85.7%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%
.ctor()100%11100%
CreateInstance()100%11100%
Scan(...)100%44100%
TryFindNextPossibleStartingPosition(...)100%44100%
TryMatchAtCurrentPosition(...)85%19118093.04%
UncaptureUntil()100%22100%

File(s)

/home/runner/work/dotnet-util/dotnet-util/src/obj/Release/net10.0/generated/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs

#LineLine coverage
 1// <auto-generated/>
 2#nullable enable
 3#pragma warning disable
 4
 5namespace ArturRios.Util.RegularExpressions
 6{
 7    partial class RegexCollection
 8    {
 9        /// <remarks>
 10        /// Pattern:<br/>
 11        /// <code>^[a-zA-Z0-9!#$%&amp;'*+\\-/=?\\^_`{|}~]+(\\.[a-zA-Z0-9!#$%&amp;'*+\\-/=?\\^_`{|}~]+)*@((([a-zA-Z0-9]((
 12        /// Explanation:<br/>
 13        /// <code>
 14        /// ○ Match if at the beginning of the string.<br/>
 15        /// ○ Match a character in the set [!#-'*+\-/-9=?A-Z^-~] greedily at least once.<br/>
 16        /// ○ Loop greedily any number of times.<br/>
 17        ///     ○ 1st capture group.<br/>
 18        ///         ○ Match '.'.<br/>
 19        ///         ○ Match a character in the set [!#-'*+\-/-9=?A-Z^-~] atomically at least once.<br/>
 20        /// ○ Match '@'.<br/>
 21        /// ○ 2nd capture group.<br/>
 22        ///     ○ Match with 2 alternative expressions.<br/>
 23        ///         ○ 3rd capture group.<br/>
 24        ///             ○ Loop greedily at least once.<br/>
 25        ///                 ○ 4th capture group.<br/>
 26        ///                     ○ Match an ASCII letter or digit.<br/>
 27        ///                     ○ Optional (greedy).<br/>
 28        ///                         ○ 5th capture group.<br/>
 29        ///                             ○ 6th capture group.<br/>
 30        ///                                 ○ Match a character in the set [\-0-9A-Za-z] greedily at most 61 times.<br/>
 31        ///                             ○ Match an ASCII letter or digit.<br/>
 32        ///                     ○ Match '.'.<br/>
 33        ///             ○ Match an ASCII letter atomically at least 2 and at most 63 times.<br/>
 34        ///         ○ 7th capture group.<br/>
 35        ///             ○ Match '['.<br/>
 36        ///             ○ Loop exactly 3 times.<br/>
 37        ///                 ○ 8th capture group.<br/>
 38        ///                     ○ 9th capture group.<br/>
 39        ///                         ○ Match with 3 alternative expressions.<br/>
 40        ///                             ○ Match a sequence of expressions.<br/>
 41        ///                                 ○ Match '2'.<br/>
 42        ///                                 ○ Match with 2 alternative expressions.<br/>
 43        ///                                     ○ Match a sequence of expressions.<br/>
 44        ///                                         ○ Match '5'.<br/>
 45        ///                                         ○ Match a character in the set [0-5].<br/>
 46        ///                                     ○ Match a sequence of expressions.<br/>
 47        ///                                         ○ Match a character in the set [0-4].<br/>
 48        ///                                         ○ Match a character in the set [0-9].<br/>
 49        ///                             ○ Match a sequence of expressions.<br/>
 50        ///                                 ○ Match '1'.<br/>
 51        ///                                 ○ Match a character in the set [0-9] exactly 2 times.<br/>
 52        ///                             ○ Match a sequence of expressions.<br/>
 53        ///                                 ○ Match a character in the set [1-9] greedily, optionally.<br/>
 54        ///                                 ○ Match a character in the set [0-9].<br/>
 55        ///                     ○ Match '.'.<br/>
 56        ///             ○ 10th capture group.<br/>
 57        ///                 ○ Match with 3 alternative expressions.<br/>
 58        ///                     ○ Match a sequence of expressions.<br/>
 59        ///                         ○ Match '2'.<br/>
 60        ///                         ○ Match with 2 alternative expressions.<br/>
 61        ///                             ○ Match a sequence of expressions.<br/>
 62        ///                                 ○ Match '5'.<br/>
 63        ///                                 ○ Match a character in the set [0-5].<br/>
 64        ///                             ○ Match a sequence of expressions.<br/>
 65        ///                                 ○ Match a character in the set [0-4].<br/>
 66        ///                                 ○ Match a character in the set [0-9].<br/>
 67        ///                     ○ Match a sequence of expressions.<br/>
 68        ///                         ○ Match '1'.<br/>
 69        ///                         ○ Match a character in the set [0-9] exactly 2 times.<br/>
 70        ///                     ○ Match a sequence of expressions.<br/>
 71        ///                         ○ Match a character in the set [1-9] greedily, optionally.<br/>
 72        ///                         ○ Match a character in the set [0-9].<br/>
 73        ///             ○ Match ']'.<br/>
 74        /// ○ Match if at the end of the string.<br/>
 75        /// </code>
 76        /// </remarks>
 77        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.374
 78        public static partial global::System.Text.RegularExpressions.Regex Email() => global::System.Text.RegularExpress
 79    }
 80}
 81
 82namespace ArturRios.Util.RegularExpressions
 83{
 84    partial class RegexCollection
 85    {
 86        /// <remarks>
 87        /// Pattern:<br/>
 88        /// <code>[0-9]+</code><br/>
 89        /// Explanation:<br/>
 90        /// <code>
 91        /// ○ Match a character in the set [0-9] atomically at least once.<br/>
 92        /// </code>
 93        /// </remarks>
 94        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.374
 95        public static partial global::System.Text.RegularExpressions.Regex HasNumber() => global::System.Text.RegularExp
 96    }
 97}
 98
 99namespace ArturRios.Util.RegularExpressions
 100{
 101    partial class RegexCollection
 102    {
 103        /// <remarks>
 104        /// Pattern:<br/>
 105        /// <code>[a-z]+</code><br/>
 106        /// Explanation:<br/>
 107        /// <code>
 108        /// ○ Match a character in the set [a-z] atomically at least once.<br/>
 109        /// </code>
 110        /// </remarks>
 111        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.374
 112        public static partial global::System.Text.RegularExpressions.Regex HasLowerChar() => global::System.Text.Regular
 113    }
 114}
 115
 116namespace ArturRios.Util.RegularExpressions
 117{
 118    partial class RegexCollection
 119    {
 120        /// <remarks>
 121        /// Pattern:<br/>
 122        /// <code>[A-Z]+</code><br/>
 123        /// Explanation:<br/>
 124        /// <code>
 125        /// ○ Match a character in the set [A-Z] atomically at least once.<br/>
 126        /// </code>
 127        /// </remarks>
 128        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.374
 129        public static partial global::System.Text.RegularExpressions.Regex HasUpperChar() => global::System.Text.Regular
 130    }
 131}
 132
 133namespace ArturRios.Util.RegularExpressions
 134{
 135    partial class RegexCollection
 136    {
 137        /// <remarks>
 138        /// Pattern:<br/>
 139        /// <code>^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+\\z</code><br/>
 140        /// Explanation:<br/>
 141        /// <code>
 142        /// ○ Match if at the beginning of the string.<br/>
 143        /// ○ Zero-width positive lookahead.<br/>
 144        ///     ○ Match a character other than '\n' greedily any number of times.<br/>
 145        ///     ○ Match a character in the set [a-z].<br/>
 146        /// ○ Zero-width positive lookahead.<br/>
 147        ///     ○ Match a character other than '\n' greedily any number of times.<br/>
 148        ///     ○ Match a character in the set [A-Z].<br/>
 149        /// ○ Zero-width positive lookahead.<br/>
 150        ///     ○ Match a character other than '\n' greedily any number of times.<br/>
 151        ///     ○ Match a Unicode digit.<br/>
 152        /// ○ Match a character other than '\n' atomically at least once.<br/>
 153        /// ○ Match if at the end of the string.<br/>
 154        /// </code>
 155        /// </remarks>
 156        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.374
 157        public static partial global::System.Text.RegularExpressions.Regex HasNumberLowerAndUpperChar() => global::Syste
 158    }
 159}
 160
 161namespace System.Text.RegularExpressions.Generated
 162{
 163    using System;
 164    using System.Buffers;
 165    using System.CodeDom.Compiler;
 166    using System.Collections;
 167    using System.ComponentModel;
 168    using System.Globalization;
 169    using System.Runtime.CompilerServices;
 170    using System.Text.RegularExpressions;
 171    using System.Threading;
 172
 173    /// <summary>Custom <see cref="Regex"/>-derived type for the Email method.</summary>
 174    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.37416")]
 175    file sealed class Email_0 : Regex
 176    {
 177        /// <summary>Cached, thread-safe singleton instance.</summary>
 1178        internal static readonly Email_0 Instance = new();
 179
 180        /// <summary>Initializes the instance.</summary>
 1181        private Email_0()
 182        {
 1183            base.pattern = "^[a-zA-Z0-9!#$%&'*+\\-/=?\\^_`{|}~]+(\\.[a-zA-Z0-9!#$%&'*+\\-/=?\\^_`{|}~]+)*@((([a-zA-Z0-9]
 1184            base.roptions = RegexOptions.None;
 1185            base.internalMatchTimeout = TimeSpan.FromMilliseconds(100);
 1186            base.factory = new RunnerFactory();
 1187            base.capsize = 11;
 1188        }
 189
 190        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 191        private sealed class RunnerFactory : RegexRunnerFactory
 192        {
 193            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 1194            protected override RegexRunner CreateInstance() => new Runner();
 195
 196            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 197            private sealed class Runner : RegexRunner
 198            {
 199                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 200                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 201                protected override void Scan(ReadOnlySpan<char> inputSpan)
 202                {
 203                    // The pattern is anchored.  Validate the current position and try to match at it only.
 73204                    if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
 205                    {
 33206                        base.runtextpos = inputSpan.Length;
 207                    }
 73208                }
 209
 210                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 211                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 212                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 213                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 214                {
 73215                    int pos = base.runtextpos;
 216
 217                    // Any possible match is at least 6 characters.
 73218                    if (pos <= inputSpan.Length - 6)
 219                    {
 220                        // The pattern leads with a beginning (\A) anchor.
 71221                        if (pos == 0)
 222                        {
 71223                            return true;
 224                        }
 225                    }
 226
 227                    // No match found.
 2228                    base.runtextpos = inputSpan.Length;
 2229                    return false;
 230                }
 231
 232                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 233                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 234                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 235                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 236                {
 71237                    int pos = base.runtextpos;
 71238                    int matchStart = pos;
 239                    char ch;
 71240                    int alternation_branch = 0;
 71241                    int alternation_branch1 = 0;
 71242                    int alternation_starting_capturepos = 0;
 71243                    int alternation_starting_capturepos2 = 0;
 71244                    int alternation_starting_pos = 0;
 71245                    int alternation_starting_pos2 = 0;
 71246                    int capture_starting_pos1 = 0;
 71247                    int capture_starting_pos2 = 0;
 71248                    int capture_starting_pos6 = 0;
 71249                    int capture_starting_pos9 = 0;
 71250                    int charloop_capture_pos = 0;
 71251                    int charloop_capture_pos1 = 0;
 142252                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
 142253                    int charloop_starting_pos1 = 0, charloop_ending_pos1 = 0;
 142254                    int charloop_starting_pos2 = 0, charloop_ending_pos2 = 0;
 142255                    int charloop_starting_pos3 = 0, charloop_ending_pos3 = 0;
 71256                    int loop_iteration = 0;
 71257                    int loop_iteration1 = 0;
 71258                    int loop_iteration2 = 0;
 71259                    int loop_iteration3 = 0;
 71260                    int stackpos = 0;
 261                    int startingStackpos = 0;
 71262                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 263
 264                    // Match if at the beginning of the string.
 71265                    if (pos != 0)
 266                    {
 0267                        UncaptureUntil(0);
 0268                        return false; // The input didn't match.
 269                    }
 270
 271                    // Match a character in the set [!#-'*+\-/-9=?A-Z^-~] greedily at least once.
 272                    //{
 71273                        charloop_starting_pos = pos;
 274
 71275                        int iteration = slice.IndexOfAnyExcept(Utilities.s_ascii_FAACFFA3FEFFFFC7FFFFFF7F);
 71276                        if (iteration < 0)
 277                        {
 1278                            iteration = slice.Length;
 279                        }
 280
 71281                        if (iteration == 0)
 282                        {
 3283                            UncaptureUntil(0);
 3284                            return false; // The input didn't match.
 285                        }
 286
 68287                        slice = slice.Slice(iteration);
 68288                        pos += iteration;
 289
 68290                        charloop_ending_pos = pos;
 68291                        charloop_starting_pos++;
 68292                        goto CharLoopEnd;
 293
 294                        CharLoopBacktrack:
 67295                        UncaptureUntil(charloop_capture_pos);
 296
 67297                        base.CheckTimeout();
 298
 67299                        if (charloop_starting_pos >= charloop_ending_pos)
 300                        {
 30301                            UncaptureUntil(0);
 30302                            return false; // The input didn't match.
 303                        }
 37304                        pos = --charloop_ending_pos;
 37305                        slice = inputSpan.Slice(pos);
 306
 307                        CharLoopEnd:
 105308                        charloop_capture_pos = base.Crawlpos();
 309                    //}
 310
 311                    // Loop greedily any number of times.
 312                    //{
 105313                        loop_iteration = 0;
 314
 315                        LoopBody:
 118316                        Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
 317
 118318                        loop_iteration++;
 319
 320                        // 1st capture group.
 321                        {
 118322                            int capture_starting_pos = pos;
 323
 324                            // Match '.'.
 118325                            if (slice.IsEmpty || slice[0] != '.')
 326                            {
 327                                goto LoopIterationNoMatch;
 328                            }
 329
 330                            // Match a character in the set [!#-'*+\-/-9=?A-Z^-~] atomically at least once.
 331                            {
 13332                                int iteration1 = slice.Slice(1).IndexOfAnyExcept(Utilities.s_ascii_FAACFFA3FEFFFFC7FFFFF
 13333                                if (iteration1 < 0)
 334                                {
 1335                                    iteration1 = slice.Length - 1;
 336                                }
 337
 13338                                if (iteration1 == 0)
 339                                {
 340                                    goto LoopIterationNoMatch;
 341                                }
 342
 13343                                slice = slice.Slice(iteration1);
 13344                                pos += iteration1;
 345                            }
 346
 13347                            pos++;
 13348                            slice = inputSpan.Slice(pos);
 13349                            base.Capture(1, capture_starting_pos, pos);
 350                        }
 351
 352
 353                        // The loop has no upper bound. Continue iterating greedily.
 13354                        goto LoopBody;
 355
 356                        // The loop iteration failed. Put state back to the way it was before the iteration.
 357                        LoopIterationNoMatch:
 174358                        if (--loop_iteration < 0)
 359                        {
 360                            // Unable to match the remainder of the expression after exhausting the loop.
 361                            goto CharLoopBacktrack;
 362                        }
 107363                        pos = base.runstack![--stackpos];
 107364                        UncaptureUntil(base.runstack![--stackpos]);
 107365                        slice = inputSpan.Slice(pos);
 366                        LoopEnd:;
 367                    //}
 368
 369                    // Match '@'.
 107370                    if (slice.IsEmpty || slice[0] != '@')
 371                    {
 372                        goto LoopIterationNoMatch;
 373                    }
 374
 375                    // 2nd capture group.
 376                    //{
 62377                        pos++;
 62378                        slice = inputSpan.Slice(pos);
 62379                        capture_starting_pos1 = pos;
 380
 381                        // Match with 2 alternative expressions.
 382                        //{
 62383                            alternation_starting_pos = pos;
 62384                            alternation_starting_capturepos = base.Crawlpos();
 385
 386                            // Branch 0
 387                            //{
 388                                // 3rd capture group.
 389                                //{
 62390                                    capture_starting_pos2 = pos;
 391
 392                                    // Loop greedily at least once.
 393                                    //{
 62394                                        loop_iteration1 = 0;
 395
 396                                        LoopBody1:
 126397                                        Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
 398
 126399                                        loop_iteration1++;
 400
 401                                        // 4th capture group.
 402                                        //{
 126403                                            int capture_starting_pos3 = pos;
 404
 405                                            // Match an ASCII letter or digit.
 126406                                            if (slice.IsEmpty || !char.IsAsciiLetterOrDigit(slice[0]))
 407                                            {
 408                                                goto LoopIterationNoMatch1;
 409                                            }
 410
 411                                            // Optional (greedy).
 412                                            //{
 113413                                                pos++;
 113414                                                slice = inputSpan.Slice(pos);
 113415                                                loop_iteration2 = 0;
 416
 417                                                LoopBody2:
 113418                                                Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), p
 419
 113420                                                loop_iteration2++;
 421
 422                                                // 5th capture group.
 423                                                //{
 113424                                                    int capture_starting_pos4 = pos;
 425
 426                                                    // 6th capture group.
 427                                                    //{
 113428                                                        int capture_starting_pos5 = pos;
 429
 430                                                        // Match a character in the set [\-0-9A-Za-z] greedily at most 6
 431                                                        //{
 113432                                                            charloop_starting_pos1 = pos;
 433
 113434                                                            int iteration2 = 0;
 563435                                                            while (iteration2 < 61 && (uint)iteration2 < (uint)slice.Len
 436                                                            {
 450437                                                                iteration2++;
 438                                                            }
 439
 113440                                                            slice = slice.Slice(iteration2);
 113441                                                            pos += iteration2;
 442
 113443                                                            charloop_ending_pos1 = pos;
 113444                                                            goto CharLoopEnd1;
 445
 446                                                            CharLoopBacktrack1:
 290447                                                            UncaptureUntil(base.runstack![--stackpos]);
 290448                                                            Utilities.StackPop(base.runstack!, ref stackpos, out charloo
 449
 290450                                                            base.CheckTimeout();
 451
 290452                                                            if (charloop_starting_pos1 >= charloop_ending_pos1 ||
 290453                                                                (charloop_ending_pos1 = inputSpan.Slice(charloop_startin
 454                                                            {
 455                                                                goto LoopIterationNoMatch2;
 456                                                            }
 219457                                                            charloop_ending_pos1 += charloop_starting_pos1;
 219458                                                            pos = charloop_ending_pos1;
 219459                                                            slice = inputSpan.Slice(pos);
 460
 461                                                            CharLoopEnd1:
 332462                                                            Utilities.StackPush(ref base.runstack!, ref stackpos, charlo
 463                                                        //}
 464
 332465                                                        base.Capture(6, capture_starting_pos5, pos);
 466
 332467                                                        Utilities.StackPush(ref base.runstack!, ref stackpos, capture_st
 332468                                                        goto CaptureSkipBacktrack;
 469
 470                                                        CaptureBacktrack:
 290471                                                        capture_starting_pos5 = base.runstack![--stackpos];
 290472                                                        goto CharLoopBacktrack1;
 473
 474                                                        CaptureSkipBacktrack:;
 475                                                    //}
 476
 477                                                    // Match an ASCII letter or digit.
 332478                                                    if (slice.IsEmpty || !char.IsAsciiLetterOrDigit(slice[0]))
 479                                                    {
 480                                                        goto CaptureBacktrack;
 481                                                    }
 482
 219483                                                    pos++;
 219484                                                    slice = inputSpan.Slice(pos);
 219485                                                    base.Capture(5, capture_starting_pos4, pos);
 486
 219487                                                    Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starti
 219488                                                    goto CaptureSkipBacktrack1;
 489
 490                                                    CaptureBacktrack1:
 177491                                                    capture_starting_pos4 = base.runstack![--stackpos];
 177492                                                    goto CaptureBacktrack;
 493
 494                                                    CaptureSkipBacktrack1:;
 495                                                //}
 496
 497
 498                                                // The loop has an upper bound of 1. Continue iterating greedily if it h
 219499                                                if (loop_iteration2 == 0)
 500                                                {
 0501                                                    goto LoopBody2;
 502                                                }
 503                                                goto LoopEnd2;
 504
 505                                                // The loop iteration failed. Put state back to the way it was before th
 506                                                LoopIterationNoMatch2:
 71507                                                if (--loop_iteration2 < 0)
 508                                                {
 509                                                    // Unable to match the remainder of the expression after exhausting 
 510                                                    goto LoopIterationNoMatch1;
 511                                                }
 71512                                                pos = base.runstack![--stackpos];
 71513                                                UncaptureUntil(base.runstack![--stackpos]);
 71514                                                slice = inputSpan.Slice(pos);
 71515                                                goto LoopEnd2;
 516
 517                                                LoopBacktrack:
 248518                                                base.CheckTimeout();
 519
 248520                                                if (loop_iteration2 == 0)
 521                                                {
 522                                                    // No iterations of the loop remain to backtrack into. Fail the loop
 71523                                                    goto LoopIterationNoMatch1;
 524                                                }
 525                                                goto CaptureBacktrack1;
 526                                                LoopEnd2:
 527
 290528                                                Utilities.StackPush(ref base.runstack!, ref stackpos, loop_iteration2);
 290529                                                goto LoopSkipBacktrack;
 530
 531                                                LoopBacktrack1:
 248532                                                loop_iteration2 = base.runstack![--stackpos];
 248533                                                base.CheckTimeout();
 534
 248535                                                goto LoopBacktrack;
 536
 537                                                LoopSkipBacktrack:;
 538                                            //}
 539
 540                                            // Match '.'.
 290541                                            if (slice.IsEmpty || slice[0] != '.')
 542                                            {
 543                                                goto LoopBacktrack1;
 544                                            }
 545
 64546                                            pos++;
 64547                                            slice = inputSpan.Slice(pos);
 64548                                            base.Capture(4, capture_starting_pos3, pos);
 549
 64550                                            Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos3)
 64551                                            goto CaptureSkipBacktrack2;
 552
 553                                            CaptureBacktrack2:
 22554                                            capture_starting_pos3 = base.runstack![--stackpos];
 22555                                            goto LoopBacktrack1;
 556
 557                                            CaptureSkipBacktrack2:;
 558                                        //}
 559
 560
 561                                        // The loop has no upper bound. Continue iterating greedily.
 562                                        goto LoopBody1;
 563
 564                                        // The loop iteration failed. Put state back to the way it was before the iterat
 565                                        LoopIterationNoMatch1:
 84566                                        if (--loop_iteration1 < 0)
 567                                        {
 568                                            // Unable to match the remainder of the expression after exhausting the loop
 569                                            goto AlternationBranch;
 570                                        }
 84571                                        pos = base.runstack![--stackpos];
 84572                                        UncaptureUntil(base.runstack![--stackpos]);
 84573                                        slice = inputSpan.Slice(pos);
 84574                                        if (loop_iteration1 == 0)
 575                                        {
 576                                            // No iterations have been matched to backtrack into. Fail the loop.
 29577                                            goto AlternationBranch;
 578                                        }
 579
 580                                        goto LoopEnd1;
 581
 582                                        LoopBacktrack2:
 22583                                        base.CheckTimeout();
 584
 22585                                        if (loop_iteration1 == 0)
 586                                        {
 587                                            // No iterations of the loop remain to backtrack into. Fail the loop.
 0588                                            goto AlternationBranch;
 589                                        }
 590                                        goto CaptureBacktrack2;
 591                                        LoopEnd1:;
 592                                    //}
 593
 594                                    // Match an ASCII letter atomically at least 2 and at most 63 times.
 595                                    {
 55596                                        int iteration3 = 0;
 185597                                        while (iteration3 < 63 && (uint)iteration3 < (uint)slice.Length && char.IsAsciiL
 598                                        {
 130599                                            iteration3++;
 600                                        }
 601
 55602                                        if (iteration3 < 2)
 603                                        {
 604                                            goto LoopBacktrack2;
 605                                        }
 606
 38607                                        slice = slice.Slice(iteration3);
 38608                                        pos += iteration3;
 609                                    }
 610
 38611                                    base.Capture(3, capture_starting_pos2, pos);
 612
 613                                    goto CaptureSkipBacktrack3;
 614
 615                                    CaptureBacktrack3:
 616                                    goto LoopBacktrack2;
 617
 618                                    CaptureSkipBacktrack3:;
 619                                //}
 620
 38621                                alternation_branch = 0;
 38622                                goto AlternationMatch;
 623
 624                                AlternationBranch:
 29625                                pos = alternation_starting_pos;
 29626                                slice = inputSpan.Slice(pos);
 29627                                UncaptureUntil(alternation_starting_capturepos);
 628                            //}
 629
 630                            // Branch 1
 631                            //{
 632                                // 7th capture group.
 633                                //{
 29634                                    capture_starting_pos6 = pos;
 635
 636                                    // Match '['.
 29637                                    if (slice.IsEmpty || slice[0] != '[')
 638                                    {
 639                                        goto LoopIterationNoMatch;
 640                                    }
 641
 642                                    // Loop exactly 3 times.
 643                                    //{
 6644                                        pos++;
 6645                                        slice = inputSpan.Slice(pos);
 646                                        startingStackpos = stackpos;
 6647                                        loop_iteration3 = 0;
 648
 649                                        LoopBody3:
 18650                                        Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
 651
 18652                                        loop_iteration3++;
 653
 654                                        // 8th capture group.
 655                                        //{
 18656                                            int capture_starting_pos7 = pos;
 657
 658                                            // 9th capture group.
 659                                            //{
 18660                                                int capture_starting_pos8 = pos;
 661
 662                                                // Match with 3 alternative expressions.
 663                                                //{
 18664                                                    int alternation_starting_pos1 = pos;
 18665                                                    int alternation_starting_capturepos1 = base.Crawlpos();
 666
 667                                                    // Branch 0
 668                                                    //{
 669                                                        // Match '2'.
 18670                                                        if (slice.IsEmpty || slice[0] != '2')
 671                                                        {
 672                                                            goto AlternationBranch1;
 673                                                        }
 674
 675                                                        // Match with 2 alternative expressions.
 676                                                        //{
 1677                                                            if ((uint)slice.Length < 2)
 678                                                            {
 679                                                                goto AlternationBranch1;
 680                                                            }
 681
 1682                                                            switch (slice[1])
 683                                                            {
 684                                                                case '5':
 685
 686                                                                    // Match a character in the set [0-5].
 0687                                                                    if ((uint)slice.Length < 3 || !char.IsBetween(slice[
 688                                                                    {
 689                                                                        goto AlternationBranch1;
 690                                                                    }
 691
 0692                                                                    pos += 3;
 0693                                                                    slice = inputSpan.Slice(pos);
 0694                                                                    break;
 695
 696                                                                case '0' or '1' or '2' or '3' or '4':
 697
 698                                                                    // Match a character in the set [0-9].
 0699                                                                    if ((uint)slice.Length < 3 || !char.IsAsciiDigit(sli
 700                                                                    {
 701                                                                        goto AlternationBranch1;
 702                                                                    }
 703
 0704                                                                    pos += 3;
 0705                                                                    slice = inputSpan.Slice(pos);
 706                                                                    break;
 707
 708                                                                default:
 709                                                                    goto AlternationBranch1;
 710                                                            }
 711                                                        //}
 712
 0713                                                        Utilities.StackPush(ref base.runstack!, ref stackpos, 0, alterna
 0714                                                        goto AlternationMatch1;
 715
 716                                                        AlternationBranch1:
 18717                                                        pos = alternation_starting_pos1;
 18718                                                        slice = inputSpan.Slice(pos);
 18719                                                        UncaptureUntil(alternation_starting_capturepos1);
 720                                                    //}
 721
 722                                                    // Branch 1
 723                                                    //{
 18724                                                        if ((uint)slice.Length < 3 ||
 18725                                                            slice[0] != '1' || // Match '1'.
 18726                                                            !char.IsAsciiDigit(slice[1]) || // Match a character in the 
 18727                                                            !char.IsAsciiDigit(slice[2]))
 728                                                        {
 729                                                            goto AlternationBranch2;
 730                                                        }
 731
 4732                                                        Utilities.StackPush(ref base.runstack!, ref stackpos, 1, alterna
 4733                                                        pos += 3;
 4734                                                        slice = inputSpan.Slice(pos);
 4735                                                        goto AlternationMatch1;
 736
 737                                                        AlternationBranch2:
 14738                                                        pos = alternation_starting_pos1;
 14739                                                        slice = inputSpan.Slice(pos);
 14740                                                        UncaptureUntil(alternation_starting_capturepos1);
 741                                                    //}
 742
 743                                                    // Branch 2
 744                                                    //{
 745                                                        // Match a character in the set [1-9] greedily, optionally.
 746                                                        //{
 14747                                                            charloop_starting_pos2 = pos;
 748
 14749                                                            if (!slice.IsEmpty && char.IsBetween(slice[0], '1', '9'))
 750                                                            {
 8751                                                                slice = slice.Slice(1);
 8752                                                                pos++;
 753                                                            }
 754
 14755                                                            charloop_ending_pos2 = pos;
 14756                                                            goto CharLoopEnd2;
 757
 758                                                            CharLoopBacktrack2:
 8759                                                            UncaptureUntil(base.runstack![--stackpos]);
 8760                                                            Utilities.StackPop(base.runstack!, ref stackpos, out charloo
 761
 8762                                                            base.CheckTimeout();
 763
 8764                                                            if (charloop_starting_pos2 >= charloop_ending_pos2)
 765                                                            {
 766                                                                goto LoopIterationNoMatch3;
 767                                                            }
 5768                                                            pos = --charloop_ending_pos2;
 5769                                                            slice = inputSpan.Slice(pos);
 770
 771                                                            CharLoopEnd2:
 19772                                                            Utilities.StackPush(ref base.runstack!, ref stackpos, charlo
 773                                                        //}
 774
 775                                                        // Match a character in the set [0-9].
 19776                                                        if (slice.IsEmpty || !char.IsAsciiDigit(slice[0]))
 777                                                        {
 778                                                            goto CharLoopBacktrack2;
 779                                                        }
 780
 14781                                                        Utilities.StackPush(ref base.runstack!, ref stackpos, 2, alterna
 14782                                                        pos++;
 14783                                                        slice = inputSpan.Slice(pos);
 14784                                                        goto AlternationMatch1;
 785                                                    //}
 786
 787                                                    AlternationBacktrack1:
 3788                                                    base.CheckTimeout();
 789
 3790                                                    Utilities.StackPop(base.runstack!, ref stackpos, out alternation_sta
 3791                                                    switch (base.runstack![--stackpos])
 792                                                    {
 793                                                        case 0:
 794                                                            goto AlternationBranch1;
 795                                                        case 1:
 796                                                            goto AlternationBranch2;
 797                                                        case 2:
 798                                                            goto CharLoopBacktrack2;
 799                                                    }
 800
 801                                                    AlternationMatch1:;
 802                                                //}
 803
 18804                                                base.Capture(9, capture_starting_pos8, pos);
 805
 18806                                                Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_p
 18807                                                goto CaptureSkipBacktrack4;
 808
 809                                                CaptureBacktrack4:
 3810                                                capture_starting_pos8 = base.runstack![--stackpos];
 3811                                                goto AlternationBacktrack1;
 812
 813                                                CaptureSkipBacktrack4:;
 814                                            //}
 815
 816                                            // Match '.'.
 18817                                            if (slice.IsEmpty || slice[0] != '.')
 818                                            {
 819                                                goto CaptureBacktrack4;
 820                                            }
 821
 18822                                            pos++;
 18823                                            slice = inputSpan.Slice(pos);
 18824                                            base.Capture(8, capture_starting_pos7, pos);
 825
 18826                                            Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos7)
 18827                                            goto CaptureSkipBacktrack5;
 828
 829                                            CaptureBacktrack5:
 3830                                            capture_starting_pos7 = base.runstack![--stackpos];
 3831                                            goto CaptureBacktrack4;
 832
 833                                            CaptureSkipBacktrack5:;
 834                                        //}
 835
 836
 837                                        // The loop has an upper bound of 3. Continue iterating greedily if it hasn't ye
 18838                                        if (loop_iteration3 < 3)
 839                                        {
 12840                                            goto LoopBody3;
 841                                        }
 842                                        goto LoopEnd3;
 843
 844                                        // The loop iteration failed. Put state back to the way it was before the iterat
 845                                        LoopIterationNoMatch3:
 3846                                        if (--loop_iteration3 < 0)
 847                                        {
 848                                            // Unable to match the remainder of the expression after exhausting the loop
 849                                            goto LoopIterationNoMatch;
 850                                        }
 3851                                        pos = base.runstack![--stackpos];
 3852                                        UncaptureUntil(base.runstack![--stackpos]);
 3853                                        slice = inputSpan.Slice(pos);
 3854                                        if (loop_iteration3 == 0)
 855                                        {
 856                                            // No iterations have been matched to backtrack into. Fail the loop.
 857                                            goto LoopIterationNoMatch;
 858                                        }
 859
 2860                                        if (loop_iteration3 < 3)
 861                                        {
 862                                            // All possible iterations have matched, but it's below the required minimum
 863                                            // Backtrack into the prior iteration.
 2864                                            goto CaptureBacktrack5;
 865                                        }
 866
 867                                        goto LoopEnd3;
 868
 869                                        LoopBacktrack3:
 1870                                        base.CheckTimeout();
 871
 1872                                        if (loop_iteration3 == 0)
 873                                        {
 874                                            // No iterations of the loop remain to backtrack into. Fail the loop.
 0875                                            goto LoopIterationNoMatch;
 876                                        }
 877                                        goto CaptureBacktrack5;
 878                                        LoopEnd3:;
 879                                    //}
 880
 881                                    // 10th capture group.
 882                                    //{
 6883                                        capture_starting_pos9 = pos;
 884
 885                                        // Match with 3 alternative expressions.
 886                                        //{
 6887                                            alternation_starting_pos2 = pos;
 6888                                            alternation_starting_capturepos2 = base.Crawlpos();
 889
 890                                            // Branch 0
 891                                            //{
 892                                                // Match '2'.
 6893                                                if (slice.IsEmpty || slice[0] != '2')
 894                                                {
 895                                                    goto AlternationBranch3;
 896                                                }
 897
 898                                                // Match with 2 alternative expressions.
 899                                                //{
 3900                                                    if ((uint)slice.Length < 2)
 901                                                    {
 902                                                        goto AlternationBranch3;
 903                                                    }
 904
 3905                                                    switch (slice[1])
 906                                                    {
 907                                                        case '5':
 908
 909                                                            // Match a character in the set [0-5].
 3910                                                            if ((uint)slice.Length < 3 || !char.IsBetween(slice[2], '0',
 911                                                            {
 912                                                                goto AlternationBranch3;
 913                                                            }
 914
 3915                                                            pos += 3;
 3916                                                            slice = inputSpan.Slice(pos);
 3917                                                            break;
 918
 919                                                        case '0' or '1' or '2' or '3' or '4':
 920
 921                                                            // Match a character in the set [0-9].
 0922                                                            if ((uint)slice.Length < 3 || !char.IsAsciiDigit(slice[2]))
 923                                                            {
 924                                                                goto AlternationBranch3;
 925                                                            }
 926
 0927                                                            pos += 3;
 0928                                                            slice = inputSpan.Slice(pos);
 929                                                            break;
 930
 931                                                        default:
 932                                                            goto AlternationBranch3;
 933                                                    }
 934                                                //}
 935
 3936                                                alternation_branch1 = 0;
 3937                                                goto AlternationMatch2;
 938
 939                                                AlternationBranch3:
 3940                                                pos = alternation_starting_pos2;
 3941                                                slice = inputSpan.Slice(pos);
 3942                                                UncaptureUntil(alternation_starting_capturepos2);
 943                                            //}
 944
 945                                            // Branch 1
 946                                            //{
 3947                                                if ((uint)slice.Length < 3 ||
 3948                                                    slice[0] != '1' || // Match '1'.
 3949                                                    !char.IsAsciiDigit(slice[1]) || // Match a character in the set [0-9
 3950                                                    !char.IsAsciiDigit(slice[2]))
 951                                                {
 952                                                    goto AlternationBranch4;
 953                                                }
 954
 0955                                                alternation_branch1 = 1;
 0956                                                pos += 3;
 0957                                                slice = inputSpan.Slice(pos);
 0958                                                goto AlternationMatch2;
 959
 960                                                AlternationBranch4:
 3961                                                pos = alternation_starting_pos2;
 3962                                                slice = inputSpan.Slice(pos);
 3963                                                UncaptureUntil(alternation_starting_capturepos2);
 964                                            //}
 965
 966                                            // Branch 2
 967                                            //{
 968                                                // Match a character in the set [1-9] greedily, optionally.
 969                                                //{
 3970                                                    charloop_starting_pos3 = pos;
 971
 3972                                                    if (!slice.IsEmpty && char.IsBetween(slice[0], '1', '9'))
 973                                                    {
 3974                                                        slice = slice.Slice(1);
 3975                                                        pos++;
 976                                                    }
 977
 3978                                                    charloop_ending_pos3 = pos;
 3979                                                    goto CharLoopEnd3;
 980
 981                                                    CharLoopBacktrack3:
 4982                                                    UncaptureUntil(charloop_capture_pos1);
 983
 4984                                                    base.CheckTimeout();
 985
 4986                                                    if (charloop_starting_pos3 >= charloop_ending_pos3)
 987                                                    {
 988                                                        goto LoopBacktrack3;
 989                                                    }
 3990                                                    pos = --charloop_ending_pos3;
 3991                                                    slice = inputSpan.Slice(pos);
 992
 993                                                    CharLoopEnd3:
 6994                                                    charloop_capture_pos1 = base.Crawlpos();
 995                                                //}
 996
 997                                                // Match a character in the set [0-9].
 6998                                                if (slice.IsEmpty || !char.IsAsciiDigit(slice[0]))
 999                                                {
 1000                                                    goto CharLoopBacktrack3;
 1001                                                }
 1002
 41003                                                alternation_branch1 = 2;
 41004                                                pos++;
 41005                                                slice = inputSpan.Slice(pos);
 41006                                                goto AlternationMatch2;
 1007                                            //}
 1008
 1009                                            AlternationBacktrack2:
 21010                                            base.CheckTimeout();
 1011
 1012                                            switch (alternation_branch1)
 1013                                            {
 1014                                                case 0:
 1015                                                    goto AlternationBranch3;
 1016                                                case 1:
 1017                                                    goto AlternationBranch4;
 1018                                                case 2:
 1019                                                    goto CharLoopBacktrack3;
 1020                                            }
 1021
 1022                                            AlternationMatch2:;
 1023                                        //}
 1024
 71025                                        base.Capture(10, capture_starting_pos9, pos);
 1026
 1027                                        goto CaptureSkipBacktrack6;
 1028
 1029                                        CaptureBacktrack6:
 1030                                        goto AlternationBacktrack2;
 1031
 1032                                        CaptureSkipBacktrack6:;
 1033                                    //}
 1034
 1035                                    // Match ']'.
 71036                                    if (slice.IsEmpty || slice[0] != ']')
 1037                                    {
 1038                                        goto CaptureBacktrack6;
 1039                                    }
 1040
 51041                                    pos++;
 51042                                    slice = inputSpan.Slice(pos);
 51043                                    base.Capture(7, capture_starting_pos6, pos);
 1044
 1045                                    goto CaptureSkipBacktrack7;
 1046
 1047                                    CaptureBacktrack7:
 1048                                    goto CaptureBacktrack6;
 1049
 1050                                    CaptureSkipBacktrack7:;
 1051                                //}
 1052
 51053                                alternation_branch = 1;
 51054                                goto AlternationMatch;
 1055                            //}
 1056
 1057                            AlternationBacktrack:
 51058                            base.CheckTimeout();
 1059
 1060                            switch (alternation_branch)
 1061                            {
 1062                                case 0:
 1063                                    goto CaptureBacktrack3;
 1064                                case 1:
 1065                                    goto CaptureBacktrack7;
 1066                            }
 1067
 1068                            AlternationMatch:;
 1069                        //}
 1070
 431071                        base.Capture(2, capture_starting_pos1, pos);
 1072
 1073                        goto CaptureSkipBacktrack8;
 1074
 1075                        CaptureBacktrack8:
 1076                        goto AlternationBacktrack;
 1077
 1078                        CaptureSkipBacktrack8:;
 1079                    //}
 1080
 1081                    // Match if at the end of the string.
 431082                    if ((uint)pos < (uint)inputSpan.Length)
 1083                    {
 1084                        goto CaptureBacktrack8;
 1085                    }
 1086
 1087                    // The input matched.
 381088                    base.runtextpos = pos;
 381089                    base.Capture(0, matchStart, pos);
 381090                    return true;
 1091
 1092                    // <summary>Undo captures until it reaches the specified capture position.</summary>
 1093                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1094                    void UncaptureUntil(int capturePosition)
 1095                    {
 12431096                        while (base.Crawlpos() > capturePosition)
 1097                        {
 5091098                            base.Uncapture();
 1099                        }
 7341100                    }
 1101                }
 1102            }
 1103        }
 1104
 1105    }
 1106
 1107    /// <summary>Custom <see cref="Regex"/>-derived type for the HasNumber method.</summary>
 1108    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.37416")]
 1109    file sealed class HasNumber_1 : Regex
 1110    {
 1111        /// <summary>Cached, thread-safe singleton instance.</summary>
 1112        internal static readonly HasNumber_1 Instance = new();
 1113
 1114        /// <summary>Initializes the instance.</summary>
 1115        private HasNumber_1()
 1116        {
 1117            base.pattern = "[0-9]+";
 1118            base.roptions = RegexOptions.None;
 1119            base.internalMatchTimeout = TimeSpan.FromMilliseconds(100);
 1120            base.factory = new RunnerFactory();
 1121            base.capsize = 1;
 1122        }
 1123
 1124        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 1125        private sealed class RunnerFactory : RegexRunnerFactory
 1126        {
 1127            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 1128            protected override RegexRunner CreateInstance() => new Runner();
 1129
 1130            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 1131            private sealed class Runner : RegexRunner
 1132            {
 1133                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 1134                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1135                protected override void Scan(ReadOnlySpan<char> inputSpan)
 1136                {
 1137                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the
 1138                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
 1139                           !TryMatchAtCurrentPosition(inputSpan) &&
 1140                           base.runtextpos != inputSpan.Length)
 1141                    {
 1142                        base.runtextpos++;
 1143                        base.CheckTimeout();
 1144                    }
 1145                }
 1146
 1147                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 1148                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1149                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 1150                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 1151                {
 1152                    int pos = base.runtextpos;
 1153
 1154                    // Empty matches aren't possible.
 1155                    if ((uint)pos < (uint)inputSpan.Length)
 1156                    {
 1157                        // The pattern begins with a character in the set [0-9].
 1158                        // Find the next occurrence. If it can't be found, there's no match.
 1159                        int i = inputSpan.Slice(pos).IndexOfAnyInRange('0', '9');
 1160                        if (i >= 0)
 1161                        {
 1162                            base.runtextpos = pos + i;
 1163                            return true;
 1164                        }
 1165                    }
 1166
 1167                    // No match found.
 1168                    base.runtextpos = inputSpan.Length;
 1169                    return false;
 1170                }
 1171
 1172                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 1173                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1174                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 1175                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 1176                {
 1177                    int pos = base.runtextpos;
 1178                    int matchStart = pos;
 1179                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 1180
 1181                    // Match a character in the set [0-9] atomically at least once.
 1182                    {
 1183                        int iteration = slice.IndexOfAnyExceptInRange('0', '9');
 1184                        if (iteration < 0)
 1185                        {
 1186                            iteration = slice.Length;
 1187                        }
 1188
 1189                        if (iteration == 0)
 1190                        {
 1191                            return false; // The input didn't match.
 1192                        }
 1193
 1194                        slice = slice.Slice(iteration);
 1195                        pos += iteration;
 1196                    }
 1197
 1198                    // The input matched.
 1199                    base.runtextpos = pos;
 1200                    base.Capture(0, matchStart, pos);
 1201                    return true;
 1202                }
 1203            }
 1204        }
 1205
 1206    }
 1207
 1208    /// <summary>Custom <see cref="Regex"/>-derived type for the HasLowerChar method.</summary>
 1209    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.37416")]
 1210    file sealed class HasLowerChar_2 : Regex
 1211    {
 1212        /// <summary>Cached, thread-safe singleton instance.</summary>
 1213        internal static readonly HasLowerChar_2 Instance = new();
 1214
 1215        /// <summary>Initializes the instance.</summary>
 1216        private HasLowerChar_2()
 1217        {
 1218            base.pattern = "[a-z]+";
 1219            base.roptions = RegexOptions.None;
 1220            base.internalMatchTimeout = TimeSpan.FromMilliseconds(100);
 1221            base.factory = new RunnerFactory();
 1222            base.capsize = 1;
 1223        }
 1224
 1225        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 1226        private sealed class RunnerFactory : RegexRunnerFactory
 1227        {
 1228            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 1229            protected override RegexRunner CreateInstance() => new Runner();
 1230
 1231            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 1232            private sealed class Runner : RegexRunner
 1233            {
 1234                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 1235                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1236                protected override void Scan(ReadOnlySpan<char> inputSpan)
 1237                {
 1238                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the
 1239                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
 1240                           !TryMatchAtCurrentPosition(inputSpan) &&
 1241                           base.runtextpos != inputSpan.Length)
 1242                    {
 1243                        base.runtextpos++;
 1244                        base.CheckTimeout();
 1245                    }
 1246                }
 1247
 1248                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 1249                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1250                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 1251                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 1252                {
 1253                    int pos = base.runtextpos;
 1254
 1255                    // Empty matches aren't possible.
 1256                    if ((uint)pos < (uint)inputSpan.Length)
 1257                    {
 1258                        // The pattern begins with a character in the set [a-z].
 1259                        // Find the next occurrence. If it can't be found, there's no match.
 1260                        int i = inputSpan.Slice(pos).IndexOfAnyInRange('a', 'z');
 1261                        if (i >= 0)
 1262                        {
 1263                            base.runtextpos = pos + i;
 1264                            return true;
 1265                        }
 1266                    }
 1267
 1268                    // No match found.
 1269                    base.runtextpos = inputSpan.Length;
 1270                    return false;
 1271                }
 1272
 1273                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 1274                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1275                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 1276                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 1277                {
 1278                    int pos = base.runtextpos;
 1279                    int matchStart = pos;
 1280                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 1281
 1282                    // Match a character in the set [a-z] atomically at least once.
 1283                    {
 1284                        int iteration = slice.IndexOfAnyExceptInRange('a', 'z');
 1285                        if (iteration < 0)
 1286                        {
 1287                            iteration = slice.Length;
 1288                        }
 1289
 1290                        if (iteration == 0)
 1291                        {
 1292                            return false; // The input didn't match.
 1293                        }
 1294
 1295                        slice = slice.Slice(iteration);
 1296                        pos += iteration;
 1297                    }
 1298
 1299                    // The input matched.
 1300                    base.runtextpos = pos;
 1301                    base.Capture(0, matchStart, pos);
 1302                    return true;
 1303                }
 1304            }
 1305        }
 1306
 1307    }
 1308
 1309    /// <summary>Custom <see cref="Regex"/>-derived type for the HasUpperChar method.</summary>
 1310    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.37416")]
 1311    file sealed class HasUpperChar_3 : Regex
 1312    {
 1313        /// <summary>Cached, thread-safe singleton instance.</summary>
 1314        internal static readonly HasUpperChar_3 Instance = new();
 1315
 1316        /// <summary>Initializes the instance.</summary>
 1317        private HasUpperChar_3()
 1318        {
 1319            base.pattern = "[A-Z]+";
 1320            base.roptions = RegexOptions.None;
 1321            base.internalMatchTimeout = TimeSpan.FromMilliseconds(100);
 1322            base.factory = new RunnerFactory();
 1323            base.capsize = 1;
 1324        }
 1325
 1326        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 1327        private sealed class RunnerFactory : RegexRunnerFactory
 1328        {
 1329            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 1330            protected override RegexRunner CreateInstance() => new Runner();
 1331
 1332            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 1333            private sealed class Runner : RegexRunner
 1334            {
 1335                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 1336                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1337                protected override void Scan(ReadOnlySpan<char> inputSpan)
 1338                {
 1339                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the
 1340                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
 1341                           !TryMatchAtCurrentPosition(inputSpan) &&
 1342                           base.runtextpos != inputSpan.Length)
 1343                    {
 1344                        base.runtextpos++;
 1345                        base.CheckTimeout();
 1346                    }
 1347                }
 1348
 1349                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 1350                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1351                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 1352                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 1353                {
 1354                    int pos = base.runtextpos;
 1355
 1356                    // Empty matches aren't possible.
 1357                    if ((uint)pos < (uint)inputSpan.Length)
 1358                    {
 1359                        // The pattern begins with a character in the set [A-Z].
 1360                        // Find the next occurrence. If it can't be found, there's no match.
 1361                        int i = inputSpan.Slice(pos).IndexOfAnyInRange('A', 'Z');
 1362                        if (i >= 0)
 1363                        {
 1364                            base.runtextpos = pos + i;
 1365                            return true;
 1366                        }
 1367                    }
 1368
 1369                    // No match found.
 1370                    base.runtextpos = inputSpan.Length;
 1371                    return false;
 1372                }
 1373
 1374                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 1375                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1376                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 1377                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 1378                {
 1379                    int pos = base.runtextpos;
 1380                    int matchStart = pos;
 1381                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 1382
 1383                    // Match a character in the set [A-Z] atomically at least once.
 1384                    {
 1385                        int iteration = slice.IndexOfAnyExceptInRange('A', 'Z');
 1386                        if (iteration < 0)
 1387                        {
 1388                            iteration = slice.Length;
 1389                        }
 1390
 1391                        if (iteration == 0)
 1392                        {
 1393                            return false; // The input didn't match.
 1394                        }
 1395
 1396                        slice = slice.Slice(iteration);
 1397                        pos += iteration;
 1398                    }
 1399
 1400                    // The input matched.
 1401                    base.runtextpos = pos;
 1402                    base.Capture(0, matchStart, pos);
 1403                    return true;
 1404                }
 1405            }
 1406        }
 1407
 1408    }
 1409
 1410    /// <summary>Custom <see cref="Regex"/>-derived type for the HasNumberLowerAndUpperChar method.</summary>
 1411    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.37416")]
 1412    file sealed class HasNumberLowerAndUpperChar_4 : Regex
 1413    {
 1414        /// <summary>Cached, thread-safe singleton instance.</summary>
 1415        internal static readonly HasNumberLowerAndUpperChar_4 Instance = new();
 1416
 1417        /// <summary>Initializes the instance.</summary>
 1418        private HasNumberLowerAndUpperChar_4()
 1419        {
 1420            base.pattern = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+\\z";
 1421            base.roptions = RegexOptions.None;
 1422            base.internalMatchTimeout = TimeSpan.FromMilliseconds(100);
 1423            base.factory = new RunnerFactory();
 1424            base.capsize = 1;
 1425        }
 1426
 1427        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 1428        private sealed class RunnerFactory : RegexRunnerFactory
 1429        {
 1430            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 1431            protected override RegexRunner CreateInstance() => new Runner();
 1432
 1433            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 1434            private sealed class Runner : RegexRunner
 1435            {
 1436                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 1437                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1438                protected override void Scan(ReadOnlySpan<char> inputSpan)
 1439                {
 1440                    // The pattern is anchored.  Validate the current position and try to match at it only.
 1441                    if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
 1442                    {
 1443                        base.runtextpos = inputSpan.Length;
 1444                    }
 1445                }
 1446
 1447                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 1448                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1449                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 1450                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 1451                {
 1452                    int pos = base.runtextpos;
 1453
 1454                    // Empty matches aren't possible.
 1455                    if ((uint)pos < (uint)inputSpan.Length)
 1456                    {
 1457                        // The pattern leads with a beginning (\A) anchor.
 1458                        if (pos == 0)
 1459                        {
 1460                            return true;
 1461                        }
 1462                    }
 1463
 1464                    // No match found.
 1465                    base.runtextpos = inputSpan.Length;
 1466                    return false;
 1467                }
 1468
 1469                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 1470                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 1471                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 1472                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 1473                {
 1474                    int pos = base.runtextpos;
 1475                    int matchStart = pos;
 1476                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
 1477                    int charloop_starting_pos1 = 0, charloop_ending_pos1 = 0;
 1478                    int charloop_starting_pos2 = 0, charloop_ending_pos2 = 0;
 1479                    int stackpos = 0;
 1480                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 1481
 1482                    // Match if at the beginning of the string.
 1483                    if (pos != 0)
 1484                    {
 1485                        return false; // The input didn't match.
 1486                    }
 1487
 1488                    // Zero-width positive lookahead.
 1489                    {
 1490                        int positivelookahead_starting_pos = pos;
 1491
 1492                        base.CheckTimeout();
 1493
 1494                        int atomic_stackpos = stackpos;
 1495
 1496                        // Match a character other than '\n' greedily any number of times.
 1497                        //{
 1498                            charloop_starting_pos = pos;
 1499
 1500                            int iteration = slice.IndexOf('\n');
 1501                            if (iteration < 0)
 1502                            {
 1503                                iteration = slice.Length;
 1504                            }
 1505
 1506                            slice = slice.Slice(iteration);
 1507                            pos += iteration;
 1508
 1509                            charloop_ending_pos = pos;
 1510                            goto CharLoopEnd;
 1511
 1512                            CharLoopBacktrack:
 1513
 1514                            base.CheckTimeout();
 1515
 1516                            if (charloop_starting_pos >= charloop_ending_pos ||
 1517                                (charloop_ending_pos = inputSpan.Slice(charloop_starting_pos, charloop_ending_pos - char
 1518                            {
 1519                                return false; // The input didn't match.
 1520                            }
 1521                            charloop_ending_pos += charloop_starting_pos;
 1522                            pos = charloop_ending_pos;
 1523                            slice = inputSpan.Slice(pos);
 1524
 1525                            CharLoopEnd:
 1526                        //}
 1527
 1528                        // Match a character in the set [a-z].
 1529                        if (slice.IsEmpty || !char.IsAsciiLetterLower(slice[0]))
 1530                        {
 1531                            goto CharLoopBacktrack;
 1532                        }
 1533
 1534                        stackpos = atomic_stackpos;
 1535
 1536                        pos = positivelookahead_starting_pos;
 1537                        slice = inputSpan.Slice(pos);
 1538                    }
 1539
 1540                    // Zero-width positive lookahead.
 1541                    {
 1542                        int positivelookahead_starting_pos1 = pos;
 1543
 1544                        base.CheckTimeout();
 1545
 1546                        int atomic_stackpos1 = stackpos;
 1547
 1548                        // Match a character other than '\n' greedily any number of times.
 1549                        //{
 1550                            charloop_starting_pos1 = pos;
 1551
 1552                            int iteration1 = slice.IndexOf('\n');
 1553                            if (iteration1 < 0)
 1554                            {
 1555                                iteration1 = slice.Length;
 1556                            }
 1557
 1558                            slice = slice.Slice(iteration1);
 1559                            pos += iteration1;
 1560
 1561                            charloop_ending_pos1 = pos;
 1562                            goto CharLoopEnd1;
 1563
 1564                            CharLoopBacktrack1:
 1565
 1566                            base.CheckTimeout();
 1567
 1568                            if (charloop_starting_pos1 >= charloop_ending_pos1 ||
 1569                                (charloop_ending_pos1 = inputSpan.Slice(charloop_starting_pos1, charloop_ending_pos1 - c
 1570                            {
 1571                                return false; // The input didn't match.
 1572                            }
 1573                            charloop_ending_pos1 += charloop_starting_pos1;
 1574                            pos = charloop_ending_pos1;
 1575                            slice = inputSpan.Slice(pos);
 1576
 1577                            CharLoopEnd1:
 1578                        //}
 1579
 1580                        // Match a character in the set [A-Z].
 1581                        if (slice.IsEmpty || !char.IsAsciiLetterUpper(slice[0]))
 1582                        {
 1583                            goto CharLoopBacktrack1;
 1584                        }
 1585
 1586                        stackpos = atomic_stackpos1;
 1587
 1588                        pos = positivelookahead_starting_pos1;
 1589                        slice = inputSpan.Slice(pos);
 1590                    }
 1591
 1592                    // Zero-width positive lookahead.
 1593                    {
 1594                        int positivelookahead_starting_pos2 = pos;
 1595
 1596                        base.CheckTimeout();
 1597
 1598                        int atomic_stackpos2 = stackpos;
 1599
 1600                        // Match a character other than '\n' greedily any number of times.
 1601                        //{
 1602                            charloop_starting_pos2 = pos;
 1603
 1604                            int iteration2 = slice.IndexOf('\n');
 1605                            if (iteration2 < 0)
 1606                            {
 1607                                iteration2 = slice.Length;
 1608                            }
 1609
 1610                            slice = slice.Slice(iteration2);
 1611                            pos += iteration2;
 1612
 1613                            charloop_ending_pos2 = pos;
 1614                            goto CharLoopEnd2;
 1615
 1616                            CharLoopBacktrack2:
 1617
 1618                            base.CheckTimeout();
 1619
 1620                            if (charloop_starting_pos2 >= charloop_ending_pos2)
 1621                            {
 1622                                return false; // The input didn't match.
 1623                            }
 1624                            pos = --charloop_ending_pos2;
 1625                            slice = inputSpan.Slice(pos);
 1626
 1627                            CharLoopEnd2:
 1628                        //}
 1629
 1630                        // Match a Unicode digit.
 1631                        if (slice.IsEmpty || !char.IsDigit(slice[0]))
 1632                        {
 1633                            goto CharLoopBacktrack2;
 1634                        }
 1635
 1636                        stackpos = atomic_stackpos2;
 1637
 1638                        pos = positivelookahead_starting_pos2;
 1639                        slice = inputSpan.Slice(pos);
 1640                    }
 1641
 1642                    // Match a character other than '\n' atomically at least once.
 1643                    {
 1644                        int iteration3 = slice.IndexOf('\n');
 1645                        if (iteration3 < 0)
 1646                        {
 1647                            iteration3 = slice.Length;
 1648                        }
 1649
 1650                        if (iteration3 == 0)
 1651                        {
 1652                            return false; // The input didn't match.
 1653                        }
 1654
 1655                        slice = slice.Slice(iteration3);
 1656                        pos += iteration3;
 1657                    }
 1658
 1659                    // Match if at the end of the string.
 1660                    if ((uint)pos < (uint)inputSpan.Length)
 1661                    {
 1662                        return false; // The input didn't match.
 1663                    }
 1664
 1665                    // The input matched.
 1666                    base.runtextpos = pos;
 1667                    base.Capture(0, matchStart, pos);
 1668                    return true;
 1669                }
 1670            }
 1671        }
 1672
 1673    }
 1674
 1675    /// <summary>Helper methods used by generated <see cref="Regex"/>-derived implementations.</summary>
 1676    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.37416")]
 1677    file static class Utilities
 1678    {
 1679        /// <summary>Pops 2 values from the backtracking stack.</summary>
 1680        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1681        internal static void StackPop(int[] stack, ref int pos, out int arg0, out int arg1)
 1682        {
 1683            arg0 = stack[--pos];
 1684            arg1 = stack[--pos];
 1685        }
 1686
 1687        /// <summary>Pushes 1 value onto the backtracking stack.</summary>
 1688        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1689        internal static void StackPush(ref int[] stack, ref int pos, int arg0)
 1690        {
 1691            // If there's space available for the value, store it.
 1692            int[] s = stack;
 1693            int p = pos;
 1694            if ((uint)p < (uint)s.Length)
 1695            {
 1696                s[p] = arg0;
 1697                pos++;
 1698                return;
 1699            }
 1700
 1701            // Otherwise, resize the stack to make room and try again.
 1702            WithResize(ref stack, ref pos, arg0);
 1703
 1704            // <summary>Resize the backtracking stack array and push 1 value onto the stack.</summary>
 1705            [MethodImpl(MethodImplOptions.NoInlining)]
 1706            static void WithResize(ref int[] stack, ref int pos, int arg0)
 1707            {
 1708                Array.Resize(ref stack, (pos + 0) * 2);
 1709                StackPush(ref stack, ref pos, arg0);
 1710            }
 1711        }
 1712
 1713        /// <summary>Pushes 2 values onto the backtracking stack.</summary>
 1714        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1715        internal static void StackPush(ref int[] stack, ref int pos, int arg0, int arg1)
 1716        {
 1717            // If there's space available for all 2 values, store them.
 1718            int[] s = stack;
 1719            int p = pos;
 1720            if ((uint)(p + 1) < (uint)s.Length)
 1721            {
 1722                s[p] = arg0;
 1723                s[p + 1] = arg1;
 1724                pos += 2;
 1725                return;
 1726            }
 1727
 1728            // Otherwise, resize the stack to make room and try again.
 1729            WithResize(ref stack, ref pos, arg0, arg1);
 1730
 1731            // <summary>Resize the backtracking stack array and push 2 values onto the stack.</summary>
 1732            [MethodImpl(MethodImplOptions.NoInlining)]
 1733            static void WithResize(ref int[] stack, ref int pos, int arg0, int arg1)
 1734            {
 1735                Array.Resize(ref stack, (pos + 1) * 2);
 1736                StackPush(ref stack, ref pos, arg0, arg1);
 1737            }
 1738        }
 1739
 1740        /// <summary>Pushes 3 values onto the backtracking stack.</summary>
 1741        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1742        internal static void StackPush(ref int[] stack, ref int pos, int arg0, int arg1, int arg2)
 1743        {
 1744            // If there's space available for all 3 values, store them.
 1745            int[] s = stack;
 1746            int p = pos;
 1747            if ((uint)(p + 2) < (uint)s.Length)
 1748            {
 1749                s[p] = arg0;
 1750                s[p + 1] = arg1;
 1751                s[p + 2] = arg2;
 1752                pos += 3;
 1753                return;
 1754            }
 1755
 1756            // Otherwise, resize the stack to make room and try again.
 1757            WithResize(ref stack, ref pos, arg0, arg1, arg2);
 1758
 1759            // <summary>Resize the backtracking stack array and push 3 values onto the stack.</summary>
 1760            [MethodImpl(MethodImplOptions.NoInlining)]
 1761            static void WithResize(ref int[] stack, ref int pos, int arg0, int arg1, int arg2)
 1762            {
 1763                Array.Resize(ref stack, (pos + 2) * 2);
 1764                StackPush(ref stack, ref pos, arg0, arg1, arg2);
 1765            }
 1766        }
 1767
 1768        /// <summary>Supports searching for characters in or not in "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno
 1769        internal static readonly SearchValues<char> s_asciiLettersAndDigits = SearchValues.Create("0123456789ABCDEFGHIJK
 1770
 1771        /// <summary>Supports searching for characters in or not in "!#$%&amp;'*+-/0123456789=?ABCDEFGHIJKLMNOPQRSTUVWXY
 1772        internal static readonly SearchValues<char> s_ascii_FAACFFA3FEFFFFC7FFFFFF7F = SearchValues.Create("!#$%&'*+-/01
 1773    }
 1774}