I am using vbscript to verify an inputted string. This string is 8 chars long. I need to identify if, within the first four characters, a Z or z is present, and if so, I need to return the location of this Z. Any ideas how I can return the location of all the Z's located in the first 4...
Try something like this:
Dim testString, objRegExp
testString = "blahABCblah"
Set objRegExp = new regexp
objRegExp.Pattern = "ABC|HIJ|LMN|STU"
If objRegExp.Test(testString) Then
MsgBox("TestString contains one of the substrings")
End If
Thanks for the assistance. I put in the error checking code, and it turns out that the command is being sent to myhost and output is being generated, according to the input.log file. But the output of the command is not being written to my variable:
@lines = $t->cmd("/usr/bin/who")...
No embedded / characters. Actually, I got the following version to work on one box after changing the prompt to />$/ and adding a "waitfor" after the login. I'm having a different problem on another box. The script is successfully logging into the box, and giving the prompt, but it...
I am just trying to get a simple script to work. Currently it is giving the following error:
"timed-out waiting for command prompt at ./test_telnet.pl line 11"
I don't know what I'm doing wrong... the prompt for this host is:
myuser@myhost{myfolder}>
Here's what I'm trying... Please...
I have a perl script which telnets to remote hosts and starts up other scripts on these hosts. Currently, I have a text config file, which I have to read in line by line and parse to get host names, user names, passwords, etc. I would rather just have this info in a separate file, with the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.