My dataframe:
pd.DataFrame({'module_num': ['Assignment Module 6 Due', 'Review of Module 2 Checklist', 'Welcome to Module 7 Chapter 25']})
I am new to regular expressions in python and I was hoping I could get the following output using regex and pandas:
pd.DataFrame({'module_num': ['Module 6', 'Module 2', 'Module 7']})
So, I am trying to match on the string "Module" and the number that comes after it. There is a white space in between Module and the number in every case.