Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyWordQuant
#python 3.6.9 #PyWordQuant #this code is created by Rezaul Hoque on February 14,2022; #contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; import re a = 'Today,February 14, is a special day.It’s not a holiday. Yet everyone loves and celebrates this day. Because it is Valentine’s day.In 2022, there are few colorful/colourful and festive programs offered by various organizations due to COVID restrictions.And 02-14-2022 ends after 23:59 pm! ' patterns = re.finditer(r'\bday\b', a) for pattern in patterns: print(pattern.group()) samples = re.finditer('\w*day',a) for sample in samples: print(sample) digits = re.finditer('\d+',a) for digit in digits: print(digit) spells = re.finditer('colou?rful',a) for spell in spells: print(spell) times= re.finditer('\d{2}:\d{2}',a) for time in times: print(time) dates = re.finditer('\d{1,2}-\d{1,2}-\d{4}',a) for date in dates: print(date)
run
|
edit
|
history
|
help
0
wrong update class
sensi
single inheritance
linked_lists_2
DuckTyping.py
HW Descending order
Pawan 1
shuru5
last 2 digit add
Lcm and hcf