[perl-win32-gui-users] RegEx

2005-02-21 Thread MJG
I'm in need of the RegEx users. In the Terminal server environment, printer mapping creates a long string. Client/workstation///printserver/printer,winspool,ne01: I need to parse this information out without doing a dozen splits if at all possible. The outcome I need is: 1). Each element, cli

Re: [perl-win32-gui-users] RegEx

2005-02-21 Thread Ariel Serbin
perlmonks.com is a great place to look for answers to questions like this. The quick answer to your question is: $stuff = 'Client/workstation///printserver/printer,winspool,ne01:'; my ($client, $station, $server, $printer, $spool, $otherthing) = ($stuff =~ m|(\w+)/(\w+)///(\w+)/(\w+),(\w+),(\w+