Skip to content

Instantly share code, notes, and snippets.

@Rrrapture
Created December 1, 2016 01:33
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/2939ab0082b944aaca9a37a2bec117ca to your computer and use it in GitHub Desktop.
Save Rrrapture/2939ab0082b944aaca9a37a2bec117ca to your computer and use it in GitHub Desktop.
RegEx Find/Replace snippet to swap data property name and data type
^\s\*\s([a-z0-9_]+)[\t]([a-z_]+)$
* \2 \1
RegEx Find/Replace Snippet to swap data property name and data type in commented out JavaScript file.
Used in Sublime Text editor. Probably compliant with most regex-supporting languages including JS
Line 1 is Find, Line 2 is replace field
ie:
* event_category string
with
* string event_category
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment