jkushwaha commited on
Commit
51b05b5
·
verified ·
1 Parent(s): 5857a49

Update reg.py

Browse files
Files changed (1) hide show
  1. reg.py +8 -4
reg.py CHANGED
@@ -1,6 +1,10 @@
1
  import re
2
 
3
- def find_matching_sentences(text):
4
- pattern = r'\b[aA]-[bB]-[cC].*?[xX]-[yY]-[zZ]\b'
5
- matching_sentences = re.findall(pattern, text)
6
- return matching_sentences
 
 
 
 
 
1
  import re
2
 
3
+ def check_sentence(sentence):
4
+ # Define the pattern for the sentence starting with 'a-b-c' and ending with 'x-y-z'
5
+ pattern = r'^a-b-c.*x-y-z$'
6
+ # Use regular expression to match the pattern
7
+ if re.match(pattern, sentence):
8
+ return True
9
+ else:
10
+ return False