docs: def replace(oldstr, newstr, infile, dryrun=False):
      """
      Sed-like Replace function..
      Usage: pysed.replace(<Old string>, <Replacement String>, <Text File>)
      Example: pysed.replace('xyz', 'XYZ', '/path/to/file.txt')
  
      This will dump the output to STDOUT instead of changing the input file.
      Example 'DRYRUN':
      pysed.replace('xyz', 'XYZ', '/path/to/file.txt', dryrun=True)
  
      """
  
      linelist = []
      with open(infile) as reader:
          for item in reader:
              newitem = re.sub(oldstr, newstr, item)
              linelist.append(newitem)
      if dryrun is False:
          with open(infile, "w") as writer:
              writer.truncate()
              for line in linelist:
                  writer.writelines(line)
      elif dryrun is True:
          for line in linelist:
              print(line, end='')
      else:
          exit("""Unknown option specified to 'dryrun' argument,
               Usage: dryrun=<True|False>.""")