Java regex for code, such as 'this.'? -


how search through source code find , remove uses of 'this' example: 'this.getversion()' change 'getversion()'

i figure need regex, don't know how create 1 search code it.

thanks.

i advice against that. because have method

public class foo {      private int a;      public void bar (int a) {         this.a = a;     }   } 

by removing this., semantics of method altered.

you cannot modify semantic-safe without building parse-tree , doing semantical analysis.


if wish proceed:

\bthis\. 

is regex trick.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -