in reply to Re: separating two sententences
in thread separating two sententences

yes, you are right.i changed it to this but still nothing

#!/usr/bin/perl -w open IN,"<","file" or die "error opening file: $!"; while(<IN>){ if(/"\(\w+\)"\/){ print "$1\n"; }}

Replies are listed 'Best First'.
Re^3: separating two sententences
by AnomalousMonk (Archbishop) on Sep 16, 2011 at 04:45 UTC
    /"\(\w+\)"\/

    In this regex, the '(' and ')' (parenthesis) characters, which would normally be regex metacharacters marking the start and end of a capture group, are escaped by \ (backslash) characters that return them to being literal '(' and ')' characters. Again, see muba's analysis above Update: ...and reply below. (Missed that last \. Bad case of backslashitis.).

      Not to mention the backslash that escapes the forward slash that's supposed to mark the end of the regex. /...\/ should read /.../.

Re^3: separating two sententences
by Sinistral (Monsignor) on Sep 16, 2011 at 14:01 UTC

    You need to reread dreadpiratepeter's node again: Re^5: separating two sententences. Your input file just needs a split on the semicolon to get the two columns, then a regular expression to remove the quotes. Print those out separated by a comma or tab, and then Excel will read the file