Skip to content

Instantly share code, notes, and snippets.

@Rrrapture
Created December 1, 2016 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rrrapture/108e5085edeb80880de300ebc566c177 to your computer and use it in GitHub Desktop.
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
^\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