Could someone explain what they mean where they are being used?
if(m/DROP TABLE IF EXISTS \`?$tableName\`?/ || m/CREATE TABLE \`?$tableName\`?/){
$inside=1
};
-Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A
?makes the character before it optional, which in this case is the `. In a high-level, this means that the author of that code is allowing for $tablename or `$tablename`.Note that the regular expression as stated also matches `$tablename and $tablename`, but such a case is probably very unlikely. One can modify it to exclude such cases by using backreferences:
Further reading on this operator can be found here.