Regex usage in search section #15149
Replies: 2 comments
-
Hey there, |
Beta Was this translation helpful? Give feedback.
-
Hello, i ran into the same issue and i solve it this way: Depending on the version of netbox you are using you need to enable the FILTER_CHAR_BASED_LOOKUP_MAP to enable search for regex, in the latest version it is already present. If the lookup expressions are availaible, you can change the search behavior for every type by replacing the query filter for the field in the filtersets.py. Here is an example for devices (netbox/dcim/filtersets.py), the patch is valid for latest version. So you need to update the search function of class DeviceFilterSet.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to use regex in search section?
Beta Was this translation helpful? Give feedback.
All reactions