On Sat, 12 Sep 2015, ND wrote:
> Pcretest.exe docs says:
> If /S++ is used instead of /S+ (with or without a following digit), the text
> "(JIT)" is added to the first output line after a match or no match when
> JIT-compiled code was actually used.
>
> But there is no text "(JIT)" when /S++2, /S++4 and /S++6 used.
That is correct in the case of your example:
> PCRE version 8.38-RC1 2015-05-03
> /a/S++2
> a
> 0: a
You have selected JIT compilation only for a search that permits a
partial match. The digit works like this:
1 normal match only
2 soft partial match only
3 normal match and soft partial match
4 hard partial match only
6 soft and hard partial match
7 all three modes (default)
You have not asked for JIT compilation for a non-partial-match search,
so JIT code is not used (the match was found by the interpreter code),
and so therefore "(JIT)" is not output. If you do a search for an
appropriate partial match, you will see "(JIT)":
PCRE version 8.38-RC1 2015-05-03
re> /a/S++2
data> a\P
0: a (JIT)
data> a\P\P
0: a
Perhaps the documentation isn't entirely clear. I will take a look at
the PCRE2 equivalent documentation, to see if it can be improved.
Philip
--
Philip Hazel