device name matching
Set a Device Name Pattern on a location and newly-registered devices whose hostname matches it are filed there automatically — no per-site registration tokens, no subnet planning. If your estate already has a hostname convention (WIN11-TILL01, LDN-POS-3, KDS-*), this is the fastest route to automatic filing.
where it fits
At registration, a device is assigned to a location by the first of these that applies:
- A location-scoped registration token
- The first location whose Device Name Pattern matches the device's hostname
- The first location whose IP Subnet contains the device's IP
- Otherwise, the catch-all Main Location
Hostname matching takes precedence over IP subnet matching. When more than one pattern matches, the location that is first alphabetically by name wins — so keep patterns specific enough that they don't overlap.
Devices sitting in Main Location are also re-checked every time their agent re-registers (for example after an agent update), so adding a pattern retroactively rescues devices that landed in the catch-all. Devices you have manually placed in a real location are never moved.
writing a pattern
The pattern is a regular expression, not a wildcard/glob — the most common trip-up. * does not mean "anything"; it means "zero or more of the previous character".
- The whole hostname must match (the pattern is anchored at both ends).
- Matching is case-insensitive —
pos-.*matchesPOS-01. - Maximum 200 characters.
| To match… | Use | Not |
|---|---|---|
Anything starting WIN11- | WIN11-.* | WIN11-* |
WIN11- plus letters/digits | WIN11-\w+ | |
POS- or BAR- followed by a number | (POS|BAR)-\d+ | |
SITE042- prefix, per-site | SITE042-.* | SITE042* |
-4567- anywhere in the name | .*-4567-.* | -4567- |
Anything ending -KDS | .*-KDS | *-KDS |
| Tills 01 to 04 only | TILL0[1-4] | |
Optional suffix (POS-1 or POS-1-BAK) | POS-\d+(-BAK)? | |
Everything except names starting KDS- | (?!KDS-).* | |
| An exact hostname | KDS-KITCHEN |
Test with a real hostname in mind: WIN11-.* matches WIN11-TILL01 but not OLDWIN11-X, because the full name must match.
safety limits
Patterns are validated when you save them. Besides being a valid regular expression, a pattern may not contain nested quantifiers (such as (a+)+) or backreferences (\1) — these shapes can make matching catastrophically slow, so they are rejected outright. Ordinary prefix/suffix patterns like the examples above are unaffected.
where to set it
| Place | Field / column |
|---|---|
| Add Location / Edit Location forms | Device Name Pattern |
| CSV import | deviceNamePattern |
| Bulk modify | deviceNamePattern |
An invalid pattern in a CSV row rejects that row with the row number, the same as an invalid subnet.