首页 > 其他 > 详细

考试第二题

时间:2019-08-11 19:37:19      阅读:115      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

 

package test02;

public class Demo {
    
    //给你一组字符串如:iu7i8hy4jnb2,让你编程输出里面的数字:7842

    public static void main(String[] args) {
        
        //先将字符串存入  待会进行提取操作
        String message = "iu7i8hy4jnb2";
        //先把待会要提取的东西 弄出来
        String regex = "i|u|h|y|j|n|b";
        
        System.out.println("提取前:"+message);
        //进行提取操作
        message = message.replaceAll(regex, "");
        
        System.out.println("提取后:"+message);
        
    }
    
    
    
}

技术分享图片

 

考试第二题

原文:https://www.cnblogs.com/bichen-01/p/11335883.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!