diff options
Diffstat (limited to 'lib/impure/nre.nim')
-rw-r--r-- | lib/impure/nre.nim | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim index 1012c7c36..738fc39cf 100644 --- a/lib/impure/nre.nim +++ b/lib/impure/nre.nim @@ -75,16 +75,16 @@ type ## comment".` ## ## `pattern: string` - ## the string that was used to create the pattern. For details on how + ## : the string that was used to create the pattern. For details on how ## to write a pattern, please see `the official PCRE pattern ## documentation. ## <https://www.pcre.org/original/doc/html/pcrepattern.html>`_ ## ## `captureCount: int` - ## the number of captures that the pattern has. + ## : the number of captures that the pattern has. ## ## `captureNameId: Table[string, int]` - ## a table from the capture names to their numeric id. + ## : a table from the capture names to their numeric id. ## ## ## Options @@ -151,36 +151,36 @@ type ## execution. On failure, it is none, on success, it is some. ## ## `pattern: Regex` - ## the pattern that is being matched + ## : the pattern that is being matched ## ## `str: string` - ## the string that was matched against + ## : the string that was matched against ## ## `captures[]: string` - ## the string value of whatever was captured at that id. If the value + ## : the string value of whatever was captured at that id. If the value ## is invalid, then behavior is undefined. If the id is `-1`, then ## the whole match is returned. If the given capture was not matched, ## `nil` is returned. See examples for `match`. ## ## `captureBounds[]: HSlice[int, int]` - ## gets the bounds of the given capture according to the same rules as + ## : 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. See examples for `match`. ## ## `match: string` - ## the full text of the match. + ## : the full text of the match. ## ## `matchBounds: HSlice[int, int]` - ## the bounds of the match, as in `captureBounds[]` + ## : the bounds of the match, as in `captureBounds[]` ## ## `(captureBounds|captures).toTable` - ## returns a table with each named capture as a key. + ## : returns a table with each named capture as a key. ## ## `(captureBounds|captures).toSeq` - ## returns all the captures by their number. + ## : returns all the captures by their number. ## ## `$: string` - ## same as `match` + ## : same as `match` pattern*: Regex ## The regex doing the matching. ## Not nil. str*: string ## The string that was matched against. @@ -583,11 +583,11 @@ proc find*(str: string, pattern: Regex, start = 0, endpos = int.high): Option[Re ## positions. ## ## `start` - ## The start point at which to start matching. `|abc` is `0`; + ## : The start point at which to start matching. `|abc` is `0`; ## `a|bc` is `1` ## ## `endpos` - ## The maximum index for a match; `int.high` means the end of the + ## : The maximum index for a match; `int.high` means the end of the ## string, otherwise it’s an inclusive upper bound. return str.matchImpl(pattern, start, endpos, 0) |