On 7/27/2016 8:38 AM, Bakkies Gatvol wrote:
This works
HOST=%_ip_printer SERVICE=conn
matches any host ending in %_ip_printer
No, the percent character is not a wildcard. It indicates that what follows is a regular expression. Yours matches any host _containing_ "_ip_printer"
http://perldoc.perl.org/5.8.8/perlre.html
what I want to match now
usphl0tsasdbv0 usphl0tsasvav1
HOST=%foo.
Would match any host containing "foo" followed by any other character. That gets close to what you want in the fewest characters. But it will match "food" just as well as "shesafool" or "ofoo8".
HOST=%^foo.
requires that the host name begin with "foo" and is followed by any character. This would match "food", and "foo8".
host=%^foo\d
requires the hostname begins with "foo" and is followed by a digit.
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Enterprise Technology Services Department of Administration State of Alaska