0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

IPアドレスの数式

Last updated at Posted at 2021-08-17

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

IPアドレスに関連する質問があったので、まとめておきます。

4番目のオクテットを取得し、/ 29を削除して、値に変換するための最終式:

VALUE( 
LEFT(MID(IP_Block__c, FIND(".",IP_Block__c, FIND(".", IP_Block__c, 
FIND(".", IP_Block__c)+1)+1)+1,LEN(IP_Block__c)-FIND(".", IP_Block__c, 
FIND(".", IP_Block__c, FIND(".", IP_Block__c)+1)+1)), 
(FIND("/", MID(IP_Block__c, FIND(".",IP_Block__c, FIND(".", IP_Block__c, 
FIND(".", IP_Block__c)+1)+1)+1,LEN(IP_Block__c)-FIND(".", IP_Block__c, 
FIND(".", IP_Block__c, FIND(".", IP_Block__c)+1)+1)))-1))
)

I'm needing to parse the IP Address in a Formula field to get the third octet.


NOT(
REGEX( ankit__IP_ADDRESS__c,
"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
))

Valid IP Address, VAlidation rule

参考資料

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?