| Share this post! | Vote this! |
|
Using regular expressions in eclipse to search and replace text in a file, is straight forward and very handy!
All you need to know is that the matched text is going to be available in the replace textbox using the '$' dollar sign.
So to access the first matched element use $1, for the second $2 and so on.
I had an old method with hundreds of lines doing calling a getAttribute("X") and casting the result to a string.
More...
All you need to know is that the matched text is going to be available in the replace textbox using the '$' dollar sign.
So to access the first matched element use $1, for the second $2 and so on.
I had an old method with hundreds of lines doing calling a getAttribute("X") and casting the result to a string.
1.(String)object1.getAttribute("X")2.(String)object2.getAttribute("Y")3.(String)objectN.getAttribute("Z")More...



0 comments:
Post a Comment