schickeneder
Technical User
I am having trouble figuring out how to get perl to do what I want it to. I'm sure there's a simple solution, but after looking through forums and tutorials I can't seem to find it.
Given this text:
storeAddresses[!5793!] = {!street1! : !#333 Carr #14, Cotto Laurel!,
I want to extract elements between the '!'s, in other words I want to be able to parse the above string and get variables containing: 5793,street1,#333 Carr #14, Cotto Laurel
Here's what I've been working with but I don't understand perl expressions well enough to get it:
$_ = "storeAddresses[!5793!] = {!street1! : !#333 Carr #14, Cotto Laurel!,";
$_ =~ /!(.*?)!(.*?)!(.*)!(.*)!/;
Then they should be in $1,$2,$3 etc...
any tips?
Given this text:
storeAddresses[!5793!] = {!street1! : !#333 Carr #14, Cotto Laurel!,
I want to extract elements between the '!'s, in other words I want to be able to parse the above string and get variables containing: 5793,street1,#333 Carr #14, Cotto Laurel
Here's what I've been working with but I don't understand perl expressions well enough to get it:
$_ = "storeAddresses[!5793!] = {!street1! : !#333 Carr #14, Cotto Laurel!,";
$_ =~ /!(.*?)!(.*?)!(.*)!(.*)!/;
Then they should be in $1,$2,$3 etc...
any tips?