diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2018-10-01 20:33:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-01 20:33:51 -0700 |
commit | c6e10a442d3cc0c67d2965b5f523cd2835ea5ec2 (patch) | |
tree | 676f219623038155b37c8ba2e8931924291da6d4 /lib/impure | |
parent | 41bd6ed628ffb4b16fcd7cbe788bd2f46ecd5596 (diff) | |
parent | a0ac0b9696f3a79fbde153c63878aea363b09ad4 (diff) | |
download | Nim-c6e10a442d3cc0c67d2965b5f523cd2835ea5ec2.tar.gz |
Merge pull request #9151 from flaviut/fix-9053
Fix option documentation in nre (fixes #9053)
Diffstat (limited to 'lib/impure')
-rw-r--r-- | lib/impure/nre.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim index 32b1d0255..4c92049c8 100644 --- a/lib/impure/nre.nim +++ b/lib/impure/nre.nim @@ -151,18 +151,18 @@ type ## the whole match is returned. If the given capture was not matched, ## ``nil`` is returned. ## - ## - ``"abc".match(re"(\w)").captures[0] == "a"`` - ## - ``"abc".match(re"(?<letter>\w)").captures["letter"] == "a"`` - ## - ``"abc".match(re"(\w)\w").captures[-1] == "ab"`` + ## - ``"abc".match(re"(\w)").get.captures[0] == "a"`` + ## - ``"abc".match(re"(?<letter>\w)").get.captures["letter"] == "a"`` + ## - ``"abc".match(re"(\w)\w").get.captures[-1] == "ab"`` ## ## ``captureBounds[]: Option[HSlice[int, int]]`` ## gets the bounds of the given capture according to the same rules as ## the above. If the capture is not filled, then ``None`` is returned. ## The bounds are both inclusive. ## - ## - ``"abc".match(re"(\w)").captureBounds[0] == 0 .. 0`` - ## - ``"abc".match(re"").captureBounds[-1] == 0 .. -1`` - ## - ``"abc".match(re"abc").captureBounds[-1] == 0 .. 2`` + ## - ``"abc".match(re"(\w)").get.captureBounds[0].get == 0 .. 0`` + ## - ``"abc".match(re"").get.captureBounds[-1].get == 0 .. -1`` + ## - ``"abc".match(re"abc").get.captureBounds[-1].get == 0 .. 2`` ## ## ``match: string`` ## the full text of the match. |