import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class demo1 {

    /**java正则表达式
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        String email = "cingbo@ss.com";
        Pattern patten = Pattern
                .compile("[\\w\\.\\-]+@([\\w\\-]+\\.)+[\\w\\-]+");
        Matcher matcher = patten.matcher(email);
        System.out.println(matcher.matches());
    }

}

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章:

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