in reply to Re^2: Steps to get a substring from a string
in thread Steps to get a substring from a string

According to RFC952 and RFC-1123, the hostname should only consists of the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9', and the hyphen ('-'). Spaces and underscores are not allowed!

Update: added "and underscores"

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics
  • Comment on Re^3: Steps to get a substring from a string

Replies are listed 'Best First'.
Re^4: Steps to get a substring from a string
by vinoth.ree (Monsignor) on Jul 21, 2015 at 17:10 UTC
    ++CountZero

    Oh Sorry! Actually I considered only string part and written the script, I will update the same. Thank you CountZero


    All is well. I learn by answering your questions...