This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- regexp does not like the special characters
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2009
08:35 AM
regexp not working
Hello.
I am trying to have a regular expression rule that ensures a number between 150-199 is entered. My rule shows:
$input_num$ Does not match ^[1][5-9][0-9]$
if this rule fails it suppose to Jump back to the label above the input panel. However, no matter what i enter, it never fails and proceeds to the next action.
Please help, we need this to work for us.
Thanks!
Joe
I am trying to have a regular expression rule that ensures a number between 150-199 is entered. My rule shows:
$input_num$ Does not match ^[1][5-9][0-9]$
if this rule fails it suppose to Jump back to the label above the input panel. However, no matter what i enter, it never fails and proceeds to the next action.
Please help, we need this to work for us.
Thanks!
Joe
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2009
11:03 AM
Hello,
Simply try ^[1][5-9][0-9]$DOLLAR$ instead
Jerome
Simply try ^[1][5-9][0-9]$DOLLAR$ instead
Jerome
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2009
01:09 PM
Hello Jerome.
Thanks for the response, but i cannot get it to work.
I changed it so to just display a message panel and here is what it does:
Input panel: enter number 150-199 range into $input_num$
msg panel 1: you entered wrongly - $input_num$
rule: $input_num$ Does not match ^[1][5-9][0-9]$DOLLAR$
msg panel 2: you entered rightly - $input_num$
rule: $input_num$ Matches ^[1][5-9][0-9]$DOLLAR$
i execute it, and enter 150 and i get the first msg panel as if the number did not match. When i hit next, i do not get the second panel. So, i start the process again.
I execute it, and enter 5555 and i get the same results above, where the first msg panel displays and not the second.
I am thinking that rules are not working properly in my Enterprise 2009 edition. I added a new:
msg panel 3: you entered right value
rule (compare install variable): $input_num$ equals 150
and i reran it and entered 150, and again only the 1st msg panel appeared.
What do you think is my problem? I have been using IA for about a year. I just upgraded from version 8 to 2009. Could this be a bug?
Thanks!
Joe
Thanks for the response, but i cannot get it to work.
I changed it so to just display a message panel and here is what it does:
Input panel: enter number 150-199 range into $input_num$
msg panel 1: you entered wrongly - $input_num$
rule: $input_num$ Does not match ^[1][5-9][0-9]$DOLLAR$
msg panel 2: you entered rightly - $input_num$
rule: $input_num$ Matches ^[1][5-9][0-9]$DOLLAR$
i execute it, and enter 150 and i get the first msg panel as if the number did not match. When i hit next, i do not get the second panel. So, i start the process again.
I execute it, and enter 5555 and i get the same results above, where the first msg panel displays and not the second.
I am thinking that rules are not working properly in my Enterprise 2009 edition. I added a new:
msg panel 3: you entered right value
rule (compare install variable): $input_num$ equals 150
and i reran it and entered 150, and again only the 1st msg panel appeared.
What do you think is my problem? I have been using IA for about a year. I just upgraded from version 8 to 2009. Could this be a bug?
Thanks!
Joe
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2009
01:17 PM
i changed the panel 3 rule to be:
rule (compare install variable): $input_num$ equals "150"
Then, it displays panel 3.
So, why does the regular expressions not work right?
Joe
rule (compare install variable): $input_num$ equals "150"
Then, it displays panel 3.
So, why does the regular expressions not work right?
Joe
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2009
02:02 PM
Okay, i changed it to be within quotes and it works,
150 entered - matches "[1][5-9][0-9]"
1501 entered - does not match
250 entered - does not match
So, it looks like we are a go on with surrounding the regexp with quotes.
Thanks!
Joe
150 entered - matches "[1][5-9][0-9]"
1501 entered - does not match
250 entered - does not match
So, it looks like we are a go on with surrounding the regexp with quotes.
Thanks!
Joe
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 12, 2009
04:09 AM
Hello,
In fact, the "problem" is not in the regular expression, but in the variable definition.
Check the get user input help from there: file:///C:/Program%20Files/Macrovision/InstallAnywhere%202009/manual/wwhelp/wwhimpl/js/html/wwhelp.htm?href=introduction.htm
When using "textfields", those result variables are double quoted.
So I guess you should call the variable "$input_num_1$" and reset you regular expression like it was.
--Jerome
In fact, the "problem" is not in the regular expression, but in the variable definition.
Check the get user input help from there: file:///C:/Program%20Files/Macrovision/InstallAnywhere%202009/manual/wwhelp/wwhimpl/js/html/wwhelp.htm?href=introduction.htm
When using "textfields", those result variables are double quoted.
So I guess you should call the variable "$input_num_1$" and reset you regular expression like it was.
--Jerome