in reply to Understanding regular expressions: why do I have to use map to clear up undefs in regex output?
I know that you're inquiring about matching regex's, but if all you want to do is to remove the double-quotes, you could, I think and IMHO, use the substitution regex approach as I did in the code below.
#!/usr/bin/perl use warnings; use strict; my $string = '1,2,3,4,"fine","day","today"'; print "\$string = [ $string ]\n"; print "\n"; $string =~ s/\"//gx; print "\$string = [ $string ]\n"; exit(0);
I tried several variations using the match regex approach and couldn't get one to work. I'm sure there is a way; I just couldn't easily construct one. I'm barely regex-literate, though, so the various responses are interesting to me and have already tought me a lot that I didn't know.
|
|---|