Do you have a question? Post it now! No Registration Necessary. Now with pictures!
June 20, 2008, 5:56 pm
rate this thread
) Thanks for all the replies. I was actually trying to get the part of
) $Entry I am interested in, in $TempEntry.
) I used the following 2 lines (as shown in the OP):
) $TempEntry =~ s/"([A-Za-z\s]*([,][A-Za-z\s]*)+)"/$1/;
) Why did the above did not get "the part of $Entry I am interested in"
) in $TempEntry? What did I do wrong?
It's a substitution. You substitute the quoted part with the part
between quotes. The rest remains intact.
To get just the part between quotes, use this:
my ($TempEntry) = $Entry =~ /"(.*?)"/;
Why the complicated match string by the way ?
Do you only want to match quoted strings that contain a comma ?
It seems needlessly complex.
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !