1: Open (INFILE, "report.txt" ; 2: While (<INFILE>) { 3: $line =~ /\"(.+?)\"/ ; 4: $YourTextBetweenTheQuotes = $1 ; 5: # Do whatever you want 6: } 7: Close (INFILE)
In English : the regular express on line 3 will grab the text between quotes (expressed as \" ) with the expression .+? The parens (around .+? ) means to capture the text and assign it to the variable $1 Hopefully I've avoided giving one of those crypic answers that are useless to most beginners (including myself)... -rjf > How can I go through a file and extract all the text between > certain delimiters - for example I have: > > Bilbo, "Why I like rings" Freemont Press, 1998. > Frodo, "Why I don't" Bridgedale Freemans, 1832 > Etc > > I want to get: > > Why I like rings > Why I don't -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]