Skip to content

String search

LAPIS allows users to filter string fields in the metadata using regular expressions. This is useful when the full string is unknown or when a more complex search is needed.

String search is enabled for all string fields. A list of searchable fields of this LAPIS instance can be found here.

The syntax for the string search is a subset of the syntax of the PCRE library. Under the hood, we use the RE2 library to evaluate the regular expressions.

Examples

Get the number of sequences with the division field containing the string Basel:

GET /sample/aggregated?division.regex=Basel

Get the number of sequences with the division field starting with the string Basel:

GET /sample/aggregated?division.regex=^Basel