Archive: Match Regular Expression using NSISpcre


Match Regular Expression using NSISpcre
Hi,

I have been investigating a bit the NSISpcre plugin and especially its REMatches function.

Seems like it is working good only i can not figure out exactly the 3rd parameter (called PARTIAL) stands for.

To make it a bit clearer:
The sample script gives some examples and sometime it passes 0 (zero) sometime 1 - but i couldn't really understood the purpose of this parameter.


Advise please?

tx

Oren


Have you tried looking at the NSISpcre.nsh file?

PARTIAL (input)

Either 1 or 0. Pass the value 1 to enable partial matches (part of the
SUBJECT string must match the PATTERN string) or 0 to force full matches
(the whole SUBJECT string must match the PATTERN string).

Hi

I have looked at NSISpcre.nsh - but I didnt really get it

tx

Oren


If you give it 1, cde|345 will match "abcde12345". If you give it 0 it will match "cde" or "345" only. Specifying 1 is the same as using ^(cde|345)$.

Stu


got it

tx

Oren