[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Lovepython015/Python/master/Article/PythonBasis/python14/3.md [Back]  [Original]

# 



{min,max} min  max  max  max  max  min `\b[1-9][0-9]{3}\b`, 1000 ~ 9999 ( \b  `\b[1-9][0-9]{2,4}\b` 100 ~ 99999 

 4  7 

```Python
import re

a = 'java*&39android##@@python'

# 

findall = re.findall('[a-z]{4,7}', a)
print(findall)
```



```txt
['java', 'android', 'python']
```




 0 





 `?` 

```Python
import re

a = 'java*&39android##@@python'

# 

re_findall = re.findall('[a-z]{4,7}?', a)
print(re_findall)

```



```txt
['java', 'andr', 'pyth']
```

android  andr Python   pyth 




> `?` 0  1 
>
> `+` 1 
>
> `*` 0 


,:

|     |     |                           |
| ------- | ------- | ----------------------------- |
|       |     | {0,1}   |
| +       | +     |  {1,}   |
| *       | *     |    {0,} |
| {n}     | {n}   |  n                  |
| {n,m}   | {n,m} |  n  m         |
| {n,}    | {n,}  |  n                  |

Web Proxy Viewer  |  New URL  |  Original Page