CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Regular Expressions:
get prompt when it is alreay appeard


New User

Nov 29, 2007, 2:03 AM

Post #1 of 2 (3938 views)
get prompt when it is alreay appeard Can't Post


i am using telnet module to get all environment varable of an env, i am using the below command that use regular expression in the Prompt property, the prompt should be ">" which is the unix prompt for the env.

the problem is that one of the environment variables has the value ">" in it

the question is how can i build a regular expression that ask him to search for the first ">" in the line

you have the example below



my %hashCommandDetails=("String"=>$strCommand,Prompt=>"/>/","Timeout"=>"60", Errmode=>'return');


Dec 5, 2007, 10:09 PM

Post #2 of 2 (3886 views)
Re: [michaelaz] get prompt when it is alreay appeard [In reply to] Can't Post

if i understand correctly you are trying to match > at the beginning of a line, if that is so then ^ is what you are looking for

my %hashCommandDetails=("String"=>$strCommand,Prompt=>"/^>/","Timeout"=>"60", Errmode=>'return');


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives