Skip to content
⌘ NSIS Forum Archive

validation in nsis for set of characters

4 posts

winman2004#

validation in nsis for set of characters

In nsis i want to validate a string. Actually it is a folder name. So it should not contain / ,\, <, >, ?, .,:,* etc. So how can i validate it?

Also i want to replace a string by substring. If a path contains "//" then replace with "/". So i want replace string option also.
T.Slappy#
Validating with regex of simple validation in cycle like:
{For} 0 to Strlen
${if} character == '?'
${Orif} character == '\'
...
{Next}

?
winman2004#
Originally Posted by T.Slappy View Post
Validating with regex of simple validation in cycle like:
{For} 0 to Strlen
${if} character == '?'
${Orif} character == '\'
...
{Next}

?
In for loop how to check for each character? i am not clear with your solution.
Afrow UK#
1. http://nsis.sourceforge.net/StrCSpn,...for_characters
2. Use StrReplace from the manual.

Stu