I've written the following regex to capture every word ending with "d":
suffix_reg_1 = re.findall(r"(\b\w+d(?=\s))", sample_list)
The regex itself seems to work fine in RegexBuddy (Python 3.8 flavour), but in Python my list remains empty when running above. Any idea why?
Originally I wrote this regex...
\b\w+d\b
which works fine in Python, but as soon as I add capturing groups...
(\b\w+)(d\b)
I have the same problem again:: empty list. Again, in RegexBuddy it works fine, even with capturing groups.