Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Regular Expression

Regular Expression

Scheduled Pinned Locked Moved Web Development
regexquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wmostafaw
    wrote on last edited by
    #1

    Dear All, how can I prvent user from entering specific pattern such as "1111" , "5555" and "123456789" , usin regular expression control. In other word I don't want user to repeat the number 4 or 5 times in input box. Ex: 1111 wrong 5555 wrong 1246 right Thanks for reply...

    G H 2 Replies Last reply
    0
    • W wmostafaw

      Dear All, how can I prvent user from entering specific pattern such as "1111" , "5555" and "123456789" , usin regular expression control. In other word I don't want user to repeat the number 4 or 5 times in input box. Ex: 1111 wrong 5555 wrong 1246 right Thanks for reply...

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      (?:(?\d)(?=\k)){3,} This expression is true when it finds a number that is repeated at least 3 times. The number 1111329 contains the number one which is repeated 3 times. The above expression will not evaluate 111329 to have a match. I have not tested this expression by the way. George

      1 Reply Last reply
      0
      • W wmostafaw

        Dear All, how can I prvent user from entering specific pattern such as "1111" , "5555" and "123456789" , usin regular expression control. In other word I don't want user to repeat the number 4 or 5 times in input box. Ex: 1111 wrong 5555 wrong 1246 right Thanks for reply...

        H Offline
        H Offline
        hiral_shah
        wrote on last edited by
        #3

        Hi take a look of following link may you will get what you want, :) http://www.delorie.com/gnu/docs/emacs/emacs_97.html[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups