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: 
<http://xenon.stanford.edu/~xusch/regexp/analyzer.html> is a simple regex analyzer (among many others). Since its not linkable, here is just a screenshot and the [link](http://xenon.stanford.edu/~xusch/regexp/analyzer.html?regex=facebox%5C%5B%3F%5C.%28%5Cw+%29%5C%5D%3F&env=env_js):

![enter image description here](https://i.stack.imgur.com/Vd5oa.png)
`/facebox\[?\.(\w+)\]?/`

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