Improve nre documentation (fixes #9470)
This commit is contained in:
parent
5a2290f788
commit
ebcf9406be
1 changed files with 16 additions and 1 deletions
|
|
@ -23,6 +23,12 @@ export options
|
||||||
##
|
##
|
||||||
## A regular expression library for Nim using PCRE to do the hard work.
|
## 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
|
## **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
|
## library doesn't work with it due to documented compiler limitations. As
|
||||||
## a workaround, use this:
|
## a workaround, use this:
|
||||||
|
|
@ -70,7 +76,10 @@ type
|
||||||
## comment".``
|
## comment".``
|
||||||
##
|
##
|
||||||
## ``pattern: string``
|
## ``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``
|
## ``captureCount: int``
|
||||||
## the number of captures that the pattern has.
|
## 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>`_
|
## Convention <http://man7.org/linux/man-pages/man3/pcresyntax.3.html#NEWLINE_CONVENTION>`_
|
||||||
## sections of the `PCRE syntax
|
## sections of the `PCRE syntax
|
||||||
## manual <http://man7.org/linux/man-pages/man3/pcresyntax.3.html>`_.
|
## 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
|
pattern*: string ## not nil
|
||||||
pcreObj: ptr pcre.Pcre ## not nil
|
pcreObj: ptr pcre.Pcre ## not nil
|
||||||
pcreExtra: ptr pcre.ExtraData ## nil
|
pcreExtra: ptr pcre.ExtraData ## nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue