Question: <https://www.myregextester.com/?r=6fba8b94>

Regex is

```
(\w(s)\b)

```

Sample Word

```
Dress

```

* \1 returns "Dress"
* \2 returns "Dres"

So I figured:

* \1 \2 would return "Dress Dres"

But it returns:

```
"Dress s"

```

How can I make it return "Dress Dres"

Answer: 
First, use a `+` quantifier with `\w` to match 1 or more word characters (you only match 1 with `\w`). That is why you get just `s` and `s` (see [your regex in action](https://regex101.com/r/vD7aN7/1) capturing `ss` as Group 1 and `s` as Group 2).

And use:

```
(\w+)s\b

```

With `\0 \1` replacement where `\0` backreferences the whole match, and the `\1` backreferences what was captured with `(\w+)`. See [demo here](https://regex101.com/r/bX5dC1/1).

Or, if it is Perl, use `((\w+)s)\b` and replace with `\1 \2` (see [demo](https://regex101.com/r/bX5dC1/2)).

See [demo](https://regex101.com/r/bX5dC1/1)
You're misreading something in that regex tester. In reality, `\1` is equal to `ss` and `\2` is equal to `s`. This is because you are only matching two characters, `\w` and `s`. Even if you added a 1+ quantifier to the `\w` (i.e. `(\w+(s)\b)`), you'd still just match `Dress` and `s`, since the second capture group is literally just capturing the `s`.

---

If you move those capture groups around a bit, you can successfully capture "Dress" and "Dres". A quick side note, you can get the entire regex match with `\0` so the nested capture groups are somewhat unnecessary here.

***Match:*** `(\w+)s\b`

***Replace:*** `\0 \1`

[***Output:***](https://regex101.com/r/jT5zG0/1) Dress Dres