Skip to content

Instantly share code, notes, and snippets.

@cjsewell
Last active July 13, 2017 03:58
Show Gist options
  • Save cjsewell/129fc611e1a04b7fbdd1 to your computer and use it in GitHub Desktop.
Save cjsewell/129fc611e1a04b7fbdd1 to your computer and use it in GitHub Desktop.

#Just a list of regular expressions I use

  • Convert Silverstripe $db or $casting arrays to property comments

    ["'](.*?)["']\s+=>\s+["'](.*?)["'],? => * @property $2 \$$1

  • Convert Standard propertied to Silverstripe $db array

    public \$(.*); => '$1' => 'VarChar\(255\)',

  • Search and replace the border-radius sass mixin with plain css3 alternative

    @include\s+(border-radius)\((.*)\) -> $1:$2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment