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

3
LINES

< > BotCompany Repo | #1032721 // apexDomain (drop subdomains) - returns null on weird input

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

Libraryless. Click here for Pure Java version (3985L/23K).

1  
sS apexDomain(S domain) {
2  
  ret regexpExtractIC("[a-z0-9\\-]+\\.[a-z]+$", domain);
3  
}

Author comment

Began life as a copy of #1029642

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032721
Snippet name: apexDomain (drop subdomains) - returns null on weird input
Eternal ID of this version: #1032721/1
Text MD5: b72802278bb6dc1bdbe5888c6074b1a7
Transpilation MD5: 0773819ddcbdf7320257d77d2fb2ae9e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-03 20:46:22
Source code size: 86 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 169 / 242
Referenced in: [show references]