From d24f64a4f0f77a34e3b2e4150651162324ed547a Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Tue, 2 Nov 2021 11:11:18 +0800 Subject: [PATCH] doc: update example to use toml syntax fixes #204. [skip ci] --- docs/usage.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/usage.rst b/docs/usage.rst index 72fe770..d930b93 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -216,7 +216,8 @@ If both ``prefix`` and ``from_pattern``/``to_pattern`` are used, ``from_pattern``/``to_pattern`` are ignored. If you want to strip the prefix and then do something special, just use ``from_pattern```/``to_pattern``. For example, the transformation of ``v1_1_0`` => ``1.1.0`` can be achieved with -``from_pattern = v(\d+)_(\d+)_(\d+)`` and ``to_pattern = \1.\2.\3``. +``from_pattern = 'v(\d+)_(\d+)_(\d+)'`` and ``to_pattern = '\1.\2.\3'``. +(Note that in TOML it's easiler to write regexes in single quotes so you don't need to escape ``\\``.) .. _list options: