Delete comments
This commit is contained in:
parent
3ece132738
commit
54cb1d191f
@ -4,13 +4,10 @@ file_name: str = "simple"
|
||||
|
||||
|
||||
def find_hamlet_lines(text: str) -> list[str]:
|
||||
# Define the regular expression pattern
|
||||
pattern = re.compile(r"Hamlet", re.IGNORECASE)
|
||||
|
||||
# Split the text into lines
|
||||
lines = text.split("\n")
|
||||
|
||||
# Use the regular expression to find lines containing "Hamlet"
|
||||
hamlet_lines = [line for line in lines if re.search(pattern, line)]
|
||||
|
||||
return hamlet_lines
|
||||
|
@ -4,13 +4,10 @@ file_name: str = "simple"
|
||||
|
||||
|
||||
def find_pies_lines(text: str) -> list[str]:
|
||||
# Define the regular expression pattern
|
||||
pattern = re.compile(r"\bpies\b", re.IGNORECASE)
|
||||
|
||||
# Split the text into lines
|
||||
lines = text.split("\n")
|
||||
|
||||
# Use the regular expression to find lines containing "pies"
|
||||
pies_lines = [line for line in lines if re.search(pattern, line)]
|
||||
|
||||
return pies_lines
|
||||
|
@ -4,13 +4,10 @@ file_name: str = "simple"
|
||||
|
||||
|
||||
def find_dates_1900_to_1999(text):
|
||||
# Define the regular expression pattern
|
||||
pattern = re.compile(r"19\d{2} r\.", re.IGNORECASE)
|
||||
|
||||
# Split the text into lines
|
||||
lines = text.split("\n")
|
||||
|
||||
# Use the regular expression to find lines containing dates from 1900 to 1999
|
||||
date_lines = [line for line in lines if re.search(pattern, line)]
|
||||
|
||||
return date_lines
|
||||
|
Loading…
Reference in New Issue
Block a user