### Summary

When using ansible-test network-integration command, no matching target is found if the target-prefixes.network file is referencing a target containing an underscore.

### Issue Type

Bug Report

### Component Name

ansible-test

### Ansible Version

```console
ansible --version
ansible [core 2.13.5.post0] (stable-2.13 b44cb7aa99) last updated 2022/10/23 22:23:42 (GMT +200)
  config file = None
  configured module search path = ['/home/warkdev/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/warkdev/ansible/lib/ansible
  ansible collection location = /home/warkdev/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/warkdev/ansible/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
  jinja version = 3.1.2
  libyaml = True
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```


### OS / Environment

Linux ansible-dev 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux

### Steps to Reproduce

- Create a simple collection with a very simple integration test case.
- Add a target, as a_b_facts to test the corresponding module.
- Add a dummy network inventory (won't be used).
- Add the following target-prefixes.network file:

```
a_b
```

Try to run the following command:

```
ansible-test network-integration --inventory inventory.networking a_b_.*
```

Notice that the target isn't detected as a network target since the code is expecting only "a" as prefix for a network target.

The suspicious line is located here: https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_internal/target.py#L627

### Expected Results

Matching test starting by network prefix a_b should be running

### Actual Results

```console
ansible-test network-integration --inventory inventory.networking a_b_.* -vvv
RLIMIT_NOFILE: (1024, 1048576)
Falling back to tests in "tests/integration/targets/" because "roles/test/" was not found.
FATAL: Target pattern not matched: a_b_.*
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
groups.append(group)
        if self.name.startswith('win_'):
            groups.append('windows')
        if self.name.startswith('connection_'):
            groups.append('connection')
        if self.name.startswith('setup_') or self.name.startswith('prepare_'):
            groups.append('hidden')
        if self.type not in ('script', 'role'):
            groups.append('hidden')
        targets_relative_path = data_context().content.integration_targets_path
        
        self.skips = tuple(g for g in groups if g.startswith('skip/'))
        
        
        self.needs_file = tuple(sorted(set('/'.join(g.split('/')[2:]) for g in groups if
                                           g.startswith('needs/file/') and not g.startswith('needs/file/%s/' % targets_relative_path))))
        
        networks = [g.split('/')[1] for g in groups if g.startswith('network/')]
        self.network_platform = networks[0] if networks else None
        for group in itertools.islice(groups, 0, len(groups)):
            if '/' in group:
                parts = group.split('/')
                for i in range(1, len(parts)):
                    groups.append('/'.join(parts[:i]))
        if not any(g in self.non_posix for g in groups):
            groups.append('posix')
        
        
        force_target = any(group in self.non_posix for group in groups)
        target_type, actual_type = categorize_integration_test(self.name, list(static_aliases), force_target)