Skip to content

Instantly share code, notes, and snippets.

@Senorsen
Last active October 30, 2018 06:08
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 Senorsen/1a60556be7efda92ef033498eccf283d to your computer and use it in GitHub Desktop.
Save Senorsen/1a60556be7efda92ef033498eccf283d to your computer and use it in GitHub Desktop.
Replace styles['aa-bb-cc'] to styles.aaBbCc

js Replace

Find

styles\['(\w+)(-([a-z])(\w*))(-([a-z])(\w*))?(-([a-z])(\w*))?(-([a-z])(\w*))?(-([a-z])(\w*))?(-([a-z])(\w*))?']

Replace

styles.$1\u$3$4\u$6$7\u$9$10\u$12$13\u$15$16\u$18$19

css Replace

Find

\.(\w+)(-([a-z])(\w*))(-([a-z])(\w*))?(-([a-z])(\w*))?(-([a-z])(\w*))?(-([a-z])(\w*))?(-([a-z])(\w*))?

Replace

.$1\u$3$4\u$6$7\u$9$10\u$12$13\u$15$16\u$18$19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment