Code Conversion One Liners for Vim

This documents useful commands for converting code from one language or one version of a language to another using the VIM text editor.

PHP

eregi to preg_match

:%s/eregi("\(.*\)",/preg_match("|\1|",/g

Topic revision: r1 - 2017-08-16 - ZachBornheimer
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback