No announcement yet.

grid mask telefon

  • Filter
  • Time
  • Show
Clear All
new posts

  • grid mask telefon


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

    +49 muss nicht sein.


    (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.


    hab ich keine lösung für.

  • #2
    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})?)$
    '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.
    +49(89)123456 | 089-1234-5678 | (089)1234-5678
    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:
    Last edited by aducom; 11-07-2013, 10:04 AM.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /


    • #3
      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



      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.


      • #4
        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 site. I hate the regexp because it's very beautiful, but also very complex. That's why I always refer to this site.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development /