Skip to content

Instantly share code, notes, and snippets.

@rahulbanerjee26
Created September 25, 2022 22:35
Show Gist options
  • Save rahulbanerjee26/f020abf74909206d0e28c5de2108f6e4 to your computer and use it in GitHub Desktop.
Save rahulbanerjee26/f020abf74909206d0e28c5de2108f6e4 to your computer and use it in GitHub Desktop.
def replaceCode(blg):
new_content = content
snippets = re.findall(start_pat + "(.*?)" + end_pat, new_content, re.S)
counter = 0
for item in snippets:
if item[0] != "bash":
new_content = new_content.replace(
"\n".join([f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment