Regex Search Excluding terms

Not applicable
Posts: 2
3095     0

G'Day everyone.  I can search for Host records with the name containing a keyword (for example loopback) by doing this:

>>> Host.find(session).whereRegex('name', '(loopback)' ).all()
[<Host ipv4addrs=[<HostIPv4 ipv4addr.....


How would I go about exlcuding any host with loopback in its name?  

>>> Host.find(session).whereRegex('name', '(!loopback)' ).all()


Alternatively, is there a programatic way of pulling down the entire zone file?  If I search for everything it won't return in JSON as it's >1000 records.  Would I need to ignore the API alltogether and setup a zone transfer?


Posts: 39
3096     0

I've tried it on and the following will return "no match" when the string contains "loopback"


Showing results for 
Search instead for 
Did you mean: 

Recommended for You