+ Reply to Thread
Results 1 to 2 of 2

Thread: Validate string format

  1. #1
    Junior Member
    Join Date
    May 2012

    Validate string format

    I have string with that format : XXXX-XX-XXX-XXXX-XXXXXXXXXX-X where X is integer or text , but two points are required for valid string :
    1) string must starts and ends with an integer
    2) contains only integers separated by dashes

    I am newbie on Regex , so i would prefer if you could give me the Regex format and illustrate it to me.

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Here is the REGEX format with explaination :
     ^        ^       ^    ^
     |        |       |    -- is a single digit, or
     |        |       ------- ends with a digit
     |        ----------------consists on digits or dashes not preceded by dashes
     ---------------------starts with a digit

+ Reply to Thread

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts