Regular Expression to replace “ {” with “(newline){” in xcode

前端 未结 5 1790
北恋
北恋 2021-02-02 08:02

I need to change my coding style of putting opening braces in same line to new line. I need to find and replace the (space){ with (newline){. I heard using regular expression fi

5条回答
  •  北恋
    北恋 (楼主)
    2021-02-02 08:35

    You can use [\n\r] to describe newline It's a shame, I came across with that when I tap on magnifier icon next to search bar while finding something in a single file.

    To see several other expressions:

    1. go to a file
    2. do cmd+f and open search
    3. tap on the magnifier icon at the left-hand side of search field at the top
    4. you can see other expressions in the dropdown menu

提交回复
热议问题