diff --git a/Data_Structures/README.md b/Data_Structures/README.md index 91f6824..5566f6a 100644 --- a/Data_Structures/README.md +++ b/Data_Structures/README.md @@ -11,13 +11,13 @@ ___ ### Arrays Problem | C | Java | Javascript | Python :---: | :---: | :---: | :---: | :---: -[2D_arrays_DS](Data_Structures/pdf/2d-array.pdf) | [Solution](Data_Structures/c/2D_arrays_DS.c) | | | -[Arrays_DS](Data_Structures/pdf/arrays-ds.pdf) | [Solution](Data_Structures/c/Arrays_DS.c) | [Solution](Data_Structures/java/Arrays_DS.java) | [Solution](Data_Structures/javascript/Arrays_DS.js) | [Solution](Data_Structures/python/Arrays_DS.py) -[Left_Rotation](Data_Structures/pdf/array-left-rotation.pdf) | [Solution](Data_Structures/c/Left_Rotation.c) | | | +[2D_arrays_DS](pdf/2d-array.pdf) | [Solution](c/2D_arrays_DS.c) | | | +[Arrays_DS](pdf/arrays-ds.pdf) | [Solution](c/Arrays_DS.c) | [Solution](java/Arrays_DS.java) | [Solution](javascript/Arrays_DS.js) | [Solution](python/Arrays_DS.py) +[Left_Rotation](pdf/array-left-rotation.pdf) | [Solution](c/Left_Rotation.c) | | | ### Linked Lists Problem | C | Java | Javascript | Python :---: | :---: | :---: | :---: | :---: -[Get_node_value](Data_Structures/pdf/get-the-value-of-the-node-at-a-specific-position-from-the-tail.pdf) | [Solution](Data_Structures/c/Get_node_value.c) | | | -[Print_in_reverse](Data_Structures/pdf/print-the-elements-of-a-linked-list.pdf) | [Solution](Data_Structures/c/Print_in_reverse.c) | | | -[Print_the_elements_of_a_linked_list](Data_Structures/pdf/print-the-elements-of-a-linked-list-in-reverse.pdf) | [Solution](Data_Structures/c/Print_the_elements_of_a_linked_list.c) | | | \ No newline at end of file +[Get_node_value](pdf/get-the-value-of-the-node-at-a-specific-position-from-the-tail.pdf) | [Solution](c/Get_node_value.c) | | | +[Print_in_reverse](pdf/print-the-elements-of-a-linked-list.pdf) | [Solution](c/Print_in_reverse.c) | | | +[Print_the_elements_of_a_linked_list](pdf/print-the-elements-of-a-linked-list-in-reverse.pdf) | [Solution](c/Print_the_elements_of_a_linked_list.c) | | | \ No newline at end of file diff --git a/Linux_Shell/README.md b/Linux_Shell/README.md index 620aa15..bea0adc 100644 --- a/Linux_Shell/README.md +++ b/Linux_Shell/README.md @@ -5,5 +5,5 @@ ___ * [Bash](#Bash) ___ ### Bash -* [Lets_Echo](Linux_Shell/pdf/bash-tutorials-lets-echo.pdf) - [Solution](Linux_Shell/bash/Lets_Echo.bash) -* [Looping_and_Skipping](Linux_Shell/pdf/bash-tutorials---looping-and-skipping.pdf) - [Solution](Linux_Shell/bash/Looping_and_Skipping.bash) \ No newline at end of file +* [Lets_Echo](pdf/bash-tutorials-lets-echo.pdf) - [Solution](bash/Lets_Echo.bash) +* [Looping_and_Skipping](pdf/bash-tutorials---looping-and-skipping.pdf) - [Solution](bash/Looping_and_Skipping.bash) \ No newline at end of file diff --git a/Python/README.md b/Python/README.md index d749ede..5a521b9 100644 --- a/Python/README.md +++ b/Python/README.md @@ -7,19 +7,19 @@ ___ * [String](#String) ___ ### Introduction -* [Arithmetic_operator](Python/pdf/python-arithmetic-operators.pdf) - [Solution](Python/python/) -* [Division](Python/pdf/python-division.pdf) - [Solution](Python/python/Division.py) -* [If_else](Python/pdf/py-if-else.pdf) - [Solution](Python/python/If_else.py) -* [Loops](Python/pdf/python-loops.pdf) - [Solution](Python/python/Loops.py) -* [Print_function](Python/pdf/python-print.pdf) - [Solution](Python/python/Print_function.py) -* [Say_hello_world](Python/pdf/py-hello-world.pdf) - [Solution](Python/python/Say_hello_world.py) -* [Write_a_function](Python/pdf/write-a-function.pdf) - [Solution](Python/python/Write_a_function.py) +* [Arithmetic_operator](pdf/python-arithmetic-operators.pdf) - [Solution](python/Arithmetic_operator.py) +* [Division](pdf/python-division.pdf) - [Solution](python/Division.py) +* [If_else](pdf/py-if-else.pdf) - [Solution](python/If_else.py) +* [Loops](pdf/python-loops.pdf) - [Solution](python/Loops.py) +* [Print_function](pdf/python-print.pdf) - [Solution](python/Print_function.py) +* [Say_hello_world](pdf/py-hello-world.pdf) - [Solution](python/Say_hello_world.py) +* [Write_a_function](pdf/write-a-function.pdf) - [Solution](python/Write_a_function.py) ___ ### Math -* [Polar_coordinates](Python/pdf/write-a-function.pdf) - [Solution](Python/python/Polar_coordinates.py) +* [Polar_coordinates](pdf/write-a-function.pdf) - [Solution](python/Polar_coordinates.py) ___ ### String -* [Mutations](Python/pdf/python-mutations.pdf) - [Solution](Python/python/Mutations.py) -* [String_split_and_join](Python/pdf/python-string-split-and-join.pdf) - [Solution](Python/python/String_split_and_join.py) -* [Swap_case](Python/pdf/swap-case.pdf) - [Solution](Python/python/Swap_case.py) -* [Whats_your_name](Python/pdf/whats-your-name.pdf) - [Solution](Python/python/Whats_your_name.py) \ No newline at end of file +* [Mutations](pdf/python-mutations.pdf) - [Solution](python/Mutations.py) +* [String_split_and_join](pdf/python-string-split-and-join.pdf) - [Solution](python/String_split_and_join.py) +* [Swap_case](pdf/swap-case.pdf) - [Solution](python/Swap_case.py) +* [Whats_your_name](pdf/whats-your-name.pdf) - [Solution](python/Whats_your_name.py) \ No newline at end of file diff --git a/README.md b/README.md index acf9e8f..4e7198a 100644 --- a/README.md +++ b/README.md @@ -16,43 +16,11 @@ Using: ![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white) # Summary -* [Algorithms](#Algorithms) -* [C](#C) -* [Data Structures](#Data-Structures) -* [Java](#Java) -* [Linux Shell](#Linux_Shell) -* [Python](#Python) -* [Regex](#Regex) -* [SQL](#SQL) - - - -## [Algorithms](Algorithms) - - - -## [C](C) - - - -## [Data Structures](Data_Structures) - - - -## [Java](Java) - - - -## [Linux_Shell](Linux_Shell) - - - -## [Python](Python) - - - -## [Regex](Regex) - - - -## [SQL](SQL) +* [Algorithms](Algorithms) +* [C](C) +* [Data Structures](Data_Structures) +* [Java](Java) +* [Linux Shell](Linux_Shell) +* [Python](Python) +* [Regex](Regex) +* [SQL](SQL) diff --git a/Regex/README.md b/Regex/README.md index bb58451..58c81e6 100644 --- a/Regex/README.md +++ b/Regex/README.md @@ -6,20 +6,30 @@ ___ ## Contents * [Introduction](#Introduction) * [Character Class](#Character-Class) +* [Repetitions](#Repetitions) ___ ### Introduction Problem | Java | Javascript | Python :---: | :---: | :---: | :---: -[Matching_Anything_But_a_Newline](Regex/pdf/matching-anything-but-new-line.pdf) | [Solution](Regex/java/Matching_Anything_But_a_Newline.java) | [Solution](Regex/javascript/Matching_Anything_But_a_Newline.js) | [Solution](Regex/python/Matching_Anything_But_a_Newline.py) -[Matching_Digits_Non_Digits_Characters](Regex/pdf/matching-digits-non-digit-character.pdf) | [Solution](Regex/java/Matching_Digits_Non_Digits_Characters.java) | [Solution](Regex/javascript/Matching_Digits_Non_Digits_Characters.js) | [Solution](Regex/python/Matching_Digits_Non_Digits_Characters.py) -[Matching_Specific_String](Regex/pdf/matching-specific-string.pdf) | [Solution](Regex/java/Matching_Specific_String.java) | [Solution](Regex/javascript/Matching_Specific_String.js) | [Solution](Regex/python/Matching_Specific_String.py) -[Matching_Start_End](Regex/pdf/matching-start-end.pdf) | [Solution](Regex/java/Matching_Start_End.java) | [Solution](Regex/javascript/Matching_Start_End.js) | [Solution](Regex/python/Matching_Start_End.py) -[Matching_Whitespace_Non_Whitespace_Character](Regex/pdf/matching-whitespace-non-whitespace-character.pdf) | [Solution](Regex/java/Matching_Whitespace_Non_Whitespace_Character.java) | [Solution](Regex/javascript/Matching_Whitespace_Non_Whitespace_Character.js) | [Solution](Regex/python/Matching_Whitespace_Non_Whitespace_Character.py) -[Matching_Word_Non_Word_Character](Regex/pdf/matching-word-non-word.pdf) | [Solution](Regex/java/Matching_Word_Non_Word_Character.java) | [Solution](Regex/javascript/Matching_Word_Non_Word_Character.js) | [Solution](Regex/python/Matching_Word_Non_Word_Character.py) +[Matching_Anything_But_a_Newline](pdf/matching-anything-but-new-line.pdf) | [Solution](java/Matching_Anything_But_a_Newline.java) | [Solution](javascript/Matching_Anything_But_a_Newline.js) | [Solution](python/Matching_Anything_But_a_Newline.py) +[Matching_Digits_Non_Digits_Characters](pdf/matching-digits-non-digit-character.pdf) | [Solution](java/Matching_Digits_Non_Digits_Characters.java) | [Solution](javascript/Matching_Digits_Non_Digits_Characters.js) | [Solution](python/Matching_Digits_Non_Digits_Characters.py) +[Matching_Specific_String](pdf/matching-specific-string.pdf) | [Solution](java/Matching_Specific_String.java) | [Solution](javascript/Matching_Specific_String.js) | [Solution](python/Matching_Specific_String.py) +[Matching_Start_End](pdf/matching-start-end.pdf) | [Solution](java/Matching_Start_End.java) | [Solution](javascript/Matching_Start_End.js) | [Solution](python/Matching_Start_End.py) +[Matching_Whitespace_Non_Whitespace_Character](pdf/matching-whitespace-non-whitespace-character.pdf) | [Solution](java/Matching_Whitespace_Non_Whitespace_Character.java) | [Solution](javascript/Matching_Whitespace_Non_Whitespace_Character.js) | [Solution](python/Matching_Whitespace_Non_Whitespace_Character.py) +[Matching_Word_Non_Word_Character](pdf/matching-word-non-word.pdf) | [Solution](java/Matching_Word_Non_Word_Character.java) | [Solution](javascript/Matching_Word_Non_Word_Character.js) | [Solution](python/Matching_Word_Non_Word_Character.py) ___ ### Character Class Problem | Java | Javascript | Python :---: | :---: | :---: | :---: -[Excluding_Specific_Characters](Regex/pdf/excluding-specific-characters.pdf) | [Solution](Regex/java/Excluding_Specific_Characters.java) | [Solution](Regex/javascript/Excluding_Specific_Characters.js) | [Solution](Regex/python/Excluding_Specific_Characters.py) -[Matching_Character_Ranges](Regex/pdf/matching-range-of-characters.pdf) | [Solution](Regex/java/Matching_Character_Ranges.java) | [Solution](Regex/javascript/Matching_Character_Ranges.js) | [Solution](Regex/python/Matching_Character_Ranges.py) -[Matching_Specific_Characters](Regex/pdf/matching-specific-characters.pdf) | [Solution](Regex/java/Matching_Specific_Characters.java) | [Solution](Regex/javascript/Matching_Specific_Characters.js) | [Solution](Regex/python/Matching_Specific_Characters.py) \ No newline at end of file +[Excluding_Specific_Characters](pdf/excluding-specific-characters.pdf) | [Solution](java/Excluding_Specific_Characters.java) | [Solution](javascript/Excluding_Specific_Characters.js) | [Solution](python/Excluding_Specific_Characters.py) +[Matching_Character_Ranges](pdf/matching-range-of-characters.pdf) | [Solution](java/Matching_Character_Ranges.java) | [Solution](javascript/Matching_Character_Ranges.js) | [Solution](python/Matching_Character_Ranges.py) +[Matching_Specific_Characters](pdf/matching-specific-characters.pdf) | [Solution](java/Matching_Specific_Characters.java) | [Solution](javascript/Matching_Specific_Characters.js) | [Solution](python/Matching_Specific_Characters.py) + +### Repetitions +Problem | Java | Javascript | Python +:---: | :---: | :---: | :---: +[Matching_Ending_Items](pdf/matching-ending-items.pdf) | [Solution](java/Matching_Ending_Items.java) | [Solution](javascript/Matching_Ending_Items.js) | [Solution](python/Matching_Ending_Items.py) +[Matching_One_Or_More_Repetitions](pdf/matching-one-or-more-repetitions.pdf) | [Solution](java/Matching_One_Or_More_Repetitions.java) | [Solution](javascript/Matching_One_Or_More_Repetitions.js) | [Solution](python/Matching_One_Or_More_Repetitions.py) +[Matching_X_Repetitions](pdf/matching-x-repetitions.pdf) | [Solution](java/Matching_X_Repetitions.java) | [Solution](javascript/Matching_X_Repetitions.js) | [Solution](python/Matching_X_Repetitions.py) +[Matching_X_Y_Repetitions](pdf/matching-x-y-repetitions.pdf) | [Solution](java/Matching_X_Y_Repetitions.java) | [Solution](javascript/Matching_X_Y_Repetitions.js) | [Solution](python/Matching_X_Y_Repetitions.py) +[Matching_Zero_Or_More_Repetitions](pdf/matching-zero-or-more-repetitions.pdf) | [Solution](java/Matching_Zero_Or_More_Repetitions.java) | [Solution](javascript/Matching_Zero_Or_More_Repetitions.js) | [Solution](python/Matching_Zero_Or_More_Repetitions.py) diff --git a/Regex/java/Matching_Ending_Items.java b/Regex/java/Matching_Ending_Items.java new file mode 100644 index 0000000..f436306 --- /dev/null +++ b/Regex/java/Matching_Ending_Items.java @@ -0,0 +1,28 @@ +import java.io.*; +import java.util.*; +import java.text.*; +import java.math.*; +import java.util.regex.*; + +public class Solution { + + public static void main(String[] args) { + + Regex_Test tester = new Regex_Test(); + tester.checker("^[A-Za-z]*s$"); // Use \\ instead of using \ + + } +} + +class Regex_Test { + + public void checker(String Regex_Pattern){ + + Scanner Input = new Scanner(System.in); + String Test_String = Input.nextLine(); + Pattern p = Pattern.compile(Regex_Pattern); + Matcher m = p.matcher(Test_String); + System.out.println(m.find()); + } + +} \ No newline at end of file diff --git a/Regex/java/Matching_One_Or_More_Repetitions.java b/Regex/java/Matching_One_Or_More_Repetitions.java new file mode 100644 index 0000000..8995f75 --- /dev/null +++ b/Regex/java/Matching_One_Or_More_Repetitions.java @@ -0,0 +1,28 @@ +import java.io.*; +import java.util.*; +import java.text.*; +import java.math.*; +import java.util.regex.*; + +public class Solution { + + public static void main(String[] args) { + + Regex_Test tester = new Regex_Test(); + tester.checker("^\\d+[A-Z]+[a-z]+$"); // Use \\ instead of using \ + + } +} + +class Regex_Test { + + public void checker(String Regex_Pattern){ + + Scanner Input = new Scanner(System.in); + String Test_String = Input.nextLine(); + Pattern p = Pattern.compile(Regex_Pattern); + Matcher m = p.matcher(Test_String); + System.out.println(m.find()); + } + +} \ No newline at end of file diff --git a/Regex/java/Matching_X_Repetitions.java b/Regex/java/Matching_X_Repetitions.java new file mode 100644 index 0000000..2533491 --- /dev/null +++ b/Regex/java/Matching_X_Repetitions.java @@ -0,0 +1,28 @@ +import java.io.*; +import java.util.*; +import java.text.*; +import java.math.*; +import java.util.regex.*; + +public class Solution { + + public static void main(String[] args) { + + Regex_Test tester = new Regex_Test(); + tester.checker("^[A-Za-z02468]{40}[\\s13579]{5}$"); // Use \\ instead of using \ + + } +} + +class Regex_Test { + + public void checker(String Regex_Pattern){ + + Scanner Input = new Scanner(System.in); + String Test_String = Input.nextLine(); + Pattern p = Pattern.compile(Regex_Pattern); + Matcher m = p.matcher(Test_String); + System.out.println(m.find()); + } + +} \ No newline at end of file diff --git a/Regex/java/Matching_X_Y_Repetitions.java b/Regex/java/Matching_X_Y_Repetitions.java new file mode 100644 index 0000000..5e7194d --- /dev/null +++ b/Regex/java/Matching_X_Y_Repetitions.java @@ -0,0 +1,28 @@ +import java.io.*; +import java.util.*; +import java.text.*; +import java.math.*; +import java.util.regex.*; + +public class Solution { + + public static void main(String[] args) { + + Regex_Test tester = new Regex_Test(); + tester.checker("^\\d{1,2}[a-zA-Z]{3,}\\.{0,3}$"); // Use \\ instead of using \ + + } +} + +class Regex_Test { + + public void checker(String Regex_Pattern){ + + Scanner Input = new Scanner(System.in); + String Test_String = Input.nextLine(); + Pattern p = Pattern.compile(Regex_Pattern); + Matcher m = p.matcher(Test_String); + System.out.println(m.find()); + } + +} \ No newline at end of file diff --git a/Regex/java/Matching_Zero_Or_More_Repetitions.java b/Regex/java/Matching_Zero_Or_More_Repetitions.java new file mode 100644 index 0000000..5bc78bf --- /dev/null +++ b/Regex/java/Matching_Zero_Or_More_Repetitions.java @@ -0,0 +1,28 @@ +import java.io.*; +import java.util.*; +import java.text.*; +import java.math.*; +import java.util.regex.*; + +public class Solution { + + public static void main(String[] args) { + + Regex_Test tester = new Regex_Test(); + tester.checker("^\\d\\d+[a-z]*[A-Z]*$"); // Use \\ instead of using \ + + } +} + +class Regex_Test { + + public void checker(String Regex_Pattern){ + + Scanner Input = new Scanner(System.in); + String Test_String = Input.nextLine(); + Pattern p = Pattern.compile(Regex_Pattern); + Matcher m = p.matcher(Test_String); + System.out.println(m.find()); + } + +} \ No newline at end of file diff --git a/Regex/javascript/Matching_Ending_Items.js b/Regex/javascript/Matching_Ending_Items.js new file mode 100644 index 0000000..53c850b --- /dev/null +++ b/Regex/javascript/Matching_Ending_Items.js @@ -0,0 +1,18 @@ +var Regex_Pattern = /^[a-zA-Z]*s$/; //Do not delete '/'. Replace __________ with your regex. + +function processData(Test_String) { + //Enter your code here + + console.log(!!Test_String.match(Regex_Pattern)); +} + +process.stdin.resume(); +process.stdin.setEncoding("ascii"); +_input = ""; +process.stdin.on("data", function (input) { + _input += input; +}); + +process.stdin.on("end", function () { + processData(_input); +}); diff --git a/Regex/javascript/Matching_One_Or_More_Repetitions.js b/Regex/javascript/Matching_One_Or_More_Repetitions.js new file mode 100644 index 0000000..41d6118 --- /dev/null +++ b/Regex/javascript/Matching_One_Or_More_Repetitions.js @@ -0,0 +1,18 @@ +var Regex_Pattern = /^\d+[A-Z]+[a-z]+$/; //Do not delete '/'. Replace __________ with your regex. + +function processData(Test_String) { + //Enter your code here + + console.log(!!Test_String.match(Regex_Pattern)); +} + +process.stdin.resume(); +process.stdin.setEncoding("ascii"); +_input = ""; +process.stdin.on("data", function (input) { + _input += input; +}); + +process.stdin.on("end", function () { + processData(_input); +}); diff --git a/Regex/javascript/Matching_X_Repetitions.js b/Regex/javascript/Matching_X_Repetitions.js new file mode 100644 index 0000000..42d077d --- /dev/null +++ b/Regex/javascript/Matching_X_Repetitions.js @@ -0,0 +1,18 @@ +var Regex_Pattern = /^[A-Za-z02468]{40}[\s13579]{5}$/; //Do not delete '/'. Replace __________ with your regex. + +function processData(Test_String) { + //Enter your code here + + console.log(!!Test_String.match(Regex_Pattern)); +} + +process.stdin.resume(); +process.stdin.setEncoding("ascii"); +_input = ""; +process.stdin.on("data", function (input) { + _input += input; +}); + +process.stdin.on("end", function () { + processData(_input); +}); diff --git a/Regex/javascript/Matching_X_Y_Repetitions.js b/Regex/javascript/Matching_X_Y_Repetitions.js new file mode 100644 index 0000000..bd005ff --- /dev/null +++ b/Regex/javascript/Matching_X_Y_Repetitions.js @@ -0,0 +1,18 @@ +var Regex_Pattern = /^\d{1,2}[a-zA-Z]{3,}\.{0,3}$/; //Do not delete '/'. Replace __________ with your regex. + +function processData(Test_String) { + //Enter your code here + + console.log(!!Test_String.match(Regex_Pattern)); +} + +process.stdin.resume(); +process.stdin.setEncoding("ascii"); +_input = ""; +process.stdin.on("data", function (input) { + _input += input; +}); + +process.stdin.on("end", function () { + processData(_input); +}); diff --git a/Regex/javascript/Matching_Zero_Or_More_Repetitions.js b/Regex/javascript/Matching_Zero_Or_More_Repetitions.js new file mode 100644 index 0000000..67787bf --- /dev/null +++ b/Regex/javascript/Matching_Zero_Or_More_Repetitions.js @@ -0,0 +1,18 @@ +var Regex_Pattern = /^\d\d+[a-z]*[A-Z]*$/; //Do not delete '/'. Replace __________ with your regex. + +function processData(Test_String) { + //Enter your code here + + console.log(!!Test_String.match(Regex_Pattern)); +} + +process.stdin.resume(); +process.stdin.setEncoding("ascii"); +_input = ""; +process.stdin.on("data", function (input) { + _input += input; +}); + +process.stdin.on("end", function () { + processData(_input); +}); diff --git a/Regex/pdf/matching-ending-items.pdf b/Regex/pdf/matching-ending-items.pdf new file mode 100644 index 0000000..8a7229b Binary files /dev/null and b/Regex/pdf/matching-ending-items.pdf differ diff --git a/Regex/pdf/matching-one-or-more-repetitions.pdf b/Regex/pdf/matching-one-or-more-repetitions.pdf new file mode 100644 index 0000000..19954b6 Binary files /dev/null and b/Regex/pdf/matching-one-or-more-repetitions.pdf differ diff --git a/Regex/pdf/matching-x-repetitions.pdf b/Regex/pdf/matching-x-repetitions.pdf new file mode 100644 index 0000000..82d16bf Binary files /dev/null and b/Regex/pdf/matching-x-repetitions.pdf differ diff --git a/Regex/pdf/matching-x-y-repetitions.pdf b/Regex/pdf/matching-x-y-repetitions.pdf new file mode 100644 index 0000000..6d40d5e Binary files /dev/null and b/Regex/pdf/matching-x-y-repetitions.pdf differ diff --git a/Regex/pdf/matching-zero-or-more-repetitions.pdf b/Regex/pdf/matching-zero-or-more-repetitions.pdf new file mode 100644 index 0000000..46f1cdb Binary files /dev/null and b/Regex/pdf/matching-zero-or-more-repetitions.pdf differ diff --git a/Regex/python/Matching_Ending_Items.py b/Regex/python/Matching_Ending_Items.py new file mode 100644 index 0000000..8342588 --- /dev/null +++ b/Regex/python/Matching_Ending_Items.py @@ -0,0 +1,5 @@ +Regex_Pattern = r'^[a-zA-Z]*s$' # Do not delete 'r'. + +import re + +print(str(bool(re.search(Regex_Pattern, input()))).lower()) \ No newline at end of file diff --git a/Regex/python/Matching_One_Or_More_Repetitions.py b/Regex/python/Matching_One_Or_More_Repetitions.py new file mode 100644 index 0000000..5257ff2 --- /dev/null +++ b/Regex/python/Matching_One_Or_More_Repetitions.py @@ -0,0 +1,5 @@ +Regex_Pattern = r'^\d+[A-Z]+[a-z]+$' # Do not delete 'r'. + +import re + +print(str(bool(re.search(Regex_Pattern, input()))).lower()) \ No newline at end of file diff --git a/Regex/python/Matching_X_Y_Repetitions.py b/Regex/python/Matching_X_Y_Repetitions.py new file mode 100644 index 0000000..a3ad167 --- /dev/null +++ b/Regex/python/Matching_X_Y_Repetitions.py @@ -0,0 +1,5 @@ +Regex_Pattern = r'^\d{1,2}[A-Za-z]{3,}\.{0,3}$' # Do not delete 'r'. + +import re + +print(str(bool(re.search(Regex_Pattern, input()))).lower()) \ No newline at end of file diff --git a/Regex/python/Matching_X_repetitions.py b/Regex/python/Matching_X_repetitions.py new file mode 100644 index 0000000..ae5b9b6 --- /dev/null +++ b/Regex/python/Matching_X_repetitions.py @@ -0,0 +1,5 @@ +Regex_Pattern = r'^[A-Za-z02468]{40}[\s13579]{5}$' # Do not delete 'r'. + +import re + +print(str(bool(re.search(Regex_Pattern, input()))).lower()) \ No newline at end of file diff --git a/Regex/python/Matching_Zero_Or_More_Repetitions.py b/Regex/python/Matching_Zero_Or_More_Repetitions.py new file mode 100644 index 0000000..dc1703b --- /dev/null +++ b/Regex/python/Matching_Zero_Or_More_Repetitions.py @@ -0,0 +1,5 @@ +Regex_Pattern = r'^\d\d+[a-z]*[A-Z]*$' # Do not delete 'r'. + +import re + +print(str(bool(re.search(Regex_Pattern, input()))).lower()) \ No newline at end of file