matching a sentence

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    matching a sentence

    Hello,
    I've got a series of files that has several sentences i want to kill.
    Each contains special symbols () [] spaces, uppercase and lowercase symbols.
    I'm trying to use perl to get rid of them, but it's not matching. Any
    suggestions?
    Thanks.
    Dave.


  • Joe Smith

    #2
    Re: matching a sentence

    Dave wrote:[color=blue]
    > Hello,
    > I've got a series of files that has several sentences i want to kill.
    > Each contains special symbols () [] spaces, uppercase and lowercase symbols.
    > I'm trying to use perl to get rid of them, but it's not matching. Any
    > suggestions?[/color]

    Perl regular expressions assign special meaning to () [] {} and such.
    You have to quote them (with \ or \Q..\E) to match them literally.
    See "perldoc perlretut" for details.
    -Joe

    Comment

    Working...