code / reg.py
jkushwaha's picture
Update reg.py
51b05b5 verified
raw
history blame contribute delete
297 Bytes
import re
def check_sentence(sentence):
# Define the pattern for the sentence starting with 'a-b-c' and ending with 'x-y-z'
pattern = r'^a-b-c.*x-y-z$'
# Use regular expression to match the pattern
if re.match(pattern, sentence):
return True
else:
return False