grid mask telefon

huhu,

hat jemand eine funktionierende grid mask f?r deutsche telefonnummern gefunden? ich brech mir da grad einen bei ab.

+49 muss nicht sein.

aber:

(999)999999999 bis (999999)9999999999 kann richtig sein - aber wie?

meine bisher beste l?sung ist eine ohne “;”

999 9 9 999 999 999 999

das macht die vorwahl entweder dreistellig oder vier oder f?nfstellig mit abtrennung. aber man kann nicht erkennen, wo die vorwahl aufh?rt.

(999)
(9999)
(99999)
(999999)

hab ich keine l?sung f?r.

You could use a regexp like:

^(((((((00|+)49[ -/]?)|0)[1-9][0-9]{1,4})[ -/]?)|((((00|+)49()|(0)[1-9][0-9]{1,4})[ -/]?))[0-9]{1,7}([ -/]?[0-9]{1,5})?)$
Description
‘Deutsche Telefonnummern’ Matches German phone and fax numbers (including cell phone numbers) in various formats like: 004989123456, +49 89 123456, +49(89)123456, 089-1234-5678, 089 1234 5678, (089)1234-5678 Max. number of digits is 21.
Matches
+49(89)123456 | 089-1234-5678 | (089)1234-5678
Non-Matches
0049089123456 | 0172.55555

This is code from the internet, you need to get rid of the first part if you don’t need the +49
Is this helpful? Perhaps there are alternatives on the site I got it from:

www.regexlib.com

thank you. but no, this isnt helpful, because thats excactly, was my problem ist: there is no option in SC to setup something like “as many as you like” between strict rules like there is in your example.
here we have: “9” is a number. “99” are two numbers.

you cant say - as far as i see it - something like

AA ( (9) OR (99) OR (999) ) AA

for

a(9)a
a(34)b
r(384)g

you are districted to one or two or three. am i wrong?

the regex you wrote isnt compatible as far as i understand the manual. i DID something like that, but in “on change” event in ajax. my phrase wsnt as complex as yours, but the idea was the same.
but in grid mask - where the input is formated right when the user tipps onto the key - there is no such possibility.

No, that’s why I was refering to a regexp and use (again) the ajax stuff. I never used the format string. I didn’t write the mask, you can search for it on regex.com site. I hate the regexp because it’s very beautiful, but also very complex. That’s why I always refer to this site.

Testing…