Publicado Mon, 21 Jan 2019 14:41:04 GMT por Phi Quan - left 09.2021 IT Manager

Hi all,

 

after studiyng the documantation regarding filedmasks, I am stuck and would like to ask the forum.

I would like to create a fieldmask for invoicenumbers. The mask should only accept numbers and alphanumeric AND only - (Character minus) as separators, no space, no underscore or other characters. The entry could be something between 1 and 100 characters. Minus is allowed no time, one time or multiple times. Any ideas?

 

e.g.

These should be valid data:

RE-1234-56-789-0

123-AB-12-INV

123456789

ABCDE

2019-01-19-ABCD

Publicado Mon, 21 Jan 2019 14:51:00 GMT por Gerardo Lisanti Team Leader Product Management

Hi Phi,

should look like this:
^[a-zA-Z\d-]{1,100}

Giv it a try here: https://regex101.com/r/hvTzI7/1

 

Viele Grüße / With best regards,

Gerardo Lisanti
Manager Product

Publicado Mon, 21 Jan 2019 15:09:38 GMT por Joe Kaufman Bell Laboratories Inc No longer there

Phi,

I got this to work, similar to what Gerardo lists (but does not allow lowercase letters):

^[A-Z0-9\-]{1,100}$

 

Thanks,

Joe Kaufman

 

Publicado Fri, 25 Jan 2019 08:11:14 GMT por Phi Quan - left 09.2021 IT Manager

Thanks guys for your great help, appreciate this.

I will try to implement this and will report. Cheers!

Publicado Sat, 26 Jan 2019 08:42:23 GMT por Phi Quan - left 09.2021 IT Manager

Hi Gerardo, 

thank you for the link, I think this might help for other fieldmasks we are still working on. Great tool!

Joe, thank you very much for you contribution aswell.

Works for us

You must be signed in to post in this forum.