Publicado Wed, 08 Jul 2020 20:05:35 GMT por Steve Shriver Application Specialist
Has anyone ever created a field mask that will allow any characters but limit the entry?

A customer wants to allow only 20 characters in a text field. But it's a cloud system so there is no changing the DB itself.

I thought I had the expression right for any letter, digit, hyphen or space but now '/' and commas are required. Is there a wild card in RegEx?

Any clues appreciated,
Publicado Thu, 09 Jul 2020 13:08:48 GMT por Josef Zayats
Steve, try this for length of 20
[\s\S]{20}
or this for range of lengths
[\s\S]{19,21}
Publicado Thu, 09 Jul 2020 13:09:22 GMT por Steve Shriver Application Specialist
In case anyone is interested. This field mask will allow any character, 0 to 20 times. \s is white space and \S is non-white space.
[\s\S]{0,20}
Publicado Thu, 09 Jul 2020 13:10:48 GMT por Steve Shriver Application Specialist

Josef, you're right of course. 

Thanks,

You must be signed in to post in this forum.