Parcourir la source

Add documentation on the `x` regexp flag

Multiline regexps were added in https://github.com/lark-parser/lark/pull/645
tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.11.0
decorator-factory il y a 3 ans
committed by GitHub
Parent
révision
d82264d5c6
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. +5
    -1
      docs/grammar.md

+ 5
- 1
docs/grammar.md Voir le fichier

@@ -112,9 +112,13 @@ You can use flags on regexps and strings. For example:
```perl
SELECT: "select"i //# Will ignore case, and match SELECT or Select, etc.
MULTILINE_TEXT: /.+/s
SIGNED_INTEGER: /
[+-]? # the sign
(0|[1-9][0-9]*) # the digits
/x
```

Supported flags are one of: `imslu`. See Python's regex documentation for more details on each one.
Supported flags are one of: `imslux`. See Python's regex documentation for more details on each one.

Regexps/strings of different flags can only be concatenated in Python 3.6+



Chargement…
Annuler
Enregistrer