xxx{1}xxx{1.seat}xxxx{seat.1}xxx{obj.1.seat}xxxxxxxxx{mp1table}xxx{mp1}xxx{1table}xxxxxxx 输出正则公式将匹配{1} {1.seat} {seat.1} {obj.1.seat}
时间: 2023-07-24 13:25:54 浏览: 42
您可以使用以下正则表达式来匹配{1}、{1.seat}、{seat.1}和{obj.1.seat}:
```
\{[\d\w]*\.?[\d\w]+\}
```
这个正则表达式将匹配大括号中的一个或多个字母、数字或下划线,也可以使用点号将它们连接起来。如果大括号中包含点号,那么点号必须出现在大括号中的字母、数字或下划线的中间位置。例如,它将匹配{1}、{1.seat}、{seat.1}和{obj.1.seat}。
相关问题
xxx{1}xxx{1.seat}xxxx{seat.1}xxx{obj.1.seat}xxxxxxxxx{mp1table}xxx{mp1}xxx{1table}xxxxxxx 输出正则公式将匹配{1}、{1.seat}、{seat.1}和{obj.1.seat}
您可以使用以下正则表达式来匹配{1}、{1.seat}、{seat.1}和{obj.1.seat}:
```
\{[\d\w]+(\.[\d\w]+)*\}
```
这个正则表达式将匹配大括号中的一个或多个字母、数字或下划线,也可以使用点号将它们连接起来。如果大括号中包含点号,那么点号必须出现在大括号中的字母、数字或下划线的中间位置,并且可以出现多次。例如,它将匹配{1}、{1.seat}、{seat.1}和{obj.1.seat}。
xxx{1}xxx{1.seat}xxxx{seat.1}xxx{obj.1.seat}xxxxxxxxx{mp1table}xxx{mp1}xxx{1table}xxxxxxx 输出正{1} {1.seat} {seat.1} {obj.1.seat}则公式,匹配内容为
您可以使用以下正则表达式来匹配您所需的内容:
```
\{\w+(\.\w+)*\}
```
这个正则表达式将匹配大括号中的一个或多个单词,每个单词可以由字母、数字或下划线组成,也可以使用点号将它们连接起来。例如,它将匹配{1}、{1.seat}、{seat.1}、{obj.1.seat}、{mp1table}、{mp1}和{1table}。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)