Repository: flutter
Issue: [go_router] path parameters regex can't use grouping
Labels: package,has reproducible steps,P2,p: go_router,found in release: 3.3,found in release: 3.7,team-go_router,triaged-go_router

## Steps to Reproduce
Declare a `GoRoute` with a path like this:

```
/details/:id((FOO|BAR)[0-9a-zA-Z]{10})
```

**Expected results:**
The following values for `id` should both match:
`FOO1234567890`
`BAR1234567890`

**Actual results:**
The route path doesn't match, and the app goes to the "Page not found" route.

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

void main() => runApp(const MyApp());

/// The route configuration.
final GoRouter _router = GoRouter(
  debugLogDiagnostics: true,
  routes: <RouteBase>[
    GoRoute(
      path: '/',
      builder: (_, __) => const HomeScreen(),
    ),
    GoRoute(
      path: '/details/:id((FOO|BAR)[0-9a-zA-Z]{10})',
      builder: (_, state) => DetailsScreen(state.params["id"]!),
    ),
  ],
);

/// The main app.
class MyApp extends StatelessWidget {
  /// Constructs a [MyApp]
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routerConfig: _router,
    );
  }
}

/// The home screen
class HomeScreen extends StatelessWidget {
  /// Constructs a [HomeScreen]
  const HomeScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Home Screen')),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              onPressed: () => context.push('/details/FOO1234567890'),
              child: const Text('FOO1234567890'),
            ),
            ElevatedButton(
              onPressed: () => context.push('/details/BAR1234567890'),
              child: const Text('BAR1234567890'),
            ),
          ],
        ),
      ),
    );
  }
}

/// The details screen
class DetailsScreen extends StatelessWidget {
  final String id;

  /// Constructs a [DetailsScreen]
  const DetailsScreen(this.id, {super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Details Screen')),
      body: Center(
        child: Text("Id is:\n $id"),
      ),
    );
  }
}

```

</details>

<details>
  <summary>Logs</summary>


```
[GoRouter] Full paths for routes:
             => /
             => /details/:id((FOO|BAR)[0-9a-zA-Z]{10})
[GoRouter] setting initial location null
[GoRouter] Using MaterialApp configuration
[GoRouter] pushing /details/FOO1234567890
[GoRouter] No initial matches: /details/FOO1234567890
[GoRouter] going to /
[GoRouter] pushing /details/BAR1234567890
[GoRouter] No initial matches: /details/BAR1234567890
```

```
flutter analyze
Analyzing bug...                                                        
No issues found! (ran in 1.2s)
```

```
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.9, on macOS 13.0 22A380 darwin-arm, locale it-IT)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.74.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!
```

</details>