Skip to content

Instantly share code, notes, and snippets.

@InvisibleKind
Last active August 29, 2015 14:08
Show Gist options
  • Save InvisibleKind/fef8afb4e55fe557f392 to your computer and use it in GitHub Desktop.
Save InvisibleKind/fef8afb4e55fe557f392 to your computer and use it in GitHub Desktop.
Regexp for replacing array() with [] in #YOUR_IDE_NAME#
search: array\(([^\(\)]++)\)
replace with: [$1]
@InvisibleKind
Copy link
Author

Note: this will not replace all the nested arrays, but only the most nested.
E.g array(1, 2, 3, array(4, 5)) will match only array(4, 5)
So, you need to run replaces untill everything is replaced

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