Skip to content

Instantly share code, notes, and snippets.

@tekk555
Last active March 25, 2022 01:43
Show Gist options
  • Save tekk555/347896307eaa8d03c7e56f55b88ab3f9 to your computer and use it in GitHub Desktop.
Save tekk555/347896307eaa8d03c7e56f55b88ab3f9 to your computer and use it in GitHub Desktop.
左辺と右辺を交換する正規表現
左辺と右辺を交換する正規表現
検索文字列
([ \t]*)(.*[^ ])([ ]*=[ ]*)(.*[^ ])(;)
置換文字列
\1\4\3\2\5
説明
()でグループ化した文字列を、置換文字列で入れ替えする仕組み。
@tekk555
Copy link
Author

tekk555 commented Mar 25, 2022

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment