It has come to my attention that I need to come up with a form that allows the user to designate a format for some string field entries. The format can be darn near anything. Essentially, the user will have to be able to set such things as:
1) Max length.
2) Min length.
3) Format such as NNN-CCCC (where N is a number and C is a character)
4) Indicate hyphens, spaces, or some other character as the separator.
5) And so on.
It looks to me that this could all be turned into a RegEx string, but I sure don't expect or desire that the users of this form deal with RegEx in any way.
I have several uses for this in my current project, and it seems so generic that I would expect that others have done it. Before I set out to build such a thing, it occurred to me that somebody has probably already done something like this, so I figured I'd ask whether anybody has something they'd like to share?
1) Max length.
2) Min length.
3) Format such as NNN-CCCC (where N is a number and C is a character)
4) Indicate hyphens, spaces, or some other character as the separator.
5) And so on.
It looks to me that this could all be turned into a RegEx string, but I sure don't expect or desire that the users of this form deal with RegEx in any way.
I have several uses for this in my current project, and it seems so generic that I would expect that others have done it. Before I set out to build such a thing, it occurred to me that somebody has probably already done something like this, so I figured I'd ask whether anybody has something they'd like to share?