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
- :
- Variables containing "$..$"
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
‎Jun 09, 2010
11:35 AM
Variables containing "$..$"
I am prompting for a password and assign it to the variable $PASS$. I then use that variable down the road to set the account of a Windows service. My problem is if the password that is entered starts and ends with a dollar sign, the $PASS$ variable equates to a null string. I have tried all combinations of escaping the variable but nothing works. I've tried:
"$PASS$"
'$PASS$'
$DOLLAR$PASS$DOLLAR$
\$PASS\$
/$PASS/$
etc.
Does anyone have any ideas? At first I thought this would rarely come up but two of my passwords that were given to me by two different people follow the convention of $...$.
"$PASS$"
'$PASS$'
$DOLLAR$PASS$DOLLAR$
\$PASS\$
/$PASS/$
etc.
Does anyone have any ideas? At first I thought this would rarely come up but two of my passwords that were given to me by two different people follow the convention of $...$.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2010
03:37 AM
I think $DOLLAR$PASS$DOLLAR$ should work.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2020
01:57 AM
Javascript is very flexible in regards to checking for "null" values. I guess you're actually looking for empty strings, in that case this simpler code should work:
if(!pass || !cpass || !email || !cemail || !user){
Which will check for empty strings (""), null, undefined, fals, and the numbers 0 and NaN
Please note that if you are specifically checking numbers then it's a common error to drop 0 through this method and num! == 0 takes precedence (num! == -1 or ~ num (hacky code also checks - 1)) for functions that return -1, for example indexOf)