How do i construct a regex for the hostnames -


host names can long/fqdn:

cs25-admin.nmtg.company.com  cs25-admin.nms.company.com  

or short:

cs25-xyz23 

but should not match

11.22:33:44:55-66 

i wrote this: /.*-.*(nmtg)*|.*(\.nms)/

but fails last 1 11.22:33:44:55-66

/^[^:]+$/, although suspect misunderstood question.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -

sql - MySQL Custom calculate views -