I have a credit card number text box which i want it to automatically insert spaces every 4 digits as the user types in the credit card number. how can i achieve that(in an elegant way if there is)? i am thinking if regular expressions can achieve it?