diff options
author | Flaviu Tamas <tamasflaviu@gmail.com> | 2018-11-18 18:30:49 -0500 |
---|---|---|
committer | Flaviu Tamas <tamasflaviu@gmail.com> | 2018-11-18 20:12:24 -0500 |
commit | ebcf9406be9ca04abb862d7d3a3ca16fc5d07a0c (patch) | |
tree | 093048fe3852c64692d9f7e6dba9119c1c5982a5 /lib | |
parent | 5a2290f788ebc160b3490a9f81d0478c0fad3aaf (diff) | |
download | Nim-ebcf9406be9ca04abb862d7d3a3ca16fc5d07a0c.tar.gz |
Improve nre documentation (fixes #9470)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/impure/nre.nim | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim index 985913a88..58594f054 100644 --- a/lib/impure/nre.nim +++ b/lib/impure/nre.nim @@ -23,6 +23,12 @@ export options ## ## A regular expression library for Nim using PCRE to do the hard work. ## +## For documentation on how to write patterns, there exists `the official PCRE +## pattern documentation +## <https://www.pcre.org/original/doc/html/pcrepattern.html>`_. You can also +## search the internet for a wide variety of third-party documentation and +## tools. +## ## **Note**: If you love ``sequtils.toSeq`` we have bad news for you. This ## library doesn't work with it due to documented compiler limitations. As ## a workaround, use this: @@ -70,7 +76,10 @@ type ## comment".`` ## ## ``pattern: string`` - ## the string that was used to create the pattern. + ## 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. @@ -126,6 +135,12 @@ type ## Convention <http://man7.org/linux/man-pages/man3/pcresyntax.3.html#NEWLINE_CONVENTION>`_ ## sections of the `PCRE syntax ## manual <http://man7.org/linux/man-pages/man3/pcresyntax.3.html>`_. + ## + ## Some of these options are not part of PCRE and are converted by nre + ## into PCRE flags. These include ``NEVER_UTF``, ``ANCHORED``, + ## ``DOLLAR_ENDONLY``, ``FIRSTLINE``, ``NO_AUTO_CAPTURE``, + ## ``JAVASCRIPT_COMPAT``, ``U``, ``NO_STUDY``. In other PCRE wrappers, you + ## will need to pass these as seperate flags to PCRE. pattern*: string ## not nil pcreObj: ptr pcre.Pcre ## not nil pcreExtra: ptr pcre.ExtraData ## nil |