LoginSignup
0
0

More than 1 year has passed since last update.

電話番号/カード番号の入力規制集【REGEX】

Last updated at Posted at 2021-09-01

Answersで回答する時に使う情報のまとめに戻る

オーストラリアかな?

AND( 
NOT(ISBLANK(MobilePhone)) ,
NOT(REGEX( MobilePhone ,"(^ [+] 614[0-9]{2}(| )[0-9]{3}(| )[0-9]{3}$)|(^04[0-9]{2}(| )[0-9]{3}(| )[0-9]{3}$)"))
) 

オーストラリア形式を補完する数式

IF(LEFT(Phone,4) = "+610","+61"&RIGHT(Phone,LEN(Phone)-4), 
IF(LEFT(Phone,3) = "610","+61"&RIGHT(Phone,LEN(Phone)-3), 
IF(LEFT(Phone,2) = "61","+61"&RIGHT(Phone,LEN(Phone)-2),  
Phone)))

スイス

AND(
NOT(ISBLANK(Phone)) ,
NOT(REGEX(Phone, "[+]{1}41[0-9]{9}"))
)

RegEx for phone number format "+1 ##########"

What's the regular expression that validates the phone number format of '+1', followed by a space, followed by 10 consecutive digits?

AND(
NOT(ISBLANK(Phone)) ,
NOT(REGEX(Phone, "[+]{1}1 [0-9]{10}"))
)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0