jammusi
6th March 2011 15:44 UTC
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
pengyou
6th March 2011 23:41 UTC
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).
jammusi
7th March 2011 15:30 UTC
Hi
I have looked at NSISpcre.nsh - but I didnt really get it
tx
Oren
Afrow UK
7th March 2011 20:50 UTC
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
jammusi
8th March 2011 16:48 UTC
got it
tx
Oren