Need to replace a multiple line large string
Posted: Mon Sep 26, 2011 1:23 pm
Hi
my source text ist for example this one (java-code):
Now i want to replace the following lines
into this
I have build a regular expression, that works fine at all regex-tester i have found, but not in textpad :/
My regular expression:
Replace expression:
Does anybody know why it does not work for TextPad?
Regards
Majo
my source text ist for example this one (java-code):
Code: Select all
/**
* Return the current page's binding container.
* @return the current page's binding container
*/
public static BindingContainer getBindingContainer1(String name) {
System.out.println("getBindingContainer1; " + "#{bindings." + name +
"}");
return (BindingContainer)resolveExpression("#{bindings." + name + "}");
}
Code: Select all
System.out.println("getBindingContainer1; " + "#{bindings." + name +
"}");
Code: Select all
if (log.isTraceEnabled()) log.trace("getBindingContainer1; " + "#{bindings." + name + "}");
My regular expression:
Code: Select all
System\.out\.println\((.*?)[\s]{1,2}(.*?)\);Code: Select all
if (log.isTraceEnabled()) log.trace(\1\2);Regards
Majo