Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyRegLookBehind
#python 3.6.9 #PyRegLookBehind #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 = r'(?<=than\s)\d+' pick2 = r'(?<!than\s)\d+' 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
StringManipulation
Bmi calculator dictionary
Insertion Sort
PythonSimpleBook1
Calc1
Max
Iam hungry
Find numbers with given sum of digits
ms 80
Hello