In case it’s not clear from the description, after removing the potato from the rosin, and wrapping in paper, the thin layer of remaining rosin quickly solidifies into a hard shell, so you can then cut through it to get access to the flesh of the potato without accidentally eating rosin.
https://searchcode.com/?q=re.compile+lang%3Apython