Skip to content

SYNG1006 - Unrecognized pattern flag

Domain: sexp
Severity: USER

A regex pattern has an unknown flag.

Pattern flags appear after the closing / of a regex. SYNG supports i (case-insensitive) and m (multiline). Other flags are not recognized.

Example

clojure
(str /foo/g)

The g (global) flag is not supported in SYNG patterns.

Solution

Use only supported flags:

  • i - case-insensitive matching
  • m - multiline mode (^ and $ match line boundaries)
clojure
(str /foo/i)

Note: Global matching is implicit in SYNG - all matches are found.

SYNG1005

Copyright © 2022-present Semantic Works, Inc.