There are probably much better ways of doing this but how about
if ($line =~ /(\\\\)(\w+)\\/){
$server=$2;
}
Rgds
Dexter
[EMAIL PROTECTED] wrote:
> 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