相关疑难解决方法(0)

意外结束正则表达式

我想从路径中只获取带扩展名的文件名:

C:\\Users\\anandada\\workspace\\MyTestProject\\src\\OpenTest.c
Run Code Online (Sandbox Code Playgroud)

以下声明,

fileName = re.match("[^\\]*.c$", fileName)
Run Code Online (Sandbox Code Playgroud)

给出错误:

意外结束正则表达式

我使用的是python 3.3.2

python regex python-3.3

1
推荐指数
1
解决办法
8719
查看次数

标签 统计

python ×1

python-3.3 ×1

regex ×1