新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSCommonPattern
CommonPattern

java.lang.Object
|---ohos.utils.CommonPattern
public class CommonPattern
extends Object提供獲取用于驗證常見模式的正則表達(dá)式的方法。
在對常用模式進(jìn)行正則表達(dá)式驗證之前,需要先使用該類中的方法獲取匹配的正則表達(dá)式。
構(gòu)造函數(shù)摘要
| 構(gòu)造函數(shù) | 描述 |
|---|---|
| CommonPattern() | 用于創(chuàng)建實例的默認(rèn)構(gòu)造函數(shù) |
方法總結(jié)
| 修飾符和類型 | 方法 | 描述 |
|---|---|---|
| static Pattern | getDomainName() | 獲取驗證域名的正則表達(dá)式。 |
| static Pattern | getEmailAddress() | 獲取用于驗證電子郵件地址的正則表達(dá)式。 |
| static Pattern | getIpAddress() | 獲取用于驗證 IPv4 地址的正則表達(dá)式。 |
| static Pattern | getWebUrl() | 獲取驗證網(wǎng)址的正則表達(dá)式。 |
| 從類 java.lang.Object 繼承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
構(gòu)造函數(shù)詳細(xì)信息
CommonPattern
public CommonPattern()
用于創(chuàng)建實例的默認(rèn)構(gòu)造函數(shù)
方法詳情
getWebUrl
public static Pattern getWebUrl()
獲取驗證網(wǎng)址的正則表達(dá)式。
返回:
返回與 Web URL 模式匹配的正則表達(dá)式。
getIpAddress
public static Pattern getIpAddress()
獲取用于驗證 IPv4 地址的正則表達(dá)式。
返回:
返回匹配 IPv4 地址模式的正則表達(dá)式。
getDomainName
public static Pattern getDomainName()
獲取驗證域名的正則表達(dá)式。
返回:
返回匹配域名模式的正則表達(dá)式。
getEmailAddress
public static Pattern getEmailAddress()
獲取用于驗證電子郵件地址的正則表達(dá)式。
返回:
返回與電子郵件地址模式匹配的正則表達(dá)式。
當(dāng)前文章:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSCommonPattern
當(dāng)前網(wǎng)址:http://www.fisionsoft.com.cn/article/cdjcedh.html


咨詢
建站咨詢
