Say $str is equal to "\\\\Server\\Pathname"

$str =~ m/\\\\(\w*)\\(\w*)/;
$server = $1;

---------- Original Message ----------------------------------
From: [EMAIL PROTECTED]
Date: Mon, 13 May 2002 17:08:26 -0500

>I'm a little bit rusty on using regular expressions and need some help.
>Let's say that I'm given \\Server\Pathname as a text.  How would I extract
>"\\Server" from this and store it to a variable $server?
>
>Thanks,
>Jason
>
>_______________________________________________
>Perl-Win32-Admin mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to