【发布时间】:2020-10-06 00:14:50
【问题描述】:
我有需要从 mysql 转储文件中提取表列表的情况。我用 sed 试过了
sed 's/DROP TABLE.*?`(.*?)`/\1/' baza.sql > 1.txt
但出现此错误
sed: -e expression #1, char 26: invalid reference \1 on `s' command's RHS
我在我的正则表达式中遗漏了什么?
【问题讨论】:
-
没有错误,但在 1.txt 中有完整的转储内容