Skip to main content
Question

Incorrect Query Conversion

  • October 30, 2025
  • 1 reply
  • 19 views

Take this v2 query:

location.country: "United Sta???" or location.country: "In???"

This produces 52.58M “United States” and 4.56M “India” results.


When passed into the v3 query converter it produces:

host.location.country:{"^United Sta...$", "^In...$"}

Searching with this in v3 shows no results.

However, this does produce results (52M “United States”, 4.3M “India”)

host.location.country:{"^United States$", "^India$"}


It seems like using regex within bracket notation is not fully supported (like only the ^ and $ anchors work here). If this is the case, the query converter should not be returning this query. Perhaps instead it should do the regex long form, which does work:
 

host.location.country =~ "^United Sta...$" or host.location.country =~ "^In...$"

We have a proprietary v2 query similar to this form, but we cannot use the converted query as returned.


 

1 reply

MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • November 3, 2025

Hey vitutus, thanks for calling this out. I reported the conversion issue to our team. Note that you could also use

host.location.country=~{"^United Sta...$" ,"^In...$"}