From 96983210918bbfe7b56f2d14ca19caccec94a9ba Mon Sep 17 00:00:00 2001 From: Ahmad Firdaus Date: Fri, 18 Oct 2024 14:13:22 +0700 Subject: [PATCH] Adding translations --- translations/README-id.md | 133 ++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 69 deletions(-) diff --git a/translations/README-id.md b/translations/README-id.md index 33475df..3793752 100644 --- a/translations/README-id.md +++ b/translations/README-id.md @@ -49,57 +49,52 @@ Ekspresi reguler di atas dapat menerima rangakaian kata `jo-hn_doe`,`jo-hn-doe` ## Daftar Isi : - [Pencocokan Dasar](#1-basic-matchers) -- [Meta Characters](#2-meta-characters) - - [The Full Stop](#21-the-full-stops) - - [Character Sets](#22-character-sets) - - [Negated Character Sets](#221-negated-character-sets) - - [Repetitions](#23-repetitions) - - [The Star](#231-the-star) - - [The Plus](#232-the-plus) - - [The Question Mark](#233-the-question-mark) - - [Braces](#24-braces) - - [Capturing Groups](#25-capturing-groups) - - [Non-Capturing Groups](#251-non-capturing-groups) - - [Alternation](#26-alternation) - - [Escaping Special Characters](#27-escaping-special-characters) - - [Anchors](#28-anchors) - - [The Caret](#281-the-caret) - - [The Dollar Sign](#282-the-dollar-sign) -- [Shorthand Character Sets](#3-shorthand-character-sets) +- [Karakter Meta](#2-meta-characters) + - [Titik](#21-the-full-stops) + - [Set Karakter](#22-character-sets) + - [Set Karakter yang dinegasikan](#221-negated-character-sets) + - [Perulangan](#23-repetitions) + - [Tanda Bintang](#231-the-star) + - [Tanda Tambah](#232-the-plus) + - [Tanda Tanya](#233-the-question-mark) + - [Tanda Kurung](#24-braces) + - [Kelompok Penangkapan](#25-capturing-groups) + - [Kelompok non-Penangkapan](#251-non-capturing-groups) + - [Alternasi](#26-alternation) + - [Meloloskan Karakter khusus](#27-escaping-special-characters) + - [Penanda Posisi](#28-anchors) + - [Tanda Karat (Caret)](#281-the-caret) + - [Tanda Dolar](#282-the-dollar-sign) +- [Set Karakter Singkatan](#3-shorthand-character-sets) - [Lookarounds](#4-lookarounds) - - [Positive Lookahead](#41-positive-lookahead) - - [Negative Lookahead](#42-negative-lookahead) - - [Positive Lookbehind](#43-positive-lookbehind) - - [Negative Lookbehind](#44-negative-lookbehind) + - [Positif Lookahead](#41-positive-lookahead) + - [Negatif Lookahead](#42-negative-lookahead) + - [Positif Lookbehind](#43-positive-lookbehind) + - [Negatif Lookbehind](#44-negative-lookbehind) - [Flags](#5-flags) - - [Case Insensitive](#51-case-insensitive) - - [Global Search](#52-global-search) - - [Multiline](#53-multiline) -- [Greedy vs Lazy Matching](#6-greedy-vs-lazy-matching) + - [Sensitivitas Huruf (besar/kecil)](#51-case-insensitive) + - [Pencarian Global](#52-global-search) + - [Baris Berganda](#53-multiline) +- [Pencocokan Serakah vs Malas](#6-greedy-vs-lazy-matching) -## 1. Basic Matchers - -A regular expression is just a pattern of characters that we use to perform a -search in a text. For example, the regular expression `the` means: the letter -`t`, followed by the letter `h`, followed by the letter `e`. +## 1. Pencocokan Dasar +Sebuah ekspresi reguler hanyalah pola karakter yang kita gunakan untuk melakukan pencarian dalam teks. Sebagai contoh, ekspresi reguler `the` berarti: huruf `t`, diikuti oleh huruf `h`, diikuti oleh huruf `e`.
 "the" => The fat cat sat on the mat.
 
