0
WAP in python using regex to give all sequences of two lowercase letters joined by underscore
Input Aa_vccj_g Output a_v j_g Input a_b_c Output a_b b_c
2 Réponses
+ 1
Here you go
https://code.sololearn.com/crIx6FjwadzU/?ref=app
+ 1
if still interested
import re
string= input ()
pattern = r"(?=([a-z]_[a-z]))
out = re.findall(pattern, string)
if out:
print(out)
PS. @Vari93 you code works, but it is not regex due to for loop. sorry.