in reply to Not matching a single quote (apostrophe!)

BUT NOT THE QUOTE
Since a quote is not special regexp character, it doesn't need escaping. If a quote gives you a problem, you have to look elsewhere than trying to escape it in the regexp: that's not the problem.

From the snippit you give us, I cannot determine where a quote makes a difference. Or is the given quote a different quote than you are matching against? (Someone gives you a "smart" quote for instance, which you're trying to match against an ASCII quote?)

  • Comment on Re: Not matching a single quote (apostrophe!)

Replies are listed 'Best First'.
Re^2: Not matching a single quote (apostrophe!)
by puddleglum (Initiate) on Nov 17, 2009 at 14:24 UTC

    >> Since a quote is not special regexp character, it doesn't need escaping.

    agreed!!

    >> Or is the given quote a different quote than you are matching against? (Someone gives you a "smart" quote for instance ... )

    yeah! hate smart quotes! the data file has been 'cleaned' to ensure there are no such entities. The quote character used in the replace was cut-and-pasted and globally-replaced in the data file and my perl, so it is definitely, 100%, exactly the same!