News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Custom profile field input mask regex help

Started by TurtleKicker, February 21, 2019, 11:32:12 PM

Previous topic - Next topic

TurtleKicker

Ok, I suck at this regex stuff. Can't wrap my head around how to do what I want based upon the resources I've found.

Goal: input field with text in the format nnnn-nnnn-nnnn
So 3 sets of 4 numeric digits, separated by 2 hyphens.

Something like: ~[0-9]{4}-[0-9]{4}-[0-9]{4}~

Is that right?

Arantor

Holder of controversial views, all of which my own.


Advertisement: