Question: first, I want to upload .xlxs and .csv file in node.js. then I want to read this file, edit this file, and also want to save this file in mongoose schema in the database.
and I am new in node.js and I want to learn node backend
please guide me, how I can do this and is this possible?

Answer: 
If letters are duplicated, you can try something like this

```
for w in text.split():
    if len(w) %2 != 0:
        print(w)
        continue
    if w[0::2] == w[1::2]:
        print(w[0::2])
        continue
    print(w)

```
i found solution in javascript that works fine :

```
([a-z])\1(?:(?=([a-z])\2)|(?<=\3([a-z])\1\1))

```

but in some how it doesn't work in python because lookbehind can't take references to group so i came up with another solution that can work in this example :

```
([a-z])\1(?:(?=([a-z])\2)|(?=[^a-z])))

```

try it [here](https://regex101.com/r/yLrB0p/1)