Code: Select all
regexp {([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})+$} [lindex [split $uhost @] 1]]
I have come up with the logic? is this okay?? or can there be a better one
Code: Select all
regexp {([a-z][0-9]{1,}).([a-z][0-9]{1,}).([a-z][0-9]{1,}).([a-z][0-9]{1,})+$} [lindex [split $uhost @] 1]]} {
And what about matching vhosts then? should only use [a-z] but how can we match vhosts they have many dots between words, some might have 1 if it is a domain or some more than 10 also. There are also numbers [0-9] present in vhosts?