-
Couldn't load subscription status.
- Fork 0
URLs
Giuseppe Cannella edited this page Feb 19, 2020
·
7 revisions
| Type name | example |
|---|---|
| URL | url with protocol |
| http://www.aaa.com | |
| ftp://www.aaa.com | |
| xyz://aaa.com | |
| a://b | |
| ftp://b |
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.URL
assert(validate[URL]("http://www.aaa.com") == Some("http://www.aaa.com"))| Type name | example |
|---|---|
| URL1 | http and https urls with www |
| http://www.aaa.com | |
| Https://www.aaa.com | |
| https://www.google.com:8080/url? | |
| HTTP://www.example.com/wpstyle/?p=364 |
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.URL1
assert(validate[URL1]("http://www.aaa.com") == Some("http://www.aaa.com"))| Type name | example |
|---|---|
| URL2 | http urls with www |
| http://www.aaa.com | |
| HTTP://www.example.com/wpstyle/?p=364 |
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.URL2
assert(validate[URL2]("http://www.aaa.com") == Some("http://www.aaa.com"))| Type name | example |
|---|---|
| URL3 | https urls with www |
| HTTPS://www.aaa.com | |
| https://www.google.com:8080/url? |
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.URL3
assert(validate[URL3]("https://www.aaa.com") == Some("https://www.aaa.com"))| Type name | example |
|---|---|
| FTP | ftp and ftps urls |
| ftp://aaa.com | |
| FTP://aaa.com | |
| FTPS://aaa.com | |
| ftps://google.com:8080/url? |
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.FTP
assert(validate[FTP]("ftp://aaa.com") == Some("ftp://aaa.com"))| Type name | example |
|---|---|
| FTP1 | ftp urls |
| ftp://aaa.com | |
| FTP://aaa.com |
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.FTP1
assert(validate[FTP1]("ftp://aaa.com") == Some("ftp://aaa.com"))| Type name | example |
|---|---|
| FTP2 | ftps urls |
| ftps://aaa.com | |
| FTPS://aaa.com |
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.FTP2
assert(validate[FTP2]("ftps://aaa.com") == Some("ftps://aaa.com"))| Type name | example |
|---|---|
| Domain | no www no protocol |
| plus.google.com | |
| google.com |
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.Domain
assert(validate[Domain]("google.com") == Some("google.com"))