So I separated a statement using regular expressions into 3 groups.

Group 1: My dog likes to go for a walk, My cat likes to go for a swim, My turtle likes to go for a nap.

Group 2: (.\*) words between "my" and "likes"

Group 3: (.\*) last three words after "for a"

```
#original statement
$p = "My dog likes to go for a walk
    My cat likes to go for a swim
    My turtle likes to go for a nap"

#regular expression used
$p =~ /((^My (.*) likes to go for a(.*)))/gm);

```

Array 1: ["My dog likes to go for a walk", "My cat likes to go for a swim", "My turtle likes to go for a nap"]

Array 2: ["dog", "cat", "turtle"]

Array 3: ["walk", "nap", "swim"]

Need help putting each group into these respective arrays