Regex Tweek to recognize 4

I wrote a regex script to recognize digits within round bracket so that the round brackets can be changed to square.

what i want is that it only grabs it if its a total of 4 digits (numbers) no more and no less... this is as far as i got...what needs to be added?

It currently grabs the brackets if the 1st position inside the brackets is a number...

(.+)(([0-9].+?))(.*)
$1[$2]$3

actually i got a little further ..now it will grab it if its 4 numbers and not if its 5 but it still grabs it if its less than 4

(.+)(([0-9]{4}?))(.*)

blah ignore this whole stupid post i solved it ugg

(.+)(([0-9]{4}))(.*)