Skip to content

Commit

Permalink
get hostname from URL
Browse files Browse the repository at this point in the history
  • Loading branch information
HasanMhdAmin committed Jun 17, 2019
0 parents commit d82e2a3
Show file tree
Hide file tree
Showing 13 changed files with 26,345 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

232 changes: 232 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Hostname-maven.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4" />
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# **Hostname**
get the hostname of a URL


## Sample
suppose you have these URLs:
* https://www.example.com/watch?v=TEST
* https://en.example.org/wiki/Software
* one.two.three.four.example.com
* https://www.example.co.uk
* example.com

and you need the output to be only the host name,
in the previous example the result for all domains should be **`example`**.


## Author
Hasan Mhd Amin on GitHub [@HasanMhdAmin](https://github.com/HasanMhdAmin)
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.HasanMhdAmin</groupId>
<artifactId>Hostname</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>
</plugins>
</build>


</project>
Loading

0 comments on commit d82e2a3

Please sign in to comment.