re.findall python returns only one match

26 Views Asked by At

I am relatively new to python just wanted to understand

import re
s=" the current process is well established by client"
re.findall(r"current process|current",s)

The output returns only "current process" and does not treat current separately. I wanted to get "current process" and "current". Not sure if I am doing anything incorrect.what is the alternative to achieve this if re.findall is not the right approach

I tried different combinations using word boundary, using re.X ,re.finditer etc but nothing seem to work

0

There are 0 best solutions below