Page 1 of 1

Help fix logger stmts.

Posted: Tue May 18, 2010 12:33 am
by rgc3679
I have logger stmts like this:

Code: Select all

logger.info("validatePassword - password = " +password);
logger.debug("createGoalStrs - goalArry = " +goalArry);
logger.debug("findAllGoalsByID - empty goalStr");
I want to change them to this:

Code: Select all

logger.info("password = " +password);
logger.debug("goalArry = " +goalArry);
logger.debug("empty goalStr");
The last thing I tried is:

Code: Select all

Find what:    "\(.* - \) \(.* \)
Replace with: "\2
My brain doesn't do RE very well... can you help?

Thanks,

--Bob

Posted: Tue May 18, 2010 1:03 am
by Bob Hansen
This can be done with two separate RegEx strings:

Search for: \(.*\+(.*)\)
Replace with: ("\1 = " +\1)

and then run these

Search for: \(.*- (.*)\)
Replace with: ("\1)

============================
Using POSIX syntax
RegEX is ON.

Posted: Tue May 18, 2010 5:48 am
by rgc3679
Thanks Bob. That worked perfectly!

--Bob