考试第二题

 

 

复制代码
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);
        
    }
    
    
    
}
复制代码

 

本文作者:AxeBurner

本文链接:https://www.cnblogs.com/bichen-01/p/11335883.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   AxeBurner  阅读(116)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.