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+):|); print "$client, $station, $server, $printer, $spool, $otherthing\n"; --- MJG <[EMAIL PROTECTED]> wrote: > 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, client,workstation, etc > 2). Client/workstation///printserver/printer > 3). Winspool,ne01: > > Can this be done with an all inclusive RegEx? > > Thanks > > MJG > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id396&op=click > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >