Created
December 1, 2016 01:49
-
-
Save Rrrapture/108e5085edeb80880de300ebc566c177 to your computer and use it in GitHub Desktop.
RegEx to convert a commented line of "data type" "property name" to a key value pair with comma
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
^\s?(?:\*|//)\s?[A-Za-z0-9_]+\s([a-z0-9_]+)$ | |
\1: "", | |
RegEx to convert a commented line of "data type" "property name" to a key value pair with comma | |
Assumes property names are lowercase, it's the only part that's captured | |
Line 1 - Find | |
Line 2 - replace with | |
ex: | |
Find: | |
* string event_category | |
replace with: | |
event_category: "", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment