京东自营 618 + 国补 iPhone 历史最低价          领 618 红包,最高25618元

Java 使用模式和匹配器类

使用模式和匹配器类
实例源码:
源代码:
执行
执行中...
执行结果:
  • Regex:[abc]@.
  • Text:cric@mypkg.com is a valid email address
  • Matched Text:c@m, Start:3, End:6
  • Regex:[abc]@.
  • Text:asdf@mypkg.com is invalid
  • No match found
  • Regex:[abc]@.
  • Text:a@asdf@fdsa@u
  • Matched Text:a@a, Start:0, End:3
  • Matched Text:a@u, Start:10, End:13
  • Regex:[abc]@.
  • Text:There is an @ sign here
  • No match found
  •  
    本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。

    编辑于

    关注时代Java

    关注时代Java