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. General Programming
  3. C#
  4. looking for regex format

looking for regex format

Scheduled Pinned Locked Moved C#
regexhelp
4 Posts 4 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.
  • G Offline
    G Offline
    Gali1978
    wrote on last edited by
    #1

    looking for help with regex format i need only numbers with this format: 05######## 0######## and 05#-####### 0#-#######

    L P OriginalGriffO 3 Replies Last reply
    0
    • G Gali1978

      looking for help with regex format i need only numbers with this format: 05######## 0######## and 05#-####### 0#-#######

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      wouldnt that be something like: ^05[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$ ^0[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$ ^05[0-9]-[0-9][0-9][0-9][0-9][0-9][0-9][0-9]$ ^0[0-9]-[0-9][0-9][0-9][0-9][0-9][0-9][0-9]$ i think :)

      "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

      1 Reply Last reply
      0
      • G Gali1978

        looking for help with regex format i need only numbers with this format: 05######## 0######## and 05#-####### 0#-#######

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        (We have a Regular Expression forum.) How about: 05?\d-?\d{7}

        1 Reply Last reply
        0
        • G Gali1978

          looking for help with regex format i need only numbers with this format: 05######## 0######## and 05#-####### 0#-#######

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          PIEBALDconsult has given you the answer, but he is also correct: there is a regex forum[^] which is more appropriate. If you are going to use regexes in future (or you want to understand the one PIEBALDconsult gave you), get a copy of Expresso [^] - it's free, and it examines and generates Regular expressions.

          Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          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