I have the following string:

```
$str = "A string".

```

When I use:

```
preg_match("/A string/", $str)

```

I get the match everything works perfectly fine, but I want to use the same regular expression for another string:

```
$str2 = "A test string".

```

For this case I can use:

```
"/A (test  )?string/"

```

But I want it to be more complex, it should also be able to match strings like this, for example:

```
A st**test** ring
**test** A string

```

I mean that the substring "test " can appear anywhere in the subject.

Is it even possible to find a regular expression for this?