このような
text = " \t hello there\n \t how are you?\n \t HHHH"
hello there
how are you?
HHHH
正規表現を介して共通のプレフィックス部分文字列を取得できますか?
試みる
In [36]: re.findall(r"(?m)(?:(^[ \t]+).+[\n\r]+\1)", " \t hello there\n \t how are you?\n \t HHHH")
Out[36]: [' \t ']
しかし、どうやらその一般的なプレフィックス部分文字列は ' \t 'であり、python textwrap モジュールのような関数
に使用したいと考えています。dedent