currently I am very confused! I have been trying to solve this for a while, and can't seem to crack it. I can't even find an answer on Google.

Currently I am using this Regex I wrote in Javascript:

```
((?: {4,}|\t+)(?:.*))

```

Simply, it matches everything that is 4+ spaces out or 1+ tabs out in a textarea. Yea, that sounds familiar you say? It is simply what Stack Overflow does for codeblocks. Now, I have run in to an issue.

Basically I am wanting to replace all of these instances found in the textarea, but first I want to back them up to an array. Now, I am not sure how I grab each match found, and insert it in to the array.

Here is what I have so far:

```
.replace(/((?: {4,}|\t+)(?:.*))/gi, function (m, g1, g2) {
    return //STUCK HERE
}); //Matches Bold

```

So simply, I just want to grab all matches found in a textarea (Either indented or 4 spaces) and then I would like to add the contents of the match to an array.
How would I go about doing this? Please Help!