Download reg.py from jkushwaha/code: direct link, hf CLI and curl.
- Browser
- Download file 297 Bytes
-
https://huggingface.co/jkushwaha/code/resolve/main/reg.py
- Command line
-
hf download hf://jkushwaha/code/reg.py
-
curl -L -o reg.py https://huggingface.co/jkushwaha/code/resolve/main/reg.py
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 |