I'm using NetBeans and I want to know what regular expression to use to add single/double quotes around each constant. Every constant is defined like this:
define(SYSTEM_BASEDIR, '/base/dir');
Afaik, that is not the correct way. I need to convert all constants to this:
define('SYSTEM_BASEDIR', '/base/dir');
Thanks in advance to all helpers!
You are correct that define(SYSTEM_BASEDIR, '/base/dir');
is invalid syntax since you are using the constant before defining it.
Now for the regex:
Open up the Replace Dialog (Ctrl+H)
Find What: define\((\w*),
Replace With: define("$1",
This will turn this:
define(BLA,"test");
into:
define("BLA","test");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With