Skip to content
⌘ NSIS Forum Archive

Finding substring

4 posts

sandeepsirsgi#

Finding substring

Hi,

How should i capture content of variable separated by commas.
Ex: I had a varible x=xy,ab,dc (content of variable may be anything).
now i want to capture the contents of the varable x separated by comman in to other variables.
i.e the new variable (ex: y,z and w ) should contain y=xy and z=ab and w=dc.



Can some body help me on that.

Regards
Sandeep
Instructor#
or
Name "Output"
OutFile "Output.exe"

!include "WordFunc.nsh"
!insertmacro WordFind

Section
StrCpy $0 "xy,ab,dc"

${WordFind} "$0" "," "+1" $1
${WordFind} "$0" "," "+2" $2
${WordFind} "$0" "," "+3" $3

MessageBox MB_OK '$$1={$1}$\n$$2={$2}$\n$$3={$3}'
SectionEnd