Skip to main content
Search for content matching a regular expression pattern within files.

Python SDK

HTTP API

Parameters

string
required
Viking URI to search in (file or directory)
string
required
Regular expression pattern to search for
boolean
default:"false"
Ignore case when matching
integer
Maximum number of files to search

Response

string
Operation status (ok on success)
object
Search results
number
Execution time in seconds

CLI

Pattern Syntax

The pattern parameter accepts standard regular expressions:
  • authentication - Literal string match
  • auth.*token - Match “auth” followed by any characters, then “token”
  • ^import - Match lines starting with “import”
  • TODO|FIXME - Match lines containing either “TODO” or “FIXME”

Performance Notes

  • Searching large directories may take time
  • Use node_limit to restrict the number of files searched
  • Directories are searched recursively by default