Hello,
I've been at this problem for some time now and any adice would be great. I have a file as such: Peter..Bjorn,John..Mary,Paul..Simon,Jack..Steve,
I wrote the following code:
@array = $line =~ /([A-Za-z]+\.\.[A-Za-z]+\,[A-Za-z]+\.\.[A-Za-z]+)/g;
It gives me: Peter,..Bjorn,John..Mary Paul..Simon,Jack..Steve
What I really want it to give me is: Peter..Bjorn,John..Mary John..Mary,Paul..Simon Paul..SImon,Jack..Steve
Is there anyway to go about doing that? I tried a lookaround, but that didn't help much.
Thanks
I've been at this problem for some time now and any adice would be great. I have a file as such: Peter..Bjorn,John..Mary,Paul..Simon,Jack..Steve,
I wrote the following code:
@array = $line =~ /([A-Za-z]+\.\.[A-Za-z]+\,[A-Za-z]+\.\.[A-Za-z]+)/g;
It gives me: Peter,..Bjorn,John..Mary Paul..Simon,Jack..Steve
What I really want it to give me is: Peter..Bjorn,John..Mary John..Mary,Paul..Simon Paul..SImon,Jack..Steve
Is there anyway to go about doing that? I tried a lookaround, but that didn't help much.
Thanks
Comment