The JSON doc has this example (to show the need for double backslash):

$ ? (@ like_regex "^\\d+$")


The example is not wrong exactly, and can be cast to jsonpath, but as-is can never match anything.

I think it'd be helpful to provide that example so that it more probably matches when the user does a quick trial.

Llet's change it to something like:

$.* ? (@ like_regex "^\\d+$")


Patch attached.

thanks,

Erik Rijkers

--- ./doc/src/sgml/func.sgml.orig	2021-05-07 21:52:53.577952054 +0200
+++ ./doc/src/sgml/func.sgml	2021-05-07 21:53:33.078578522 +0200
@@ -17132,7 +17132,7 @@
      backslashes you want to use in the regular expression must be doubled.
      For example, to match strings that contain only digits:
 <programlisting>
-$ ? (@ like_regex "^\\d+$")
+$.* ? (@ like_regex "^\\d+$")
 </programlisting>
     </para>
    </sect3>

Reply via email to