řešení úkolů - regulární výrazy#62
Closed
DagyDee wants to merge 1 commit intoPyLadiesCZ-Brno:mainfrom
Closed
Conversation
řešení úkolů v sekci 'Regulární výrazy v Pythonu'
Contributor
Author
|
@ZelenyMartin prosím o kontrolu úkolů. |
ZelenyMartin
reviewed
May 6, 2025
| @@ -0,0 +1,10 @@ | |||
| import re | |||
|
|
|||
| regularni_vyraz = re.compile(r"\w+\.?\w+@\w+\.cz") | |||
Contributor
There was a problem hiding this comment.
Tady ten regexp bude vyžadovat minimálně 2 znaky před zavináčem (mezi kterými může nebo nemusí být tečka). Jinak super.
Contributor
Author
There was a problem hiding this comment.
@ZelenyMartin
Opravený regulární výraz: r"(\w+.)?\w+@\w+.cz"
Takhle je to OK?
ZelenyMartin
reviewed
May 6, 2025
|
|
||
| ip_adresa = input("Zadejte IP adresu: ") | ||
|
|
||
| rv = re.compile(r"([1-2]?\d?\d\.){3}[1-2]?\d?\d") |
Contributor
There was a problem hiding this comment.
Suggested change
| rv = re.compile(r"([1-2]?\d?\d\.){3}[1-2]?\d?\d") | |
| rv = re.compile(r"([12]?\d?\d\.){3}[12]?\d?\d") |
Mělo byt fungovat i takto. Celkově vynikající!
Contributor
|
Výborné řešení. Jen to musím zavřít, protože to nemůžu zamergovat do hlavního repa. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
řešení úkolů v sekci 'Regulární výrazy v Pythonu'