I've looked around for solutions to my problem but I cannot see what part of my regex expression is invalid (javascript says that I have an invalid group). I imagine that I am using something which isn't support by javascript's regex engine?

I'm trying to validate US phone numbers like the following:

```
555-555-5555
(555)555-5555
(555) 555-5555
555 555 5555
5555555555
1 555 555 5555

```

And my expression for validations is:

```
1?[\s-]?\(?(\d{3})\)?[\s-]?(\d{3})[\s-]?(\d{4})

```

Any tips?