[a-zA-Z]
签到
http://wechat.poso2o.com/wxshop/sign_in/sign_in.jsp?shop_id=XXX&preview=1
http://wechat.poso2o.com/wxshop/goods/goods20181218.jsp?shop_id=XXX
[a-zA-Z]
1.匹配变量
[a-zA-Z]* =
2.匹配括号里面的强转类型
[(][a-zA-Z]*[)]
匹配Android 里面的点击事件:
1.匹配findViewById(普通的findViewById)
[a-zA-Z]* = [(][a-zA-Z][)] findViewById[(]R.id.[a-zA-Z_][)];
例如:
mTvBrokeage = (TextView) findViewById(R.id.tv_brokeage_hhfd);
2.第二种findViewById(没有指定类型):
[a-zA-Z]* = findViewById[(]R.id.[a-zA-Z_]*[)];
mTvRightNowEarn = findViewById(R.id.tv_right_now_earn);
3.匹配view.findViewById
[a-zA-Z]* = [(][a-zA-Z][)] [a-zA-z].findViewById[(]R.id.[a-zA-Z_]*[)];
mVpContent = (ViewPager) view.findViewById(R.id.vp_content);
mLlyParentContent = view.findViewById(R.id.lly_parent_content);
mTvCommissionRate = view.findViewById(R.id.tv_commission_rate);
mTvCommissionDiscount = view.findViewById(R.id.tv_commission_discount);
4.匹配没有实例的点击事件
findViewById[(]R.id.[a-zA-z_][)].setOnClickListener[(][a-zA-Z][)];
findViewById(R.id.ty_share_earn).setOnClickListener(this);
findViewById(R.id.item_na_goods_detail_second_more_comment).setOnClickListener(this);
5.匹配点击事件:
[a-zA-Z].setOnClickListener[(][a-zA-Z][)];
mTvClickAll.setOnClickListener(this);
String rawCodeBlock = mPsiCodeBlock.getText();
rawCodeBlock=rawCodeBlock.replaceAll("[a-zA-Z]* = [(][a-zA-Z][)] findViewById[(]R.id.[a-zA-Z_][)];","");
String rawCodeBlock = mPsiCodeBlock.getText();
rawCodeBlock=rawCodeBlock.replaceAll("[a-zA-Z]* = [(][a-zA-Z]*[)] findViewById[(]R.id.[a-zA-Z_]*[)];\n","");
rawCodeBlock=rawCodeBlock.replaceAll("[a-zA-Z]* = findViewById[(]R.id.[a-zA-Z_]*[)];\n","");
rawCodeBlock=rawCodeBlock.replaceAll("[a-zA-Z]* = findViewById[(]R.id.[a-zA-Z_]*[)];\n","");
rawCodeBlock=rawCodeBlock.replaceAll("[a-zA-Z]* = [(][a-zA-Z]*[)] [a-zA-z]*.findViewById[(]R.id.[a-zA-Z_]*[)];\n","");
rawCodeBlock=rawCodeBlock.replaceAll("[a-zA-Z]* = findViewById[(]R.id.[a-zA-Z_]*[)];\n","");
rawCodeBlock=rawCodeBlock.replaceAll("findViewById[(]R.id.[a-zA-z_]*[)].setOnClickListener[(][a-zA-Z]*[)];\n","");
rawCodeBlock=rawCodeBlock.replaceAll("[a-zA-Z]*.setOnClickListener[(][a-zA-Z]*[)];\n","");