Link to home
Start Free TrialLog in
Avatar of ambuli
ambuliFlag for United States of America

asked on

Perl how to search a pattern in a string

I need to parse a line in the following form:

ABCDx=20,y=3,z=4;

I want to get the values of x, y, z
How to do this?
Thanks,
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ambuli

ASKER

Thanks Ozo.  Can you please explain what is this line is doing?

my($x,$y,$z)=/=(\w*)/g;
it is looking for any string of alphanumeric characters following an =
Avatar of ambuli

ASKER

Thank you