Multi-line regex search in whole file

前端 未结 6 974
悲哀的现实
悲哀的现实 2021-02-15 16:47

I\'ve found loads of examples on to to replace text in files using regex. However it all boils down to two versions:
1. Iterate over all lines in the file and apply regex to

6条回答
  •  情深已故
    2021-02-15 16:59

    I'm with Bart; you really should be using some kind of parser for this.

    Or, if you don't mind spawning a child process, you could just use sed (there's a native port on windows, or you can use Cygwin)

提交回复
热议问题