ContextSearch syntax guideBack to analysis →
FIND THE PATTERN, KEEP THE EVIDENCE

Search words, shapes, and sequences.

Start with a normal word. Add wildcards when spelling varies, regular expressions when the shape matters, and CQL when several token conditions must line up.

Fastest

Type a word or quoted phrase in Concordance.

Most flexible

Use Pattern and batch search for sequences, fields, and repeats.

Private

Every query and every corpus stays in this browser.

Choose the simplest search that works

  1. Known word or phrase?
    Use ordinary Concordance search.
  2. Several possible spellings?
    Add * or ? as a wildcard.
  3. A spelling rule or a set of alternatives?
    Wrap a regular expression in slashes.
  4. A sequence of token conditions?
    Use CQL in the query builder or Pattern and batch search.
Context replaces the example words automatically after language detection. The chips beneath the CQL box are rebuilt from frequent content words in the active corpus.

Words and phrases

Concordance normalizes the query with the selected language profile before matching. Case is ignored by ordinary word searches.

important
Every occurrence of one word.
"in this case"
An exact consecutive phrase.
القرار الإداري
An Arabic phrase, normalized with the active Arabic settings.
重要
A token in a corpus segmented as Chinese or Japanese.

Wildcards

Wildcards operate inside a token. They are useful for inflectional families, incomplete spellings, and uncertain characters.

decid*
* matches zero or more letters or digits: decide, decided, decision, and similar forms.
wom?n
? matches exactly one letter or digit: woman and women.
[word="قانون*"]
The same wildcard inside a CQL word condition.
[word="*ية"]
Tokens ending in a chosen string.
A wildcard does not understand morphology. It matches characters. Check the concordance evidence before treating the results as one linguistic category.

Regular expressions

Write a regular expression between / delimiters. Context anchors it to the whole token, so /كتب|كتاب/ means “either complete token,” not “contains this anywhere.”

/law|court|judge/i
Any of several alternatives; i requests case-insensitive matching.
/un.*able/
A token beginning with un and ending with able.
/\p{L}{8,}/u
A token containing at least eight Unicode letters. The u flag enables Unicode property classes.
[word=/قرار|حكم|قانون/]
A regular expression as the word condition in CQL.

Useful regex building blocks

.
Any single character.
*   +   ?
Zero or more, one or more, or optional.
[abc]
One character from a set.
(one|two)
Grouped alternatives.
{2,5}
Repeat the preceding expression two to five times.

CQL token patterns

Each pair of square brackets describes one token. Put token blocks next to each other to describe a sequence.

[word="قرار"]
One exact normalized word.
[word=/قرار|حكم/] [word="*"]
One of two words followed by any token.
[word="court"] [] [word="decision"]
Two specified words with exactly one unrestricted token between them.
[pos="adjective"] [pos="noun"]
An adjective followed by a noun in Pattern and batch search.
[lemma="decide"]
A lemma condition. English has the strongest bundled lemma support.
[word="very"]{1,3}
Repeat one token condition from one to three times. Repeats are available in Pattern and batch search.
[word=/admin.*/ & pos="adjective"]
Combine conditions on the same token with &.
Two levels: the quick Regex / CQL builder in Advanced analysis accepts consecutive word blocks. Pattern and batch search inside Concordance additionally accepts empty blocks, lemma and part-of-speech fields, combined conditions, and repeats.

Logic, presets, and batches

Pattern and batch search can run several independent lines at once and merge their concordance evidence.

peace OR war
Return matches for either search.
NOT peace
Return token positions other than the excluded word. Use this broad form carefully.
NOUN
Run a grammar preset. Available labels are listed beneath the query box.
قرار
[word=/حكم|قانون/]
ADJECTIVE
Three batch queries, one per line.

Multilingual examples

These examples illustrate syntax only. After analysis, Context proposes examples from your actual corpus rather than copying these words into the query box.

Arabic[word=/قرار|قانون/] [word="*"]
English[word="significant"] []
Spanish[word=/bueno|buena/]
French[word="important*"]
Russian[word=/важный|важная/]
Japanese[word="重要"] [word="*"]

Accuracy, speed, and privacy

Word and character matching are deterministic. Grammatical presets and lemmas are exploratory annotations: English uses the bundled offline tagger; other supported languages use transparent lexical classes. Always inspect the returned lines when the distinction matters.

Search runs entirely on the current device. Context does not send corpus text, queries, annotations, or reports to a server. Large batches and broad expressions such as /.*/ can still take time because they may inspect every token.