Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #1028963 - assertSimpleDomainName

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2696L/17K).

sS assertSimpleDomainName(S s) {
  if (!regexpMatchesIC("[a-z0-9\\-]+\\.[a-z]+", s))
    fail("Not a simple domain name: " + s);
  ret s;
}

download  show line numbers  debug dex   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028963
Snippet name: assertSimpleDomainName
Eternal ID of this version: #1028963/2
Text MD5: be66213b42c7f7a3a341cdaf2cbba9f1
Transpilation MD5: 93b2ae7c2722dfcbac352351a3473656
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-14 17:23:39
Source code size: 143 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 8 / 23
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1028963 & http://1028963.tinybrain.de