Question: I have a string:

`/1/2/3/anystring as follows here even forward slashes/////`

how can i capture the groups

`(1) (2) (3) (anystring as follows here even forward slashes/////)`

or conditionally if (2) or (3) cannot be captured then capture one (1) or (1)/(2) or (1)(2)(3) or all

i have tried

`^/(.*)/(.*)/(.*)/(.*)`

but it doesn't capture `/1/2/` or `/1/` or `/1/2/3/`.

Answer: 
I have a suggestion,if you have install MySQL database,you follow this,open pycharm and click File->Settings->Project->Project Interpreter,then select your Python interpreter and click install button (the little green plus sign),input "MySQL-Python" and click the button "install package",you will install MySQL-Python successfully.If you have not install MySQL database,you need install MySQL database first.
If you are unable to install MySQL CLient in Pycharm, try opening the Terminal (Alt+F12) and write the command

```
pip install --only-binary :all: mysqlclient

```

This might help!