bichen-01

 

 

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);
        
    }
    
    
    
}

 

分类:

技术点:

相关文章:

  • 2022-01-21
  • 2021-11-24
  • 2021-12-10
  • 2022-12-23
  • 2021-07-24
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-22
  • 2022-01-03
  • 2022-12-23
  • 2021-12-18
  • 2022-01-12
  • 2021-07-25
相关资源
相似解决方案