In this case your modified expression works fine because there aren't any trailing blanks after the Hostname. If that happened, something like "HOSTNAME-1A_1ST " your expression would also pick up those extra spaces. To prevent that, you could use a character set, like ([\w\-]+) That essentially adds "-" to the \w character set.
Update: There is more than one way to write the regex. Another possibility would be (\S+) Changing one character (\w to \S) does a lot. That would match any non-whitespace character. So if some weirdo thing like "*" showed up, it would also be included. What you choose to implement depends both upon your actual data and personal preference. | [reply] [Watch: Dir/Any] [d/l] [select] |
That helps. Some good tips! Thank you Marshall.
| [reply] [Watch: Dir/Any] |