([\w\W]*)

例子:

const str= `
pages: [
      'a',
      'b',
      'c'
],
windows: {
}
`
str.replace(/([\w\W]*)/,'any')

正则匹配多行任意字符

参考:https://www.jianshu.com/p/ff05d467e145

相关文章:

  • 2021-12-25
  • 2022-01-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-07-06
  • 2022-12-23
猜你喜欢
  • 2021-08-02
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
相关资源
相似解决方案