Find the answer to your Linux question:
Results 1 to 2 of 2
escaping the ' here is what my regular expression looks like Code: $file =~ s/\'/\\'/g Is this how you escape the apostrophie...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Apr 2003
    Location
    TEXAS
    Posts
    314

    escaping the '


    escaping the '

    here is what my regular expression looks like

    Code:
    $file =~ s/\'/\\\'/g
    Is this how you escape the apostrophie
    The computer made me do it!! Slackware and SUSE too Gig\'em WHOOOOP!!
    \"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Do you need to? This works for me:
    Code:
    $file =~ s/'/\\'/g;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •