You do not say what you want to do with the line or the value for which you are searching. You also do specify if “xx” is only numeric or not. But anyway…

 

if ($String =~ /PSserver../){

  #do something…

}

 

if ($String =~ /PSserver\d\d/){

  #do something…

}

 

You should checkout perlretut.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Hansen
Sent: Friday, April 15, 2005 11:59 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: Regex

 

I need to parse a string with a specific phrase within it.

 

For example:

 

"PSserverxx"

 

What is the best way to do this?

 

Thanks


Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to