General questions about using TextPad
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
rgc3679
- Posts: 2
- Joined: Tue May 18, 2010 12:29 am
Post
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
-
Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
-
Contact:
Post
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.
Hope this was helpful.............good luck,
Bob
-
rgc3679
- Posts: 2
- Joined: Tue May 18, 2010 12:29 am
Post
by rgc3679 »
Thanks Bob. That worked perfectly!
--Bob