Question: I am trying to match a string that has the form:

```
abcd:vxyz

```

That is: 4 chars followed by a colon then followed by three (or maximum) 4 chars.

I want to do case INSENSITIVE matches.

Can anyone help with the pattern?

Answer: 
Your example was alphabetical, but it was unclear if your desired regex should be limited to that. If you wanted to match *any* characters in those groups:

```
/^.{4}:.{3,4}$/i

```
Another non-regex way to do this would be to `split()` on the colon. Check for length 4 on the first element, and length 3 or 4 on the second element.

```
var foo = 'abcd:123a';
var bar = 'fds:0';

var af = foo.split(':');
var isMatch = ((af[0].length==4) && (af[1].length==3 || af[1].length==4));
alert (isMatch);

var ab = bar.split(':');
alert ((ab[0].length==4) && (ab[1].length==3 || ab[1].length==4));

```