18.104.22.168. Find Using Regular Expressions - Matches Found¶
This does the following:
Get devices by hostname that match a regular expression.
This command builds a query for you, example:
(specific_data.data.hostname == regex("win.*", "i"))
$ axonshell devices get-by-hostname \ --value "win.*" \ --value-regex \ --export-file device.json \ --export-overwrite
This example uses the
devices get-by-hostname command, but it will work for any
get-by-.. command for the devices and users command groups with the exception of
get-by-saved-query (which uses the query built in to the saved query).
devices get-by-subnet command does not support using regular expressions,
so it does not have a –value-regex option.