我正在尝试使用sed但使用正则表达式取消注释文件内容(例如:[0-9] {1,5})
# one two 12
# three four 34
# five six 56
Run Code Online (Sandbox Code Playgroud)
以下是有效的:
sed -e 's/# one two 12/one two 12/g' /file
Run Code Online (Sandbox Code Playgroud)
但是,我想要的是使用正则表达式模式替换所有匹配而不输入数字但保留结果中的数字.