-[Test the regular expression](https://regex101.com/r/dmRygT/1) +[Uji Ekspresi Reguler](https://regex101.com/r/dmRygT/1) -The regular expression `123` matches the string `123`. The regular expression is -matched against an input string by comparing each character in the regular -expression to each character in the input string, one after another. Regular -expressions are normally case-sensitive so the regular expression `The` would -not match the string `the`. +Ekspresi reguler `123` akan cocok dengan string `123`. Ekspresi reguler dicocokkan dengan string masukan dengan cara membandingkan setiap karakter dalam ekspresi reguler dengan setiap karakter dalam string masukan, satu per satu. Biasanya, ekspresi reguler bersifat case-sensitive (peka terhadap huruf besar/kecil), sehingga ekspresi reguler `The` tidak akan cocok dengan string `the`. + +Ini berarti huruf besar dan huruf kecil dianggap berbeda dalam pencocokan pola menggunakan ekspresi reguler, kecuali jika diatur untuk mengabaikan perbedaan tersebut.
 "The" => The fat cat sat on the mat.
 
-[Test the regular expression](https://regex101.com/r/1paXsy/1) +[Uji Ekspresi Reguler](https://regex101.com/r/1paXsy/1) ## 2. Meta Characters @@ -134,7 +129,7 @@ letter `a`, followed by the letter `r`. ".ar" => The car parked in the garage. -[Test the regular expression](https://regex101.com/r/xc9GkU/1) +[Uji Ekspresi Reguler](https://regex101.com/r/xc9GkU/1) ## 2.2 Character Sets @@ -148,7 +143,7 @@ doesn't matter. For example, the regular expression `[Tt]he` means: an uppercase "[Tt]he" => The car parked in the garage. -[Test the regular expression](https://regex101.com/r/2ITLQ4/1) +[Uji Ekspresi Reguler](https://regex101.com/r/2ITLQ4/1) A period inside a character set, however, means a literal period. The regular expression `ar[.]` means: a lowercase character `a`, followed by the letter `r`, @@ -158,7 +153,7 @@ followed by a period `.` character. "ar[.]" => A garage is a good place to park a car. -[Test the regular expression](https://regex101.com/r/wL3xtE/1) +[Uji Ekspresi Reguler](https://regex101.com/r/wL3xtE/1) ### 2.2.1 Negated Character Sets @@ -171,7 +166,7 @@ followed by the character `a`, followed by the letter `r`. "[^c]ar" => The car parked in the garage. -[Test the regular expression](https://regex101.com/r/nNNlq3/1) +[Uji Ekspresi Reguler](https://regex101.com/r/nNNlq3/1) ## 2.3 Repetitions @@ -191,7 +186,7 @@ the repetitions of the whole character set. For example, the regular expression "[a-z]*" => The car parked in the garage #21. -[Test the regular expression](https://regex101.com/r/7m8me5/1) +[Uji Ekspresi Reguler](https://regex101.com/r/7m8me5/1) The `*` symbol can be used with the meta character `.` to match any string of characters `.*`. The `*` symbol can be used with the whitespace character `\s` @@ -204,7 +199,7 @@ followed by zero or more spaces. "\s*cat\s*" => The fat cat sat on the concatenation. -[Test the regular expression](https://regex101.com/r/gGrwuz/1) +[Uji Ekspresi Reguler](https://regex101.com/r/gGrwuz/1) ### 2.3.2 The Plus @@ -217,7 +212,7 @@ clarified that`t` is the last `t` in the sentence. "c.+t" => The fat cat sat on the mat. -[Test the regular expression](https://regex101.com/r/Dzf9Aa/1) +[Uji Ekspresi Reguler](https://regex101.com/r/Dzf9Aa/1) ### 2.3.3 The Question Mark @@ -230,13 +225,13 @@ For example, the regular expression `[T]?he` means: Optional uppercase "[T]he" => The car is parked in the garage. -[Test the regular expression](https://regex101.com/r/cIg9zm/1) +[Uji Ekspresi Reguler](https://regex101.com/r/cIg9zm/1)
 "[T]?he" => The car is parked in the garage.
 
-[Test the regular expression](https://regex101.com/r/kPpO2x/1) +[Uji Ekspresi Reguler](https://regex101.com/r/kPpO2x/1) ## 2.4 Braces @@ -249,7 +244,7 @@ repeated. For example, the regular expression `[0-9]{2,3}` means: Match at least "[0-9]{2,3}" => The number was 9.9997 but we rounded it off to 10.0. -[Test the regular expression](https://regex101.com/r/juM86s/1) +[Uji Ekspresi Reguler](https://regex101.com/r/juM86s/1) We can leave out the second number. For example, the regular expression `[0-9]{2,}` means: Match 2 or more digits. If we also remove the comma, the @@ -259,13 +254,13 @@ regular expression `[0-9]{3}` means: Match exactly 3 digits. "[0-9]{2,}" => The number was 9.9997 but we rounded it off to 10.0. -[Test the regular expression](https://regex101.com/r/Gdy4w5/1) +[Uji Ekspresi Reguler](https://regex101.com/r/Gdy4w5/1)
 "[0-9]{3}" => The number was 9.9997 but we rounded it off to 10.0.
 
-[Test the regular expression](https://regex101.com/r/Sivu30/1) +[Uji Ekspresi Reguler](https://regex101.com/r/Sivu30/1) ## 2.5 Capturing Groups @@ -282,7 +277,7 @@ For example, the regular expression `(c|g|p)ar` means: a lowercase `c`, "(c|g|p)ar" => The car is parked in the garage. -[Test the regular expression](https://regex101.com/r/tUxrBG/1) +[Uji Ekspresi Reguler](https://regex101.com/r/tUxrBG/1) Note that capturing groups do not only match, but also capture, the characters for use in the parent language. The parent language could be Python or JavaScript or virtually any @@ -299,7 +294,7 @@ within parentheses `(...)`. For example, the regular expression `(?:c|g|p)ar` is "(?:c|g|p)ar" => The car is parked in the garage. -[Test the regular expression](https://regex101.com/r/Rm7Me8/1) +[Uji Ekspresi Reguler](https://regex101.com/r/Rm7Me8/1) Non-capturing groups can come in handy when used in find-and-replace functionality or when mixed with capturing groups to keep the overview when producing any other kind of output. @@ -322,7 +317,7 @@ in parentheses can be met and it will match. "(T|t)he|car" => The car is parked in the garage. -[Test the regular expression](https://regex101.com/r/fBXyX0/1) +[Uji Ekspresi Reguler](https://regex101.com/r/fBXyX0/1) ## 2.7 Escaping Special Characters @@ -339,7 +334,7 @@ character. "(f|c|m)at\.?" => The fat cat sat on the mat. -[Test the regular expression](https://regex101.com/r/DOc5Nu/1) +[Uji Ekspresi Reguler](https://regex101.com/r/DOc5Nu/1) ## 2.8 Anchors @@ -364,13 +359,13 @@ lowercase `h`, followed by a lowercase `e`. "(T|t)he" => The car is parked in the garage. -[Test the regular expression](https://regex101.com/r/5ljjgB/1) +[Uji Ekspresi Reguler](https://regex101.com/r/5ljjgB/1)
 "^(T|t)he" => The car is parked in the garage.
 
-[Test the regular expression](https://regex101.com/r/jXrKne/1) +[Uji Ekspresi Reguler](https://regex101.com/r/jXrKne/1) ### 2.8.2 The Dollar Sign @@ -383,13 +378,13 @@ character and the matcher must be at the end of the string. "(at\.)" => The fat cat. sat. on the mat. -[Test the regular expression](https://regex101.com/r/y4Au4D/1) +[Uji Ekspresi Reguler](https://regex101.com/r/y4Au4D/1)
 "(at\.)$" => The fat cat. sat. on the mat.
 
-[Test the regular expression](https://regex101.com/r/t0AkOd/1) +[Uji Ekspresi Reguler](https://regex101.com/r/t0AkOd/1) ## 3. Shorthand Character Sets @@ -442,7 +437,7 @@ or `the` only if it's followed by the word `fat`. "(T|t)he(?=\sfat)" => The fat cat sat on the mat. -[Test the regular expression](https://regex101.com/r/IDDARt/1) +[Uji Ekspresi Reguler](https://regex101.com/r/IDDARt/1) ### 4.2 Negative Lookahead @@ -457,7 +452,7 @@ from the input string that are not followed by a space character and the word `f "(T|t)he(?!\sfat)" => The fat cat sat on the mat. -[Test the regular expression](https://regex101.com/r/V32Npg/1) +[Uji Ekspresi Reguler](https://regex101.com/r/V32Npg/1) ### 4.3 Positive Lookbehind @@ -470,7 +465,7 @@ from the input string that come after the word `The` or `the`. "(?<=(T|t)he\s)(fat|mat)" => The fat cat sat on the mat. -[Test the regular expression](https://regex101.com/r/avH165/1) +[Uji Ekspresi Reguler](https://regex101.com/r/avH165/1) ### 4.4 Negative Lookbehind @@ -483,7 +478,7 @@ string that are not after the word `The` or `the`. "(?<!(T|t)he\s)(cat)" => The cat sat on cat. -[Test the regular expression](https://regex101.com/r/8Efx5G/1) +[Uji Ekspresi Reguler](https://regex101.com/r/8Efx5G/1) ## 5. Flags @@ -510,13 +505,13 @@ whole input string. "The" => The fat cat sat on the mat. -[Test the regular expression](https://regex101.com/r/dpQyf9/1) +[Uji Ekspresi Reguler](https://regex101.com/r/dpQyf9/1)
 "/The/gi" => The fat cat sat on the mat.
 
-[Test the regular expression](https://regex101.com/r/ahfiuh/1) +[Uji Ekspresi Reguler](https://regex101.com/r/ahfiuh/1) ### 5.2 Global Search @@ -530,13 +525,13 @@ the regular expression, it will now find all matches in the input string, not ju "/.(at)/" => The fat cat sat on the mat. -[Test the regular expression](https://regex101.com/r/jnk6gM/1) +[Uji Ekspresi Reguler](https://regex101.com/r/jnk6gM/1)
 "/.(at)/g" => The fat cat sat on the mat.
 
-[Test the regular expression](https://regex101.com/r/dO1nef/1) +[Uji Ekspresi Reguler](https://regex101.com/r/dO1nef/1) ### 5.3 Multiline @@ -554,7 +549,7 @@ at the end of each line in a string. on the mat. -[Test the regular expression](https://regex101.com/r/hoGMkP/1) +[Uji Ekspresi Reguler](https://regex101.com/r/hoGMkP/1)
 "/.at(.)?$/gm" => The fat
@@ -562,7 +557,7 @@ at the end of each line in a string.
                   on the mat.
 
-[Test the regular expression](https://regex101.com/r/E88WE2/1) +[Uji Ekspresi Reguler](https://regex101.com/r/E88WE2/1) ## 6. Greedy vs Lazy Matching By default, a regex will perform a greedy match, which means the match will be as long as @@ -572,13 +567,13 @@ possible. We can use `?` to match in a lazy way, which means the match should be "/(.*at)/" => The fat cat sat on the mat. -[Test the regular expression](https://regex101.com/r/AyAdgJ/1) +[Uji Ekspresi Reguler](https://regex101.com/r/AyAdgJ/1)
 "/(.*?at)/" => The fat cat sat on the mat. 
-[Test the regular expression](https://regex101.com/r/AyAdgJ/2) +[Uji Ekspresi Reguler](https://regex101.com/r/AyAdgJ/2) ## Contribution