Old 6th March 2011, 14:44   #1
jammusi
Member
 
Join Date: Dec 2009
Posts: 78
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
jammusi is offline   Reply With Quote
Old 6th March 2011, 22:41   #2
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
Have you tried looking at the NSISpcre.nsh file?

Quote:
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).
pengyou is offline   Reply With Quote
Old 7th March 2011, 14:30   #3
jammusi
Member
 
Join Date: Dec 2009
Posts: 78
Hi

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

tx

Oren
jammusi is offline   Reply With Quote
Old 7th March 2011, 19:50   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 8th March 2011, 15:48   #5
jammusi
Member
 
Join Date: Dec 2009
Posts: 78
got it

tx

Oren
jammusi is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump