This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PLEASE DO IT CAREFULLY, SPECIAL CASES MAY OCCUR, SO BULK REPLACE IS NOT RECOMMENDED | |
find: (:)(((?!:).)*?)(\s*=>) | |
replace: ${2}: | |
explanation: | |
i. the brackets are used to create capture/matches groups, so that you can ommit the : (group 1) and the => (group 3) | |
and use only the key (group 2) | |
ii. ((?!:).)*? finds KEY text, it searches any text, expect it should not have : included, that's the role of (?!:) part, | |
the ? is used to mark a non-greedy search, if not marked, some text like :KEY1 => VAL1, :KEY2 => VAL2 will end up |