컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
strings.url_decode
strings.url_decode(url_string)
설명
URL 문자열이 지정되면 이스케이프 문자를 디코딩하고 인코딩된 UTF-8 문자를 처리합니다. 디코딩이 실패하면 빈 문자열을 반환합니다.
매개변수 데이터 유형
STRING
반환 유형
STRING
코드 샘플
예 1
이 예시에서는 양수 테스트 사례를 보여줍니다.
strings.url_decode("three%20nine%20four") = "three nine four"
예 2
이 예시에서는 빈 문자열 사례를 보여줍니다.
strings.url_decode("") // ""
예시 3
이 예시에서는 알파벳이 아닌 문자 처리를 보여줍니다.
strings.url_decode("%E4%B8%8A%E6%B5%B7%2B%E4%B8%AD%E5%9C%8B") // "上海+中國"
예 4
이 예시에서는 샘플 URL 디코딩을 보여줍니다.
strings.url_decode("http://www.google.com%3Fparam1%3D%22+1+%3E+2+%22%26param2%3D2%3B") // 'http://www.google.com?param1="+1+>+2+"¶m2=2;'
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-29(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-29(UTC)"],[[["\u003cp\u003e\u003ccode\u003estrings.url_decode\u003c/code\u003e decodes URL strings, handling escape characters and encoded UTF-8 characters, and is supported in Rules and Search.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns an empty string if the URL decoding fails.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts a single parameter of the type \u003ccode\u003eSTRING\u003c/code\u003e representing the URL string to decode and it also returns a \u003ccode\u003eSTRING\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt effectively handles non-alphabet characters in addition to standard URL encoding.\u003c/p\u003e\n"]]],[],null,["### strings.url_decode\n\nSupported in: \n[Rules](/chronicle/docs/detection/default-rules) [Search](/chronicle/docs/investigation/udm-search) \n\n strings.url_decode(url_string)\n\n#### Description\n\nGiven a URL string, decode the escape characters and handle UTF-8 characters that have been encoded. Returns empty string if decoding fails.\n\n#### Param data types\n\n`STRING`\n\n#### Return type\n\n`STRING`\n\n#### Code samples\n\n##### Example 1\n\nThis example shows a positive test case. \n\n strings.url_decode(\"three%20nine%20four\") = \"three nine four\"\n\n##### Example 2\n\nThis example shows an empty string case. \n\n strings.url_decode(\"\") // \"\"\n\n##### Example 3\n\nThis example shows non-alphabet characters handling. \n\n strings.url_decode(\"%E4%B8%8A%E6%B5%B7%2B%E4%B8%AD%E5%9C%8B\") // \"上海+中國\"\n\n##### Example 4\n\nThis example shows a sample URL decoding. \n\n strings.url_decode(\"http://www.google.com%3Fparam1%3D%22+1+%3E+2+%22%26param2%3D2%3B\") // 'http://www.google.com?param1=\"+1+\u003e+2+\"¶m2=2;'"]]