Archive: Using StrFilter


Using StrFilter
I would like to use StrFilter to strip out all the non-numeric characters from a string, however when I do so it doesn't seem to have any effect, can anybody point me in the right direction?

example:

!include "WordFunc.nsh"
!insertmacro StrFilter

Section
${StrFilter} "$$Revision 10 $$" "1" "" "" $rev
SectionEnd


However $rev remains undefined.

Any thoughts?

For the record what I'm actually trying to do is massage a Subversion revision number into a Windows .exe product version number using VIProductVersion.

cheers,
Gabe

Don't you need to define $rev?

OutFile StrFilter.exe

!include "WordFunc.nsh"
!insertmacro StrFilter

Var rev

Section
${StrFilter} "$$Revision 10 $$" "1" "" "" $rev
MessageBox MB_OK $rev
SectionEnd

Oops, good point, however I did define it earlier in my actual code, I just didn't snip it when I pasted it there. (All my defines, etc. are in one block.)

cheers,
Gabe