Class ParseURI

java.lang.Object
io.github.enxign.shed.toolkit.ParseURI

public final class ParseURI extends Object
ParseURI 클래스는 URI를 파싱하여 도메인 부분을 추출하는 기능을 제공합니다.
Since:
2020-01-09
Version:
1.0
 수정일       수정자      수정내용
 ----------   ---------   -------------------------------
 2020-01-09   first       create
 
Author:
enxign
  • Constructor Details

    • ParseURI

      public ParseURI()
  • Method Details

    • get

      public static String get(String target)
      주어진 URI에서 도메인 부분을 추출합니다.
      Parameters:
      target - URI 문자열
      Returns:
      도메인 부분이 포함된 문자열 This method uses a regular expression to match the URI structure and extract the domain. It captures the protocol (http or https), the domain name, and any port number if present. Example: Input: "https://www.example.com:8080/path/to/resource?query=value#fragment" Output: "https://www.example.com:8080" This method is useful for extracting the base URL from a full URI, which can be used for various purposes such as logging, redirection, or API calls.