Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyRegLookAhead
#python 3.6.9 #PyRegLookAhead #this code is created by Rezaul Hoque on February 21,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 = '3 is greater than 2 but smaller than 4.' pick1= '\d+(?=\,*\s*is)' pick2= '\d+(?!\,*\s*is)' fits = re.finditer(pick1,a) for i in fits: print(i.group()) matches=re.finditer(pick2,a) for j in matches: print(j.group())
run
|
edit
|
history
|
help
0
Eje2_Python_201169275
PyBatScoreSOLID
Сумма цифр пятизначного числа
Game4
number factor memoised
iya
H
Faiha Lesson 3
aaa
(P3) Rok przestępny