กำหนดสตริงให้แทนที่เครื่องหมายอัญประกาศคู่ซ้ายทั้งหมดเป็น backticks สองรายการและเครื่องหมายอัญประกาศคู่ด้านขวาทั้งหมดเป็นเครื่องหมายคำพูดเดี่ยวสองตัว
เครื่องหมายคำพูดซ้ายหมายถึงเครื่องหมายคำพูดที่เริ่มต้นการเสนอราคา คำพูดที่ถูกต้องหมายถึงคำพูดที่จบคำพูด ไม่สามารถซ้อนคำพูดได้ คุณอาจคิดว่ามีจำนวนคู่ของคำพูดคู่ในสตริง
ตัวอย่าง
การป้อนข้อมูล:
"To be or not to be," quoth the Bard, "that
is the question".
The programming contestant replied: "I must disagree.
To `C' or not to `C', that is The Question!"
เอาท์พุท:
``To be or not to be,'' quoth the Bard, ``that
is the question''.
The programming contestant replied: ``I must disagree.
To `C' or not to `C', that is The Question!''