Liking cljdoc? Tell your friends :D

rencg.api


re-find-ncgcljmultimethod

(re-find-ncg m)
(re-find-ncg m ncgs)
(re-find-ncg re s)
(re-find-ncg re s ncgs)

Equivalent to clojure.core/re-find, but returns the result of calling re-groups-ncg when the pattern is found, or nil otherwise.

If multiple finds are being performed, the versions where the sequence of named-capturing groups is passed in will be more efficient as they allow the caller to calculate the named-capturing groups in the regex once, then reuse that information, avoiding re-parsing of the regex on each call.

Equivalent to clojure.core/re-find, but returns the result
of calling re-groups-ncg when the pattern is found, or nil
otherwise.

If multiple finds are being performed, the versions where
the sequence of named-capturing groups is passed in will be
more efficient as they allow the caller to calculate the
named-capturing groups in the regex once, then reuse that
information, avoiding re-parsing of the regex on each call.
sourceraw docstring

re-groups-ncgclj

(re-groups-ncg m)
(re-groups-ncg m ncgs)

Equivalent to clojure.core/re-groups, but instead of returning a sequence containing the entire match and each group, it returns a map of the named-capturing groups as well as the start and end of the entire match (in keys :start and :end).

The key for each named-capturing group that's found is the (String) name of that group, and the corresponding value is the (String) text that matched that group.

If the same regex is being used many times, the 2-arg version will be more efficient as it allows the caller to calculate the named- capturing groups in the regex once, then reuse that information, avoiding re-parsing of the regex on each call.

Equivalent to clojure.core/re-groups, but instead of returning
a sequence containing the entire match and each group, it returns
a map of the named-capturing groups as well as the start and end of
the entire match (in keys :start and :end).

The key for each named-capturing group that's found is the (String)
name of that group, and the corresponding value is the (String) text
that matched that group.

If the same regex is being used many times, the 2-arg version will be
more efficient as it allows the caller to calculate the named-
capturing groups in the regex once, then reuse that information,
avoiding re-parsing of the regex on each call.
sourceraw docstring

re-matches-ncgclj

(re-matches-ncg re s)
(re-matches-ncg re s ncgs)

Equivalent to clojure.core/re-matches, but returns the result of calling re-groups-ncg when there's a match, or nil otherwise.

If the regex is being reused many times, the 3-arg version will be more efficient as it allows the caller to calculate the named-capturing groups in the regex once, then reuse that information, avoiding re-parsing of the regex on each call.

Equivalent to clojure.core/re-matches, but returns the result
of calling re-groups-ncg when there's a match, or nil otherwise.

If the regex is being reused many times, the 3-arg version will
be more efficient as it allows the caller to calculate the
named-capturing groups in the regex once, then reuse that
information, avoiding re-parsing of the regex on each call.
sourceraw docstring

re-named-groupscljmultimethod

(re-named-groups re)
(re-named-groups m)

Returns the names of all of the named-capturing groups in the given regular expression (or matcher), as a set of Strings.

Note: JDK-agnostic workaround for https://bugs.openjdk.org/browse/JDK-7032377 (which is fixed in JDK 20)

Returns the names of all of the named-capturing groups in the
given regular expression (or matcher), as a set of Strings.

Note: JDK-agnostic workaround for https://bugs.openjdk.org/browse/JDK-7032377
(which is fixed in JDK 20)
sourceraw docstring

re-seq-ncgclj

(re-seq-ncg re s)
(re-seq-ncg re s ncgs)

Equivalent to clojure.core/re-seq, but returns the result of calling re-groups-ncg on each successive match, or nil if there are no matches.

If the regex is being reused many times, the 3-arg version will be more efficient as it allows the caller to calculate the named-capturing groups in the regex once, then reuse that information, avoiding re-parsing of the regex on each call.

Equivalent to clojure.core/re-seq, but returns the result
of calling re-groups-ncg on each successive match, or nil
if there are no matches.

If the regex is being reused many times, the 3-arg version
will be more efficient as it allows the caller to calculate
the named-capturing groups in the regex once, then reuse that
information, avoiding re-parsing of the regex on each call.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close