2. 多次替换:可以通过多次替换来将单位数的数字前填充0以实现格式化输出对齐,比如:
./Season 6/Scene 2.mp3
通过替换 ‘s/([[:digit:]]+)/0&/g’ 变成
./Season 06/Scene 02.mp03
再通过 s/Season 0[/]Scene ([0-9]{2}).mp03/\1-\2.mp3/g ,变成
06-02.mp3
2. 多次替换:可以通过多次替换来将单位数的数字前填充0以实现格式化输出对齐,比如:
./Season 6/Scene 2.mp3
通过替换 ‘s/([[:digit:]]+)/0&/g’ 变成
./Season 06/Scene 02.mp03
再通过 s/Season 0[/]Scene ([0-9]{2}).mp03/\1-\2.mp3/g ,变成
06-02.mp3
No comments yet.
RSS feed for comments on this post.
Sorry, the comment form is closed at this time.
Powered by WordPress