Start a new topic

Regex To Validate Model/Part Numbers

|\b((?=[A-Za-z/ -]{0,19}\d)[A-Za-z0-9/ -]{4,20})\b

It looks for a 4 to 20 chars string composed of [A-Za-z0-9/ -] chars and this string must be "on its own" (\b stands for word boundary)

1 Comment

Of course this isn't perfect (what is ...?). Attached a sample glossary for non-translatables and a test document. Have fun with it!

(555 Bytes)
Login to post a comment