I an a newbie in python and I want to use my regex in `re.sub`. I tried it on [regex101](https://regex101.com/r/InljCc/1) and it works. Somehow when I tried to use it on my python (version 3.6) it doesn't work properly. I get the following warning

> 
> bad character in group name '?=[^\t]\*' at position 5
> 
> 
> 

This is my code:

```
re = r"(?(?=[^\t]*)([\t]+))";
str = 'a            bold, italic,           teletype';
subst = ',';

result = re.sub($re, $subst, $str);

```