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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



michaelaz
New User

Nov 29, 2007, 2:03 AM

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

hi,

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

thanks.

PS1=$host:$TLG_MARKET:"$PWD">

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


winfinit
User

Dec 5, 2007, 10:09 PM

Post #2 of 2 (1980 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