Question: I thought this regex was about turning words into an array, but I get null as a result

when I want to get the second word from "facebox otherword" with array[0]

This is the regex:

```
this.rel.match(/facebox\[?\.(\w+)\]?/)

```

Thanks Richard

Answer: 
Your regex matches:

facebox.abc  

facebox[.abc  

facebox[.abc]  

facebox.abc] 

with `abc` being at least one "word character" (letters, digits, and underscores).
`/facebox\[?\.(\w+)\]?/`

* matches `facebox` literal
* then optionally match `[`
* then match `.`
* then match any word
* then optionally match `]`