parse a file

From the following file I need to get everything after Members but just beforr crackets for example the output for the following input will be. So in every line lookfor Members  and get everything just before comma like this

cmandali
legarcia
mrottman
nfluhman
TestMINA

______________________________________________________________
2/4/2008 12:53:55 PM   Version: 8.1.0 (Build 8.1.000.149)
2/4/2008 12:53:55 PM   Project Source: 1-DEV (SMFIMDMSI01)
2/4/2008 12:53:55 PM   Login: administrator
2/4/2008 12:53:55 PM   Executing task(s)...
2/4/2008 12:53:55 PM   Members = cmandali (Chandrashekar Mandali), legarcia (Leonardo Garcia), mrottman (Matthew Rottman), nfluhman (Nathan Fluhman)
2/4/2008 12:53:55 PM   Members = TestMINA (TestMINA)
2/4/2008 12:53:55 PM   Task(s) execution completed successfully.
anshumaEngineeringAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
perl -lne '($_)=/Members(.*)/;print for /(\w+)\s*\(/'
0
anshumaEngineeringAuthor Commented:
Hello Ozo,

Instead of running this command can i get this in a file form.

thanks
-anshu
0
ozoCommented:
#!/usr/bin/perl
$\=$/;
while( <> ){
  ($_)=/Members(.*)/;  print for /(\w+)\s*\(/;
}
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

anshumaEngineeringAuthor Commented:
Hello Ozo,

this is not working as expected. it's only printing the first user for every line, but that line might have more users after commas. Can you try this with the input I gave.

thanks
-anshu
0
ozoCommented:
sorry, I left out the /g
  print for /(\w+)\s*\(/g;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
anshumaEngineeringAuthor Commented:
Hey Ozo,

You are amazing. Thanks alot

-anshu
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.