I know this is old but it shows up as a first result for this issue.
Here you'd use a wildcard:
"anything-but": { "wildcard": ["database_1*", "database_2*", "*_test"] }