How do you match multiple lines with dot (DOTALL) in eclipse find regex

前端 未结 2 692
礼貌的吻别
礼貌的吻别 2021-01-19 08:32

I would like to convert this:

  def getEmployeeReminders(employeeId: Int, page: Option[Int], pageSize: Option[Int], js_callback: Option[String]) = Action {
          


        
2条回答
  •  半阙折子戏
    2021-01-19 08:51

    You can use the (?s) inline mode modifier which will force the dot . to match newline characters as well. In your answer, you are using a negated character class so there is no need to use this modifier, and simply use \n

    Find:    = (Action[^}]*})
    Replace: = \n    Restrict(companyAdmin, new MyDeadboltHandler) {\n     \1}
    

    Using the dot . instead:

    Find:    (?s)= (Action.*?})
    Replace: = \n    Restrict(companyAdmin, new MyDeadboltHandler) {\n     \1}
    

提交回复
热议问题