I’m working on a regex to match this set of numbers:

```
xxxx xxx xxxx
01 xxx xxxx
+234 1 xxx xxxx
xxxx-xxx-xxxx
xxxxxxxxxxx
234 xxx xxx xxxx
234(xxx)xxx-xxxx
234(xxx)xxx xxxx
+234(xxx)xxx xxxx
+234(xxx) xxx xxxx
+234(xxx)xxx-xxxx
234xxxxxxxxxx
+234xxxxxxxxxx

```

The rules are:

* At most 11 digits long (any number combo, excluding the static parts)
* Optional (234) or (+234)
* Optional 1 or 01 or 234 1
* Optional bracketing as specified above.

It’s to validate the Nigerian phone numbering system. I have searched far and wide and haven’t seen any good solutions so far.

I have this expression:

```
/^(\+)?234[0-9]*?.*/gm

```

but it doesn’t match the ones without (234) properly.

Specifically:

```
xxxx xxx xxxx
01 xxx xxxx
xxxx-xxx-xxxx
xxxxxxxxxxx

```

How can I make this work? I’m kinda new to regex, would appreciate any assistance I can get.

[Demo](https://regex101.com/r/1099Nr/1)