LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Regular express in perl confusion (https://www.linuxquestions.org/questions/linux-newbie-8/regular-express-in-perl-confusion-4175422061/)

ufmale 08-14-2012 01:41 PM

Regular express in perl confusion
 
Can someone help me please? I cannot figure out what this statement does.

$text =~ s/\'/\\\'/g;

j-ray 08-15-2012 01:44 AM

It replaces all ' in $text with \' if they are not escaped with \


All times are GMT -5. The time now is 09:33 PM.