Repository: flutter
Issue: [go_router] Illegal RegExp pattern exception when query parameter contains colon followed by number
Labels: c: crash,package,has reproducible steps,P2,p: go_router,found in release: 3.3,found in release: 3.4,team-go_router,triaged-go_router

When path is not empty (is not only root) and query parameter contains colon followed by number, `go_router` throws an exception `Illegal RegExp pattern`.

## Steps to Reproduce

1. run the provided code sample
2. open route below

This route throws: `/home?test=something:1`
This one too: `/home?test=:1`

Root path is ok: `/?test=something:1` (colon gets encoded to `%3A`)
Colon followed by letter is also ok: `/home?test=something:a` (again `%3A`)

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

void main() => runApp(App());

class App extends StatelessWidget {
  App({super.key});

  late final _router = GoRouter(
    routes: [
      GoRoute(
        path: '/',
        builder: (context, state) => const SizedBox(),
      ),
    ],
  );

  @override
  Widget build(BuildContext context) => MaterialApp.router(
    routeInformationProvider: _router.routeInformationProvider,
    routeInformationParser: _router.routeInformationParser,
    routerDelegate: _router.routerDelegate,
  );
}
```

</details>

<details>
  <summary>Logs</summary>

```
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following FormatException was thrown while dispatching notifications for
GoRouteInformationProvider:
Illegal RegExp pattern: ^/home\?test=something(?<1>[^/]+)(?=/|$), SyntaxError: Invalid regular expression: /^/home\?test=something(?<1>[^/]+)(?=/|$)/: Invalid capture group name
When the exception was thrown, this was the stack:
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49  throw_
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/regexp_helper.dart 115:5        makeNative
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/regexp_helper.dart 59:30        new
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 748:7             new
packages/go_router/src/path_utils.dart 47:10                                                                               patternToRegExp
packages/go_router/src/route.dart 32:15                                                                                    new
packages/go_router/src/parser.dart 119:16                                                                                  [_errorScreen]
packages/go_router/src/parser.dart 75:50                                                                                   parseRouteInformation
packages/flutter/src/widgets/router.dart 1213:12                                                                           parseRouteInformationWithDependencies
packages/flutter/src/widgets/router.dart 706:12                                                                            [_processRouteInformation]
packages/flutter/src/widgets/router.dart 726:5                                                                             [_handleRouteInformationProviderNotification]
packages/flutter/src/foundation/change_notifier.dart 351:24                                                                notifyListeners
packages/go_router/src/information_provider.dart 70:5                                                                      [_platformReportsNewRouteInformation]
packages/go_router/src/information_provider.dart 102:5                                                                     didPushRouteInformation
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54            runBody
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5            _async
packages/go_router/src/information_provider.dart 99:39                                                                     didPushRouteInformation
packages/flutter/src/widgets/binding.dart 664:23                                                                           _handlePushRouteInformation
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50            <fn>
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1653:54                                          runUnary
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 147:18                                    handleValue
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 766:44                                    handleValueCallback
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 795:13                                    _propagateToListeners
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 566:5                                     [_completeWithValue]
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/future_impl.dart 639:7                                     callback
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/schedule_microtask.dart 40:11                              _microtaskLoop
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/schedule_microtask.dart 49:5                               _startMicrotaskLoop
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 166:15           <fn>
The GoRouteInformationProvider sending notification was:
  Instance of 'GoRouteInformationProvider'
════════════════════════════════════════════════════════════════════════════════════════════════════
```

```
flutter doctor -v
[✓] Flutter (Channel stable, 3.3.0, on Microsoft Windows [Version 10.0.22000.856], locale en-GB)
    • Flutter version 3.3.0 on channel stable at C:\Users\husar\AppData\Local\Flutter\Sdk\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffccd96b62 (12 days ago), 2022-08-29 17:28:57 -0700
    • Engine revision 5e9e0e0aa8
    • Dart version 2.18.0
    • DevTools version 2.15.0

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\husar\AppData\Local\Android\sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Preview
    • Visual Studio Community 2022 version 17.2.32630.192
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code, 64-bit edition (version 1.69.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.19.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.856]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 105.0.5195.102
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 103.0.1264.77

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
```

</details>