pseudodepseudonimizer_2.py 252 B

12345
  1. def dots2numberedDots(all_text, replace_string="..."):
  2. replace_string = re.escape(replace_string)
  3. dots_regex = re.compile(r"(\s)[A-Z]?\[?({})\]?(\s)".format(replace_string))
  4. all_text = dots_regex.sub(dots_repl, all_text)
  5. return all_text