
kalu91 asked a question.
Hi,
is it possible to create a validation of user input, for example by using regex in order to define the user input format?

kalu91 asked a question.
Hi,
is it possible to create a validation of user input, for example by using regex in order to define the user input format?

Hi @kalu91 ,
You can use VBscript function in your installscript codefor regex validation.Snippet would be:
function NUMBER ValidateString(szString,szPattern)
OBJECT oRegEx, oMatch;
NUMBER nRet;
begin
//try to create the RegEx object
try
set oRegEx = CreateObject("VBScript.RegExp");
catch
MessageBox("CreateObject Failed- "+ Err.Decription, SEVERE);
endcatch;
oRegEx.Pattern = szPattern;
oRegEx.Global = 1; //set to 1 to find all matches in the string
//set to 0 to find only the first match
try
set oMatch = oRegEx.Execute(szString);
catch
MessageBox("CreateObject Failed- "+ Err.Decription, SEVERE);
endcatch;
nRet = oMatch.Count;
return nRet;
end;
Attaching sample .rul file for your reference as an attachment.
Thanks,
Jenifer

Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Activity: Status change: 2 hours ago
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Hi @kalu91 ,
You can use VBscript function in your installscript codefor regex validation.Snippet would be:
function NUMBER ValidateString(szString,szPattern)
OBJECT oRegEx, oMatch;
NUMBER nRet;
begin
//try to create the RegEx object
try
set oRegEx = CreateObject("VBScript.RegExp");
catch
MessageBox("CreateObject Failed- "+ Err.Decription, SEVERE);
endcatch;
oRegEx.Pattern = szPattern;
oRegEx.Global = 1; //set to 1 to find all matches in the string
//set to 0 to find only the first match
try
set oMatch = oRegEx.Execute(szString);
catch
MessageBox("CreateObject Failed- "+ Err.Decription, SEVERE);
endcatch;
nRet = oMatch.Count;
return nRet;
end;Attaching sample .rul file for your reference as an attachment.
Thanks,
Jenifer
isregex